1
0
Fork 0

Build x64dbg.chm in CI

Closes #3687
This commit is contained in:
Duncan Ogilvie 2025-08-19 19:52:09 +02:00
parent dc3e8299d4
commit 099a17a16a
5 changed files with 68 additions and 10 deletions

View File

@ -42,8 +42,31 @@ jobs:
include-hidden-files: true
retention-days: 1
docs:
# Skip building pull requests from the same repository
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Build Documentation
run: |
docs\makechm.bat
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/x64dbg.chm
if-no-files-found: error
include-hidden-files: true
retention-days: 1
package:
needs: cmake
needs: [cmake, docs]
runs-on: windows-latest
steps:
- name: Checkout
@ -63,6 +86,12 @@ jobs:
name: build-x86
path: bin
- name: Download Documentation
uses: actions/download-artifact@v4
with:
name: docs
path: docs
- name: Prepare Release
run: |
curl.exe -L https://github.com/x64dbg/translations/releases/download/translations/qm.zip -o bin\qm.zip

4
docs/.gitignore vendored
View File

@ -1,3 +1,7 @@
_build*/
*.chm
python-2.7.18.amd64.portable/
hha.dll
hhc.exe
itcc.dll
*.7z

View File

@ -89,7 +89,7 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build*', 'Thumbs.db', '.DS_Store', 'README.md', '.git', 'python-2.7.18.amd64.portable']
exclude_patterns = ['_build*', 'Thumbs.db', '.DS_Store', 'README.md', '.git', 'python-2.7.18.amd64.portable*']
# The reST default role (used for this markup: `text`) to use for all
# documents.

View File

@ -2,8 +2,14 @@
REM Command file for Sphinx documentation
set PYTHONNOUSERSITE=1
set PYTHONHOME=%CD%\python-2.7.18.amd64.portable
set PATH=%PYTHONHOME%;%PYTHONHOME%\Scripts;%PATH%
set PORTABLE_PYTHON=%~dp0python-2.7.18.amd64.portable
if not exist "%PORTABLE_PYTHON%" (
echo Portable Python not found!
exit /b 1
)
set PATH=%PORTABLE_PYTHON%;%PORTABLE_PYTHON%\Scripts;%PATH%
set SPHINXBUILD=sphinx-build
if "%SPHINXBUILD%" == "" (

View File

@ -1,13 +1,32 @@
@echo off
if "%VSVARSALLPATH%"=="" set VSVARSALLPATH=c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
echo Setting VS Path
call "%VSVARSALLPATH%"
cd /d "%~dp0"
set PORTABLE_PYTHON=%~dp0python-2.7.18.amd64.portable
if not exist "%PORTABLE_PYTHON%\python.exe" (
echo Downloading portable Python...
curl.exe -L -O https://github.com/x64dbg/docs/releases/download/python27-portable/python-2.7.18.amd64.portable.7z
7z x python-2.7.18.amd64.portable.7z -opython-2.7.18.amd64.portable
)
if not exist "%~dp0hhc.exe" (
echo Downloading HTML Help Workshop...
pause
curl.exe -L -O https://github.com/x64dbg/deps/releases/download/dependencies/hhc-4.74.8702.7z
7z x hhc-4.74.8702.7z
)
echo Building Help Project
call make htmlhelp
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
echo Applying CHM hacks
copy theme.js .\_build\htmlhelp\_static\js\theme.js
type hacks.css >> .\_build\htmlhelp\_static\css\theme.css
echo Building CHM File
hhc .\_build\htmlhelp\x64dbgdoc.hhp
copy .\_build\htmlhelp\x64dbgdoc.chm x64dbg.chm
echo Finished
hhc.exe .\_build\htmlhelp\x64dbgdoc.hhp
copy /Y .\_build\htmlhelp\x64dbgdoc.chm x64dbg.chm
if not exist "x64dbg.chm" (
echo Failed to build CHM file!
exit /b 1
)
echo Finished