From 8e9d933e47250613ac721ea72de8ab23dc44f2e9 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 6 Nov 2009 05:27:55 +0100 Subject: Adding Iup to lua-interface-light, and to the various default modules. --- Makefile.mingw32 | 4 +++- src/lua-interface.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.mingw32 b/Makefile.mingw32 index 7390d73..6b54ef3 100644 --- a/Makefile.mingw32 +++ b/Makefile.mingw32 @@ -39,6 +39,8 @@ LDFLAGS += $(LDFLAGS_BASIC) -Wl,--enable-auto-image-base -Wl,--export-dynamic -- LIBS += -L../gnuwin32/lib ../libreadline-static.a -lz.dll -lucl.dll -lwsock32 -lws2_32 ../pthreads-w32-2-8-0-release/libpthreadGC2.a +IUP_LIBS = -lole32 -lcomctl32 -lgdi32 -lcomdlg32 + vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src:../Baltisot/MSVC/iconv:../Baltisot/MSVC/regex vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src:../Baltisot/MSVC/iconv:../Baltisot/MSVC/regex vpath %.cpp ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src:../Baltisot/MSVC/iconv:../Baltisot/MSVC/regex @@ -231,7 +233,7 @@ lua-interface-light.exe: lua-interface-light.dll $(LUAINTERFACE_OBJECTS) $(LD) -o lua-interface-light.exe $(LUAINTERFACE_OBJECTS) ./lua-interface.a $(LDFLAGS) $(LIBS) lua-interface-light.dll: $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECTS) - $(LD) -shared -Wl,--output-def=lua-interface.def -Wl,--out-implib=lua-interface.a -o lua-interface.dll $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECTS) $(LIBS) $(LDFLAGS) + $(LD) -shared -Wl,--output-def=lua-interface.def -Wl,--out-implib=lua-interface.a -o lua-interface.dll $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECTS) $(LIBS) $(LDFLAGS) ../lua-modules-iup-win32/luaiup.a $(IUP_LIBS) touch lua-interface-light.dll lua-interface-light.o: lua-interface.cpp diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index e85eab1..b697e9c 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -77,6 +77,8 @@ extern void luatask_init(Lua * L) WEAK; extern void luaxml_init(Lua * L) WEAK; extern void luaosmesa_init(Lua * L) WEAK; extern void luacd_init(Lua * L) WEAK; +extern void luapsx_init(Lua * L) WEAK; +extern void luaiup_init(Lua * L) WEAK; } @@ -417,7 +419,11 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in #endif } else if ((filename == "luacd") && (luacd_init != NULL)) { luacd_init(L); + } else if ((filename == "luapsx") && (luapsx_init != NULL)) { + luapsx_init(L); #endif + } else if ((filename == "luaiup") && (luaiup_init != NULL)) { + luaiup_init(L); #endif } else { LuaLoadPlugin(filename, L); @@ -803,7 +809,11 @@ void autoload_exports(Lua * L) { #endif if (luacd_init) luacd_init(L); + if (luapsx_init) + luapsx_init(L); #endif + if (luaiup_init) + luaiup_init(L); #endif } -- cgit v1.2.3 From 011d229cc5da218c280d1cd8af998bfaad04e0bd Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 6 Nov 2009 20:38:08 +0100 Subject: Adding various resources and manifest files to enable XP look when using UI under mingw32. --- src/lua-interface.manifest | 22 ++++++++++++++++++++++ src/lua-interface.rc | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/lua.ico | Bin 0 -> 1078 bytes src/pen.cur | Bin 0 -> 326 bytes 4 files changed, 66 insertions(+) create mode 100644 src/lua-interface.manifest create mode 100644 src/lua-interface.rc create mode 100644 src/lua.ico create mode 100644 src/pen.cur diff --git a/src/lua-interface.manifest b/src/lua-interface.manifest new file mode 100644 index 0000000..af39578 --- /dev/null +++ b/src/lua-interface.manifest @@ -0,0 +1,22 @@ + + + +Iup Application + + + + + + diff --git a/src/lua-interface.rc b/src/lua-interface.rc new file mode 100644 index 0000000..5a8c1a3 --- /dev/null +++ b/src/lua-interface.rc @@ -0,0 +1,44 @@ +LUA_ICON ICON "lua.ico" + +1 VERSIONINFO + FILEVERSION 0,7,0,0 + PRODUCTVERSION 0,7,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "http://www.nobis-crew.org/lua-interface\0" + VALUE "CompanyName", "Nobis\0" + VALUE "FileDescription", "lua-interface\0" + VALUE "FileVersion", "0.7.0\0" + VALUE "LegalCopyright", "Copyright © 2003-2009 Nicolas ""Pixel"" Noble\0" + VALUE "OriginalFilename", "lua-interface.dll\0" + VALUE "ProductName", "lua-interface\0" + VALUE "ProductVersion", "0.7.0\0" + END + END +END + +CURSOR_PEN CURSOR "pen.cur" + +/* To avoid the inclusion of */ +#define WS_CHILD 0x40000000L +#define WS_VISIBLE 0x10000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define DS_3DLOOK 0x0004L +#define DS_CONTROL 0x0400L +#define SS_OWNERDRAW 0x0000000DL +#define WS_EX_STATICEDGE 0x00020000L + +#define IUP_PREVIEWCANVAS 3000 + +iupPreviewDlg DIALOG DISCARDABLE 0, 0, 250, 95 +STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE +END + +/* The following line will enable Windows XP Visual Styles */ +1 24 "lua-interface.manifest" diff --git a/src/lua.ico b/src/lua.ico new file mode 100644 index 0000000..ccbabc4 Binary files /dev/null and b/src/lua.ico differ diff --git a/src/pen.cur b/src/pen.cur new file mode 100644 index 0000000..5912b15 Binary files /dev/null and b/src/pen.cur differ -- cgit v1.2.3 From a6ad7a6bdf6ca49ec211ee3c429c4f58b59e4f3c Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 6 Nov 2009 21:53:50 +0100 Subject: Actually compiling these ressources in... --- Makefile.mingw32 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile.mingw32 b/Makefile.mingw32 index 9ef4853..1827667 100644 --- a/Makefile.mingw32 +++ b/Makefile.mingw32 @@ -4,12 +4,14 @@ CC = i386-mingw32-gcc CXX = i386-mingw32-g++ LD = i386-mingw32-g++ STRIP = i386-mingw32-strip --strip-unneeded +WINDRES = i386-mingw32-windres else ifeq ($(SYSTEM),MINGW32_NT-5.1) CC = gcc CXX = g++ LD = g++ -STRIP = strip +STRIP = strip --strip-unneeded +WINDRES = windres else DISTRIB=$(shell cat /etc/issue | cut -f 1 -d\ | head -1) ifeq ($(DISTRIB), CentOS) @@ -17,11 +19,13 @@ CC = i686-pc-mingw32-gcc CXX = i686-pc-mingw32-g++ LD = i686-pc-mingw32-g++ STRIP = i686-pc-mingw32-strip --strip-unneeded +WINDRES = i686-pc-mingw32-windres else CC = i586-mingw32msvc-gcc CXX = i586-mingw32msvc-g++ LD = i586-mingw32msvc-g++ STRIP = i586-mingw32msvc-strip --strip-unneeded +WINDRES = i586-mingw32msvc-windres endif endif endif @@ -239,11 +243,11 @@ luac.exe: $(LUAC_OBJECTS) lua-interface.dll: $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_MAIN_OBJECTS) $(LD) -shared -Wl,--output-def=lua-interface.def -Wl,--out-implib=lua-interface.a -o lua-interface.dll $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_MAIN_OBJECTS) $(LDFLAGS) $(LUAINTERFACE_LDFLAGS) $(LIBS) -lua-interface.exe: $(LUAINTERFACE_OBJECTS) - $(LD) -o lua-interface.exe $(LUAINTERFACE_OBJECTS) ./lua-interface.a $(LDFLAGS) $(LIBS) +lua-interface.exe: $(LUAINTERFACE_OBJECTS) lua-interface-res.o + $(LD) -o lua-interface.exe $(LUAINTERFACE_OBJECTS) ./lua-interface.a $(LDFLAGS) $(LIBS) lua-interface-res.o -lua-interface-light.exe: lua-interface-light.dll $(LUAINTERFACE_OBJECTS) - $(LD) -o lua-interface-light.exe $(LUAINTERFACE_OBJECTS) ./lua-interface.a $(LDFLAGS) $(LIBS) +lua-interface-light.exe: lua-interface-light.dll $(LUAINTERFACE_OBJECTS) lua-interface-res.o + $(LD) -o lua-interface-light.exe $(LUAINTERFACE_OBJECTS) ./lua-interface.a $(LDFLAGS) $(LIBS) lua-interface-res.o lua-interface-light.dll: $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECTS) $(LD) -shared -Wl,--output-def=lua-interface.def -Wl,--out-implib=lua-interface.a -o lua-interface.dll $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECTS) $(LIBS) $(LDFLAGS) ../lua-modules-iup-win32/luaiup.a $(IUP_LIBS) @@ -252,6 +256,9 @@ lua-interface-light.dll: $(LUAINTERFACE_DLL_OBJECTS) $(LUAINTERFACE_LIGHT_OBJECT lua-interface-light.o: lua-interface.cpp $(CC) $(CPPFLAGS) -c -o lua-interface-light.o src/lua-interface.cpp -DLUA_INTERFACE_LIGHT +lua-interface-res.o: src/lua-interface.rc src/lua-interface.manifest src/lua.ico src/pen.cur + $(WINDRES) -o lua-interface-res.o src/lua-interface.rc + clean: rm -f lua-interface.dll lua-interface.exe lua-interface-light.exe luac.exe *.o *.dep *.a *.def -- cgit v1.2.3