From 0694f69c9c2d379c08e7e8f3cde8b6cf6f003857 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Thu, 29 Oct 2009 22:50:34 +0000 Subject: [PATCH] trunk: Lua binding works on Windows. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1101 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- Makefile | 7 ++++--- doc/COMPILING.txt | 19 ++++++++++++++++--- doc/README-lua.txt | 24 ++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 doc/README-lua.txt diff --git a/Makefile b/Makefile index 3397ccf4..19c9be21 100644 --- a/Makefile +++ b/Makefile @@ -42,15 +42,16 @@ ifdef COMSPEC RMDIR = rmdir CP = cp BIN = grafx2.exe - COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb `sdl-config --cflags` $(TTFCOPT) $(JOYCOPT) - LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng + COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb `sdl-config --cflags` $(TTFCOPT) $(JOYCOPT) $(LUACOPT) + LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) CC = gcc OBJDIR = obj/win32 # Resources (icon) WINDRES = windres.exe PLATFORMOBJ = $(OBJDIR)/winres.o PLATFORM = win32 - PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll gfx2.ico $(TTFLIBS) #some misc files we have to add to the release archive under windows. + #some misc files we have to add to the release archive under windows. + PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll gfx2.ico $(TTFLIBS) ZIP = zip else diff --git a/doc/COMPILING.txt b/doc/COMPILING.txt index a6ea24be..65ff40cc 100644 --- a/doc/COMPILING.txt +++ b/doc/COMPILING.txt @@ -68,6 +68,11 @@ To compile a gp2x executable, type This will only work on an UNIXsystem (Linux or FreeBSD). == Windows == + +It is also possible to compile from linux, with this command : + make WIN32CROSS=1 +You will need the mingw cross-compiler, and all the librairies listed above. + Here are the resources used to build the Windows version: 4DOS @@ -141,6 +146,14 @@ SDL_ttf: SDL_ttf-2.0.9-win32.zip for DLLs: libfreetype-6.dll, SDL_ttf.dll, zlib1.dll SDL_ttf-2.0.9.tar.gz -It is also possible to compile from linux, with this command : - make WIN32CROSS=1 -You will need the mingw cross-compiler, and all the librairies listed above. +Lua: + (optional) + http://www.lua.org/ftp/lua-5.1.4.tar.gz + Uncompress in temporary directory + Use sh shell + make mingw + (make install doesn't work, even with prefix) + Copy luaconf.h, lualib.h, lua.h, lauxlib.h to c:\msys\mingw\include\lua5.1 + Copy liblua.a to c:\msys\mingw\lib RENAMED AS liblua5.1.a + Copy lua51.dll to c:\msys\mingw\bin + diff --git a/doc/README-lua.txt b/doc/README-lua.txt new file mode 100644 index 00000000..2d8a0b44 --- /dev/null +++ b/doc/README-lua.txt @@ -0,0 +1,24 @@ +The Windows distribution of Grafx2 is compiled and statically linked with +Lua v5.1.4 + +Lua is licensed with the MIT license: + +Copyright © 1994-2008 Lua.org, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.