From 29f3fe70aeb5f566864c7868f7c89483547e92b4 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 13 May 2014 14:42:20 +1000 Subject: Extantz calls love, and love calls LuaSL, and clean out the need for scripts to twiddle the Lua paths. --- src/extantz/build.lua | 2 +- src/extantz/extantz.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/extantz') diff --git a/src/extantz/build.lua b/src/extantz/build.lua index caca02f..1591e8a 100755 --- a/src/extantz/build.lua +++ b/src/extantz/build.lua @@ -15,7 +15,7 @@ end CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include -I../GuiLua' LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' -libs = libs .. ' -lIrrlicht -lGL -lbz2 -lGuiLua -lwinFang' +libs = libs .. ' -lIrrlicht -lGL -lbz2 -lGuiLua -lwinFang -lRunnr' removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', 'gears.o', 'ephysics_demo.o', 'Evas_3D_demo.o', '../../media/extantz.edj'}) removeFiles(dir, {'../../extantz', 'camera.o', 'files.o', 'scenri.o', 'woMan.o'}) diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index b422343..c077f44 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c @@ -1,3 +1,5 @@ +#include + #include "extantz.h" #include "SledjHamr.h" #include "LumbrJack.h" @@ -408,7 +410,7 @@ void overlay_add(globals *ourGlobals) EAPI_MAIN int elm_main(int argc, char **argv) { GLData *gld = NULL; - char buf[PATH_MAX]; + char buf[PATH_MAX * 2], *env; // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. /* Set the locale according to the system pref. @@ -428,6 +430,21 @@ EAPI_MAIN int elm_main(int argc, char **argv) logDom = loggingStartup("extantz", logDom); + // Add extras, so we can run test.lua later. + env = getenv("LUA_CPATH"); + if (!env) env = ""; + sprintf(buf, "%s;%s/src/GuiLua/?.so", env, elm_app_bin_dir_get()); + setenv("LUA_CPATH", buf, 1); + + env = getenv("LUA_PATH"); + if (!env) env = ""; + sprintf(buf, "%s;%s/src/GuiLua/?.lua", env, elm_app_bin_dir_get()); + setenv("LUA_PATH", buf, 1); + + sprintf(buf, "%s/love &", elm_app_bin_dir_get()); + system(buf); + sleep(1); + // Don't do this, we need to clean up other stuff to, so set a clean up function below. //elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); -- cgit v1.1