From c616d02cb6193e41ea6d0d1bbc98bc3b6c1b8614 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Mar 2016 23:43:36 +1000 Subject: Move executables to the bin directory. --- .gitignore | 8 ++++---- bin/unpacker.lua | 2 +- build.lua | 4 ++-- media/Irrlicht | 2 +- src/GuiLua/build.lua | 4 ++-- src/LuaSL/build.lua | 2 +- src/extantz/build.lua | 10 +++++----- src/extantz/extantz.c | 4 +++- src/libraries/build.lua | 4 ++-- src/love/build.lua | 6 +++--- src/love/love.c | 3 ++- test.sh | 5 +---- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 9117d23..1f90be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ /docs/SledjHamr/XMRE.txt -/extantz -/love -/LuaSL -/skang +/bin/extantz +/bin/love +/bin/LuaSL +/bin/skang /src/others/irrlicht-1.8.1/bin/Linux/01.HelloWorld /src/others/irrlicht-1.8.1/lib/Linux/libIrrlicht.a /src/others/irrlicht-1.8.1/source/Irrlicht/C3DSMeshFileLoader.d diff --git a/bin/unpacker.lua b/bin/unpacker.lua index c60ef30..e35c2dc 100755 --- a/bin/unpacker.lua +++ b/bin/unpacker.lua @@ -26,7 +26,7 @@ end --baseDir = workingDir --baseDir = string.gsub(baseDir, '(.*)/.-$', '%1') ---bin_d = baseDir .. '' +--bin_d = baseDir .. '/bin' --lib_d = baseDir .. '/lib' --data_d = baseDir .. '/media' --locale_d = baseDir .. '/locale' diff --git a/build.lua b/build.lua index 19168fd..bc32ad8 100755 --- a/build.lua +++ b/build.lua @@ -66,7 +66,7 @@ if 'number' == type(args) then end end -bin_d = baseDir +bin_d = baseDir .. '/bin' lib_d = baseDir .. '/lib' data_d = baseDir .. '/media' locale_d = baseDir .. '/locale' @@ -94,7 +94,7 @@ if 'nil' == type(args) then -- print('_______________ BUILDING Irrlicht _______________') -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. --- runCommand('Irrlicht','libraries/irrlicht-1.8.1/source/Irrlicht', 'make') +-- runCommand('Irrlicht','src/others/irrlicht-1.8.1/source/Irrlicht', 'make') buildSub('libraries', 'src/libraries') buildSub('LuaSL', 'src/LuaSL') buildSub('love', 'src/love') diff --git a/media/Irrlicht b/media/Irrlicht index cd9b2c2..e5d14cf 120000 --- a/media/Irrlicht +++ b/media/Irrlicht @@ -1 +1 @@ -../libraries/irrlicht-1.8.1/media \ No newline at end of file +../src/others/irrlicht-1.8.1/media \ No newline at end of file diff --git a/src/GuiLua/build.lua b/src/GuiLua/build.lua index c0215b5..f6e6d81 100755 --- a/src/GuiLua/build.lua +++ b/src/GuiLua/build.lua @@ -15,9 +15,9 @@ end LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS -removeFiles(dir, {'test_c.so', 'GuiLua.o', lib_d .. '/libGuiLua.so', '../../skang'}) +removeFiles(dir, {'test_c.so', 'GuiLua.o', lib_d .. '/libGuiLua.so', bin_d .. '/skang'}) runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c GuiLua.c') runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libGuiLua.so -o ' .. lib_d .. '/libGuiLua.so GuiLua.o') -runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o ../../skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs) +runCommand('C apps', dir, 'gcc ' .. CFLAGS .. ' -Wl,-export-dynamic -o ' .. bin_d .. '/skang skang.c ' .. LDFLAGS .. ' -lGuiLua ' .. libs) runCommand('C modules', dir, 'gcc ' .. CFLAGS .. ' -fPIC -shared -o test_c.so test_c.c') diff --git a/src/LuaSL/build.lua b/src/LuaSL/build.lua index 3a45e9b..418f13b 100755 --- a/src/LuaSL/build.lua +++ b/src/LuaSL/build.lua @@ -19,4 +19,4 @@ removeFiles(dir, {'*.output', '*.backup', 'LuaSL_lexer.h', 'LuaSL_lexer.c', 'Lua compileFiles('lemon', dir .. '/../others/lemon', {'lemon'}, '') runCommand('lemon', dir, '../others/lemon/lemon -qs -T../others/lemon/lempar.c LuaSL_lemon_yaccer.y') runCommand('flex', dir, 'flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l') -compileFiles('../../LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}, '') +compileFiles(bin_d .. '/LuaSL', dir, {'LuaSL_main', 'LuaSL_compile', 'LuaSL_lexer', 'LuaSL_lemon_yaccer'}, '') diff --git a/src/extantz/build.lua b/src/extantz/build.lua index abb449e..d094f74 100755 --- a/src/extantz/build.lua +++ b/src/extantz/build.lua @@ -19,13 +19,13 @@ end CFLAGS = CFLAGS .. ' -I/usr/X11R6/include -I../GuiLua' libs = libs .. ' -lephysics -lGuiLua' ---removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', '../../media/extantz.edj'}) -removeFiles(dir, {'../../media/extantz.edj'}) +--removeFiles(dir, {'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', data_d .. '/extantz.edj'}) +removeFiles(dir, {data_d .. '/extantz.edj'}) -runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc ../../media/extantz.edj') +runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc ' .. data_d .. '/extantz.edj') --runCommand('Irrlicht files', dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c crappisspuke.cpp -o crappisspuke.o ' .. LDFLAGS) --runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c CDemo.cpp -o CDemo.o ' .. LDFLAGS) --runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -ffast-math -c extantzCamera.cpp -o extantzCamera.o ' .. LDFLAGS) CFLAGS = CFLAGS .. ' -Wl,-export-dynamic' ---compileFiles('../../extantz', dir, {'gears', 'ephysics_demo', 'camera', 'files', 'scenri', 'woMan', 'extantz'}, 'crappisspuke.o CDemo.o extantzCamera.o') -compileFiles('../../extantz', dir, {'gears', 'ephysics_demo', 'camera', 'files', 'scenri', 'woMan', 'extantz'}, '') +--compileFiles(bin_d .. '/extantz', dir, {'gears', 'ephysics_demo', 'camera', 'files', 'scenri', 'woMan', 'extantz'}, 'crappisspuke.o CDemo.o extantzCamera.o') +compileFiles(bin_d .. '/extantz', dir, {'gears', 'ephysics_demo', 'camera', 'files', 'scenri', 'woMan', 'extantz'}, '') diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 159fcaf..1708a6c 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c @@ -538,6 +538,7 @@ int skangStep = 0; static Eina_Bool _makeSkang(void *data) { globals *ourGlobals = data; + char buf[PATH_MAX]; switch (skangStep++) { @@ -567,7 +568,8 @@ static Eina_Bool _makeSkang(void *data) #if USE_LOVE case 5 : // PD("About to try connecting to a love server."); - reachOut("love", "./love", "127.0.0.1", 8211 + 1, ourGlobals, (Ecore_Event_Handler_Cb) _add, /*(Ecore_Event_Handler_Cb) _data*/ NULL, (Ecore_Event_Handler_Cb) _del, clientParser, NULL); + snprintf(buf, sizeof(buf), "%s/love", prefix_bin_get()); + reachOut("love", buf, "127.0.0.1", 8211 + 1, ourGlobals, (Ecore_Event_Handler_Cb) _add, /*(Ecore_Event_Handler_Cb) _data*/ NULL, (Ecore_Event_Handler_Cb) _del, clientParser, NULL); break; #endif diff --git a/src/libraries/build.lua b/src/libraries/build.lua index d0c0b46..ceb7771 100755 --- a/src/libraries/build.lua +++ b/src/libraries/build.lua @@ -21,7 +21,7 @@ CFLAGS = CFLAGS .. ' -DPACKAGE_LOCALE_DIR=\\"' .. locale_d .. '\\"' LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS -removeFiles(dir, {'LumbrJack.o', lib_d .. '/libLumbrJack.so', 'Runnr.o', lib_d .. '/libRunnr.so', 'SledjHamr.o', lib_d .. '/libSledjHamr.so', '../../media/winFang.edj', 'winFang.o', lib_d .. '/libwinFang.so'}) +removeFiles(dir, {'LumbrJack.o', lib_d .. '/libLumbrJack.so', 'Runnr.o', lib_d .. '/libRunnr.so', 'SledjHamr.o', lib_d .. '/libSledjHamr.so', data_d .. '/winFang.edj', 'winFang.o', lib_d .. '/libwinFang.so'}) runCommand('C libraries', dir, 'gcc ' .. CFLAGS .. ' -fPIC -c LumbrJack.c') runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libLumbrJack.so -o ' .. lib_d .. '/libLumbrJack.so LumbrJack.o') @@ -33,6 +33,6 @@ runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libRunnr.so -o runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c SledjHamr.c') runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libSledjHamr.so -o ' .. lib_d .. '/libSledjHamr.so SledjHamr.o') -runCommand(nil, dir, 'edje_cc ' .. EDJE_FLAGS .. ' winFang.edc ../../media/winFang.edj') +runCommand(nil, dir, 'edje_cc ' .. EDJE_FLAGS .. ' winFang.edc ' .. data_d .. '/winFang.edj') runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -fPIC -c winFang.c') runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' -shared -Wl,-soname,libwinFang.so -o ' .. lib_d .. '/libwinFang.so winFang.o') diff --git a/src/love/build.lua b/src/love/build.lua index ff5bf7d..b5200b4 100755 --- a/src/love/build.lua +++ b/src/love/build.lua @@ -14,7 +14,7 @@ if 'nil' == type(dir) then end -removeFiles(dir, {'../../media/love.edj'}) +removeFiles(dir, {data_d .. '/love.edj'}) -runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' love.edc ../../media/love.edj') -compileFiles('../../love', dir, {'love'}, '') +runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' love.edc ' .. data_d .. '/love.edj') +compileFiles(bin_d .. '/love', dir, {'love'}, '') diff --git a/src/love/love.c b/src/love/love.c index 698726f..0c1a63d 100644 --- a/src/love/love.c +++ b/src/love/love.c @@ -666,7 +666,8 @@ int main(int argc, char **argv) // PD("About to try connecting to a LuaSL server."); // Try to connect to a local LuaSL server. - reachOut("LuaSL", "./LuaSL", "127.0.0.1", ourGlobals.port, &ourGlobals, (Ecore_Event_Handler_Cb) _addLuaSL, /*(Ecore_Event_Handler_Cb) _dataLuaSL*/ NULL, (Ecore_Event_Handler_Cb) _delLuaSL, LuaSLParser, NULL); + snprintf(buf, sizeof(buf), "%s/LuaSL", prefix_bin_get()); + reachOut("LuaSL", buf, "127.0.0.1", ourGlobals.port, &ourGlobals, (Ecore_Event_Handler_Cb) _addLuaSL, /*(Ecore_Event_Handler_Cb) _dataLuaSL*/ NULL, (Ecore_Event_Handler_Cb) _delLuaSL, LuaSLParser, NULL); // PD("Love is about to try creating a love server."); if (openArms("love", ourGlobals.address, ourGlobals.port + 1, &ourGlobals, (Ecore_Event_Handler_Cb) _addClient, NULL, (Ecore_Event_Handler_Cb) _delClient, clientParser, NULL)) diff --git a/test.sh b/test.sh index ed86835..96a50d6 100755 --- a/test.sh +++ b/test.sh @@ -4,13 +4,10 @@ reset wd=$(pwd) -./killem.sh -sleep 1 - ./build.lua || exit echo "_______________ TESTING extantz, love and LuaSL _______________" -./LuaSL & sleep 2 && ./love & sleep 1 && ./extantz & +bin/LuaSL & sleep 2 && bin/love & sleep 1 && bin/extantz & sleep 30 echo "_______________ TESTING GuiLua _______________" -- cgit v1.1