Subversion Repositories Kolibri OS

Rev

Rev 6999 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6999 Rev 7000
Line 1... Line 1...
1
#define MEMSIZE 731935 + 200200
1
#define MEMSIZE 731935 + 200200
2
#include "..\lib\strings.h"
2
#include "..\lib\strings.h"
3
#include "..\lib\file_system.h"
3
#include "..\lib\file_system.h"
Line -... Line 4...
-
 
4
 
-
 
5
char app_name[] = "KingsBounty";
4
 
6
 
5
//file_listing.h must be generated using generate_file_listing.bat
7
//file_listing.h must be generated using generate_file_listing.bat
Line 6... Line 8...
6
#include "file_listing.h"
8
#include "file_listing.h"
7
 
9
 
Line 19... Line 21...
19
		die(
21
	die(
20
			"'/kolibrios/ folder is not mounted!\nPlease run APP+ on desktop.\nYou must use ISO distro.'E");
22
		"'/kolibrios/ folder is not mounted!\nPlease run APP+ on desktop.\nYou must use ISO distro.'E");
21
	}
23
}
Line 22... Line 24...
22
 
24
 
23
	CreateDir("/tmp0/1/DOS");
25
CreateDir("/tmp0/1/DOS");
Line 24... Line 26...
24
	CreateDir("/tmp0/1/DOS/KingsBounty");
26
CreateDir(sprintf(#param, "/tmp0/1/DOS/%s", #app_name));
25
 
27
 
26
	if (EAX!=0) {
28
if (EAX!=0) {
Line 27... Line 29...
27
		die("'/tmp0/1/ is not mounted!\nPlease run TMPDISK to add it.'E");
29
	die("'/tmp0/1/ is not mounted!\nPlease run TMPDISK to add it.'E");
28
	}
30
}
-
 
31
 
29
 
32
WriteFile(sizeof(file0), #file0, makepath("/tmp0/1/DOS/", FILE_NAME_0));
-
 
33
WriteFile(sizeof(file1), #file1, makepath("/tmp0/1/DOS/", FILE_NAME_1));
-
 
34
#ifdef FILE_NAME_2
30
	WriteFile(sizeof(file0), #file0, makepath("/tmp0/1/DOS/", FILE_NAME_0));
35
WriteFile(sizeof(file2), #file2, makepath("/tmp0/1/DOS/", FILE_NAME_2));
-
 
36
#endif
-
 
37
#ifdef FILE_NAME_3
31
	WriteFile(sizeof(file1), #file1, makepath("/tmp0/1/DOS/", FILE_NAME_1));
38
WriteFile(sizeof(file3), #file3, makepath("/tmp0/1/DOS/", FILE_NAME_3));
-
 
39
#endif
-
 
40
#ifdef FILE_NAME_4
32
	WriteFile(sizeof(file2), #file2, makepath("/tmp0/1/DOS/", FILE_NAME_2));
41
WriteFile(sizeof(file4), #file4, makepath("/tmp0/1/DOS/", FILE_NAME_4));
-
 
42
#endif
-
 
43
#ifdef FILE_NAME_5
33
	WriteFile(sizeof(file3), #file3, makepath("/tmp0/1/DOS/", FILE_NAME_3));
44
WriteFile(sizeof(file5), #file5, makepath("/tmp0/1/DOS/", FILE_NAME_5));
-
 
45
#endif
-
 
46
#ifdef FILE_NAME_6
34
	WriteFile(sizeof(file4), #file4, makepath("/tmp0/1/DOS/", FILE_NAME_4));
47
WriteFile(sizeof(file6), #file6, makepath("/tmp0/1/DOS/", FILE_NAME_6));
-
 
48
#endif
-
 
49
#ifdef FILE_NAME_7 
35
	WriteFile(sizeof(file5), #file5, makepath("/tmp0/1/DOS/", FILE_NAME_5));
50
WriteFile(sizeof(file7), #file7, makepath("/tmp0/1/DOS/", FILE_NAME_7));
-
 
51
#endif
-
 
52
#ifdef FILE_NAME_8
36
	WriteFile(sizeof(file6), #file6, makepath("/tmp0/1/DOS/", FILE_NAME_6));
53
WriteFile(sizeof(file8), #file8, makepath("/tmp0/1/DOS/", FILE_NAME_8));
-
 
54
#endif
Line 37... Line 55...
37
	WriteFile(sizeof(file7), #file7, makepath("/tmp0/1/DOS/", FILE_NAME_7));
55
#ifdef FILE_NAME_9
38
	WriteFile(sizeof(file8), #file8, makepath("/tmp0/1/DOS/", FILE_NAME_8));
56
WriteFile(sizeof(file9), #file9, makepath("/tmp0/1/DOS/", FILE_NAME_9));
Line 39... Line 57...
39
	WriteFile(sizeof(file9), #file9, makepath("/tmp0/1/DOS/", FILE_NAME_9));
57
#endif
40
 
58
 
Line 41... Line 59...
41
	notify("'KingsBounty\nInstalled succesfull.\nEnjoy the game!'tO");
59
notify(sprintf(#param, "'%s\nInstalled to /tmp0/1/DOS/\nEnjoy the game!'tO", #app_name));
42
	RunProgram("/sys/@open", "/tmp0/1/DOS/KingsBounty/PLAY.sh");
60
RunProgram("/sys/@open", sprintf(#param, "/tmp0/1/DOS/%s/PLAY.sh", #app_name));