diff options
author | David Walter Seikel | 2014-04-27 16:48:07 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-27 16:48:07 +1000 |
commit | 568c8829db2f886921c7592cadbadbf4241127b6 (patch) | |
tree | 0af400526db683fa4ff5fb18a7eb2f685795fd04 /src/LuaSL | |
parent | Added stuff cut and pasted from the new Evas_3d examples, but they are broken... (diff) | |
download | SledjHamr-568c8829db2f886921c7592cadbadbf4241127b6.zip SledjHamr-568c8829db2f886921c7592cadbadbf4241127b6.tar.gz SledjHamr-568c8829db2f886921c7592cadbadbf4241127b6.tar.bz2 SledjHamr-568c8829db2f886921c7592cadbadbf4241127b6.tar.xz |
Centralise the PACKAGE_* stuff, move our libraries to lib, and shuffle stuff to suit.
Diffstat (limited to 'src/LuaSL')
-rw-r--r-- | src/LuaSL/LuaSL_compile.c | 4 | ||||
-rw-r--r-- | src/LuaSL/LuaSL_test.c | 8 | ||||
-rwxr-xr-x | src/LuaSL/build.lua | 9 | ||||
-rwxr-xr-x | src/LuaSL/test.sh | 2 |
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 |
14 | end | 14 | end |
15 | 15 | ||
16 | |||
16 | removeFiles(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 | removeFiles(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. |
19 | runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y') | 20 | runCommand('lemon', dir, '../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y') |
20 | runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') | 21 | runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') |
21 | runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' LuaSL.edc ../../media/LuaSL.edj') | 22 | runCommand('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. | ||
26 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. bin_d .. '\\"' | ||
27 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. lib_d .. '\\"' | ||
28 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. data_d .. '\\"' | ||
29 | CFLAGS = CFLAGS .. ' -DPACKAGE_LOCALE_DIR=\\"' .. locale_d .. '\\"' | ||
30 | |||
22 | compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}) | 31 | compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_threads', 'LuaSL_utilities', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}) |
23 | compileFiles('LuaSL_test', dir, {'LuaSL_test', 'LuaSL_utilities'}) | 32 | compileFiles('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. |
6 | killall -KILL LuaSL | 6 | killall -KILL LuaSL |
7 | export LUA_PATH="$wd/../../libraries/?.lua" | 7 | export LUA_PATH="$wd/../../lib/?.lua" |
8 | 8 | ||
9 | case $@ in | 9 | case $@ in |
10 | 10 | ||