Subversion Repositories Kolibri OS

Rev

Rev 7541 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * PIGEX - PIG Game extractor
  3.  * We need this app because PIG can not be run from CD-drive
  4. */
  5.  
  6. #define MEMSIZE 4096*5
  7.  
  8. #include "../lib/kolibri.h"
  9. #include "../lib/fs.h"
  10. #include "../lib/patterns/restart_process.h"
  11.  
  12. void main()
  13. {
  14.         int i;
  15.         CreateDir("/tmp0/1/pig");
  16.  
  17.         if (! file_exists("/tmp0/1/pig/pig")) {
  18.                 RunProgram("/sys/UNZ", "-o \"/tmp0/1/pig\" -h \"/kolibrios/games/pig/pig.zip\"");
  19.                 for (i = 0; i < 200; i++)
  20.                 {
  21.                         if (CheckProcessExists("UNZ")==false) break;
  22.                         pause(3);
  23.                 }              
  24.         }
  25.  
  26.         RunProgram("/tmp0/1/pig/pig", NULL);
  27. }
  28.  
  29.