git.iko.soy/typeable/pandoc
on master help sign in
Use versioned directory for windows release zipfile.

Also remove old make-windows-installer.bat, superseded by GitHub actions workflow, and modify pandoc.wxs for new paths.

commitc78af6f3a68ba6778d42b8308d96f74f88f56750 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 17 Jan 2020, 15:37 (7 years ago) parentaa59037
3 files changed+12−40
.github/workflows/release-candidate.yml+9−8 windows/make-windows-installer.bat−29 windows/pandoc.wxs+3−3
.github/workflows/release-candidate.yml+9−8
@@ -53,12 +53,6 @@ jobs:
5353 run: |
5454 for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
5555 stack build ${{ matrix.versions.stack_opts }}pandoc pandoc-citeproc
56− @set WINDOWS=%CD%\windows
57− forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%WINDOWS%%"
58− stack exec pandoc -- -s --toc MANUAL.txt -o windows\MANUAL.html
59− stack exec pandoc -- -s COPYING.md -t rtf -o windows\COPYING.rtf
60− copy COPYRIGHT windows\COPYRIGHT.txt
61− cd windows
6256 for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
6357 @set VERSION=%%b
6458 goto :next
@@ -69,16 +63,23 @@ jobs:
6963 exit /b 1
7064 )
7165 echo Detected version %VERSION%
66+ @set WINDOWS=%CD%\windows
67+ @set RELEASE=%WINDOWS%\pandoc-%VERSION%
68+ forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
69+ stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
70+ stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
71+ copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
72+ cd windows
7273 echo Creating msi...
7374 dir
7475 @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
7576 @set WORKDIR=%CD%
7677 echo Running candle...
77− %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%WORKDIR% *.wxs -out wixobj\
78+ %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
7879 if %errorlevel% neq 0 exit /b %errorlevel%
7980 echo Running light...
8081 %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
81− 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc.exe pandoc-citeproc.exe MANUAL.html COPYING.rtf
82+ 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
8283 cd ..
8384 mkdir windows-release-candidate
8485 copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
windows/make-windows-installer.batdeleted−29
@@ -1,29 +0,0 @@
1−@echo off
2−stack install --test --ghc-options="-O2" --stack-yaml=..\stack.yaml
3−if %errorlevel% neq 0 exit /b %errorlevel%
4−for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
5−%BINPATH%\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
6−if %errorlevel% neq 0 exit /b %errorlevel%
7−%BINPATH%\pandoc.exe -s ..\COPYING.md -t rtf -o COPYING.rtf
8−if %errorlevel% neq 0 exit /b %errorlevel%
9−copy ..\COPYRIGHT COPYRIGHT.txt
10−for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
11− @set VERSION=%%b
12− goto :next
13− )
14−:next
15−if "%VERSION%" == "" (
16− echo Error: could not determine version number.
17− exit /b 1
18−)
19−echo Detected version %VERSION%
20−echo Creating msi...
21−candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% *.wxs -out wixobj\
22−if %errorlevel% neq 0 exit /b %errorlevel%
23−light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out pandoc-%VERSION%-windows.msi wixobj\*.wixobj
24−if %errorlevel% neq 0 exit /b %errorlevel%
25−echo Starting kSign: sign, then quit kSign to complete the build...
26−kSign
27−
28−echo Copying to shared drive
29−copy pandoc-%VERSION%-windows.msi \\VBOXSVR\WindowsShared\
windows/pandoc.wxs+3−3
@@ -40,9 +40,9 @@
4040 <File Id="pandocEXE" Name="pandoc.exe"
4141 Source="$(var.BINPATH)\pandoc.exe" />
4242 <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
43− Source="COPYRIGHT.txt" />
43+ Source="$(var.BINPATH)\COPYRIGHT.txt" />
4444 <File Id="pandocCOPYING" Name="COPYING.rtf"
45− Source="COPYING.rtf" />
45+ Source="$(var.BINPATH)\COPYING.rtf" />
4646 </Component>
4747
4848 <Component Id="CitationSupport"
@@ -58,7 +58,7 @@
5858 <Component Id="Documentation"
5959 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
6060 <File Id="pandocMANUAL" Name="Pandoc User's Guide.html"
61− Source="MANUAL.html" KeyPath="yes">
61+ Source="$(var.BINPATH)\MANUAL.html" KeyPath="yes">
6262 <Shortcut Id="ApplicationStartMenuShortcut"
6363 Directory="ApplicationProgramsFolder"
6464 Name="Pandoc User’s Guide" Advertise="yes" />