auto-build games/xonix

git-svn-id: svn://kolibrios.org@5115 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2014-09-12 19:13:20 +00:00
parent d1289fac5e
commit 0f8b75bb05
10 changed files with 49 additions and 4 deletions

View File

@ -53,7 +53,6 @@ img_files = {
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
{"GAMES/CHECKERS", build_type .. "/games/checkers"},
{"GAMES/MEGAMAZE", build_type .. "/games/megamaze"},
{"GAMES/XONIX", build_type .. "/games/xonix"},
{"LIB/PIXLIB.OBJ", "common/lib/pixlib.obj"},
{"LIB/ICONV.OBJ", "common/lib/iconv.obj"},
{"LIB/NETCODE.OBJ", "common/lib/netcode.obj"},
@ -445,6 +444,7 @@ tup.append_table(img_files, {
{"MEDIA/AC97SND", PROGS .. "/media/ac97snd/ac97snd.bin"},
{"GAMES/KOSILKA", PROGS .. "/games/kosilka/kosilka"},
{"GAMES/RFORCES", PROGS .. "/games/rforces/trunk/rforces"},
{"GAMES/XONIX", PROGS .. "/games/xonix/trunk/xonix"},
})
tup.append_table(extra_files, {
{"kolibrios/games/fara/fara", PROGS .. "/games/fara/trunk/fara"},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,9 @@
if tup.getconfig("NO_MSVC") ~= "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_msvc.lua")
if tup.getconfig("LANG") == "ru"
then CFLAGS = CFLAGS .. " /DLANG=RUS"
else CFLAGS = CFLAGS .. " /DLANG=ENG"
end
compile_msvc{"*.cpp"}
link_msvc("xonix")

View File

@ -2,11 +2,40 @@
#define atexitBufferSize 32
// Autobuild uses FASM method for exe->kos,
// MENUET01 header should be present in EXE.
#ifdef AUTOBUILD
char kosExePath[1024];
char exeStack[16384];
// must be alphabetically first in the image
#pragma data_seg(".1seg")
extern "C" struct
{
char header[8];
int headerver;
void* entry;
void* i_end;
void* memsize;
void* stack;
void* params;
void* icon;
} header = {
{'M', 'E', 'N', 'U', 'E', 'T', '0', '1'},
1,
&crtStartUp,
0, // filled by doexe2.asm
0, // filled by doexe2.asm
exeStack + sizeof(exeStack),
NULL,
kosExePath
};
#pragma data_seg()
#else
char *kosExePath = NULL;
#endif
char pureCallMessage[] = "PURE function call!";
char *kosExePath = NULL;
//
void (__cdecl *atExitList[atexitBufferSize])();
int atExitFnNum = 0;
@ -809,6 +838,10 @@ __declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL };
//
void crtStartUp()
{
#ifdef AUTOBUILD
// linker will try to remove unused variables; force header to be included
header.header;
#endif
// âûçûâàåì èíèöèàëèçàòîðû ïî ñïèñêó, NULL'û èãíîðèðóåì
for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ )
{
@ -818,8 +851,10 @@ void crtStartUp()
}
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
rtlSrand( kos_GetSystemClock() );
#ifndef AUTOBUILD
// ïóòü ê ôàéëó ïðîöåññà
kosExePath = *((char **)0x20);
#endif
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ
kos_Main();
// âûõîä

View File

@ -95,8 +95,12 @@ struct PRINTK
Dword args[11];
};
#ifdef AUTOBUILD
extern char kosExePath[];
#else
//
extern char *kosExePath;
#endif
//
void crtStartUp();

View File

@ -1,3 +1,5 @@
#define RUS 1
#define ENG 2
#define LANG RUS
#ifndef LANG
#define LANG RUS
#endif