diff options
Diffstat (limited to 'windows')
-rw-r--r-- | windows/make-windows-installer.bat | 24 | ||||
-rw-r--r-- | windows/pandoc.wxs | 12 | ||||
-rw-r--r-- | windows/stack.yaml | 19 |
3 files changed, 34 insertions, 21 deletions
diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat index cac5d974b..c7befe531 100644 --- a/windows/make-windows-installer.bat +++ b/windows/make-windows-installer.bat @@ -1,20 +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 --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%
-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
+%BINPATH%\pandoc.exe -s ..\COPYING -t rtf -S -o COPYING.rtf
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
)
@@ -24,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%
diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index c1465ffcf..d19ed81e1 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -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 User’s 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" /> diff --git a/windows/stack.yaml b/windows/stack.yaml new file mode 100644 index 000000000..4a00e2d38 --- /dev/null +++ b/windows/stack.yaml @@ -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 |