summaryrefslogtreecommitdiffstats
path: root/util/scripts/win-binary/batch
diff options
context:
space:
mode:
Diffstat (limited to 'util/scripts/win-binary/batch')
-rwxr-xr-xutil/scripts/win-binary/batch/build.bat121
-rwxr-xr-xutil/scripts/win-binary/batch/copy.bat91
-rwxr-xr-xutil/scripts/win-binary/batch/delete.bat41
-rwxr-xr-xutil/scripts/win-binary/batch/env.bat101
-rwxr-xr-xutil/scripts/win-binary/batch/extract.bat47
-rwxr-xr-xutil/scripts/win-binary/batch/installer.bat227
-rwxr-xr-xutil/scripts/win-binary/batch/log.bat18
-rwxr-xr-xutil/scripts/win-binary/batch/toupper.bat29
8 files changed, 675 insertions, 0 deletions
diff --git a/util/scripts/win-binary/batch/build.bat b/util/scripts/win-binary/batch/build.bat
new file mode 100755
index 0000000..2d81b6f
--- /dev/null
+++ b/util/scripts/win-binary/batch/build.bat
@@ -0,0 +1,121 @@
+call :%1 %2
+goto END
+
+:begin
+for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_COMPILER=%%~m& set IWMAKE_TMP=%%~n
+
+if "%IWMAKE_TMP%"=="" set IWMAKE_TMP=build_%IWMAKE_COMPILER%
+set IWMAKE_BUILD=%IWMAKE_ROOT%\%IWMAKE_TMP%
+if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
+
+set IWMAKE_OLD_PATH=%PATH%
+if not "%QMAKESPEC%"=="" set IWMAKE_OLD_QMAKESPEC=%QMAKESPEC%
+if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR%
+if not "%INCLUDE%"=="" set IWMAKE_OLD_INCLUDE=%INCLUDE%
+if not "%LIB%"=="" set IWMAKE_OLD_LIB=%LIB%
+
+set PATH=%IWMAKE_BUILD%\bin;%PATH%
+set QTDIR=%IWMAKE_BUILD%
+
+if "%IWMAKE_COMPILER%"=="vs2003" goto VS2003Env
+if "%IWMAKE_COMPILER%"=="vs2002" goto VS2002Env
+if "%IWMAKE_COMPILER%"=="vs2005" goto VS2005Env
+if "%IWMAKE_COMPILER%"=="vs2008" goto VS2008Env
+if "%IWMAKE_COMPILER%"=="vc60" goto VC60Env
+if "%IWMAKE_COMPILER%"=="mingw" goto MinGWEnv
+goto :eof
+
+:VS2003Env
+set QMAKESPEC=win32-msvc2003
+set IWMAKE_MAKE=nmake
+goto :eof
+
+:VS2002Env
+set QMAKESPEC=win32-msvc2002
+set IWMAKE_MAKE=nmake
+goto :eof
+
+:VS2005Env
+set QMAKESPEC=win32-msvc2005
+set IWMAKE_MAKE=nmake
+goto :eof
+
+:VS2008Env
+set QMAKESPEC=win32-msvc2008
+set IWMAKE_MAKE=nmake
+goto :eof
+
+:VC60Env
+set QMAKESPEC=win32-msvc
+set IWMAKE_MAKE=nmake
+goto :eof
+
+:SetVSEnvironment
+if not exist %1 echo %1 not found >> %IWMAKE_LOGFILE% & exit /b 1
+call %1 >> %IWMAKE_LOGFILE%
+goto :eof
+
+:MinGWEnv
+set QMAKESPEC=win32-g++
+set IWMAKE_MAKE=mingw32-make
+goto :eof
+
+:finish
+ if not "%IWMAKE_OLD_PATH%"=="" set PATH=%IWMAKE_OLD_PATH%& set IWMAKE_OLD_PATH=
+ if not "%IWMAKE_OLD_QMAKESPEC%"=="" set QMAKESPEC=%IWMAKE_OLD_QMAKESPEC%& set IWMAKE_OLD_QMAKESPEC=
+ if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR%& set IWMAKE_OLD_QTDIR=
+ if not "%IWMAKE_OLD_INCLUDE%"=="" set INCLUDE=%IWMAKE_OLD_INCLUDE%& set IWMAKE_OLD_INCLUDE=
+ if not "%IWMAKE_OLD_LIB%"=="" set LIB=%IWMAKE_OLD_LIB%& set IWMAKE_OLD_LIB=
+goto :eof
+
+:configure
+ pushd %IWMAKE_BUILD%
+ configure %~1 >> %IWMAKE_LOGFILE% 2>&1
+ popd
+goto :eof
+
+:shadowconfigure
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ pushd %IWMAKE_BUILD%
+ %IWMAKE_ROOT%\%IWMAKE_TMP%\configure %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1
+ popd
+goto :eof
+
+:setcepaths
+ call %IWMAKE_BUILD%\bin\setcepaths.bat %~1 >> %IWMAKE_LOGFILE% 2>&1
+goto :eof
+
+:bin
+ pushd %IWMAKE_BUILD%
+ %IWMAKE_MAKE% %~1 >>%IWMAKE_LOGFILE% 2>&1
+ popd
+goto :eof
+
+:binInDir
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ pushd %IWMAKE_BUILD%\%IWMAKE_TMP%
+ %IWMAKE_MAKE% %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1
+ popd
+goto :eof
+
+:DBPlugins
+ call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sql
+ set IWMAKE_SQL_OLD_LIB=%LIB%
+
+ set LIB=%IWMAKE_ROOT%\sql\%IWMAKE_COMPILER%;%IWMAKE_SQL_OLD_LIB%
+ pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\psql
+ qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpqd.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1
+ %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1
+ qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpq.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1
+ %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1
+ popd
+ set LIB=%IWMAKE_SQL_OLD_LIB%
+ set IWMAKE_SQL_OLD_LIB=
+goto :eof
+
+:root
+ set IWMAKE_BUILD=%~1
+ if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/copy.bat b/util/scripts/win-binary/batch/copy.bat
new file mode 100755
index 0000000..95869ea
--- /dev/null
+++ b/util/scripts/win-binary/batch/copy.bat
@@ -0,0 +1,91 @@
+call :%1 %2
+goto END
+
+:dest
+ set IWMAKE_OUTDIR=%IWMAKE_ROOT%\%~1
+ if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR%
+goto :eof
+
+:src
+ set IWMAKE_SRCDIR=%IWMAKE_ROOT%\%~1
+ if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR%
+goto :eof
+
+:destAbs
+ set IWMAKE_OUTDIR=%1
+ if not exist %IWMAKE_OUTDIR% mkdir %IWMAKE_OUTDIR%
+goto :eof
+
+:srcAbs
+ set IWMAKE_SRCDIR=%1
+ if not exist %IWMAKE_SRCDIR% mkdir %IWMAKE_SRCDIR%
+goto :eof
+
+:extsync
+ echo Copying %IWMAKE_EXTERNAL%\%~1 to %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE%
+ if exist %IWMAKE_ROOT%\%~1 rd /S /Q %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE%
+ xcopy /H /Y /Q /I /R /E %IWMAKE_EXTERNAL%\%~1 %IWMAKE_ROOT%\%~1 >> %IWMAKE_LOGFILE%
+goto :eof
+
+:all
+ xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%~1 %IWMAKE_OUTDIR%\ >> %IWMAKE_LOGFILE%
+goto :eof
+
+:filesEx
+ for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o
+ echo %IWMAKE_TMP3% > %IWMAKE_ROOT%\iwmake_exclude
+ xcopy /H /Y /Q /I /R /S /EXCLUDE:%IWMAKE_ROOT%\iwmake_exclude %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:file
+ set IWMAKE_TMP=%~1
+ set IWMAKE_TMP2=%~nx1
+ echo set IWMAKE_TMP3=%%IWMAKE_TMP:%IWMAKE_TMP2%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat"
+ call %IWMAKE_ROOT%\iwmake_tmp.bat
+ if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%"
+ xcopy /H /Y /Q /I /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP3% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:fileAndRename
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP4=%%~nxn
+ echo set IWMAKE_TMP3=%%IWMAKE_TMP2:%IWMAKE_TMP4%=%%>"%IWMAKE_ROOT%\iwmake_tmp.bat"
+ call %IWMAKE_ROOT%\iwmake_tmp.bat
+ if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP3%"
+ echo > %IWMAKE_OUTDIR%\%IWMAKE_TMP2%
+ xcopy /H /Y /Q /R %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE%
+ set IWMAKE_TMP4=
+goto :eof
+
+:files
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ if not exist "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%" mkdir "%IWMAKE_OUTDIR%\%IWMAKE_TMP2%"
+ xcopy /H /Y /Q /I /R /S %IWMAKE_SRCDIR%\%IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:runtime
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ if "%IWMAKE_TMP2%" == "" set IWMAKE_TMP2=bin
+ if "%IWMAKE_TMP%" == "mingw" (
+ xcopy /H /Y /Q /I /R %IWMAKE_MINGWPATH%\bin\mingwm*.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE%
+ ) else (
+ xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcr%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE%
+ xcopy /H /Y /Q /I /R %SystemRoot%\system32\msvcp%IWMAKE_TMP%.dll %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE%
+ )
+goto :eof
+
+:external
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ xcopy /H /Y /Q /I /R %IWMAKE_TMP% %IWMAKE_OUTDIR%\%IWMAKE_TMP2%\ >> %IWMAKE_LOGFILE%
+goto :eof
+
+:syncqt
+ pushd %IWMAKE_OUTDIR%
+ if exist "include" rd /S /Q include
+ if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR%
+ set QTDIR=%IWMAKE_OUTDIR%
+ "%IWMAKE_PERLPATH%\perl" %QTDIR%\bin\syncqt -copy >> %IWMAKE_LOGFILE% 2>&1
+ if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR%
+ popd
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/delete.bat b/util/scripts/win-binary/batch/delete.bat
new file mode 100755
index 0000000..cd751fd
--- /dev/null
+++ b/util/scripts/win-binary/batch/delete.bat
@@ -0,0 +1,41 @@
+call :%1 %2
+goto END
+
+:destDir
+ if exist "%IWMAKE_OUTDIR%\%~1" rd /S /Q %IWMAKE_OUTDIR%\%~1
+goto :eof
+
+:dir
+ if exist "%IWMAKE_ROOT%\%~1" rd /S /Q %IWMAKE_ROOT%\%~1
+goto :eof
+
+:dirAbs
+ if exist "%~1" rd /S /Q %~1
+goto :eof
+
+:file
+ del /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1
+ exit /b 0
+goto :eof
+
+:files
+ del /S /Q /F %IWMAKE_OUTDIR%\%~1 >> %IWMAKE_LOGFILE% 2>&1
+ exit /b 0
+goto :eof
+
+:line
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ if exist "%IWMAKE_ROOT%\tmp_line.txt" del /Q /F "%IWMAKE_ROOT%\tmp_line.txt" >> %IWMAKE_LOGFILE%
+ type "%IWMAKE_ROOT%\%IWMAKE_TMP%" | %WINDIR%\system32\find /V "%IWMAKE_TMP2%" >> "%IWMAKE_ROOT%\tmp_line.txt"
+ xcopy /Y /Q /R %IWMAKE_ROOT%\tmp_line.txt %IWMAKE_ROOT%\%IWMAKE_TMP% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:dirs
+ for /R "%IWMAKE_OUTDIR%" %%d in ("%~1") do (
+ if exist %%d (
+ rd /S /Q %%d >> %IWMAKE_LOGFILE% 2>&1
+ )
+ )
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/env.bat b/util/scripts/win-binary/batch/env.bat
new file mode 100755
index 0000000..302a855
--- /dev/null
+++ b/util/scripts/win-binary/batch/env.bat
@@ -0,0 +1,101 @@
+call :%1 %2
+goto END
+
+:setglobals
+set IWMAKE_PARSESECTION=1
+set IWMAKE_MINGWPATH=c:\MinGW\bin
+set IWMAKE_STARTDIR=%CD%
+set IWMAKE_NSISCONF=%IWMAKE_SCRIPTDIR%\nsis\config.nsh
+set IWMAKE_ROOT=c:\package
+set IWMAKE_OUTDIR=%IWMAKE_ROOT%
+set IWMAKE_SRCDIR=%IWMAKE_ROOT%
+set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT%
+set IWMAKE_NSISPATH=%PROGRAMFILES%\NSIS
+call %IWMAKE_SCRIPTDIR%\batch\log.bat fileAbs "%IWMAKE_STARTDIR%\log.txt"
+goto :eof
+
+:signPath
+ set IWMAKE_SIGNPATH=%~1
+goto :eof
+
+:wgetPath
+ set IWMAKE_WGET=%~1
+goto :eof
+
+:wgetDir
+ set IWMAKE_WGET=%IWMAKE_ROOT%\%~1
+goto :eof
+
+:NSISPath
+ set IWMAKE_NSISPATH=%~1
+goto :eof
+
+:PerlPath
+ set IWMAKE_PERLPATH=%~1
+goto :eof
+
+:MinGWPath
+ set IWMAKE_MINGWPATH=%~1
+goto :eof
+
+:unzipApp
+ set IWMAKE_UNZIPAPP=%~1
+goto :eof
+
+:releaseLocation
+ set IWMAKE_WGETUSER=
+ set IWMAKE_WGETPASS=
+ for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& if not "%%~n"=="" set IWMAKE_TMP2=%%~n& if not "%%~o"=="" set IWMAKE_TMP3=%%~o
+ if not "%IWMAKE_TMP2%"=="" set IWMAKE_WGETUSER=--http-user=%IWMAKE_TMP2%
+ if not "%IWMAKE_TMP3%"=="" set IWMAKE_WGETPASS=--http-passwd=%IWMAKE_TMP3%
+ set IWMAKE_RELEASELOCATION=%IWMAKE_TMP%
+goto :eof
+
+:removeglobals
+if not "%IWMAKE_OLD_PATH%"=="" call %IWMAKE_SCRIPTDIR%\batch\build.bat finish
+set IWMAKE_RELEASELOCATION=
+set IWMAKE_NSISPATH=
+set IWMAKE_SECTION=
+set IWMAKE_WGET=
+set IWMAKE_WGETUSER=
+set IWMAKE_WGETPASS=
+set IWMAKE_UNZIPAPP=
+set IWMAKE_MINGWPATH=
+set IWMAKE_MAKE=
+set IWMAKE_PERLPATH=
+set IWMAKE_STARTDIR=
+set IWMAKE_SCRIPTDIR=
+set IWMAKE_NSISCONF=
+set IWMAKE_RESULT=
+set IWMAKE_TMP=
+set IWMAKE_TMP2=
+set IWMAKE_TMP3=
+set IWMAKE_STATUS=
+set IWMAKE_LOGFILE=
+set IWMAKE_BUILD=
+set IWMAKE_ROOT=
+set IWMAKE_OUTDIR=
+set IWMAKE_EXTERNAL=
+set IWMAKE_OLD_PATH=
+set IWMAKE_OLD_QMAKESPEC=
+set IWMAKE_OLD_QTDIR=
+set IWMAKE_OLD_INCLUDE=
+set IWMAKE_OLD_LIB=
+set IWMAKE_COMPILER=
+set IWMAKE_SRCDIR=
+set IWMAKE_EXTRACTSRC=
+set IWMAKE_EXTRACTDEST=
+set IWMAKE_PARSESECTION=
+set IWMAKE_OUTPUT_FILE=
+set IWMAKE_SIGNPATH=
+goto :eof
+
+:root
+set IWMAKE_ROOT=%~1
+goto :eof
+
+:extroot
+set IWMAKE_EXTERNAL=%~1
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/extract.bat b/util/scripts/win-binary/batch/extract.bat
new file mode 100755
index 0000000..c5a9a23
--- /dev/null
+++ b/util/scripts/win-binary/batch/extract.bat
@@ -0,0 +1,47 @@
+call :%1 %2
+goto END
+
+:dest
+ set IWMAKE_EXTRACTDEST=%IWMAKE_ROOT%\%~1
+goto :eof
+
+:src
+ set IWMAKE_EXTRACTSRC=%~1
+goto :eof
+
+:extUnpack
+ set IWMAKE_EXTRACTSRC=%~n1
+ pushd %IWMAKE_ROOT%
+ if exist "%IWMAKE_EXTRACTSRC%.zip" del /Q /F "%IWMAKE_EXTRACTSRC%.zip"
+ %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE% 2>&1
+ popd
+ call :unpack "%~1"
+goto :eof
+
+:unpack
+ set IWMAKE_EXTRACTSRC=%~n1
+ pushd %IWMAKE_ROOT%
+ if exist "%IWMAKE_EXTRACTDEST%" rd /S /Q %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE% 2>&1
+ if exist "%IWMAKE_EXTRACTSRC%" rd /S /Q %IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE% 2>&1
+ %IWMAKE_UNZIPAPP% -q %IWMAKE_EXTRACTSRC%.zip >> %IWMAKE_LOGFILE%
+ popd
+ move %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% %IWMAKE_EXTRACTDEST% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:extPatch
+ pushd %IWMAKE_ROOT%
+ if exist "%~1" del /Q /F "%~1"
+ %IWMAKE_WGET%\wget %IWMAKE_WGETUSER% %IWMAKE_WGETPASS% %IWMAKE_RELEASELOCATION%/%~1 >> %IWMAKE_LOGFILE% 2>&1
+ popd
+ call :patch "%~1"
+goto :eof
+
+:patch
+ pushd %IWMAKE_ROOT%
+ %IWMAKE_UNZIPAPP% %~1 >> %IWMAKE_LOGFILE%
+ popd
+ xcopy /R /I /S /Q /Y %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC%\*.* %IWMAKE_EXTRACTDEST%\ >> %IWMAKE_LOGFILE%
+ rd /S /Q %IWMAKE_ROOT%\%IWMAKE_EXTRACTSRC% >> %IWMAKE_LOGFILE%
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/installer.bat b/util/scripts/win-binary/batch/installer.bat
new file mode 100755
index 0000000..74887ee
--- /dev/null
+++ b/util/scripts/win-binary/batch/installer.bat
@@ -0,0 +1,227 @@
+call :%1 %2
+goto END
+
+:begin
+ call :reset
+ echo !define PRODUCT_NAME "%~1" >> %IWMAKE_NSISCONF%
+ echo !define INSTALL_ROOT "%IWMAKE_ROOT%" >> %IWMAKE_NSISCONF%
+goto :eof
+
+:output
+ set IWMAKE_OUTPUT_FILE=%~1
+ echo !define OUTPUT_FILE "%~1" >> %IWMAKE_NSISCONF%
+goto :eof
+
+:module
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1
+ echo !define MODULE_%IWMAKE_RESULT% >> %IWMAKE_NSISCONF%
+goto :eof
+
+:enable
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1
+ echo !define USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF%
+goto :eof
+
+:disable
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %~1
+ echo !undef USE_%IWMAKE_RESULT:"=% >> %IWMAKE_NSISCONF%
+goto :eof
+
+:startmenu
+ echo !define DEFAULT_STARTMENU_STRING "%~1" >> %IWMAKE_NSISCONF%
+goto :eof
+
+:reset
+ if exist "%IWMAKE_NSISCONF%" del /Q /F "%IWMAKE_NSISCONF%"
+goto :eof
+
+:instdir
+ for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o"
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ echo !define INSTDIR_%IWMAKE_TMP2% %IWMAKE_RESULT:"=% >> "%IWMAKE_NSISCONF%"
+ echo !define INSTDIR_%IWMAKE_TMP2%_TEXT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:version
+ echo !define PRODUCT_VERSION "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:readme
+ echo !define README_FILE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:licenseFile
+ echo !define LICENSE_FILE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:runfunction
+ echo !define RUN_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:readmefunction
+ echo !define README_FUNCTION "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:readmestartpage
+ echo !define README_STARTPAGE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:welcomenote
+ echo !define WELCOME_NOTE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:welcometitle
+ echo !define WELCOME_TITLE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:welcomeicon
+ echo !define WELCOME_ICON "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:finishtitle
+ echo !define FINISH_TITLE "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:updateplugins
+ call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync INetLoad
+ xcopy /Q /Y /R "%IWMAKE_ROOT%\INetLoad\INetLoad.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE%
+ xcopy /Q /Y /R "%IWMAKE_SCRIPTDIR%\nsis\qtnsisext\qtnsisext.dll" "%IWMAKE_NSISPATH%\Plugins\" >> %IWMAKE_LOGFILE%
+goto :eof
+
+:defineDir
+ for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3=%%~o
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ set IWMAKE_TMP=%IWMAKE_RESULT%
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2%
+ set IWMAKE_TMP2=%IWMAKE_RESULT%
+ echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% "%IWMAKE_ROOT%\%IWMAKE_TMP3%" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:define
+ for /F "tokens=1,2*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n& set IWMAKE_TMP3="%%~o"
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ set IWMAKE_TMP=%IWMAKE_RESULT%
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP2%
+ set IWMAKE_TMP2=%IWMAKE_RESULT%
+ if %IWMAKE_TMP3%=="" set IWMAKE_TMP3=
+ echo !define MODULE_%IWMAKE_TMP%_%IWMAKE_TMP2% %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:src
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ set IWMAKE_TMP=%IWMAKE_RESULT%
+ set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%"
+ echo !define MODULE_%IWMAKE_TMP%_ROOT %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:buildDir
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ set IWMAKE_TMP=%IWMAKE_RESULT%
+ set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%"
+ echo !define MODULE_%IWMAKE_TMP%_BUILDDIR %IWMAKE_TMP3% >> "%IWMAKE_NSISCONF%"
+ for /F "eol=- tokens=1,2,3" %%m in ('%WINDIR%\system32\find "QT_PACKAGEDATE_STR" %IWMAKE_ROOT%\%IWMAKE_TMP2%\src\corelib\global\qglobal.h') do echo !define MODULE_LICENSECHECK_PACKAGEDATE %%o >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:compile
+ call :required
+ pushd %IWMAKE_SCRIPTDIR%\nsis
+ "%IWMAKE_NSISPATH%\makensis.exe" installer.nsi >> %IWMAKE_LOGFILE%
+ popd
+goto :eof
+
+:required
+ call :setrequired PRODUCT_NAME
+ call :setrequired INSTALL_ROOT
+ call :setrequired PRODUCT_VERSION
+ call :setrequired OUTPUT_FILE
+ call :setrequired INSTDIR_0
+ call :setrequired DEFAULT_STARTMENU_STRING
+goto :eof
+
+:setrequired
+ echo !ifndef %1 >> "%IWMAKE_NSISCONF%"
+ echo !error "%1 must be in the .conf file..." >> "%IWMAKE_NSISCONF%"
+ echo !endif >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:makeFileList
+ for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
+ call "%IWMAKE_SCRIPTDIR%\batch\toupper.bat" %IWMAKE_TMP%
+ set IWMAKE_TMP=%IWMAKE_RESULT%
+ set IWMAKE_TMP3="%IWMAKE_ROOT%\%IWMAKE_TMP2%"
+
+
+ echo !macro MODULE_%IWMAKE_TMP%_INSTALLFILES >> "%IWMAKE_NSISCONF%"
+
+ pushd %IWMAKE_TMP3%
+
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$0=$$0%%> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$1=$$1%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$2=$$2%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$3=$$3%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$4=$$4%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$5=$$5%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$6=$$6%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$7=$$7%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$8=$$8%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:$9=$$9%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo set IWMAKE_TMP2=%%IWMAKE_TMP2:%CD%\=%%>> "%IWMAKE_ROOT%\iwmake_tmp.bat"
+
+ dir /AD /B /S | sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt"
+ for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallDirectory "%%m"
+
+
+ dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt"
+ for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addInstallFile "%%m"
+
+ popd
+ echo !macroend >> "%IWMAKE_NSISCONF%"
+
+
+ echo !macro MODULE_%IWMAKE_TMP%_REMOVE removepath >> "%IWMAKE_NSISCONF%"
+ echo strcmp ${removepath} "" MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL >> "%IWMAKE_NSISCONF%"
+ pushd %IWMAKE_TMP3%
+
+ dir /A-D /B /S > "%IWMAKE_ROOT%\iwmake_tmp.txt"
+ for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveFiles "%%m"
+
+ dir /AD /B /S | sort /R > "%IWMAKE_ROOT%\iwmake_tmp.txt"
+ for /F "tokens=1" %%m in (%IWMAKE_ROOT%\iwmake_tmp.txt) do call :addRemoveDirectory "%%m"
+
+ popd
+ echo MODULE_%IWMAKE_TMP%_REMOVE_SAFETYLABEL: >> "%IWMAKE_NSISCONF%"
+ echo !macroend >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:addInstallFile
+ set IWMAKE_TMP2=%~1
+ call "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo File "/oname=%IWMAKE_TMP2%" "%~1" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:addInstallDirectory
+ set IWMAKE_TMP2=%~1
+ call "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo CreateDirectory "$OUTDIR\%IWMAKE_TMP2%" >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:addRemoveDirectory
+ set IWMAKE_TMP2=%~1
+ call "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo RMDir ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:addRemoveFiles
+ set IWMAKE_TMP2=%~1
+ call "%IWMAKE_ROOT%\iwmake_tmp.bat"
+ echo Delete ${removepath}\%IWMAKE_TMP2% >> "%IWMAKE_NSISCONF%"
+goto :eof
+
+:sign
+ echo Signing Installer ...
+ %IWMAKE_SIGNPATH%\signtool.exe sign /v /t http://timestamp.verisign.com/scripts/timestamp.dll /f "%IWMAKE_SIGNPATH%\keys.pfx" "%IWMAKE_OUTPUT_FILE%" >> %IWMAKE_LOGFILE%
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/log.bat b/util/scripts/win-binary/batch/log.bat
new file mode 100755
index 0000000..6186ff1
--- /dev/null
+++ b/util/scripts/win-binary/batch/log.bat
@@ -0,0 +1,18 @@
+call :%1 %2
+goto END
+
+:file
+set IWMAKE_LOGFILE=%IWMAKE_ROOT%\%~1
+call :reset
+goto :eof
+
+:fileAbs
+set IWMAKE_LOGFILE=%1
+call :reset
+goto :eof
+
+:reset
+date /T > %IWMAKE_LOGFILE%
+goto :eof
+
+:END
diff --git a/util/scripts/win-binary/batch/toupper.bat b/util/scripts/win-binary/batch/toupper.bat
new file mode 100755
index 0000000..cc4365a
--- /dev/null
+++ b/util/scripts/win-binary/batch/toupper.bat
@@ -0,0 +1,29 @@
+set IWMAKE_RESULT=%1
+if [%IWMAKE_RESULT%]==[] goto :eof
+set IWMAKE_RESULT=%IWMAKE_RESULT:a=A%
+set IWMAKE_RESULT=%IWMAKE_RESULT:b=B%
+set IWMAKE_RESULT=%IWMAKE_RESULT:c=C%
+set IWMAKE_RESULT=%IWMAKE_RESULT:d=D%
+set IWMAKE_RESULT=%IWMAKE_RESULT:e=E%
+set IWMAKE_RESULT=%IWMAKE_RESULT:f=F%
+set IWMAKE_RESULT=%IWMAKE_RESULT:g=G%
+set IWMAKE_RESULT=%IWMAKE_RESULT:h=H%
+set IWMAKE_RESULT=%IWMAKE_RESULT:i=I%
+set IWMAKE_RESULT=%IWMAKE_RESULT:j=J%
+set IWMAKE_RESULT=%IWMAKE_RESULT:k=K%
+set IWMAKE_RESULT=%IWMAKE_RESULT:l=L%
+set IWMAKE_RESULT=%IWMAKE_RESULT:m=M%
+set IWMAKE_RESULT=%IWMAKE_RESULT:n=N%
+set IWMAKE_RESULT=%IWMAKE_RESULT:o=O%
+set IWMAKE_RESULT=%IWMAKE_RESULT:p=P%
+set IWMAKE_RESULT=%IWMAKE_RESULT:q=Q%
+set IWMAKE_RESULT=%IWMAKE_RESULT:r=R%
+set IWMAKE_RESULT=%IWMAKE_RESULT:s=S%
+set IWMAKE_RESULT=%IWMAKE_RESULT:t=T%
+set IWMAKE_RESULT=%IWMAKE_RESULT:u=U%
+set IWMAKE_RESULT=%IWMAKE_RESULT:v=V%
+set IWMAKE_RESULT=%IWMAKE_RESULT:w=W%
+set IWMAKE_RESULT=%IWMAKE_RESULT:x=X%
+set IWMAKE_RESULT=%IWMAKE_RESULT:y=Y%
+set IWMAKE_RESULT=%IWMAKE_RESULT:z=Z%
+