Commit 038e9e71 authored by Jernej Simončič's avatar Jernej Simončič

Installer: improved compile.bat

parent ff665da1
......@@ -4,11 +4,16 @@ if [%2]==[] goto help
if [%3]==[] goto help
if [%4]==[] goto help
set VER=%~1
set GIMPDIR=%~2
set DIR32=%~3
set DIR64=%~4
set GIMP_BASE=%~2
set GIMP32=%~3
set GIMP64=%~4
set DEPS_BASE=%~5
set DEPS32=%~6
set DEPS64=%~7
if [%INNOPATH%]==[] (
FOR /F "usebackq tokens=5,* skip=2" %%A IN (`REG QUERY "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path" /reg:32`) DO set INNOPATH=%%B
)
if not exist "%INNOPATH%\iscc.exe" goto noinno
::i'd use %*, but shift has no effect on it
......@@ -16,6 +21,9 @@ shift
shift
shift
shift
shift
shift
shift
set PARAMS=
:doparams
if "%1"=="" goto paramsdone
......@@ -24,13 +32,14 @@ shift
goto doparams
:paramsdone
"%INNOPATH%\iscc.exe" -DVERSION="%VER%" -DGIMP_DIR="%GIMPDIR%" -DDIR32="%DIR32%" -DDIR64="%DIR64%" %PARAMS% gimp3264.iss
"%INNOPATH%\iscc.exe" -DVERSION="%VER%" -DGIMP_DIR="%GIMP_BASE%" -DDIR32="%GIMP32%" -DDIR64="%GIMP64%" -DDEPS_DIR="%DEPS_BASE%" -DDDIR32="%DEPS32%" -DDDIR64="%DEPS64%" %PARAMS% gimp3264.iss
goto :eof
:help
echo Usage: %~n0%~x0 ver.si.on base_dir gimp_x86_dir gimp_x64_dir
echo Example: %~n0%~x0 2.9.4 X:\gimp-output\2.9-dev gimp-dev-i686-2016-10-08 gimp-dev-x86_64-2016-10-08
echo Usage: %~n0%~x0 ver.si.on gimp_base_dir gimp_x86_dir gimp_x64_dir deps_base_dir deps_x86_dir deps_x64_dir [iscc_parameters]
echo Example: %~n0%~x0 2.9.4 X:\gimp-output\2.9-dev x86 x64 x:\gimp-deps x86 x64 -DPYTHON -DDEBUG_SYMBOLS
goto :eof
:noinno
echo Inno Setup path could not be read from Registry
echo Inno Setup path could not be read from Registry - install Inno Setup or set INNOPATH environment variable pointing at it's
echo install directory
goto :eof
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment