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.
This commit is contained in:
parent
aa5903705a
commit
c78af6f3a6
3 changed files with 12 additions and 40 deletions
17
.github/workflows/release-candidate.yml
vendored
17
.github/workflows/release-candidate.yml
vendored
|
@ -53,12 +53,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
|
for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
|
||||||
stack build ${{ matrix.versions.stack_opts }}pandoc pandoc-citeproc
|
stack build ${{ matrix.versions.stack_opts }}pandoc pandoc-citeproc
|
||||||
@set WINDOWS=%CD%\windows
|
|
||||||
forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%WINDOWS%%"
|
|
||||||
stack exec pandoc -- -s --toc MANUAL.txt -o windows\MANUAL.html
|
|
||||||
stack exec pandoc -- -s COPYING.md -t rtf -o windows\COPYING.rtf
|
|
||||||
copy COPYRIGHT windows\COPYRIGHT.txt
|
|
||||||
cd windows
|
|
||||||
for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
|
for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
|
||||||
@set VERSION=%%b
|
@set VERSION=%%b
|
||||||
goto :next
|
goto :next
|
||||||
|
@ -69,16 +63,23 @@ jobs:
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
echo Detected version %VERSION%
|
echo Detected version %VERSION%
|
||||||
|
@set WINDOWS=%CD%\windows
|
||||||
|
@set RELEASE=%WINDOWS%\pandoc-%VERSION%
|
||||||
|
forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
|
||||||
|
stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
|
||||||
|
stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
|
||||||
|
copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
|
||||||
|
cd windows
|
||||||
echo Creating msi...
|
echo Creating msi...
|
||||||
dir
|
dir
|
||||||
@set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
|
@set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
|
||||||
@set WORKDIR=%CD%
|
@set WORKDIR=%CD%
|
||||||
echo Running candle...
|
echo Running candle...
|
||||||
%WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%WORKDIR% *.wxs -out wixobj\
|
%WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
echo Running light...
|
echo Running light...
|
||||||
%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
|
%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
|
||||||
7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc.exe pandoc-citeproc.exe MANUAL.html COPYING.rtf
|
7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
|
||||||
cd ..
|
cd ..
|
||||||
mkdir windows-release-candidate
|
mkdir windows-release-candidate
|
||||||
copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
|
copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
@echo off
|
|
||||||
stack install --test --ghc-options="-O2" --stack-yaml=..\stack.yaml
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
||||||
for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
|
|
||||||
%BINPATH%\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
||||||
%BINPATH%\pandoc.exe -s ..\COPYING.md -t rtf -o COPYING.rtf
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
||||||
copy ..\COPYRIGHT COPYRIGHT.txt
|
|
||||||
for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
|
|
||||||
@set VERSION=%%b
|
|
||||||
goto :next
|
|
||||||
)
|
|
||||||
:next
|
|
||||||
if "%VERSION%" == "" (
|
|
||||||
echo Error: could not determine version number.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
echo Detected version %VERSION%
|
|
||||||
echo Creating msi...
|
|
||||||
candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% *.wxs -out wixobj\
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
||||||
light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out pandoc-%VERSION%-windows.msi wixobj\*.wixobj
|
|
||||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
||||||
echo Starting kSign: sign, then quit kSign to complete the build...
|
|
||||||
kSign
|
|
||||||
|
|
||||||
echo Copying to shared drive
|
|
||||||
copy pandoc-%VERSION%-windows.msi \\VBOXSVR\WindowsShared\
|
|
|
@ -40,9 +40,9 @@
|
||||||
<File Id="pandocEXE" Name="pandoc.exe"
|
<File Id="pandocEXE" Name="pandoc.exe"
|
||||||
Source="$(var.BINPATH)\pandoc.exe" />
|
Source="$(var.BINPATH)\pandoc.exe" />
|
||||||
<File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
|
<File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
|
||||||
Source="COPYRIGHT.txt" />
|
Source="$(var.BINPATH)\COPYRIGHT.txt" />
|
||||||
<File Id="pandocCOPYING" Name="COPYING.rtf"
|
<File Id="pandocCOPYING" Name="COPYING.rtf"
|
||||||
Source="COPYING.rtf" />
|
Source="$(var.BINPATH)\COPYING.rtf" />
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
<Component Id="CitationSupport"
|
<Component Id="CitationSupport"
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<Component Id="Documentation"
|
<Component Id="Documentation"
|
||||||
Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
|
Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
|
||||||
<File Id="pandocMANUAL" Name="Pandoc User's Guide.html"
|
<File Id="pandocMANUAL" Name="Pandoc User's Guide.html"
|
||||||
Source="MANUAL.html" KeyPath="yes">
|
Source="$(var.BINPATH)\MANUAL.html" KeyPath="yes">
|
||||||
<Shortcut Id="ApplicationStartMenuShortcut"
|
<Shortcut Id="ApplicationStartMenuShortcut"
|
||||||
Directory="ApplicationProgramsFolder"
|
Directory="ApplicationProgramsFolder"
|
||||||
Name="Pandoc User’s Guide" Advertise="yes" />
|
Name="Pandoc User’s Guide" Advertise="yes" />
|
||||||
|
|
Loading…
Reference in a new issue