diff --git a/compile b/compile index 0d66b27b74e8170de91d9a8bcbc6954a2d44ddf4..ae11f96ba8210c56dce4bea35d1e36977ed7f29b 100755 --- a/compile +++ b/compile @@ -5,22 +5,18 @@ COMMIT=$(git rev-list HEAD --count) sed -i "s/COMMIT/$COMMIT/" ./src/init/storyInit.tw -# Will add all *.tw files to StoryIncludes. +# Run sanity check. ./sanityCheck -rm -f src/config/start.tw -cp src/config/start.tw.proto start.tw.tmp -find src -name '*.tw' -print >>start.tw.tmp -mv start.tw.tmp src/config/start.tw HASH=`git log -n1 |grep commit | sed 's/commit //'` if [ $(uname -m) = "x86_64" ] then echo "x64 arch" - ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod.html src/config/start.tw + ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod.html src/ else echo "x86 arch" - ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod.html src/config/start.tw + ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod.html src/ fi #Make the output prettier, replacing \t with a tab and \n with a newline @@ -28,5 +24,3 @@ sed -i -e '/^.*<div id="store-area".*$/s/\\t/\t/g' -e '/^.*<div id="store-area". # Revert ./src/init/storyInit.tw for next compilation git checkout -- ./src/init/storyInit.tw - -rm -f src/config/start.tw diff --git a/compile-git b/compile-git index 91cca996e1caf83866e83180afde68511f4cb9dd..5d33f0a2be526a421c7cbaa1e3f5c3fca7d97064 100755 --- a/compile-git +++ b/compile-git @@ -1,26 +1,20 @@ #!/bin/bash -# Will add all *.tw files to StoryIncludes. +# Run sanity check. ./sanityCheck -rm -f src/config/start.tw -cp src/config/start.tw.proto start.tw.tmp -find src -name '*.tw' -print >>start.tw.tmp -mv start.tw.tmp src/config/start.tw HASH=`git log -n1 |grep -m1 commit | sed 's/commit //'` if [ $(uname -m) = "x86_64" ] then echo "x64 arch" - ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod_$HASH.html src/config/start.tw + ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod_$HASH.html src/ else echo "x86 arch" - ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod_$HASH.html src/config/start.tw + ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod_$HASH.html src/ fi #Make the output prettier, replacing \t with a tab and \n with a newline sed -i -e '/^<div id="store-area".*$/s/\\t/\t/g' -e '/^<div id="store-area".*$/s/\\n/\n/g' bin/FC_pregmod_$HASH.html -rm -f src/config/start.tw - echo "FC_pregmod_$HASH.html" compilation finished. diff --git a/compile.bat b/compile.bat index 3ef0b723fc8e988968672ceb9ab617adc7e26087..d3ece54d2d21858f66577f80092a201e24df1d02 100644 --- a/compile.bat +++ b/compile.bat @@ -1,18 +1,15 @@ @echo off :: Free Cities Basic Compiler - Windows -:: Will add all *.tw files to StoryIncludes. -del src\config\start.tw -copy src\config\start.tw.proto start.tw.tmp >nul ->>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F) -move start.tw.tmp src\config\start.tw >nul +:: Set working directory +pushd %~dp0 :: Run the appropriate compiler for the user's CPU architecture. if %PROCESSOR_ARCHITECTURE% == AMD64 ( - CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" + CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src" ) else ( - CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" + CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src" ) -del src\config\start.tw +popd ECHO Done diff --git a/compile_debug+sanityCheck.bat b/compile_debug+sanityCheck.bat index 6ae0665ccd0a4dd98a702ceb5c13bc3e0c08a6ca..7e73de714b767c764d92de761b7cc9008e51f8d0 100644 --- a/compile_debug+sanityCheck.bat +++ b/compile_debug+sanityCheck.bat @@ -1,6 +1,9 @@ @echo off :: Free Cities Basic Compiler - Windows +:: Set working directory +pushd %~dp0 + :: See if we can find a git installation setlocal enabledelayedexpansion @@ -21,18 +24,8 @@ if %GITFOUND% == yes ( bash --login -c ./sanityCheck ) -:: Will add all *.tw files to StoryIncludes. -del src\config\start.tw -copy src\config\start.tw.proto start.tw.tmp >nul ->>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F) -move start.tw.tmp src\config\start.tw >nul - -:: Run the appropriate compiler for the user's CPU architecture. -if %PROCESSOR_ARCHITECTURE% == AMD64 ( - CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" -) else ( - CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" -) +:: Compile the game +call "%~dp0compile.bat" if %GITFOUND% == yes ( :: Make the output prettier, replacing \t with a tab and \n with a newline @@ -42,6 +35,5 @@ if %GITFOUND% == yes ( git checkout -- ./src/init/storyInit.tw ) -del src\config\start.tw -ECHO Done +popd PAUSE diff --git a/compile_debug.bat b/compile_debug.bat index b5d519c99c701cb95ae4698f7ff6508ccd0a1e6e..233abac8457a2955794e1231c48a4bdcf4301b34 100644 --- a/compile_debug.bat +++ b/compile_debug.bat @@ -1,19 +1,11 @@ @echo off :: Free Cities Basic Compiler - Windows -:: Will add all *.tw files to StoryIncludes. -del src\config\start.tw -copy src\config\start.tw.proto start.tw.tmp >nul ->>start.tw.tmp (for /r "src" %%F in (*.tw) do echo %%F) -move start.tw.tmp src\config\start.tw >nul +:: Set working directory +pushd %~dp0 -:: Run the appropriate compiler for the user's CPU architecture. -if %PROCESSOR_ARCHITECTURE% == AMD64 ( - CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" -) else ( - CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src\config\start.tw" -) +:: Compile the game +call "%~dp0compile.bat" -del src\config\start.tw -ECHO Done +popd PAUSE diff --git a/devTools/tweeGo/targets/sugarcube-2/LICENSE b/devTools/tweeGo/storyFormats/sugarcube-2/LICENSE similarity index 100% rename from devTools/tweeGo/targets/sugarcube-2/LICENSE rename to devTools/tweeGo/storyFormats/sugarcube-2/LICENSE diff --git a/devTools/tweeGo/targets/sugarcube-2/header.html b/devTools/tweeGo/storyFormats/sugarcube-2/header.html similarity index 100% rename from devTools/tweeGo/targets/sugarcube-2/header.html rename to devTools/tweeGo/storyFormats/sugarcube-2/header.html diff --git a/devTools/tweeGo/targets/sugarcube-2/sugarcube-2.py b/devTools/tweeGo/storyFormats/sugarcube-2/sugarcube-2.py similarity index 100% rename from devTools/tweeGo/targets/sugarcube-2/sugarcube-2.py rename to devTools/tweeGo/storyFormats/sugarcube-2/sugarcube-2.py diff --git a/devTools/tweeGo/tweego_nix64 b/devTools/tweeGo/tweego_nix64 index d7c466ef3103d61dd6d9ac4a47d38e3dc278003d..94f443ac19b91e62b6e737b7241d7186e3fe74f2 100755 Binary files a/devTools/tweeGo/tweego_nix64 and b/devTools/tweeGo/tweego_nix64 differ diff --git a/devTools/tweeGo/tweego_nix86 b/devTools/tweeGo/tweego_nix86 index c91c3abca782b8360596c23210b087f4eb463b3f..d10ae3832fb040a55b84cc1723d1aafd38b37ea4 100755 Binary files a/devTools/tweeGo/tweego_nix86 and b/devTools/tweeGo/tweego_nix86 differ diff --git a/devTools/tweeGo/tweego_osx64 b/devTools/tweeGo/tweego_osx64 index eeb7546c9016ca01b95cb9d35f16316ad22892c1..1d5a6e2d74cb15a3a80db2adaee9753de2f488c9 100644 Binary files a/devTools/tweeGo/tweego_osx64 and b/devTools/tweeGo/tweego_osx64 differ diff --git a/devTools/tweeGo/tweego_osx86 b/devTools/tweeGo/tweego_osx86 index 72adf92cce305e270afe31564331525ebd4bd5e0..96581841a4c2375d9b078b3e7ceb58b5e0aae772 100644 Binary files a/devTools/tweeGo/tweego_osx86 and b/devTools/tweeGo/tweego_osx86 differ diff --git a/devTools/tweeGo/tweego_win64.exe b/devTools/tweeGo/tweego_win64.exe index ddd2071c3418242840a3ab1f8df990bcb51e6057..c51755eb18b38304501eb7ac89a185bc12d83bd2 100755 Binary files a/devTools/tweeGo/tweego_win64.exe and b/devTools/tweeGo/tweego_win64.exe differ diff --git a/devTools/tweeGo/tweego_win86.exe b/devTools/tweeGo/tweego_win86.exe index 539381287e76cea07d2eec4e9b161fd3e7ad80cb..4020b6fec2ecab494eabd6f50dcbf74531010e4f 100644 Binary files a/devTools/tweeGo/tweego_win86.exe and b/devTools/tweeGo/tweego_win86.exe differ diff --git a/src/config/start.tw.proto b/src/config/start.tw similarity index 52% rename from src/config/start.tw.proto rename to src/config/start.tw index 24883bd4b1ea145c448d83e94e0b6177d1541d9f..9f5b5359db3354b0677f5d2f5b3b0d5a4bd7fe4f 100644 --- a/src/config/start.tw.proto +++ b/src/config/start.tw @@ -3,6 +3,4 @@ :: StoryTitle -Free Cities - -:: StoryIncludes +Free Cities \ No newline at end of file