Use stack for Windows installer.

This commit is contained in:
John MacFarlane
2015-11-14 22:23:47 -08:00
parent 2725ad3be5
commit 87f20f11e2
3 changed files with 34 additions and 23 deletions
+9 -17
View File
@@ -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%
+6 -6
View File
@@ -41,11 +41,11 @@
KeyPath="yes"/>
<RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/>
<File Id="pandocEXE" Name="pandoc.exe"
Source="..\.cabal-sandbox\bin\pandoc.exe" />
Source="$(var.BINPATH)\pandoc.exe" />
<File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
Source="..\COPYRIGHT.txt" />
Source="COPYRIGHT.txt" />
<File Id="pandocCOPYING" Name="COPYING.rtf"
Source="..\COPYING.rtf" />
Source="COPYING.rtf" />
</Component>
<Component Id="CitationSupport"
@@ -55,13 +55,13 @@
Name="Version" Type="string" Value="[ProductVersion]"
KeyPath="yes"/>
<File Id="pandoc_citeprocEXE" Name="pandoc-citeproc.exe"
Source="..\.cabal-sandbox\bin\pandoc-citeproc.exe" />
Source="$(var.BINPATH)\pandoc-citeproc.exe" />
</Component>
<Component Id="Documentation"
Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
<File Id="pandocREADME" Name="Pandoc User's Guide.html"
Source="..\README.html" KeyPath="yes">
Source="README.html" KeyPath="yes">
<Shortcut Id="ApplicationStartMenuShortcut"
Directory="ApplicationProgramsFolder"
Name="Pandoc Users Guide" Advertise="yes" />
@@ -163,7 +163,7 @@
<Property Id="ALLUSERS" Value="2" Secure="yes" />
<Property Id="MSIINSTALLPERUSER" Value="1" />
<WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />
<WixVariable Id="WixUILicenseRtf" Value="COPYING.rtf" />
<UI Id="MyWixUI_Advanced">
<UIRef Id="WixUI_Advanced" />
+19
View File
@@ -0,0 +1,19 @@
flags:
pandoc:
trypandoc: false
https: true
embed_data_files: true
old-locale: false
network-uri: true
pandoc-citeproc:
bibutils: true
embed_data_files: true
unicode_collation: false
test_citeproc: false
debug: false
packages:
- '..'
- '../../pandoc-citeproc'
extra-deps:
- 'hsb2hs-0.3.1'
resolver: lts-3.13