Subversion Repositories Kolibri OS

Rev

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

  1. #define MEMSIZE 731935 + 200200
  2. #include "..\lib\strings.h"
  3. #include "..\lib\file_system.h"
  4.  
  5. char app_name[] = "KingsBounty";
  6.  
  7. //file_listing.h must be generated using generate_file_listing.bat
  8. #include "file_listing.h"
  9.  
  10. :dword makepath(dword basic_path, relative_path)
  11. {
  12.         char absolute_path[4096];
  13.         strcpy(#absolute_path, basic_path);
  14.         strcat(#absolute_path, relative_path); 
  15.         return #absolute_path;
  16. }
  17.  
  18. void main()
  19. {
  20. if (dir_exists("/kolibrios")==false)
  21. die("'/kolibrios/ folder is not mounted!
  22. Please run APP+ on desktop.
  23. You must use ISO distro.'E");
  24.  
  25. CreateDir("/tmp0/1/DOS");
  26. CreateDir(sprintf(#param, "/tmp0/1/DOS/%s", #app_name));
  27.  
  28. if (EAX!=0) {
  29.         die("'/tmp0/1/ is not mounted!\nPlease run TMPDISK to add it.'E");
  30. }
  31.  
  32. CreateFile(sizeof(file0), #file0, makepath("/tmp0/1/DOS/", FILE_NAME_0));
  33.  
  34. notify(sprintf(#param, "'%s\nInstalled to /tmp0/1/DOS/\nEnjoy the game!'tO", #app_name));
  35. RunProgram("/sys/@open", sprintf(#param, "/tmp0/1/DOS/%s/PLAY.sh", #app_name));
  36.  
  37. ExitProcess();
  38. }
  39.  
  40. stop: