git.iko.soy/typeable/pandoc
on free help sign in
typeable/pandoc/windows/make-windows-installer.bat
29 lines 1.1 kB history raw
1@echo off
2stack install --test
3if %errorlevel% neq 0 exit /b %errorlevel%
4for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
5%BINPATH%\pandoc.exe -s -S --toc ..\MANUAL.txt -o MANUAL.html
6if %errorlevel% neq 0 exit /b %errorlevel%
7%BINPATH%\pandoc.exe -s ..\COPYING.md -t rtf -S -o COPYING.rtf
8if %errorlevel% neq 0 exit /b %errorlevel%
9copy ..\COPYRIGHT COPYRIGHT.txt
10for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
11 @set VERSION=%%b
12 goto :next
13 )
14:next
15if "%VERSION%" == "" (
16 echo Error: could not determine version number.
17 exit /b 1
19echo Detected version %VERSION%
20echo Creating msi...
21candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% *.wxs -out wixobj\
22if %errorlevel% neq 0 exit /b %errorlevel%
23light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out pandoc-%VERSION%-windows.msi wixobj\*.wixobj
24if %errorlevel% neq 0 exit /b %errorlevel%
25echo Starting kSign: sign, then quit kSign to complete the build...
26kSign
28echo Copying to shared drive
29copy pandoc-%VERSION%-windows.msi \\VBOXSVR\WindowsShared\