aboutsummaryrefslogtreecommitdiff
path: root/windows/make-windows-installer.bat
diff options
context:
space:
mode:
Diffstat (limited to 'windows/make-windows-installer.bat')
-rw-r--r--windows/make-windows-installer.bat15
1 files changed, 13 insertions, 2 deletions
diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat
index 3398e3930..269458dc3 100644
--- a/windows/make-windows-installer.bat
+++ b/windows/make-windows-installer.bat
@@ -12,10 +12,21 @@ if %errorlevel% neq 0 exit /b %errorlevel%
cabal-dev\bin\pandoc.exe -s --template data\templates\default.rtf COPYING -t rtf -S -o COPYING.rtf
if %errorlevel% neq 0 exit /b %errorlevel%
copy COPYRIGHT COPYRIGHT.txt
+for /f "tokens=1-2 delims= " %%a in ('cabal-dev\bin\pandoc --version') do (
+ @set VERSION=%%b
+ goto :next
+ )
+:next
+if "%VERSION%" == "" (
+ echo Error: could not determine version number.
+ exit /b 1
+)
+echo Detected version %VERSION%
cd windows
echo Creating msi...
-"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -ext WixUIExtension pandoc.wxs
+"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -dVERSION=%VERSION% -ext WixUIExtension pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
-"C:\Program Files\WiX Toolset v3.7\bin\light.exe" -ext WixUIExtension pandoc.wixobj
+"C:\Program Files\WiX Toolset v3.7\bin\light.exe" -ext WixUIExtension -out pandoc-%VERSION%.msi pandoc.wixobj
if %errorlevel% neq 0 exit /b %errorlevel%
+echo Starting kSign: sign, then quit kSign to complete the build...
"C:\Program Files\kSign\kSign.exe"