pandoc/windows/make-windows-installer.bat

37 lines
1.3 KiB
Batchfile
Raw Normal View History

@echo off
cd ..
cabal update
cabal-dev clean
2013-09-15 01:06:54 +02:00
cabal install hsb2hs cabal-dev
if %errorlevel% neq 0 exit /b %errorlevel%
2013-09-15 01:06:54 +02:00
cabal-dev install -v1 --reinstall --flags="embed_data_files" pandoc-citeproc
if %errorlevel% neq 0 exit /b %errorlevel%
cabal-dev install -v1 --reinstall --flags="embed_data_files"
if %errorlevel% neq 0 exit /b %errorlevel%
strip cabal-dev\bin\pandoc.exe
2013-09-15 01:06:54 +02:00
strip cabal-dev\bin\pandoc-citeproc.exe
strip cabal-dev\bin\biblio2yaml.exe
cabal-dev\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html
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...
candle -dVERSION=%VERSION% pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
light -sw1076 -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...
kSign