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