2010-01-17 01:37:44 +01:00
|
|
|
@echo off
|
|
|
|
cd ..
|
2013-09-05 18:22:37 +02:00
|
|
|
cabal update
|
2014-05-05 16:08:57 +02:00
|
|
|
cabal sandbox init
|
|
|
|
cabal clean
|
2014-05-06 16:22:40 +02:00
|
|
|
cabal install hsb2hs alex happy
|
2013-01-23 04:43:32 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2014-05-05 16:08:57 +02:00
|
|
|
cabal install -v1 --force --reinstall --flags="embed_data_files"
|
2013-09-15 01:06:54 +02:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2014-05-05 16:08:57 +02:00
|
|
|
cabal install -v1 --reinstall --flags="embed_data_files" pandoc-citeproc
|
2013-01-23 04:43:32 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2014-05-05 16:08:57 +02:00
|
|
|
strip .\.cabal-sandbox\bin\pandoc.exe
|
|
|
|
strip .\.cabal-sandbox\bin\pandoc-citeproc.exe
|
2014-05-06 17:42:30 +02:00
|
|
|
.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html
|
2013-01-23 04:43:32 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2014-05-06 17:56:52 +02:00
|
|
|
.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.rtf COPYING -t rtf -S -o COPYING.rtf
|
2013-02-10 08:19:55 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2010-01-17 01:37:44 +01:00
|
|
|
copy COPYRIGHT COPYRIGHT.txt
|
2014-05-06 17:56:52 +02:00
|
|
|
for /f "tokens=1-2 delims= " %%a in ('.\.cabal-sandbox\bin\pandoc --version') do (
|
2013-02-11 01:25:58 +01:00
|
|
|
@set VERSION=%%b
|
|
|
|
goto :next
|
|
|
|
)
|
|
|
|
:next
|
|
|
|
if "%VERSION%" == "" (
|
|
|
|
echo Error: could not determine version number.
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
echo Detected version %VERSION%
|
2010-01-17 01:37:44 +01:00
|
|
|
cd windows
|
2013-02-10 08:01:21 +01:00
|
|
|
echo Creating msi...
|
2013-07-04 19:37:20 +02:00
|
|
|
candle -dVERSION=%VERSION% pandoc.wxs
|
2013-02-10 08:01:21 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2014-05-17 06:55:07 +02:00
|
|
|
light -sw1076 -ext WixUIExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
|
2013-02-10 08:01:21 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2013-02-11 01:25:58 +01:00
|
|
|
echo Starting kSign: sign, then quit kSign to complete the build...
|
2013-07-04 19:37:20 +02:00
|
|
|
kSign
|