app_installer update

git-svn-id: svn://kolibrios.org@7000 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-09-20 12:51:50 +00:00
parent fa97d76abb
commit 1dff355a6b
2 changed files with 40 additions and 43 deletions

View File

@ -1,21 +0,0 @@
//FIle listing generated by BAT script
#define FILE_NAME_0 "KingsBounty/256.CC\0"
dword file0 = FROM FILE_NAME_0;
#define FILE_NAME_1 "KingsBounty/416.CC\0"
dword file1 = FROM FILE_NAME_1;
#define FILE_NAME_2 "KingsBounty/A.DAT\0"
dword file2 = FROM FILE_NAME_2;
#define FILE_NAME_3 "KingsBounty/ANDELOCK.DAT\0"
dword file3 = FROM FILE_NAME_3;
#define FILE_NAME_4 "KingsBounty/ANDREAS.DAT\0"
dword file4 = FROM FILE_NAME_4;
#define FILE_NAME_5 "KingsBounty/ANDY_OG_.DAT\0"
dword file5 = FROM FILE_NAME_5;
#define FILE_NAME_6 "KingsBounty/BENT.DAT\0"
dword file6 = FROM FILE_NAME_6;
#define FILE_NAME_7 "KingsBounty/E.DAT\0"
dword file7 = FROM FILE_NAME_7;
#define FILE_NAME_8 "KingsBounty/KB.EXE\0"
dword file8 = FROM FILE_NAME_8;
#define FILE_NAME_9 "KingsBounty/PLAY.sh\0"
dword file9 = FROM FILE_NAME_9;

View File

@ -2,6 +2,8 @@
#include "..\lib\strings.h"
#include "..\lib\file_system.h"
char app_name[] = "KingsBounty";
//file_listing.h must be generated using generate_file_listing.bat
#include "file_listing.h"
@ -15,33 +17,49 @@
void main()
{
if (dir_exists("/kolibrios")==false) {
die(
"'/kolibrios/ folder is not mounted!\nPlease run APP+ on desktop.\nYou must use ISO distro.'E");
}
if (dir_exists("/kolibrios")==false) {
die(
"'/kolibrios/ folder is not mounted!\nPlease run APP+ on desktop.\nYou must use ISO distro.'E");
}
CreateDir("/tmp0/1/DOS");
CreateDir("/tmp0/1/DOS/KingsBounty");
CreateDir("/tmp0/1/DOS");
CreateDir(sprintf(#param, "/tmp0/1/DOS/%s", #app_name));
if (EAX!=0) {
die("'/tmp0/1/ is not mounted!\nPlease run TMPDISK to add it.'E");
}
if (EAX!=0) {
die("'/tmp0/1/ is not mounted!\nPlease run TMPDISK to add it.'E");
}
WriteFile(sizeof(file0), #file0, makepath("/tmp0/1/DOS/", FILE_NAME_0));
WriteFile(sizeof(file1), #file1, makepath("/tmp0/1/DOS/", FILE_NAME_1));
WriteFile(sizeof(file2), #file2, makepath("/tmp0/1/DOS/", FILE_NAME_2));
WriteFile(sizeof(file3), #file3, makepath("/tmp0/1/DOS/", FILE_NAME_3));
WriteFile(sizeof(file4), #file4, makepath("/tmp0/1/DOS/", FILE_NAME_4));
WriteFile(sizeof(file5), #file5, makepath("/tmp0/1/DOS/", FILE_NAME_5));
WriteFile(sizeof(file6), #file6, makepath("/tmp0/1/DOS/", FILE_NAME_6));
WriteFile(sizeof(file7), #file7, makepath("/tmp0/1/DOS/", FILE_NAME_7));
WriteFile(sizeof(file8), #file8, makepath("/tmp0/1/DOS/", FILE_NAME_8));
WriteFile(sizeof(file9), #file9, makepath("/tmp0/1/DOS/", FILE_NAME_9));
WriteFile(sizeof(file0), #file0, makepath("/tmp0/1/DOS/", FILE_NAME_0));
WriteFile(sizeof(file1), #file1, makepath("/tmp0/1/DOS/", FILE_NAME_1));
#ifdef FILE_NAME_2
WriteFile(sizeof(file2), #file2, makepath("/tmp0/1/DOS/", FILE_NAME_2));
#endif
#ifdef FILE_NAME_3
WriteFile(sizeof(file3), #file3, makepath("/tmp0/1/DOS/", FILE_NAME_3));
#endif
#ifdef FILE_NAME_4
WriteFile(sizeof(file4), #file4, makepath("/tmp0/1/DOS/", FILE_NAME_4));
#endif
#ifdef FILE_NAME_5
WriteFile(sizeof(file5), #file5, makepath("/tmp0/1/DOS/", FILE_NAME_5));
#endif
#ifdef FILE_NAME_6
WriteFile(sizeof(file6), #file6, makepath("/tmp0/1/DOS/", FILE_NAME_6));
#endif
#ifdef FILE_NAME_7
WriteFile(sizeof(file7), #file7, makepath("/tmp0/1/DOS/", FILE_NAME_7));
#endif
#ifdef FILE_NAME_8
WriteFile(sizeof(file8), #file8, makepath("/tmp0/1/DOS/", FILE_NAME_8));
#endif
#ifdef FILE_NAME_9
WriteFile(sizeof(file9), #file9, makepath("/tmp0/1/DOS/", FILE_NAME_9));
#endif
notify("'KingsBounty\nInstalled succesfull.\nEnjoy the game!'tO");
RunProgram("/sys/@open", "/tmp0/1/DOS/KingsBounty/PLAY.sh");
notify(sprintf(#param, "'%s\nInstalled to /tmp0/1/DOS/\nEnjoy the game!'tO", #app_name));
RunProgram("/sys/@open", sprintf(#param, "/tmp0/1/DOS/%s/PLAY.sh", #app_name));
ExitProcess();
ExitProcess();
}
stop: