Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #define MEMSIZE 0x9000
  2. #include "..\lib\kolibri.h"
  3. #include "..\lib\strings.h"
  4. #include "..\lib\mem.h"
  5. #include "..\lib\file_system.h"
  6.  
  7.  
  8. void main()
  9. {  
  10.         dword dirbuf, fcount, filename, i;
  11.         dword dirbuf2, fcount2, filename2, j;
  12.         char cd_path[4096];
  13.         char install_path[4096];
  14.         signed int result;
  15.  
  16.         mem_Init();
  17.         GetDir(#dirbuf, #fcount, "/");
  18.  
  19.         for (i=0; i<fcount; i++)
  20.         {
  21.                 filename = i*304+dirbuf+72;
  22.                 if (!strstr(filename, "fd"))
  23.                 {
  24.                         strcpy(#cd_path, "/");
  25.                         strcat(#cd_path, filename);
  26.                         free(dirbuf2);
  27.                         GetDir(#dirbuf2, #fcount2, #cd_path);
  28.  
  29.                         for (j=0; j<fcount2; j++)
  30.                         {
  31.                                 filename2 = j*304+dirbuf2+72;
  32.                                 strcpy(#install_path, #cd_path);
  33.                                 strcat(#install_path, "/");
  34.                                 strcat(#install_path, filename2);
  35.                                 strcat(#install_path, "/installer.kex");
  36.                                 result = RunProgram(#install_path, NULL);
  37.                                 if (result>0) ExitProcess();
  38.                         }
  39.                 }
  40.         }
  41.         if (GetSystemLanguage()==4) notify("¥ ¬®£ã ­ ©â¨ installer.kex ­¨ ¢ ®¤­®¬ ª®à­¥ ¤¨áª ! ®¯à®¡ã©â¥ ­ ©â¨ ¨ § ¯ãáâ¨âì ¥£® ¢àãç­ãî.");
  42.         else notify("Can't find installer.kex at the root of all disks! Try to find and run it manually."w);
  43.         ExitProcess();
  44. }
  45.  
  46.  
  47. stop:
  48.