start portiont to kolibrios && нафиг xmake

Все тесты кроме Desktop.lua падают
все тесты сыпят ошибками об отсутвии pbfond.bmp и чето про разришение
This commit is contained in:
2025-04-12 18:18:43 +05:00
parent 6933a4363b
commit 3cee2d898c
5 changed files with 116 additions and 5 deletions

25
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,25 @@
{
"configurations": [
{
"name": "Release",
"includePath": [
"${workspaceFolder}/../lua/src",
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/newlib/libc/include",
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/PDCurses"
],
"defines": []
},
{
"name": "Debug",
"includePath": [
"${workspaceFolder}/../lua/src",
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/newlib/libc/include",
"${workspaceFolder}/../kolibrios/contrib/sdk/sources/PDCurses"
],
"defines": [
"NDEBUG"
]
}
],
"version": 4
}

8
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"recommendations": [
"sumneko.lua",
"ms-vscode.cpptools",
"streetsidesoftware.code-spell-checker-russian",
"streetsidesoftware.code-spell-checker"
]
}

35
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"editor.tabSize": 4,
"editor.insertSpaces": false,
"files.associations": {
"stdlib.h": "c"
},
"cSpell.words": [
"ksys",
"ksys_oskey_t",
"LUALIB_API",
"luaL_newlib",
"metatable",
"luaL_newmetatable",
"luaL_setmetatable",
"lua_createtable",
"luaL_setfuncs",
"luaL_checkinteger",
"luaL_checkstring",
"luaL_checkudata",
"lua_pushboolean",
"lua_pushinteger",
"lua_pushnumber",
"luaL_optinteger",
"lua_pushstring",
"lua_pushnil",
"lua_touserdata",
"lua_setfield",
"lua_getfield",
"lua_settop",
"lua_islightuserdata",
"luaL_checktype",
"LUA_TTABLE",
],
"C_Cpp.formatting": "disabled"
}

43
Makefile Normal file
View File

@@ -0,0 +1,43 @@
LUA_V = 54
CC=kos32-gcc
LD=kos32-ld
STRIP=kos32-strip
OBJCOPY=kos32-objcopy
STD=-std=gnu99
CFLAGS=$(SYSCFLAGS) -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(STD) $(MYCFLAGS)
LDFLAGS=$(SYSLDFLAGS) $(MYLDFLAGS)
LIBS=$(SYSLIBS) $(MYLIBS) $(TOOLCHAIN_PATH)/mingw32/lib/lua$(LUA_V).dll.a --start-group -lgcc -lc.dll -ldll -lcurses -lSDLn -lSDL_mixer -lsound --end-group
ifeq ($(OS), Windows_NT)
TOOLCHAIN_PATH=C:/MinGW/msys/1.0/home/autobuild/tools/win32
else
TOOLCHAIN_PATH=/home/autobuild/tools/win32
endif
KOLIBRIOS_REPO=$(abspath ../kolibrios)
SDK_DIR=$(KOLIBRIOS_REPO)/contrib/sdk
NewLib_DIR=$(SDK_DIR)/sources/newlib
PDCurses_DIR=$(SDK_DIR)/sources/PDCurses
SYSCFLAGS=-fno-ident -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -I$(NewLib_DIR)/libc/include -I$(abspath .)/../lua/src -I$(PDCurses_DIR)
SYSLDFLAGS=--image-base 0 -shared -T dll.lds --entry _DllStartup
SYSLIBS=-L $(SDK_DIR)/lib -L$(TOOLCHAIN_PATH)/lib -L$(TOOLCHAIN_PATH)/mingw32/lib
MYCFLAGS=
MYLDFLAGS=
MYLIBS=
MYOBJS=
ALL_O = src/core/curses/curses.o
ltui.dll: $(ALL_O)
$(LD) $(LDFLAGS) -o $@ $(ALL_O) $(LIBS)
$(STRIP) -S $@
clean:
rm -f $(ALL_O) ltui.dll
src/core/curses/curses.o: src/core/curses/curses.c

View File

@@ -598,23 +598,23 @@ static void lt_curses_register_constants(lua_State* lua)
LT_CURSES_CONST(BUTTON4_CLICKED) LT_CURSES_CONST(BUTTON4_CLICKED)
LT_CURSES_CONST(BUTTON4_DOUBLE_CLICKED) LT_CURSES_CONST(BUTTON4_DOUBLE_CLICKED)
LT_CURSES_CONST(BUTTON4_TRIPLE_CLICKED) LT_CURSES_CONST(BUTTON4_TRIPLE_CLICKED)
LT_CURSES_CONST(BUTTON_CTRL) LT_CURSES_CONST(BUTTON_CONTROL)
LT_CURSES_CONST(BUTTON_SHIFT) LT_CURSES_CONST(BUTTON_SHIFT)
LT_CURSES_CONST(BUTTON_ALT) LT_CURSES_CONST(BUTTON_ALT)
LT_CURSES_CONST(REPORT_MOUSE_POSITION) LT_CURSES_CONST(REPORT_MOUSE_POSITION)
LT_CURSES_CONST(ALL_MOUSE_EVENTS) LT_CURSES_CONST(ALL_MOUSE_EVENTS)
# if NCURSES_MOUSE_VERSION > 1 //# if NCURSES_MOUSE_VERSION > 1
LT_CURSES_CONST(BUTTON5_RELEASED) LT_CURSES_CONST(BUTTON5_RELEASED)
LT_CURSES_CONST(BUTTON5_PRESSED) LT_CURSES_CONST(BUTTON5_PRESSED)
LT_CURSES_CONST(BUTTON5_CLICKED) LT_CURSES_CONST(BUTTON5_CLICKED)
LT_CURSES_CONST(BUTTON5_DOUBLE_CLICKED) LT_CURSES_CONST(BUTTON5_DOUBLE_CLICKED)
LT_CURSES_CONST(BUTTON5_TRIPLE_CLICKED) LT_CURSES_CONST(BUTTON5_TRIPLE_CLICKED)
# else /*# else
LT_CURSES_CONST(BUTTON1_RESERVED_EVENT) LT_CURSES_CONST(BUTTON1_RESERVED_EVENT)
LT_CURSES_CONST(BUTTON2_RESERVED_EVENT) LT_CURSES_CONST(BUTTON2_RESERVED_EVENT)
LT_CURSES_CONST(BUTTON3_RESERVED_EVENT) LT_CURSES_CONST(BUTTON3_RESERVED_EVENT)
LT_CURSES_CONST(BUTTON4_RESERVED_EVENT) LT_CURSES_CONST(BUTTON4_RESERVED_EVENT)
# endif # endif*/
# endif # endif
#endif #endif
} }
@@ -663,7 +663,7 @@ static int lt_curses_stdscr(lua_State* lua)
static int lt_curses_getmouse(lua_State* lua) static int lt_curses_getmouse(lua_State* lua)
{ {
MEVENT e; MEVENT e;
if (getmouse(&e) == OK) if (nc_getmouse(&e) == OK)
{ {
lua_pushinteger(lua, e.bstate); lua_pushinteger(lua, e.bstate);
lua_pushinteger(lua, e.x); lua_pushinteger(lua, e.x);