From 73ee5e160ac160c32f5103b9391d984fd7f23f50 Mon Sep 17 00:00:00 2001 From: "Charlton, Scott R." Date: Mon, 15 Apr 2024 14:50:00 -0600 Subject: [PATCH] Added htmlhelp steps --- .github/workflows/chm.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chm.yml b/.github/workflows/chm.yml index e98d9cdf9..de6e092d8 100644 --- a/.github/workflows/chm.yml +++ b/.github/workflows/chm.yml @@ -31,5 +31,37 @@ jobs: - name: 'fixup_html' shell: bash - working-directory: ./HTMLversion/HTML + working-directory: ${{ github.workspace }}/HTMLversion/HTML run: ./fixup_html.bash + + - name: cache htmlhelp + id: cache-htmlhelp + uses: actions/cache@v4 + with: + path: "C:/Program Files (x86)/HTML Help Workshop" + key: ${{ runner.os }}-htmlhelp + + - name: install htmlhelp + if: steps.cache-htmlhelp.outputs.cache-hit != 'true' + timeout-minutes: 5 + run: | + curl -L -O --max-time 120 http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe + cmd /c start /wait .\htmlhelp.exe /q /c /t:$(Get-Location)\tmp + $file = "$(Get-Location)\tmp\htmlhelp.inf" + (Get-Content $file) | Foreach-Object { $_ ` + -replace '^BeginPrompt', ';;BeginPrompt' ` + -replace '^EndPrompt', ';;EndPrompt' ` + -replace '^49000=CustomLDID49000, 1', '49000=CustomLDID49000, 5' ` + -replace '^"hhupd.exe', ';;hhupd.exe' ` + -replace '^DefaultInstallDir="C:\\Program Files\\HTML Help Workshop"', 'DefaultInstallDir="%ProgramFiles%\\HTML Help Workshop"' + } | Set-Content $file + cmd /c start /wait .\tmp\setup.exe + Remove-Item -Recurse -Force .\tmp + Remove-Item -Recurse -Force .\htmlhelp.exe + # the next line doesn't seem to work (supposed to set the path) + # echo 'C:\Program Files (x86)\HTML Help Workshop' >> $GITHUB_PATH + Write-Output 'C:\Program Files (x86)\HTML Help Workshop' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: 'hhc' + working-directory: ${{ github.workspace }}/HTMLversion + run: Get-Command hhc