aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'src/LuaSL')
-rw-r--r--src/LuaSL/LuaSL_compile.c4
-rw-r--r--src/LuaSL/LuaSL_test.c8
-rwxr-xr-xsrc/LuaSL/build.lua9
-rwxr-xr-xsrc/LuaSL/test.sh2
4 files changed, 16 insertions, 7 deletions
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c
index 771888e..f32e0c0 100644
--- a/src/LuaSL/LuaSL_compile.c
+++ b/src/LuaSL/LuaSL_compile.c
@@ -2119,9 +2119,9 @@ boolean compilerSetup(gameGlobals *ourGlobals)
2119 } 2119 }
2120 2120
2121 // Compile the constants. 2121 // Compile the constants.
2122 snprintf(buf, sizeof(buf), "lua -e 'require(\"LSL\").gimmeLSL()' > %s/libraries/constants.lsl", PACKAGE_DATA_DIR); 2122 snprintf(buf, sizeof(buf), "lua -e 'require(\"LSL\").gimmeLSL()' > %s/constants.lsl", PACKAGE_LIB_DIR);
2123 system(buf); 2123 system(buf);
2124 snprintf(buf, sizeof(buf), "%s/libraries/constants.lsl", PACKAGE_DATA_DIR); 2124 snprintf(buf, sizeof(buf), "%s/constants.lsl", PACKAGE_LIB_DIR);
2125 compileLSL(ourGlobals, NULL, "FAKE_SID", buf, TRUE); 2125 compileLSL(ourGlobals, NULL, "FAKE_SID", buf, TRUE);
2126 2126
2127 return TRUE; 2127 return TRUE;
diff --git a/src/LuaSL/LuaSL_test.c b/src/LuaSL/LuaSL_test.c
index 58d6225..27b9626 100644
--- a/src/LuaSL/LuaSL_test.c
+++ b/src/LuaSL/LuaSL_test.c
@@ -147,7 +147,7 @@ static Eina_Bool _add(void *data, int type __UNUSED__, Ecore_Con_Event_Server_Ad
147 147
148 ourGlobals->server = ev->server; 148 ourGlobals->server = ev->server;
149 gettimeofday(&startTime, NULL); 149 gettimeofday(&startTime, NULL);
150 snprintf(buf, sizeof(buf), "%s/media/Test sim/objects", PACKAGE_DATA_DIR); 150 snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR);
151 eina_file_dir_list(buf, EINA_TRUE, dirList_compile, ourGlobals); 151 eina_file_dir_list(buf, EINA_TRUE, dirList_compile, ourGlobals);
152 // Wait awhile, then start sending events for testing. 152 // Wait awhile, then start sending events for testing.
153 ecore_timer_add(0.5, _timer_cb, ourGlobals); 153 ecore_timer_add(0.5, _timer_cb, ourGlobals);
@@ -392,7 +392,7 @@ int main(int argc, char **argv)
392 evas_object_focus_set(ourGlobals.bg, EINA_TRUE); 392 evas_object_focus_set(ourGlobals.bg, EINA_TRUE);
393 393
394 ourGlobals.edje = edje_object_add(ourGlobals.canvas); 394 ourGlobals.edje = edje_object_add(ourGlobals.canvas);
395 snprintf(buf, sizeof(buf), "%s/media/%s.edj", PACKAGE_DATA_DIR, "LuaSL"); 395 snprintf(buf, sizeof(buf), "%s/%s.edj", PACKAGE_DATA_DIR, "LuaSL");
396 if (!edje_object_file_set(ourGlobals.edje, buf, group)) 396 if (!edje_object_file_set(ourGlobals.edje, buf, group))
397 { 397 {
398 int err = edje_object_load_error_get(ourGlobals.edje); 398 int err = edje_object_load_error_get(ourGlobals.edje);
@@ -409,7 +409,7 @@ int main(int argc, char **argv)
409 evas_object_resize(ourGlobals.edje, WIDTH, HEIGHT); 409 evas_object_resize(ourGlobals.edje, WIDTH, HEIGHT);
410 evas_object_show(ourGlobals.edje); 410 evas_object_show(ourGlobals.edje);
411 411
412 snprintf(buf, sizeof(buf), "%s/media/bubble_sh.png", PACKAGE_DATA_DIR); 412 snprintf(buf, sizeof(buf), "%s/bubble_sh.png", PACKAGE_DATA_DIR);
413 for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) 413 for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++)
414 { 414 {
415 sh = evas_object_image_filled_add(ourGlobals.canvas); 415 sh = evas_object_image_filled_add(ourGlobals.canvas);
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
419 evas_object_data_set(ourGlobals.bg, names[(i * 2) + 1], sh); 419 evas_object_data_set(ourGlobals.bg, names[(i * 2) + 1], sh);
420 } 420 }
421 421
422 snprintf(buf, sizeof(buf), "%s/media/bubble.png", PACKAGE_DATA_DIR); 422 snprintf(buf, sizeof(buf), "%s/bubble.png", PACKAGE_DATA_DIR);
423 for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++) 423 for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++)
424 { 424 {
425 bub = evas_object_image_filled_add(ourGlobals.canvas); 425 bub = evas_object_image_filled_add(ourGlobals.canvas);
diff --git a/src/LuaSL/build.lua b/src/LuaSL/build.lua
index f86715c..6b34145 100755
--- a/src/LuaSL/build.lua
+++ b/src/LuaSL/build.lua
@@ -13,11 +13,20 @@ if 'nil' == type(dir) then
13 dir = workingDir 13 dir = workingDir
14end 14end
15 15
16
16removeFiles(dir, {'../../LuaSL', '*.o', '*.output', '*.backup', '../../media/LuaSL.edj', 'LuaSL_lexer.h', 'LuaSL_lexer.c', 'LuaSL_lemon_yaccer.h', 'LuaSL_lemon_yaccer.c', 'LuaSL_lemon_yaccer.out'}) 17removeFiles(dir, {'../../LuaSL', '*.o', '*.output', '*.backup', '../../media/LuaSL.edj', 'LuaSL_lexer.h', 'LuaSL_lexer.c', 'LuaSL_lemon_yaccer.h', 'LuaSL_lemon_yaccer.c', 'LuaSL_lemon_yaccer.out'})
17 18
18-- Run lemon first, flex depends on it to define the symbol values. 19-- Run lemon first, flex depends on it to define the symbol values.
19runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y') 20runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y')
20runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') 21runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l')
21runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' LuaSL.edc ../../media/LuaSL.edj') 22runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' LuaSL.edc ../../media/LuaSL.edj')
23
24-- While SledHamr.c does this, we can't use that here, coz LuaSL is not an Elm app.
25-- Neither is LuaSL_test actually.
26CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. bin_d .. '\\"'
27CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. lib_d .. '\\"'
28CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. data_d .. '\\"'
29CFLAGS = CFLAGS .. ' -DPACKAGE_LOCALE_DIR=\\"' .. locale_d .. '\\"'
30
22compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}) 31compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'})
23compileFiles('LuaSL_test', dir, {'LuaSL_test', 'LuaSL_utilities'}) 32compileFiles('LuaSL_test', dir, {'LuaSL_test', 'LuaSL_utilities'})
diff --git a/src/LuaSL/test.sh b/src/LuaSL/test.sh
index 1c26ade..435c5e2 100755
--- a/src/LuaSL/test.sh
+++ b/src/LuaSL/test.sh
@@ -4,7 +4,7 @@ wd=$(pwd)
4 4
5# Kill any left overs. 5# Kill any left overs.
6killall -KILL LuaSL 6killall -KILL LuaSL
7export LUA_PATH="$wd/../../libraries/?.lua" 7export LUA_PATH="$wd/../../lib/?.lua"
8 8
9case $@ in 9case $@ in
10 10