Started to add Lua support to AROS.
src/Makefile: link with lua. Note that I'm currently using an absolute path to include/lua which only exits on my machine until AROS has support for pkg-config. src/setup.h: added valid path to lua scripts. src/io.c: take colon into account when checking for last separator. src/factory.c: use luaL_newstate() instead of lua_open() because latter doesn't exist anymore in Lua-5.2. Note: that fix should be valid for all platforms. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1977 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
18886d86cb
commit
ce8fbe076d
@ -316,10 +316,12 @@ endif
|
|||||||
|
|
||||||
else
|
else
|
||||||
ifdef AROS32CROSS
|
ifdef AROS32CROSS
|
||||||
#cross compile an Aros 32 bit executable
|
#cross compile an AROS 32 bit executable
|
||||||
BIN = ../GrafX2
|
BIN = ../GrafX2
|
||||||
COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT)
|
COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) $(LUACOPT)
|
||||||
LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared
|
LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared $(LUALOPT)
|
||||||
|
LUACOPT = -I/home/mazze/projects/fullaros/aros-linux-i386-dbg/bin/linux-i386/AROS/Development/include/lua
|
||||||
|
LUALOPT = -llua
|
||||||
CC = i386-linux-aros-gcc
|
CC = i386-linux-aros-gcc
|
||||||
OBJDIR = ../obj/aros
|
OBJDIR = ../obj/aros
|
||||||
STRIP = strip --strip-unneeded --remove-section .comment
|
STRIP = strip --strip-unneeded --remove-section .comment
|
||||||
|
|||||||
@ -1593,7 +1593,11 @@ void Run_script(const char *script_subdirectory, const char *script_filename)
|
|||||||
Extract_path(buf,Last_run_script);
|
Extract_path(buf,Last_run_script);
|
||||||
chdir(buf);
|
chdir(buf);
|
||||||
|
|
||||||
|
#if defined(__AROS__)
|
||||||
|
L = luaL_newstate(); // lua_open() doesn't exist anymore in Lua-5.2
|
||||||
|
#else
|
||||||
L = lua_open();
|
L = lua_open();
|
||||||
|
#endif
|
||||||
|
|
||||||
strcpy(buf, "LUA_PATH=");
|
strcpy(buf, "LUA_PATH=");
|
||||||
strcat(buf, Data_directory);
|
strcat(buf, Data_directory);
|
||||||
|
|||||||
2
src/io.c
2
src/io.c
@ -172,6 +172,8 @@ char * Find_last_slash(const char * str)
|
|||||||
if (*str == PATH_SEPARATOR[0]
|
if (*str == PATH_SEPARATOR[0]
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|| *str == '/'
|
|| *str == '/'
|
||||||
|
#elif __AROS__
|
||||||
|
|| *str == ':'
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
position = str;
|
position = str;
|
||||||
|
|||||||
@ -73,6 +73,8 @@ void Set_config_directory(const char * program_dir, char * config_dir);
|
|||||||
/// Name of the subdirectory containing scripts
|
/// Name of the subdirectory containing scripts
|
||||||
#if defined (__MINT__)
|
#if defined (__MINT__)
|
||||||
#define SCRIPTS_SUBDIRECTORY "SCRIPTS"
|
#define SCRIPTS_SUBDIRECTORY "SCRIPTS"
|
||||||
|
#elif defined(__AROS__)
|
||||||
|
#define SCRIPTS_SUBDIRECTORY "share/grafx2/scripts"
|
||||||
#else
|
#else
|
||||||
#define SCRIPTS_SUBDIRECTORY "scripts"
|
#define SCRIPTS_SUBDIRECTORY "scripts"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user