trunk: Lua binding works on Windows.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1101 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-10-29 22:50:34 +00:00
parent b0aa1dcbab
commit 0694f69c9c
3 changed files with 44 additions and 6 deletions

View File

@ -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

View File

@ -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

24
doc/README-lua.txt Normal file
View File

@ -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.