From 6ae002b84db0663c567c041e4376afaf33e16737 Mon Sep 17 00:00:00 2001 From: Jeff Davidson Date: Sun, 9 Feb 2020 18:45:26 -0800 Subject: [PATCH] Improve script and default config handling for distribution. For scripts, migrate gen_nsis.lua to dist/gen_nsis.py since Python can be run in stock AppVeyor environments whereas Lua is more challenging. Edit the script to filter out plugin directories containing "_" or "debug" which are not meant for release. Use the output of this script directly when building the installer instead of copy-pasting it. Update the zip command for Mac distributions to perform the same filtering on the set of included scripts. For the default config, move it to an explicit file instead of generating it inline in the .nsi script, and bundle it on Mac as well. Update the code to read from the default config if no config is present. See #40 --- .gitignore | 1 + .travis.yml | 2 +- appveyor.yml | 2 +- default_config.ini | 8 +++ dist/XWord.nsi | 146 +-------------------------------------------- dist/gen_nsis.py | 11 ++++ gen_nsis.lua | 1 - premake4.lua | 1 + src/App.cpp | 3 + src/paths.cpp | 8 +++ src/paths.hpp | 1 + src/premake4.lua | 3 +- 12 files changed, 40 insertions(+), 147 deletions(-) create mode 100644 default_config.ini create mode 100644 dist/gen_nsis.py delete mode 100644 gen_nsis.lua diff --git a/.gitignore b/.gitignore index b331859c..0d1216e6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /bin /build /lib +/dist/scripts.nsi /dist/XWord-Windows.exe /dist/packages /doc/chm diff --git a/.travis.yml b/.travis.yml index 1adea54f..10ef66f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ script: # For deployed Mac builds, zip the .app folder before_deploy: - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then pushd bin/$CONFIGURATION && zip -r XWord-macOS.zip XWord.app/ -x *.fbp && popd; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then pushd bin/$CONFIGURATION && zip -r XWord-macOS.zip XWord.app/ -x *.fbp -x "*/scripts/_*" -x "*/scripts/*debug*" && popd; fi # Deploy tagged release builds to GitHub Releases # TODO(#40): Deployment for Linux. diff --git a/appveyor.yml b/appveyor.yml index 81231fa0..b7e278a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ build_script: - msbuild build/vs2010/XWord.sln /p:Configuration=%CONFIGURATION% # For release builds, also build docs and run dist steps. - IF %CONFIGURATION%==Release pushd doc & make_help.cmd & popd - - IF %CONFIGURATION%==Release pushd dist & "%ProgramFiles(x86)%\NSIS\makensis.exe" /V4 XWord.nsi & popd + - IF %CONFIGURATION%==Release pushd dist & python gen_nsis.py > scripts.nsi & "%ProgramFiles(x86)%\NSIS\makensis.exe" /V4 XWord.nsi & popd # Zip the full build folder and make it available as an artifact. after_build: diff --git a/default_config.ini b/default_config.ini new file mode 100644 index 00000000..2133103f --- /dev/null +++ b/default_config.ini @@ -0,0 +1,8 @@ +[Layouts] +Full\ View=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=638;besth=619;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=638;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=251;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=638;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=387;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=395;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=280;floaty=194;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=395;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-12;floaty=517;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(4,4,0)=223|dock_size(4,5,0)=223|dock_size(3,0,1)=34|frame_size=808,543| +Floating\ Clues=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1440;besth=619;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1440;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=567;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1440;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=873;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875389;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=409;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=163;floaty=187;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875389;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=409;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=422;floaty=470;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=34|frame_size=1440,762| +Side\ Clues=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=420;besth=401;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=420;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=166;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=420;besth=28;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=254;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=188;besth=536;minw=15;minh=15;maxw=-1;maxh=-1;floatx=237;floaty=770;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=2;layer=4;row=0;pos=0;prop=100000;bestw=188;besth=536;minw=15;minh=15;maxw=-1;maxh=-1;floatx=501;floaty=773;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(4,4,0)=190|dock_size(2,4,0)=190|frame_size=808,543| +Stacked\ Clues\ \(Left\)=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=457;besth=458;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=457;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=180;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=457;besth=29;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=277;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=345;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=280;floaty=194;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=4;layer=5;row=0;pos=1;prop=100000;bestw=345;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=414;floaty=81;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(4,5,0)=336|dock_size(3,0,1)=29|frame_size=808,596| +Stacked\ Clues\ \(Right\)=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=490;besth=458;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=490;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=193;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=490;besth=29;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=297;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=2;layer=4;row=0;pos=0;prop=100000;bestw=312;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=253;floaty=209;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=2;layer=4;row=0;pos=1;prop=100000;bestw=312;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=250;floaty=509;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=29|dock_size(2,4,0)=323|frame_size=808,596| +Clues\ Below=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1438;besth=572;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1438;besth=73;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=563;besth=32;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1438;besth=26;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=869;besth=32;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=3;layer=1;row=0;pos=0;prop=100000;bestw=716;besth=33;minw=15;minh=15;maxw=-1;maxh=-1;floatx=163;floaty=187;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=3;layer=1;row=0;pos=1;prop=100000;bestw=716;besth=33;minw=15;minh=15;maxw=-1;maxh=-1;floatx=422;floaty=470;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(3,1,0)=35|frame_size=1440,762| +Clues\ Above=layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1440;besth=585;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1440;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=567;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1440;besth=28;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=873;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=1;layer=4;row=0;pos=0;prop=100000;bestw=716;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-2;floaty=86;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=1;layer=4;row=0;pos=1;prop=100000;bestw=716;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=7;floaty=798;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(1,4,0)=32|frame_size=1440,762| diff --git a/dist/XWord.nsi b/dist/XWord.nsi index 81d5281d..377f9584 100644 --- a/dist/XWord.nsi +++ b/dist/XWord.nsi @@ -1,6 +1,3 @@ -; NB: This must be compiled with Unicode NSIS so that the extra long strings -; in the config section don't get truncated. - ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "XWord" !define PRODUCT_VERSION "0.6.1" @@ -163,6 +160,7 @@ Section "MainSection" SEC01 SetOutPath "$INSTDIR" ; Program File "${XWORD_BIN}\XWord.exe" + File "${XWORD_BIN}\default_config.ini" File "${XWORD_BIN}\puz.dll" File "${XWORD_TRUNK}\doc\chm\xword.chm" ; LUA @@ -207,151 +205,13 @@ Section "MainSection" SEC01 File "${XWORD_TRUNK}\images\zoom_in_24.png" File "${XWORD_TRUNK}\images\zoom_out_24.png" - SetOutPath "$CONFIGDIR" - ; Default layouts - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Full\ View" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=638;besth=619;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=638;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=251;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=638;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=387;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=395;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=280;floaty=194;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=395;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-12;floaty=517;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(4,4,0)=223|dock_size(4,5,0)=223|dock_size(3,0,1)=34|frame_size=808,543|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Floating\ Clues" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1440;besth=619;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1440;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=567;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1440;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=873;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875389;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=409;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=163;floaty=187;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875389;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=409;besth=760;minw=15;minh=15;maxw=-1;maxh=-1;floatx=422;floaty=470;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=34|frame_size=1440,762|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Side\ Clues" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=420;besth=401;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=420;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=166;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=420;besth=28;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=254;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=4;row=0;pos=0;prop=100000;bestw=188;besth=536;minw=15;minh=15;maxw=-1;maxh=-1;floatx=237;floaty=770;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=2;layer=4;row=0;pos=0;prop=100000;bestw=188;besth=536;minw=15;minh=15;maxw=-1;maxh=-1;floatx=501;floaty=773;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(4,4,0)=190|dock_size(2,4,0)=190|frame_size=808,543|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Stacked\ Clues\ \(Left\)" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=457;besth=458;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=457;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=180;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=457;besth=29;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=277;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=4;layer=5;row=0;pos=0;prop=100000;bestw=345;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=280;floaty=194;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=4;layer=5;row=0;pos=1;prop=100000;bestw=345;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=414;floaty=81;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(4,5,0)=336|dock_size(3,0,1)=29|frame_size=808,596|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Stacked\ Clues\ \(Right\)" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=490;besth=458;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=490;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=193;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=490;besth=29;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=297;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=2;layer=4;row=0;pos=0;prop=100000;bestw=312;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=253;floaty=209;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=2;layer=4;row=0;pos=1;prop=100000;bestw=312;besth=294;minw=15;minh=15;maxw=-1;maxh=-1;floatx=250;floaty=509;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=29|dock_size(2,4,0)=323|frame_size=808,596|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Clues\ Below" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1438;besth=572;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1438;besth=73;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=563;besth=32;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1438;besth=26;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=869;besth=32;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=3;layer=1;row=0;pos=0;prop=100000;bestw=716;besth=33;minw=15;minh=15;maxw=-1;maxh=-1;floatx=163;floaty=187;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=3;layer=1;row=0;pos=1;prop=100000;bestw=716;besth=33;minw=15;minh=15;maxw=-1;maxh=-1;floatx=422;floaty=470;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(3,1,0)=35|frame_size=1440,762|" - WriteINIStr "$CONFIGDIR\config.ini" "Layouts" "Clues\ Above" "layout2|name=Logger;caption=Logger;state=18875390;dir=1;layer=0;row=6;pos=0;prop=100000;bestw=350;besth=540;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=105;floaty=177;floatw=350;floath=540|name=Grid;caption=Grid;state=0;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=1440;besth=585;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=647|name=Clue;caption=Clue Prompt;state=18874620;dir=1;layer=2;row=0;pos=0;prop=100000;bestw=1440;besth=75;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=272;floath=75|name=Notes;caption=Notes;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=365;besth=288;minw=15;minh=15;maxw=-1;maxh=-1;floatx=331;floaty=206;floatw=365;floath=288|name=/Metadata/Author;caption=Author;state=18874620;dir=1;layer=3;row=0;pos=1;prop=99614;bestw=567;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=87;floath=20|name=/Metadata/Copyright;caption=Copyright;state=18874620;dir=3;layer=0;row=1;pos=0;prop=83228;bestw=1440;besth=28;minw=15;minh=15;maxw=-1;maxh=-1;floatx=13;floaty=801;floatw=87;floath=49|name=/Metadata/Title;caption=Title;state=18874620;dir=1;layer=3;row=0;pos=0;prop=153658;bestw=873;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=86;floath=20|name=ClueList1;caption=Across;state=18875388;dir=1;layer=4;row=0;pos=0;prop=100000;bestw=716;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-2;floaty=86;floatw=300;floath=322|name=ClueList2;caption=Down;state=18875388;dir=1;layer=4;row=0;pos=1;prop=100000;bestw=716;besth=34;minw=15;minh=15;maxw=-1;maxh=-1;floatx=7;floaty=798;floatw=300;floath=323|name=00520f304e5da8570000014700000007;caption=Notes;state=18876414;dir=4;layer=0;row=0;pos=1;prop=100000;bestw=-1;besth=-1;minw=15;minh=15;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=250;floath=250|dock_size(5,0,0)=22|dock_size(1,3,0)=34|dock_size(1,2,0)=75|dock_size(3,0,1)=28|dock_size(1,4,0)=32|frame_size=1440,762|" - - SetOutPath "$SCRIPTSDIR" - - ; Script libraries + ; Scripts - generated by gen_nsis.py + !include scripts.nsi SetOutPath "$SCRIPTSDIR\libs" ; Anywhere we have dlls that link to msvcrt, we need a manifest file File "${VC_REDIST}\dummy_manifest\Microsoft.VC90.CRT.manifest" - File "${XWORD_TRUNK}\scripts\libs\date.lua" - File "${XWORD_TRUNK}\scripts\libs\md5.lua" - File "${XWORD_TRUNK}\scripts\libs\serialize.lua" - - File "${XWORD_TRUNK}\scripts\libs\c-luacurl.dll" - File "${XWORD_TRUNK}\scripts\libs\c-task.dll" - File "${XWORD_TRUNK}\scripts\libs\c-yaml.dll" - File "${XWORD_TRUNK}\scripts\libs\lfs.dll" - File "${XWORD_TRUNK}\scripts\libs\luayajl.dll" - File "${XWORD_TRUNK}\scripts\libs\lxp.dll" - - SetOutPath "$SCRIPTSDIR\libs\luacurl" - File "${XWORD_TRUNK}\scripts\libs\luacurl\http.lua" - File "${XWORD_TRUNK}\scripts\libs\luacurl\init.lua" - - SetOutPath "$SCRIPTSDIR\libs\lxp" - File "${XWORD_TRUNK}\scripts\libs\lxp\lom.lua" - - SetOutPath "$SCRIPTSDIR\libs\lyaml" - File "${XWORD_TRUNK}\scripts\libs\lyaml\explicit.lua" - File "${XWORD_TRUNK}\scripts\libs\lyaml\functional.lua" - File "${XWORD_TRUNK}\scripts\libs\lyaml\implicit.lua" - File "${XWORD_TRUNK}\scripts\libs\lyaml\init.lua" - - SetOutPath "$SCRIPTSDIR\libs\pl" - File "${XWORD_TRUNK}\scripts\libs\pl\app.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\array2d.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\class.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\compat.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\comprehension.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\config.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\data.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\Date.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\dir.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\file.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\func.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\import_into.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\init.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\input.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\lapp.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\lexer.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\list.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\luabalanced.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\Map.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\MultiMap.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\operator.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\OrderedMap.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\path.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\permute.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\pretty.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\seq.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\Set.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\sip.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\strict.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\stringio.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\stringx.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\tablex.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\template.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\test.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\text.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\types.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\utils.lua" - File "${XWORD_TRUNK}\scripts\libs\pl\xml.lua" - - SetOutPath "$SCRIPTSDIR\libs\task" - File "${XWORD_TRUNK}\scripts\libs\task\debug.lua" - File "${XWORD_TRUNK}\scripts\libs\task\event.lua" - File "${XWORD_TRUNK}\scripts\libs\task\init.lua" - File "${XWORD_TRUNK}\scripts\libs\task\queue.lua" - File "${XWORD_TRUNK}\scripts\libs\task\queue_task.lua" - File "${XWORD_TRUNK}\scripts\libs\task\queue_task_create.lua" - File "${XWORD_TRUNK}\scripts\libs\task\task_create.lua" - - SetOutPath "$SCRIPTSDIR\libs\wx\lib" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\animate.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\arrows.png" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\arrow_button.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\bmp.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\bmp_button.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\checklist.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\collapse.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\collapse_fb.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\ctrlgrid.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\textcombo.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\text_button.lua" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\toggle_button.lua" - - SetOutPath "$SCRIPTSDIR\libs\wx\lib\mixins" - File "${XWORD_TRUNK}\scripts\libs\wx\lib\mixins\listctrl.lua" - - - ; XWord main script - SetOutPath "$SCRIPTSDIR\xword" - File "${XWORD_TRUNK}\scripts\xword\archives.lua" - File "${XWORD_TRUNK}\scripts\xword\cleanup.lua" - File "${XWORD_TRUNK}\scripts\xword\init.lua" - File "${XWORD_TRUNK}\scripts\xword\menu.lua" - File "${XWORD_TRUNK}\scripts\xword\messages.lua" - File "${XWORD_TRUNK}\scripts\xword\preferences.lua" - SetOutPath "$SCRIPTSDIR\xword\pkgmgr" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\dialog.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\init.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\install.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\join.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\load.lua" - SetOutPath "$SCRIPTSDIR\xword\pkgmgr\updater" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\updater\check_task.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\updater\dialog.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\updater\download_task.lua" - File "${XWORD_TRUNK}\scripts\xword\pkgmgr\updater\init.lua" - SetOutPath "$SCRIPTSDIR\xword\widgets" - File "${XWORD_TRUNK}\scripts\xword\widgets\arrows.png" - File "${XWORD_TRUNK}\scripts\xword\widgets\button.lua" - File "${XWORD_TRUNK}\scripts\xword\widgets\customlist.lua" - File "${XWORD_TRUNK}\scripts\xword\widgets\sizedtext.lua" - - ; import script - SetOutPath "$SCRIPTSDIR\import" - File "${XWORD_TRUNK}\scripts\import\info.lua" - File "${XWORD_TRUNK}\scripts\import\init.lua" - File "${XWORD_TRUNK}\scripts\import\newsday.lua" - File "${XWORD_TRUNK}\scripts\import\rowsgarden.lua" - File "${XWORD_TRUNK}\scripts\import\theme.lua" - File "${XWORD_TRUNK}\scripts\import\uclick.lua" - File "${XWORD_TRUNK}\scripts\import\xwordinfo.lua" - - ; If it's portable, make a portable_mode_enabled file. ${If} $isPortable == "true" FileOpen $0 "$INSTDIR\portable_mode_enabled" w diff --git a/dist/gen_nsis.py b/dist/gen_nsis.py new file mode 100644 index 00000000..e37e79a0 --- /dev/null +++ b/dist/gen_nsis.py @@ -0,0 +1,11 @@ +import os + +scripts_dir = '..\\scripts' + +for root, dirs, files in os.walk(scripts_dir): + if '_' not in root and 'debug' not in root: + print('SetOutPath "$SCRIPTSDIR' + root[len(scripts_dir):] + '"') + for filename in files: + if filename.endswith('.lua') or filename.endswith('.dll') or filename.endswith('.png'): + print(' File "${XWORD_TRUNK}' + os.path.join(root[2:],filename) + '"') + print() diff --git a/gen_nsis.lua b/gen_nsis.lua deleted file mode 100644 index 18101965..00000000 --- a/gen_nsis.lua +++ /dev/null @@ -1 +0,0 @@ --- Generate NSIS install stuff for scripts. local dir = require 'pl.dir' local path = require 'pl.path' local scripts = [[scripts]] for root, dirs, files in dir.walk(scripts) do if not root:find('.svn') then local p = root:sub(#scripts+1) print('SetOutPath "$SCRIPTSDIR'..p..'"') for _, f in ipairs(files) do local ext = path.extension(f):sub(2) if ext == 'lua' or ext == 'dll' or ext == 'png' then print(' File "${XWORD_TRUNK}\\scripts'..path.join(p, f)..'"') end end end end \ No newline at end of file diff --git a/premake4.lua b/premake4.lua index cf8bb003..615eb866 100644 --- a/premake4.lua +++ b/premake4.lua @@ -51,6 +51,7 @@ solution "XWord" [[if not exist "..\..\bin\$(ConfigurationName)" mkdir "..\..\bin\$(ConfigurationName)"]], [[if not exist "..\..\bin\$(ConfigurationName)\scripts" mklink /j "..\..\bin\$(ConfigurationName)\scripts" "..\..\scripts"]], [[if not exist "..\..\bin\$(ConfigurationName)\images" mklink /j "..\..\bin\$(ConfigurationName)\images" "..\..\images"]], + [[if not exist "..\..\bin\$(ConfigurationName)\default_config.ini" copy "..\..\default_config.ini" "..\..\bin\$(ConfigurationName)\" ]], } configuration "macosx" diff --git a/src/App.cpp b/src/App.cpp index eca26c7d..a7a9f668 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -280,6 +280,9 @@ void MyApp::SetupConfig() if (! configFile.FileExists()) configFile.Assign(GetConfigFile_XWord_3()); + // Try to load the default configuration. + if (! configFile.FileExists()) + configFile.Assign(GetDefaultConfigFile()); // Setup wxFileConfig if (configFile.FileExists()) diff --git a/src/paths.cpp b/src/paths.cpp index 6b95bd23..9f1cd946 100644 --- a/src/paths.cpp +++ b/src/paths.cpp @@ -56,6 +56,14 @@ wxString GetConfigFile() return GetConfigDir() + sep() + configFileName; } +wxString GetDefaultConfigFile() +{ + if (wxGetApp().IsPortable()) + return exedir() + sep() + "default_config.ini"; + else + return wxStandardPaths::Get().GetResourcesDir() + sep() + "default_config.ini"; +} + wxString GetImagesDir() { if (wxGetApp().IsPortable()) diff --git a/src/paths.hpp b/src/paths.hpp index 25945ab1..e8cb4acc 100644 --- a/src/paths.hpp +++ b/src/paths.hpp @@ -36,6 +36,7 @@ wxString GetUserDataDir(); // Directory for user data wxString GetConfigDir(); // Directory for config files (DataDir/config) wxString GetConfigFile(); // The main XWord config file (DataDir/config/config.ini) +wxString GetDefaultConfigFile(); // Default config file to use if no config exists wxString GetImagesDir(); // Images wxString GetScriptsDir(); // Scripts wxString exedir(); diff --git a/src/premake4.lua b/src/premake4.lua index 95ece8c8..a539ae9f 100644 --- a/src/premake4.lua +++ b/src/premake4.lua @@ -139,9 +139,10 @@ project "XWord" "ln -sFh ../../../../../scripts $PLUGINS_FOLDER_PATH/scripts", "mkdir -p $UNLOCALIZED_RESOURCES_FOLDER_PATH", "ln -sFh ../../../../../images $UNLOCALIZED_RESOURCES_FOLDER_PATH/images", - -- Copy Info.plist and xword.icns + -- Copy Info.plist, xword.icns, and default_config.ini "cp ../../src/Info.plist $INFOPLIST_PATH", "cp ../../images/xword.icns $UNLOCALIZED_RESOURCES_FOLDER_PATH", + "cp ../../default_config.ini $UNLOCALIZED_RESOURCES_FOLDER_PATH", } if not _OPTIONS["disable-lua"] then postbuildcommands {