Add configuration. See #5 #8.

What's new:
- --config flag to pass a INI config file to parse. See config.ini.
- Updated the modules scripts for configuration. Now needs to unset
  variables passed by CLI or config.
- Fix release directory that was added in love file (maybe).
- Properly escapes sed arguments.
- chmod +x to getopt.sh and read_ini.sh
- Fix #12
This commit is contained in:
Antonin Décimo
2014-08-22 14:07:44 +02:00
parent 83a5f111b7
commit 5bbf17401a
12 changed files with 502 additions and 18 deletions

View File

@@ -2,6 +2,16 @@
init_module "Windows"
# Configuration
if [ "$CONFIG" = true ]; then
RELEASE_WIN_32=true
RELEASE_WIN_64=true
if [ -n "${INI__windows__icon}" ]; then
PROJECT_ICO=${INI__windows__icon}
fi
fi
# Options
while getoptex "$SCRIPT_ARGS" "$@"
do
@@ -80,10 +90,10 @@ if [ "$RELEASE_WIN_64" = true ] && [ "$LOVE_GT_080" = true ]; then
cp "$CACHE_DIR"/love-$LOVE_VERSION-win-x64.zip ./love-$LOVE_VERSION-win64.zip
fi
fi
unzip -qq love-$LOVE_VERSION-win64.zip
rm -rf "$PROJECT_NAME"-win64.zip 2> /dev/null
if [ "$FOUND_WINE" = true ] && [ -n "$PROJECT_ICO" ]; then
WINEPREFIX="$WINEPREFIX" wine "$RESHACKER" -addoverwrite "love-$LOVE_VERSION-win32/love.exe,love-$LOVE_VERSION-win32/love.exe,"$PROJECT_ICO",ICONGROUP,MAINICON,0" 2> /dev/null
fi
@@ -95,5 +105,6 @@ if [ "$RELEASE_WIN_64" = true ] && [ "$LOVE_GT_080" = true ]; then
fi
unset PROJECT_ICO
exit_module