aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/extantz.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-13 14:42:20 +1000
committerDavid Walter Seikel2014-05-13 14:42:20 +1000
commit29f3fe70aeb5f566864c7868f7c89483547e92b4 (patch)
treec142966809d5b0d67104e12c8b7ed5d61417dab8 /src/extantz/extantz.c
parentOops, left this laying around, no longer needed. (diff)
downloadSledjHamr-29f3fe70aeb5f566864c7868f7c89483547e92b4.zip
SledjHamr-29f3fe70aeb5f566864c7868f7c89483547e92b4.tar.gz
SledjHamr-29f3fe70aeb5f566864c7868f7c89483547e92b4.tar.bz2
SledjHamr-29f3fe70aeb5f566864c7868f7c89483547e92b4.tar.xz
Extantz calls love, and love calls LuaSL, and clean out the need for scripts to twiddle the Lua paths.
Diffstat (limited to 'src/extantz/extantz.c')
-rw-r--r--src/extantz/extantz.c19
1 files changed, 18 insertions, 1 deletions
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 @@
1#include <unistd.h>
2
1#include "extantz.h" 3#include "extantz.h"
2#include "SledjHamr.h" 4#include "SledjHamr.h"
3#include "LumbrJack.h" 5#include "LumbrJack.h"
@@ -408,7 +410,7 @@ void overlay_add(globals *ourGlobals)
408EAPI_MAIN int elm_main(int argc, char **argv) 410EAPI_MAIN int elm_main(int argc, char **argv)
409{ 411{
410 GLData *gld = NULL; 412 GLData *gld = NULL;
411 char buf[PATH_MAX]; 413 char buf[PATH_MAX * 2], *env;
412// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. 414// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't.
413 415
414 /* Set the locale according to the system pref. 416 /* Set the locale according to the system pref.
@@ -428,6 +430,21 @@ EAPI_MAIN int elm_main(int argc, char **argv)
428 430
429 logDom = loggingStartup("extantz", logDom); 431 logDom = loggingStartup("extantz", logDom);
430 432
433 // Add extras, so we can run test.lua later.
434 env = getenv("LUA_CPATH");
435 if (!env) env = "";
436 sprintf(buf, "%s;%s/src/GuiLua/?.so", env, elm_app_bin_dir_get());
437 setenv("LUA_CPATH", buf, 1);
438
439 env = getenv("LUA_PATH");
440 if (!env) env = "";
441 sprintf(buf, "%s;%s/src/GuiLua/?.lua", env, elm_app_bin_dir_get());
442 setenv("LUA_PATH", buf, 1);
443
444 sprintf(buf, "%s/love &", elm_app_bin_dir_get());
445 system(buf);
446 sleep(1);
447
431 // Don't do this, we need to clean up other stuff to, so set a clean up function below. 448 // Don't do this, we need to clean up other stuff to, so set a clean up function below.
432 //elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 449 //elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
433 elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); 450 elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE);