summaryrefslogtreecommitdiff
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.bat26
1 files changed, 9 insertions, 17 deletions
diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat
index 1e576a525..c7befe531 100644
--- a/windows/make-windows-installer.bat
+++ b/windows/make-windows-installer.bat
@@ -1,22 +1,15 @@
@echo off
-cd ..
-cabal update
-cabal sandbox init
-cabal clean
-cabal install hsb2hs
+stack install --test
if %errorlevel% neq 0 exit /b %errorlevel%
-cabal install -v1 --force --enable-tests --reinstall --flags="embed_data_files" . pandoc-citeproc
+for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
+strip %BINPATH%\pandoc.exe
+strip %BINPATH%\pandoc-citeproc.exe
+%BINPATH%\pandoc.exe -s -S ..\README -o README.html
if %errorlevel% neq 0 exit /b %errorlevel%
-cabal test
+%BINPATH%\pandoc.exe -s ..\COPYING -t rtf -S -o COPYING.rtf
if %errorlevel% neq 0 exit /b %errorlevel%
-strip .\.cabal-sandbox\bin\pandoc.exe
-strip .\.cabal-sandbox\bin\pandoc-citeproc.exe
-.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html
-if %errorlevel% neq 0 exit /b %errorlevel%
-.\.cabal-sandbox\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-sandbox\bin\pandoc --version') do (
+copy ..\COPYRIGHT COPYRIGHT.txt
+for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
@set VERSION=%%b
goto :next
)
@@ -26,9 +19,8 @@ if "%VERSION%" == "" (
exit /b 1
)
echo Detected version %VERSION%
-cd windows
echo Creating msi...
-candle -dVERSION=%VERSION% pandoc.wxs
+candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
if %errorlevel% neq 0 exit /b %errorlevel%