diff --git a/.github/workflows/build-doxygen.yml b/.github/workflows/build-doxygen.yml deleted file mode 100644 index 3e04b0a..0000000 --- a/.github/workflows/build-doxygen.yml +++ /dev/null @@ -1,372 +0,0 @@ -name: Build Doxygen - -on: - workflow_dispatch: - -permissions: - contents: read - -env: - BUILD_TYPE: Release - -jobs: - build-doxygen: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - extension: "" - archive_format: tar.gz - - os: windows-latest - platform: windows - extension: .exe - archive_format: zip - - os: macos-latest - platform: macos - extension: "" - archive_format: tar.gz - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies (Linux) - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - ninja-build \ - git \ - python3 \ - flex \ - bison - shell: bash - - - name: Install dependencies (Windows) - if: matrix.platform == 'windows' - run: | - choco install ninja winflexbison3 - shell: bash - - - name: Install dependencies (macOS) - if: matrix.platform == 'macos' - run: | - brew install cmake ninja flex bison - shell: bash - - - name: Get latest Doxygen release tag - id: doxygen-version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -euo pipefail - echo "GITHUB_TOKEN present: ${GITHUB_TOKEN:+yes}" - # Retry loop with exponential backoff - attempts=5 - sleep_for=2 - for i in $(seq 1 $attempts); do - echo "Attempt $i..." - resp=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/doxygen/doxygen/releases/latest" ) || true - http_code=$(echo "$resp" | jq -r '. | if has("message") then "error" else "ok" end') - tag=$(echo "$resp" | jq -r '.tag_name // empty') - if [ -n "$tag" ]; then - LATEST_TAG="$tag" - break - fi - echo "No tag found. API response (truncated):" - echo "$resp" | jq -C '.' | sed -n '1,200p' - echo "Sleeping $sleep_for seconds before retry..." - sleep $sleep_for - sleep_for=$((sleep_for * 2)) - done - - if [ -z "${LATEST_TAG:-}" ]; then - echo "Error: Could not fetch Doxygen release tag; last response:" - echo "$resp" | jq -C '.' || echo "$resp" - exit 1 - fi - - echo "Latest Doxygen release: $LATEST_TAG" - echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT - # Remove leading 'Release_' prefix if present - VERSION=${LATEST_TAG#Release_} - VERSION=${VERSION//_/.} - echo "version=$VERSION" >> $GITHUB_OUTPUT - shell: bash - - - name: Cache Doxygen source - id: cache-doxygen-source - uses: actions/cache@v4 - with: - path: doxygen - key: doxygen-source-${{ steps.doxygen-version.outputs.tag }}-${{ matrix.platform }} - - - name: Download Doxygen source code - if: steps.cache-doxygen-source.outputs.cache-hit != 'true' - run: | - echo "Downloading Doxygen ${{ steps.doxygen-version.outputs.tag }}" - git clone --depth 1 --branch ${{ steps.doxygen-version.outputs.tag }} https://github.com/doxygen/doxygen.git - if [ ! -d "doxygen" ]; then - echo "Error: Doxygen source download failed or directory structure is incorrect" - exit 1 - fi - echo "Doxygen source downloaded successfully" - shell: bash - - - name: Download LLVM artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: build-llvm.yml - name: llvm-static-.*-${{ matrix.platform }} - name_is_regexp: true - path: llvm-artifact - skip_unpack: false - - - name: Extract LLVM version from artifact - id: llvm-version - run: | - cd llvm-artifact - if [ "${{ matrix.platform }}" == "windows" ]; then - FILENAME=$(ls llvm-static-*.zip | head -1) - # Extract version from filename like: llvm-static-19.1.6-windows.zip - VERSION=$(echo "$FILENAME" | sed -E 's/llvm-static-(.+)-${{ matrix.platform }}.zip/\1/') - else - FILENAME=$(ls llvm-static-*.tar.gz | head -1) - # Extract version from filename like: llvm-static-19.1.6-linux.tar.gz - VERSION=$(echo "$FILENAME" | sed -E 's/llvm-static-(.+)-${{ matrix.platform }}.tar.gz/\1/') - fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "LLVM version from artifact: $VERSION" - shell: bash - - - name: Download Qt6 artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: build-qt6.yml - name: qt6-static-.*-${{ matrix.platform }} - name_is_regexp: true - path: qt6-artifact - skip_unpack: false - - - name: Extract Qt6 version from artifact - id: qt6-version - run: | - cd qt6-artifact - if [ "${{ matrix.platform }}" == "windows" ]; then - FILENAME=$(ls qt6-static-*.zip | head -1) - # Extract version from filename like: qt6-static-6.10.0-windows.zip - VERSION=$(echo "$FILENAME" | sed -E 's/qt6-static-(.+)-${{ matrix.platform }}.zip/\1/') - else - FILENAME=$(ls qt6-static-*.tar.gz | head -1) - # Extract version from filename like: qt6-static-6.10.0-linux.tar.gz - VERSION=$(echo "$FILENAME" | sed -E 's/qt6-static-(.+)-${{ matrix.platform }}.tar.gz/\1/') - fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Qt6 version from artifact: $VERSION" - shell: bash - - - name: Download Xapian artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: build-xapian.yml - name: xapian-static-.*-${{ matrix.platform }} - name_is_regexp: true - path: xapian-artifact - skip_unpack: false - - - name: Extract Xapian version from artifact - id: xapian-version - run: | - cd xapian-artifact - if [ "${{ matrix.platform }}" == "windows" ]; then - FILENAME=$(ls xapian-static-*.zip | head -1) - # Extract version from filename like: xapian-static-1.4.29-windows.zip - VERSION=$(echo "$FILENAME" | sed -E 's/xapian-static-(.+)-${{ matrix.platform }}.zip/\1/') - else - FILENAME=$(ls xapian-static-*.tar.gz | head -1) - # Extract version from filename like: xapian-static-1.4.29-linux.tar.gz - VERSION=$(echo "$FILENAME" | sed -E 's/xapian-static-(.+)-${{ matrix.platform }}.tar.gz/\1/') - fi - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Xapian version from artifact: $VERSION" - shell: bash - - - name: Extract LLVM artifacts (Linux/macOS) - if: matrix.platform != 'windows' - run: | - mkdir -p llvm-install - cd llvm-artifact - # Extract the tar.gz archive to the install directory - tar -xzf llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C ../llvm-install - shell: bash - - - name: Extract LLVM artifacts (Windows) - if: matrix.platform == 'windows' - run: | - mkdir llvm-install - cd llvm-artifact - # Extract the zip archive to the install directory - Expand-Archive -Path "llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }}.zip" -DestinationPath "../llvm-install" - shell: pwsh - - - name: Extract Qt6 artifacts (Linux/macOS) - if: matrix.platform != 'windows' - run: | - mkdir -p qt6-install - cd qt6-artifact - # Extract the tar.gz archive to the install directory - tar -xzf qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C ../qt6-install - shell: bash - - - name: Extract Qt6 artifacts (Windows) - if: matrix.platform == 'windows' - run: | - mkdir qt6-install - cd qt6-artifact - # Extract the zip archive to the install directory - Expand-Archive -Path "qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }}.zip" -DestinationPath "../qt6-install" - shell: pwsh - - - name: Extract Xapian artifacts (Linux/macOS) - if: matrix.platform != 'windows' - run: | - mkdir -p xapian-install - cd xapian-artifact - # Extract the tar.gz archive to the install directory - tar -xzf xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C ../xapian-install - shell: bash - - - name: Extract Xapian artifacts (Windows) - if: matrix.platform == 'windows' - run: | - mkdir xapian-install - cd xapian-artifact - # Extract the zip archive to the install directory - Expand-Archive -Path "xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }}.zip" -DestinationPath "../xapian-install" - shell: pwsh - - - name: Set up MSVC dev command prompt (Windows) - if: matrix.platform == 'windows' - uses: ilammy/msvc-dev-cmd@v1 - - - name: Configure CMake for Doxygen - env: - WORKSPACE: ${{ github.workspace }} - run: | - if command -v cygpath >/dev/null 2>&1; then - export WORKSPACE_UNIX=$(cygpath -u "$WORKSPACE") - echo "Converted with cygpath: $WORKSPACE_UNIX" - else - export WORKSPACE_UNIX=${WORKSPACE//\\//} - echo "cygpath not found; fallback: $WORKSPACE_UNIX" - fi - - # Verify Doxygen source directory exists - if [ ! -d "doxygen" ]; then - echo "Error: Doxygen source directory not found" - exit 1 - fi - - mkdir -p doxygen/build - cd doxygen/build - - cmake .. \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ - -DCMAKE_INSTALL_PREFIX=$WORKSPACE_UNIX/doxygen-install \ - -Dbuild_doc=YES \ - -Dbuild_search=YES \ - -Dbuild_wizard=YES \ - -Dbuild_app=YES \ - -Dbuild_parse=YES \ - -Duse_libclang=YES \ - -Dstatic_libclang=YES \ - -Dforce_qt=Qt6 \ - -DCMAKE_PREFIX_PATH="$WORKSPACE_UNIX/llvm-install;$WORKSPACE_UNIX/qt6-install;$WORKSPACE_UNIX/xapian-install" - shell: bash - - - name: Build Doxygen - run: | - cd doxygen/build - if [ "${{ matrix.platform }}" == "windows" ]; then - ninja -j${NUMBER_OF_PROCESSORS:-4} - elif [ "${{ matrix.platform }}" == "macos" ]; then - ninja -j$(sysctl -n hw.logicalcpu) - else - ninja -j$(nproc) - fi - shell: bash - - - name: Install Doxygen - run: | - cd doxygen/build - ninja install - shell: bash - - - name: Verify Doxygen build - run: | - echo "Checking Doxygen binary..." - if [ "${{ matrix.platform }}" == "windows" ]; then - ls -lh ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} - else - ls -lh ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} - fi - - # Try to run doxygen to verify it works - ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} --version || echo "Note: doxygen version check failed (may be expected on some platforms)" - shell: bash - - - name: Create build artifact (Linux/macOS) - if: matrix.platform != 'windows' - run: | - cd ${{ github.workspace }} - tar -czf doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C doxygen-install . - shell: bash - - - name: Create build artifact (Windows) - if: matrix.platform == 'windows' - run: | - Compress-Archive -Path 'doxygen-install\\*' -DestinationPath 'doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.platform }}.zip' -Force - shell: pwsh - - - name: Upload Doxygen build - uses: actions/upload-artifact@v4 - with: - name: doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.platform }} - path: doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.platform }}.${{ matrix.archive_format }} - retention-days: 30 - - - name: Display build summary - run: | - echo "## Doxygen Build Summary (${{ matrix.platform }})" >> $GITHUB_STEP_SUMMARY - echo "- **Platform**: ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY - echo "- **OS**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY - echo "- **Doxygen Version**: ${{ steps.doxygen-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Build Type**: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY - echo "- **LLVM Version**: ${{ steps.llvm-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Qt6 Version**: ${{ steps.qt6-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Xapian Version**: ${{ steps.xapian-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Archive Format**: ${{ matrix.archive_format }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### CMake Configuration" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "-Dbuild_doc=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dbuild_search=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dbuild_wizard=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dbuild_app=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dbuild_parse=YES" >> $GITHUB_STEP_SUMMARY - echo "-Duse_libclang=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dstatic_libclang=YES" >> $GITHUB_STEP_SUMMARY - echo "-Dforce_qt=Qt6" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Components" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - find ${{ github.workspace }}/doxygen-install/bin -type f -executable 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/build-llvm.yml b/.github/workflows/build-llvm.yml deleted file mode 100644 index 1d969b6..0000000 --- a/.github/workflows/build-llvm.yml +++ /dev/null @@ -1,248 +0,0 @@ -name: Build LLVM Static - -on: - workflow_dispatch: - -env: - # Build type for CMake - BUILD_TYPE: Release - -jobs: - build-llvm: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - extension: "" - archive_format: tar.gz - cmake_args: >- - -DLLVM_ENABLE_PIC=OFF - -DLLVM_ENABLE_TERMINFO=OFF - -DLLVM_TARGETS_TO_BUILD="X86;AArch64" - - os: windows-latest - platform: windows - extension: .exe - archive_format: zip - cmake_args: >- - -DLLVM_USE_CRT_RELEASE=MT - -DLLVM_TARGETS_TO_BUILD="X86;AArch64" - -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded - -DLLVM_ENABLE_ZLIB=OFF - - os: macos-latest - platform: macos - extension: "" - archive_format: tar.gz - cmake_args: >- - -DLLVM_ENABLE_PIC=OFF - -DLLVM_TARGETS_TO_BUILD="X86;AArch64" - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies (Linux) - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - ninja-build \ - git \ - python3 \ - python3-pip \ - zlib1g-dev \ - libedit-dev \ - libffi-dev \ - libxml2-dev \ - libtinfo-dev - shell: bash - - - name: Install dependencies (Windows) - if: matrix.platform == 'windows' - run: | - choco install ninja - shell: bash - - - name: Install dependencies (macOS) - if: matrix.platform == 'macos' - run: | - brew install cmake ninja - shell: bash - - - name: Get latest LLVM release tag - id: llvm-version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -euo pipefail - echo "GITHUB_TOKEN present: ${GITHUB_TOKEN:+yes}" - # Retry loop with exponential backoff - attempts=5 - sleep_for=2 - for i in $(seq 1 $attempts); do - echo "Attempt $i..." - resp=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/llvm/llvm-project/releases/latest" ) || true - http_code=$(echo "$resp" | jq -r '. | if has("message") then "error" else "ok" end') - tag=$(echo "$resp" | jq -r '.tag_name // empty') - if [ -n "$tag" ]; then - LATEST_TAG="$tag" - break - fi - echo "No tag found. API response (truncated):" - echo "$resp" | jq -C '.' | sed -n '1,200p' - echo "Sleeping $sleep_for seconds before retry..." - sleep $sleep_for - sleep_for=$((sleep_for * 2)) - done - - if [ -z "${LATEST_TAG:-}" ]; then - echo "Error: Could not fetch LLVM release tag; last response:" - echo "$resp" | jq -C '.' || echo "$resp" - exit 1 - fi - - echo "Latest LLVM release: $LATEST_TAG" - echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT - VERSION=${LATEST_TAG#llvmorg-} - echo "version=$VERSION" >> $GITHUB_OUTPUT - shell: bash - - - - name: Cache LLVM source - id: cache-llvm-source - uses: actions/cache@v4 - with: - path: llvm-project - key: llvm-source-${{ steps.llvm-version.outputs.tag }}-${{ matrix.platform }} - - - name: Download LLVM source code - if: steps.cache-llvm-source.outputs.cache-hit != 'true' - run: | - echo "Downloading LLVM ${{ steps.llvm-version.outputs.tag }}" - git clone --depth 1 --branch ${{ steps.llvm-version.outputs.tag }} https://github.com/llvm/llvm-project.git - if [ ! -d "llvm-project/llvm" ]; then - echo "Error: LLVM source download failed or directory structure is incorrect" - exit 1 - fi - echo "LLVM source downloaded successfully" - shell: bash - - - name: Configure CMake for LLVM - env: - WORKSPACE: ${{ github.workspace }} - run: | - if command -v cygpath >/dev/null 2>&1; then - export WORKSPACE_UNIX=$(cygpath -u "$WORKSPACE") - echo "Converted with cygpath: $WORKSPACE_UNIX" - else - # fallback to simple replace - export WORKSPACE_UNIX=${WORKSPACE//\\//} - echo "cygpath not found; fallback: $WORKSPACE_UNIX" - fi - # Verify LLVM source directory exists - if [ ! -d "llvm-project/llvm" ]; then - echo "Error: LLVM source directory not found" - exit 1 - fi - mkdir -p llvm-project/build - cd llvm-project/build - cmake ../llvm \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ - -DCMAKE_INSTALL_PREFIX=$WORKSPACE_UNIX/llvm-install \ - -DLLVM_ENABLE_PROJECTS="clang;lld" \ - -DLIBCLANG_BUILD_STATIC=ON \ - -DLLVM_ENABLE_OCAMLDOC=OFF \ - -DLLVM_ENABLE_LTO=OFF \ - -DLLVM_ENABLE_WARNINGS=OFF \ - -DLLVM_ENABLE_Z3_SOLVER=OFF \ - -DLLVM_ENABLE_ZSTD=OFF \ - -DLLVM_ENABLE_BINDING=OFF \ - -DLLVM_ENABLE_LIBXML2=OFF \ - -DLLVM_ENABLE_LIBEDIT=OFF \ - -DLLVM_ENABLE_ASSERTIONS=OFF \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_TOOL_REMARKS_SHLIB_BUILD=OFF \ - -DLLVM_PARALLEL_LINK_JOBS=1 \ - ${{ matrix.cmake_args }} - shell: bash - - - name: Build LLVM - run: | - cd llvm-project/build - if [ "${{ matrix.platform }}" == "windows" ]; then - ninja -j${NUMBER_OF_PROCESSORS:-4} - elif [ "${{ matrix.platform }}" == "macos" ]; then - ninja -j$(sysctl -n hw.logicalcpu) - else - ninja -j$(nproc) - fi - shell: bash - - - name: Install LLVM - run: | - cd llvm-project/build - ninja install - shell: bash - - - name: Verify static build - run: | - echo "Checking libclang static library..." - if [ "${{ matrix.platform }}" == "windows" ]; then - win_search_dir="${{ github.workspace }}/llvm-install" - win_search_dir="${search_dir//\\//}" - find $win_search_dir -name "libclang*.lib" -o -name "clang*.lib" | head -10 - else - find ${{ github.workspace }}/llvm-install -name "libclang*.a" | head -10 - fi - shell: bash - - - name: Create build artifact (Linux/macOS) - if: matrix.platform != 'windows' - run: | - cd ${{ github.workspace }} - tar -czf llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C llvm-install . - shell: bash - - - name: Create build artifact (Windows) - if: matrix.platform == 'windows' - run: | - Compress-Archive -Path 'llvm-install\\*' -DestinationPath 'llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }}.zip' -Force - shell: pwsh - - - name: Upload LLVM static build - uses: actions/upload-artifact@v4 - with: - name: llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }} - path: llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.platform }}.${{ matrix.archive_format }} - retention-days: 30 - - - name: Display build summary - run: | - echo "## LLVM Build Summary (${{ matrix.platform }})" >> $GITHUB_STEP_SUMMARY - echo "- **Platform**: ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY - echo "- **OS**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY - echo "- **LLVM Version**: ${{ steps.llvm-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Build Type**: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY - echo "- **Enabled Projects**: clang, lld" >> $GITHUB_STEP_SUMMARY - echo "- **Static Build**: Enabled" >> $GITHUB_STEP_SUMMARY - echo "- **libclang Static**: Enabled" >> $GITHUB_STEP_SUMMARY - echo "- **Archive Format**: ${{ matrix.archive_format }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Platform-specific CMake Args" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo '${{ matrix.cmake_args }}' >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Components" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - find ${{ github.workspace }}/llvm-install/bin -type f -executable 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/build-qt6.yml b/.github/workflows/build-qt6.yml deleted file mode 100644 index 175a6ec..0000000 --- a/.github/workflows/build-qt6.yml +++ /dev/null @@ -1,236 +0,0 @@ -name: Build Qt6 Static - -on: - workflow_dispatch: - -permissions: - contents: read - -env: - # Build type for CMake - BUILD_TYPE: Release - -jobs: - build-qt6: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - archive_format: tar.gz - - os: windows-latest - platform: windows - archive_format: zip - - os: macos-latest - platform: macos - archive_format: tar.gz - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies (Linux) - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - ninja-build \ - libfontconfig1-dev \ - libfreetype6-dev \ - libx11-dev \ - libx11-xcb-dev \ - libxext-dev \ - libxfixes-dev \ - libxi-dev \ - libxrender-dev \ - libxcb1-dev \ - libxcb-cursor-dev \ - libxcb-glx0-dev \ - libxcb-keysyms1-dev \ - libxcb-image0-dev \ - libxcb-shm0-dev \ - libxcb-icccm4-dev \ - libxcb-sync-dev \ - libxcb-xfixes0-dev \ - libxcb-shape0-dev \ - libxcb-randr0-dev \ - libxcb-render-util0-dev \ - libxcb-util-dev \ - libxcb-xinerama0-dev \ - libxcb-xkb-dev \ - libxkbcommon-dev \ - libxkbcommon-x11-dev \ - libgl1-mesa-dev \ - libglu1-mesa-dev - shell: bash - - - name: Install dependencies (Windows) - if: matrix.platform == 'windows' - run: | - choco install ninja - shell: bash - - - name: Install dependencies (macOS) - if: matrix.platform == 'macos' - run: | - brew install cmake ninja - shell: bash - - - name: Set Qt6 version - id: qt6-version - run: | - # Using a fixed Qt6 version for stability - # Update this version when a new Qt6 is released - VERSION="6.10.0" - echo "Qt6 version: $VERSION" - echo "version=$VERSION" >> $GITHUB_OUTPUT - shell: bash - - - name: Cache Qt6 source - id: cache-qt6-source - uses: actions/cache@v4 - with: - path: qt6-source - key: qt6-source-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }} - - - name: Download Qt6 source code - if: steps.cache-qt6-source.outputs.cache-hit != 'true' - run: | - echo "Downloading Qt6 ${{ steps.qt6-version.outputs.version }}" - VERSION="${{ steps.qt6-version.outputs.version }}" - MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1-2) - - # Download qtbase - mkdir -p qt6-source - cd qt6-source - - echo "Downloading qtbase..." - curl -L -o qtbase.tar.xz "https://download.qt.io/official_releases/qt/$MAJOR_MINOR/$VERSION/submodules/qtbase-everywhere-src-$VERSION.tar.xz" - tar -xf qtbase.tar.xz - mv qtbase-everywhere-src-$VERSION qtbase - rm qtbase.tar.xz - - echo "Downloading qtsvg..." - curl -L -o qtsvg.tar.xz "https://download.qt.io/official_releases/qt/$MAJOR_MINOR/$VERSION/submodules/qtsvg-everywhere-src-$VERSION.tar.xz" - tar -xf qtsvg.tar.xz - mv qtsvg-everywhere-src-$VERSION qtsvg - rm qtsvg.tar.xz - - if [ ! -d "qtbase" ] || [ ! -d "qtsvg" ]; then - echo "Error: Qt6 source download failed or directory structure is incorrect" - exit 1 - fi - echo "Qt6 source downloaded successfully" - shell: bash - - - name: Set up MSVC dev command prompt (Windows) - if: matrix.platform == 'windows' - uses: ilammy/msvc-dev-cmd@v1 - - - name: Configure CMake for Qt6 Base (Windows) - if: matrix.platform == 'windows' - run: | - cd qt6-source\qtbase - call configure.bat -static -static-runtime -release -prefix ${{ github.workspace }}\qt6-install -platform win32-msvc -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -sql-odbc -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests - cmake --build . --parallel - cmake --install . - shell: cmd - - - name: Configure CMake for Qt6 Base (Linux) - if: matrix.platform == 'linux' - run: | - cd qt6-source/qtbase - ./configure -static -static-runtime -release -prefix ${{ github.workspace }}/qt6-install -platform linux-g++-64 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests - cmake --build . --parallel - cmake --install . - shell: bash - - - name: Configure CMake for Qt6 Base (macOS) - if: matrix.platform == 'macos' - run: | - cd qt6-source/qtbase - ./configure -static -static-runtime -release -prefix ${{ github.workspace }}/qt6-install -platform macx-clang -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests - cmake --build . --parallel - cmake --install . - shell: bash - - - name: Configure CMake for Qt6 SVG (Windows) - if: matrix.platform == 'windows' - run: | - cd qt6-source\qtsvg - call ${{ github.workspace }}\qt6-install\bin\qt-configure-module.bat . - cmake --build . --parallel - cmake --install . - shell: cmd - - - name: Configure CMake for Qt6 SVG (Linux/macOS) - if: matrix.platform != 'windows' - run: | - cd qt6-source/qtsvg - ${{ github.workspace }}/qt6-install/bin/qt-configure-module . - cmake --build . --parallel - cmake --install . - shell: bash - - - name: Verify static build - run: | - echo "Checking Qt6 static libraries..." - if [ "${{ matrix.platform }}" == "windows" ]; then - win_search_dir="${{ github.workspace }}/qt6-install" - win_search_dir="${win_search_dir//\\//}" - find $win_search_dir -name "Qt6*.lib" | head -10 - else - find ${{ github.workspace }}/qt6-install -name "libQt6*.a" | head -10 - fi - shell: bash - - - name: Create build artifact (Linux/macOS) - if: matrix.platform != 'windows' - run: | - cd ${{ github.workspace }} - tar -czf qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C qt6-install . - shell: bash - - - name: Create build artifact (Windows) - if: matrix.platform == 'windows' - run: | - Compress-Archive -Path 'qt6-install\\*' -DestinationPath 'qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }}.zip' -Force - shell: pwsh - - - name: Upload Qt6 static build - uses: actions/upload-artifact@v4 - with: - name: qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }} - path: qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.platform }}.${{ matrix.archive_format }} - retention-days: 30 - - - name: Display build summary - run: | - echo "## Qt6 Build Summary (${{ matrix.platform }})" >> $GITHUB_STEP_SUMMARY - echo "- **Platform**: ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY - echo "- **OS**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY - echo "- **Qt6 Version**: ${{ steps.qt6-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Build Type**: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY - echo "- **Enabled Modules**: qtbase, qtsvg" >> $GITHUB_STEP_SUMMARY - echo "- **Static Build**: Enabled" >> $GITHUB_STEP_SUMMARY - echo "- **Shared Build**: Disabled" >> $GITHUB_STEP_SUMMARY - echo "- **Archive Format**: ${{ matrix.archive_format }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Platform-specific CMake Args" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo '${{ matrix.cmake_args }}' >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Qt6 Libraries" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - if [ "${{ matrix.platform }}" == "windows" ]; then - find ${{ github.workspace }}/qt6-install -name "*.lib" 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true - else - find ${{ github.workspace }}/qt6-install -name "*.a" 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true - fi - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..0d8d6cc --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,1447 @@ +on: + workflow_dispatch: + +name: Create Doxygen Release + +permissions: + contents: read + +env: + BUILD_TYPE: Release + +jobs: + +#=============================================================== +# LLVM JOB +#=============================================================== + build-llvm: + name: LLVM (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + cpu: intel + platform: linux + extension: "" + archive_format: tar.gz + - os: windows-latest + cpu: intel + platform: windows + extension: .exe + archive_format: zip + - os: macos-15 + cpu: arm + platform: macos + extension: "" + archive_format: tar.gz + - os: macos-15-intel + cpu: intel + platform: macos + extension: "" + archive_format: tar.gz + steps: + - name: Checkout repository + uses: actions/checkout@v4 + +#------------------------------------- setup Linux environment for LLVM + + - name: Install dependencies (Linux) + if: matrix.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + cmake \ + ninja-build \ + git \ + python3 \ + python3-pip \ + zlib1g-dev \ + libedit-dev \ + libffi-dev \ + libxml2-dev \ + libtinfo-dev + shell: bash + +#------------------------------------- setup Windows environment for LLVM +# + - name: Install dependencies (Windows) + if: matrix.platform == 'windows' + run: | + choco install ninja + shell: bash + +#------------------------------------- setup macOS environment for LLVM + + - name: Install dependencies (macOS) + if: matrix.platform == 'macos' + run: | + brew install cmake ninja + shell: bash + +#------------------------------------- determine LLVM version to use + + - name: Get latest LLVM release tag + id: llvm-version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + # echo "GITHUB_TOKEN present: ${GITHUB_TOKEN:+yes}" + # # Retry loop with exponential backoff + # attempts=5 + # sleep_for=2 + # for i in $(seq 1 $attempts); do + # echo "Attempt $i..." + # resp=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/llvm/llvm-project/releases/latest" ) || true + # http_code=$(echo "$resp" | jq -r '. | if has("message") then "error" else "ok" end') + # tag=$(echo "$resp" | jq -r '.tag_name // empty') + # if [ -n "$tag" ]; then + # LATEST_TAG="$tag" + # break + # fi + # echo "No tag found. API response (truncated):" + # echo "$resp" | jq -C '.' | sed -n '1,200p' + # echo "Sleeping $sleep_for seconds before retry..." + # sleep $sleep_for + # sleep_for=$((sleep_for * 2)) + # done + + # if [ -z "${LATEST_TAG:-}" ]; then + # echo "Error: Could not fetch LLVM release tag; last response:" + # echo "$resp" | jq -C '.' || echo "$resp" + # exit 1 + # fi + + # echo "Latest LLVM release: $LATEST_TAG" + LATEST_TAG="llvmorg-21.1.5" + echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT + VERSION=${LATEST_TAG#llvmorg-} + echo "version=$VERSION" >> $GITHUB_OUTPUT + shell: bash + +#------------------------------------- get LLVM sources to build + + - name: Cache LLVM source + id: cache-llvm-source + uses: actions/cache@v4 + with: + path: llvm-project + key: llvm-source-${{ steps.llvm-version.outputs.tag }}-${{ matrix.os }} + + - name: Download LLVM source code + if: steps.cache-llvm-source.outputs.cache-hit != 'true' + run: | + echo "Downloading LLVM ${{ steps.llvm-version.outputs.tag }}" + git clone --depth 1 --branch ${{ steps.llvm-version.outputs.tag }} https://github.com/llvm/llvm-project.git + if [ ! -d "llvm-project/llvm" ]; then + echo "Error: LLVM source download failed or directory structure is incorrect" + exit 1 + fi + echo "LLVM source downloaded successfully" + shell: bash + +#------------------------------------- configure LLVM + + - name: Configure CMake for LLVM (Linux/macOS) + if: matrix.platform != 'windows' + run: | + # Verify LLVM source directory exists + if [ ! -d "llvm-project/llvm" ]; then + echo "Error: LLVM source directory not found" + exit 1 + fi + mkdir -p llvm-project/build + cd llvm-project/build + cmake ../llvm \ + -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/llvm-install \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + -DLIBCLANG_BUILD_STATIC=ON \ + -DLLVM_ENABLE_OCAMLDOC=OFF \ + -DLLVM_ENABLE_LTO=OFF \ + -DLLVM_ENABLE_WARNINGS=OFF \ + -DLLVM_ENABLE_Z3_SOLVER=OFF \ + -DLLVM_ENABLE_ZSTD=OFF \ + -DLLVM_ENABLE_BINDING=OFF \ + -DLLVM_ENABLE_LIBXML2=OFF \ + -DLLVM_ENABLE_LIBEDIT=OFF \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_TOOL_REMARKS_SHLIB_BUILD=OFF \ + -DLLVM_PARALLEL_LINK_JOBS=1 \ + ${{ matrix.cmake_args }} + cmake --build . --parallel 2 + cmake --install . + shell: bash + + - name: Set up MSVC dev command prompt (Windows) + if: matrix.platform == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Configure CMake for LLVM (Windows) + if: matrix.platform == 'windows' + run: | + mkdir llvm-project + mkdir llvm-project\build + cd llvm-project\build + cmake ..\llvm ^ + -G Ninja ^ + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ^ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\llvm-install ^ + -DLLVM_ENABLE_PROJECTS="clang;lld" ^ + -DLIBCLANG_BUILD_STATIC=ON ^ + -DLLVM_ENABLE_OCAMLDOC=OFF ^ + -DLLVM_ENABLE_LTO=OFF ^ + -DLLVM_ENABLE_WARNINGS=OFF ^ + -DLLVM_ENABLE_Z3_SOLVER=OFF ^ + -DLLVM_ENABLE_ZSTD=OFF ^ + -DLLVM_ENABLE_ZLIB=OFF ^ + -DLLVM_ENABLE_BINDING=OFF ^ + -DLLVM_ENABLE_LIBXML2=OFF ^ + -DLLVM_ENABLE_LIBEDIT=OFF ^ + -DLLVM_ENABLE_ASSERTIONS=OFF ^ + -DLLVM_INCLUDE_BENCHMARKS=OFF ^ + -DLLVM_INCLUDE_TESTS=OFF ^ + -DLLVM_INCLUDE_EXAMPLES=OFF ^ + -DLLVM_TOOL_REMARKS_SHLIB_BUILD=OFF ^ + -DLLVM_PARALLEL_LINK_JOBS=1 ^ + -DLLVM_USE_CRT_RELEASE=MT ^ + -DLLVM_TARGETS_TO_BUILD="X86;AArch64" ^ + -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded + cmake --build . --parallel 2 + cmake --install . + shell: cmd + +#------------------------------------- check LLVM build results + + - name: Verify static build + run: | + echo "Checking libclang static library..." + if [ "${{ matrix.platform }}" == "windows" ]; then + win_search_dir="${{ github.workspace }}/llvm-install" + win_search_dir="${search_dir//\\//}" + find $win_search_dir -name "libclang*.lib" -o -name "clang*.lib" | head -10 + else + find ${{ github.workspace }}/llvm-install -name "libclang*.a" | head -10 + fi + shell: bash + +#------------------------------------- create LLVM artifacts to upload + + - name: Create build artifact (Linux/macOS) + if: matrix.platform != 'windows' + run: | + cd ${{ github.workspace }} + tar -czf llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }}.tar.gz -C llvm-install . + shell: bash + + - name: Create build artifact (Windows) + if: matrix.platform == 'windows' + run: | + Compress-Archive -Path 'llvm-install\\*' -DestinationPath 'llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }}.zip' -Force + shell: pwsh + +#------------------------------------- upload LLVM artifacts + + - name: Upload LLVM static build + uses: actions/upload-artifact@v6 + with: + name: llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }} + path: llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }}.${{ matrix.archive_format }} + retention-days: 30 + +#=============================================================== +# Xapian JOB +#=============================================================== + + build-xapian: + name: Xapian (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + cpu: intel + platform: linux + extension: "" + archive_format: tar.gz + - os: windows-latest + cpu: intel + platform: windows + extension: .exe + archive_format: zip + - os: macos-15 + cpu: arm + platform: macos + extension: "" + archive_format: tar.gz + - os: macos-15-intel + cpu: intel + platform: macos + extension: "" + archive_format: tar.gz + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + +#------------------------------------- setup Linux environment for Xapian + + - name: Install dependencies (Linux) + if: matrix.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + libmagic-dev \ + build-essential \ + autoconf \ + automake \ + libtool \ + git \ + zlib1g-dev \ + uuid-dev + shell: bash + +#------------------------------------- setup Windows environment for Xapian + + - name: Install dependencies (Windows) + if: matrix.platform == 'windows' + run: | + choco install wget -y + shell: bash + + - name: Set up MSVC dev command prompt (Windows) + if: matrix.platform == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Download zlib (Windows) + if: matrix.platform == 'windows' + run: | + curl -L -o zlib.tgz https://zlib.net/zlib-1.3.1.tar.gz + tar zxvf zlib.tgz + + - name: Build zlib (Windows) + if: matrix.platform == 'windows' + shell: cmd + run: | + cd zlib-1.3.1 + @rem nmake -f win32\Makefile.msc LOC="-MT" all + nmake -f win32\Makefile.msc LOC="-MT" zlib.lib + + - name: Install MSYS2 (Windows) + uses: msys2/setup-msys2@v2 + if: matrix.platform == 'windows' + with: + update: true + install: >- + base-devel + mingw-w64-x86_64-toolchain + autoconf + automake + libtool + jq + +#------------------------------------- setup macOS environment for Xapian + + - name: Install dependencies (macOS) + if: matrix.platform == 'macos' + run: | + brew install autoconf automake libtool libmagic + shell: bash + +#------------------------------------- determine version of Xapian to use + + - name: Get latest Xapian stable release tag + id: xapian-version + run: | + VERSION="1.4.29" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Extracted version: $VERSION" + shell: bash + +#------------------------------------- download Xapian sources to build + + #- name: Cache Xapian source + # id: cache-xapian-source + # uses: actions/cache@v4 + # with: + # path: xapian + # key: xapian-core-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.tar.xz + + - name: Download Xapian source code + #if: steps.cache-xapian-source.outputs.cache-hit != 'true' + run: | + VERSION="${{ steps.xapian-version.outputs.version }}" + echo "Downloading Xapian $VERSION" + mkdir xapian + cd xapian + wget https://oligarchy.co.uk/xapian/$VERSION/xapian-core-$VERSION.tar.xz + tar -Jxf xapian-core-$VERSION.tar.xz + rm xapian-core-$VERSION.tar.xz + echo "Xapian source downloaded successfully" + shell: bash + +#------------------------------------- configure Xapian build for Linux/macOS + + - name: Configure Xapian (Linux/macOS) + if: matrix.platform != 'windows' + run: | + VERSION="${{ steps.xapian-version.outputs.version }}" + cd xapian/xapian-core-$VERSION + ./configure \ + --prefix=${{ github.workspace }}/xapian-install \ + --enable-static=yes \ + --enable-shared=no \ + --disable-documentation \ + ${{ matrix.configure_args }} + shell: bash + +#------------------------------------- configure Xapian build for Windows + + - name: Write configure script (Windows) + if: matrix.platform == 'windows' + run: | + VERSION="${{ steps.xapian-version.outputs.version }}" + cd xapian/xapian-core-$VERSION + cat <<- 'EOF' > run_me.sh + export CC="cl -nologo" + export CXX="./compile cl -nologo" + export CXXFLAGS="-EHsc" + export AR="lib" + export LD="link" + export NM="dumpbin" + export CPPFLAGS="-I../../zlib-1.3.1" + export LDFLAGS="-I../../zlib-1.3.1" + export PREFIX_UNIX="$(cygpath $PREFIX)" + echo "prefix=$PREFIX_UNIX" + ./configure --enable-static=yes --enable-shared=no --prefix=$PREFIX_UNIX + make + make install + EOF + chmod 755 run_me.sh + echo "====" + cat run_me.sh + echo "====" + shell: bash + + - name: Configure and Build Xapian (Windows) + if: matrix.platform == 'windows' + shell: cmd + run: | + @echo on + set VERSION=${{ steps.xapian-version.outputs.version }} + cd xapian\xapian-core-%VERSION% + set PATH=C:\msys64\usr\bin;%PATH% + set LIB=..\..\zlib-1.3.1;%LIB% + set PREFIX=${{ github.workspace }}\xapian-install + set MSYS2_PATH_TYPE=inherit + bash -c "./run_me.sh" + + - name: Build Xapian (Linux/macOS) + if: matrix.platform != 'windows' + run: | + VERSION="${{ steps.xapian-version.outputs.version }}" + cd xapian/xapian-core-$VERSION + make + make install + shell: bash + +#------------------------------------- verify Xapian build results + + - name: Verify static build + run: | + echo "Checking Xapian static library..." + cd xapian + if [ "${{ matrix.platform }}" == "windows" ]; then + find "$(cygpath "${{ github.workspace }}")/xapian-install" -name "*.lib" | head -10 + else + find ${{ github.workspace }}/xapian-install -name "*.a" | head -10 + nm -C ${{ github.workspace }}/xapian-install/lib/libxapian.a | grep " U " | sort | uniq + fi + shell: bash + +#------------------------------------- create Xapian build artifacts to upload + + - name: Create build artifact (Linux/macOS) + if: matrix.platform != 'windows' + run: | + cd ${{ github.workspace }} + tar -czf xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.tar.gz -C xapian-install . + shell: bash + + - name: Create build artifact (Windows) + if: matrix.platform == 'windows' + run: | + Compress-Archive -Path 'xapian-install\\*' -DestinationPath 'xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.zip' -Force + shell: pwsh + +#------------------------------------- upload Xapian build artifacts + + - name: Upload Xapian static build + uses: actions/upload-artifact@v6 + with: + name: xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }} + path: xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.${{ matrix.archive_format }} + retention-days: 30 + +#=============================================================== +# Qt6 JOB +#=============================================================== + + build-qt6: + name: Qt6 (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + cpu: intel + platform: linux + extension: "" + archive_format: tar.gz + - os: windows-latest + cpu: intel + platform: windows + extension: .exe + archive_format: zip + - os: macos-15 + cpu: arm + platform: macos + extension: "" + archive_format: tar.gz + - os: macos-15-intel + cpu: intel + platform: macos + extension: "" + archive_format: tar.gz + steps: + - name: Checkout repository + uses: actions/checkout@v4 + +#------------------------------------- setup Linux environment for Qt6 + + - name: Install dependencies (Linux) + if: matrix.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + cmake \ + ninja-build \ + libfontconfig1-dev \ + libfreetype6-dev \ + libx11-dev \ + libx11-xcb-dev \ + libxext-dev \ + libxfixes-dev \ + libxi-dev \ + libxrender-dev \ + libxcb1-dev \ + libxcb-cursor-dev \ + libxcb-glx0-dev \ + libxcb-keysyms1-dev \ + libxcb-image0-dev \ + libxcb-shm0-dev \ + libxcb-icccm4-dev \ + libxcb-sync-dev \ + libxcb-xfixes0-dev \ + libxcb-shape0-dev \ + libxcb-randr0-dev \ + libxcb-render-util0-dev \ + libxcb-util-dev \ + libxcb-xinerama0-dev \ + libxcb-xkb-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev + shell: bash + +#------------------------------------- setup Windows environment for Qt6 + + - name: Install dependencies (Windows) + if: matrix.platform == 'windows' + run: | + choco install ninja + shell: bash + + - name: Set up MSVC dev command prompt (Windows) + if: matrix.platform == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + +#------------------------------------- setup macOS environment for Qt6 + + - name: Install dependencies (macOS) + if: matrix.platform == 'macos' + run: | + brew install cmake ninja + which ninja + shell: bash + +#------------------------------------- determine Qt6 version to use + + - name: Set Qt6 version + id: qt6-version + run: | + # Using a fixed Qt6 version for stability + # Update this version when a new Qt6 is released + VERSION="6.10.0" + echo "Qt6 version: $VERSION" + echo "version=$VERSION" >> $GITHUB_OUTPUT + shell: bash + +#------------------------------------- download Qt6 sources + + #- name: Cache Qt6 source + # id: cache-qt6-source + # uses: actions/cache@v4 + # with: + # path: qt6-source + # key: qt6-source-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} + + - name: Download Qt6 source code + #if: steps.cache-qt6-source.outputs.cache-hit != 'true' + run: | + echo "Downloading Qt6 ${{ steps.qt6-version.outputs.version }}" + VERSION="${{ steps.qt6-version.outputs.version }}" + MAJOR_MINOR=$(echo "$VERSION" | cut -d. -f1-2) + + # Download qtbase + mkdir -p qt6-source + cd qt6-source + + echo "Downloading qtbase..." + curl -L -o qtbase.tar.xz "https://download.qt.io/official_releases/qt/$MAJOR_MINOR/$VERSION/submodules/qtbase-everywhere-src-$VERSION.tar.xz" + tar -xf qtbase.tar.xz + mv qtbase-everywhere-src-$VERSION qtbase + rm qtbase.tar.xz + + echo "Downloading qtsvg..." + curl -L -o qtsvg.tar.xz "https://download.qt.io/official_releases/qt/$MAJOR_MINOR/$VERSION/submodules/qtsvg-everywhere-src-$VERSION.tar.xz" + tar -xf qtsvg.tar.xz + mv qtsvg-everywhere-src-$VERSION qtsvg + rm qtsvg.tar.xz + + if [ ! -d "qtbase" ] || [ ! -d "qtsvg" ]; then + echo "Error: Qt6 source download failed or directory structure is incorrect" + exit 1 + fi + echo "Qt6 source downloaded successfully" + shell: bash + +#------------------------------------- configure Qt6 for building + + - name: Configure CMake for Qt6 Base (Windows) + if: matrix.platform == 'windows' + run: | + cd qt6-source\qtbase + call configure.bat -static -static-runtime -release -prefix ${{ github.workspace }}\qt6-install -platform win32-msvc -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -sql-odbc -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests + cmake --build . --parallel + cmake --install . + shell: cmd + + - name: Configure CMake for Qt6 Base (Linux) + if: matrix.platform == 'linux' + run: | + cd qt6-source/qtbase + ./configure -static -static-runtime -release -prefix ${{ github.workspace }}/qt6-install -platform linux-g++-64 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests + cmake --build . --parallel + cmake --install . + shell: bash + + - name: Configure CMake for Qt6 Base (macOS) + if: matrix.platform == 'macos' + run: | + cd qt6-source/qtbase + ./configure -static -static-runtime -release -prefix ${{ github.workspace }}/qt6-install -platform macx-clang -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake tests + cmake --build . --parallel + cmake --install . + shell: bash + + - name: Configure CMake for Qt6 SVG (Windows) + if: matrix.platform == 'windows' + run: | + cd qt6-source\qtsvg + call ${{ github.workspace }}\qt6-install\bin\qt-configure-module.bat . + cmake --build . --parallel + cmake --install . + shell: cmd + + - name: Configure CMake for Qt6 SVG (Linux/macOS) + if: matrix.platform != 'windows' + run: | + cd qt6-source/qtsvg + ${{ github.workspace }}/qt6-install/bin/qt-configure-module . + cmake --build . --parallel + cmake --install . + shell: bash + +#------------------------------------- verify Qt6 build results + + - name: Verify static build + run: | + echo "Checking Qt6 static libraries..." + if [ "${{ matrix.platform }}" == "windows" ]; then + win_search_dir="${{ github.workspace }}/qt6-install" + win_search_dir="${win_search_dir//\\//}" + find $win_search_dir -name "Qt6*.lib" | head -10 + else + find ${{ github.workspace }}/qt6-install -name "libQt6*.a" | head -10 + fi + shell: bash + +#------------------------------------- create Qt6 build artifacts to upload + + - name: Create build artifact (Linux/macOS) + if: matrix.platform != 'windows' + run: | + cd ${{ github.workspace }} + tar -czf qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.tar.gz -C qt6-install . + shell: bash + + - name: Create build artifact (Windows) + if: matrix.platform == 'windows' + run: | + Compress-Archive -Path 'qt6-install\\*' -DestinationPath 'qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.zip' -Force + shell: pwsh + +#------------------------------------- upload the Qt6 build artifacts + + - name: Upload Qt6 static build + uses: actions/upload-artifact@v6 + with: + name: qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} + path: qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.${{ matrix.archive_format }} + retention-days: 30 + +#=============================================================== +# DOXYGEN JOB +#=============================================================== + build-doxygen: + name: Doxygen (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + needs: [build-llvm, build-xapian, build-qt6] + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-24.04 + cpu: intel + platform: linux + extension: "" + archive_format: tar.gz + - os: windows-latest + cpu: intel + platform: windows + extension: .exe + archive_format: zip + - os: macos-15 + cpu: arm + platform: macos + extension: "" + archive_format: tar.gz + - os: macos-15-intel + cpu: intel + platform: macos + extension: "" + archive_format: tar.gz + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + +#------------------------------------- setup Linux environment + + - name: Install dependencies (Linux) + if: matrix.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + cmake \ + ninja-build \ + git \ + python3 \ + python3-pip \ + zlib1g-dev \ + libedit-dev \ + libffi-dev \ + libxml2-dev \ + libtinfo-dev \ + flex \ + bison \ + libfontconfig1-dev \ + libfreetype6-dev \ + libx11-dev \ + libx11-xcb-dev \ + libxext-dev \ + libxfixes-dev \ + libxi-dev \ + libxrender-dev \ + libxcb1-dev \ + libxcb-cursor-dev \ + libxcb-glx0-dev \ + libxcb-keysyms1-dev \ + libxcb-image0-dev \ + libxcb-shm0-dev \ + libxcb-icccm4-dev \ + libxcb-sync-dev \ + libxcb-xfixes0-dev \ + libxcb-shape0-dev \ + libxcb-randr0-dev \ + libxcb-render-util0-dev \ + libxcb-util-dev \ + libxcb-xinerama0-dev \ + libxcb-xkb-dev \ + libxkbcommon-dev \ + libxkbcommon-x11-dev \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + uuid-dev \ + texlive \ + texlive-latex-recommended \ + texlive-extra-utils \ + texlive-latex-extra \ + texlive-font-utils \ + ghostscript \ + graphviz + shell: bash + +#------------------------------------- setup Windows environment + + - name: Install dependencies (Windows) + if: matrix.platform == 'windows' + run: | + choco install ninja winflexbison3 ghostscript graphviz.portable innosetup + shell: bash + + - name: Install MikTeX (Windows) + if: matrix.platform == 'windows' + uses: nick-invision/retry@v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 60 + command: | + choco install miktex --debug --verbose --no-progress --params "/Set:basic" -y + if ($?) { echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 } + + - name: Configure MikTeX (Windows) + if: matrix.platform == 'windows' + run: | + miktex --admin --verbose packages update-package-database + miktex --admin --verbose packages update + miktex --admin --verbose fndb refresh + initexmf --admin --verbose --set-config-value=[MPM]AutoInstall=1 + initexmf --admin --verbose --update-fndb + initexmf --admin --verbose --mklinks --force + updmap --admin + + - name: Setting Ghostscript paths (Windows) + if: matrix.platform == 'windows' + run: | + export GSpath=`find /c/Prog*/gs -name gswin\*c.exe | sed -e "s/gswin.*c.exe//"` + export PATH="$GSpath:$PATH" + export GSpath=`echo "$GSpath" | sed -e "s%/c%C:%"` + echo "$GSpath" >> $GITHUB_PATH + shell: bash + + - name: Refresh Env (Windows) + if: matrix.platform == 'windows' + run: | + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + refreshenv + + - name: Check tool versions (Windows) + if: matrix.platform == 'windows' + run: | + echo "=== perl ==="; + perl --version; + echo "=== python ==="; + python --version; + echo "=== cmake ==="; + cmake --version; + echo "=== latex ==="; + latex --version; + echo "=== bibtex ==="; + bibtex --version + echo "=== dvips ==="; + dvips --version + echo "=== bison ==="; + win_bison --version; + echo "=== flex ==="; + win_flex --version; + echo "=== dot ==="; + dot -V; + echo "=== ghostscript ==="; + gswin64c --version; + shell: bash + +#------------------------------------- setup macOS environment + + - name: Install dependencies (macOS) + if: matrix.platform == 'macos' + run: | + brew install cmake ninja flex bison ossp-uuid + # make sure flex and bison from brew are found and not the one from the system. + echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH + echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH + echo "LOC=$(brew --prefix ossp-uuid)" + shell: bash + +#------------------------------------- install Visual Studio compiler + + - name: Set up MSVC dev command prompt (Windows) + if: matrix.platform == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + +#------------------------------------- install HtmlHelp compiler for Windows + + - name: Download htmlhelp (Windows) + if: matrix.platform == 'windows' + run: | + # curl -L -o windows/htmlhelp.exe http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe + ./windows/htmlhelp.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART + shell: pwsh + + - name: Verify hhc.exe is installed + if: matrix.platform == 'windows' + shell: powershell + run: | + $possiblePaths = @( + "$env:ProgramFiles(x86)\HTML Help Workshop\hhc.exe", + "$env:ProgramFiles\HTML Help Workshop\hhc.exe", + "$env:ProgramFiles(x86)\HTMLHelpWorkshop\hhc.exe", + "$env:ProgramFiles\HTMLHelpWorkshop\hhc.exe" + ) + + # Find first existing file + $installed = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 + + # Fallback: on PATH + if (-not $installed) { + $cmd = Get-Command hhc.exe -ErrorAction SilentlyContinue + if ($cmd) { $installed = $cmd.Path } + } + + if (-not $installed) { + Write-Error "hhc.exe not found in known locations or PATH." + exit 1 + } + + Write-Host "hhc.exe found at: $installed" + $fi = Get-Item $installed + Write-Host "FileVersion: $($fi.VersionInfo.FileVersion)" + Write-Host "ProductVersion: $($fi.VersionInfo.ProductVersion)" + +#------------------------------------- get and install static libz for Windows + + - name: Download zlib (Windows) + if: matrix.platform == 'windows' + run: | + curl -L -o zlib.tgz https://zlib.net/zlib-1.3.1.tar.gz + tar zxvf zlib.tgz + + - name: Build zlib (Windows) + if: matrix.platform == 'windows' + shell: cmd + run: | + cd zlib-1.3.1 + @rem nmake -f win32\Makefile.msc LOC="-MT" all + nmake -f win32\Makefile.msc LOC="-MT" zlib.lib + +#------------------------------------- determine version of doxygen to use + + - name: Get latest Doxygen release tag + id: doxygen-version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + echo "GITHUB_TOKEN present: ${GITHUB_TOKEN:+yes}" + # Retry loop with exponential backoff + attempts=5 + sleep_for=2 + for i in $(seq 1 $attempts); do + echo "Attempt $i..." + resp=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/doxygen/doxygen/releases/latest" ) || true + http_code=$(echo "$resp" | jq -r '. | if has("message") then "error" else "ok" end') + tag=$(echo "$resp" | jq -r '.tag_name // empty') + if [ -n "$tag" ]; then + LATEST_TAG="$tag" + break + fi + echo "No tag found. API response (truncated):" + echo "$resp" | jq -C '.' | sed -n '1,200p' + echo "Sleeping $sleep_for seconds before retry..." + sleep $sleep_for + sleep_for=$((sleep_for * 2)) + done + + if [ -z "${LATEST_TAG:-}" ]; then + echo "Error: Could not fetch Doxygen release tag; last response:" + echo "$resp" | jq -C '.' || echo "$resp" + exit 1 + fi + + echo "Latest Doxygen release: $LATEST_TAG" + echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT + # Remove leading 'Release_' prefix if present + VERSION=${LATEST_TAG#Release_} + VERSION=${VERSION//_/.} + echo "version=$VERSION" >> $GITHUB_OUTPUT + shell: bash + +#------------------------------------- download Doxygen sources + + - name: Download Doxygen source code + #if: steps.cache-doxygen-source.outputs.cache-hit != 'true' + run: | + echo "Downloading Doxygen ${{ steps.doxygen-version.outputs.tag }}" + + # download specific tag + #git clone --depth 1 --branch ${{ steps.doxygen-version.outputs.tag }} https://github.com/doxygen/doxygen.git + + # alternatively use latest master + git clone --depth 1 --branch master https://github.com/doxygen/doxygen.git + + if [ ! -d "doxygen" ]; then + echo "Error: Doxygen source download failed or directory structure is incorrect" + exit 1 + fi + echo "Doxygen source downloaded successfully" + shell: bash + +#------------------------------------- prepare libclang dependency +# + - name: Get latest LLVM release tag for download + id: llvm-version-download + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + VERSION="21.1.5" + echo "version=$VERSION" >> $GITHUB_OUTPUT + shell: bash + + - name: Download LLVM artifacts + uses: actions/download-artifact@v7 + with: + name: llvm-static-${{ steps.llvm-version-download.outputs.version }}-${{ matrix.os }} + path: llvm-artifact + + #- name: Extract LLVM version from artifact + # id: llvm-version + # run: | + # cd llvm-artifact + # FILENAME=$(ls llvm-static-* | head -1) + # VERSION=$(echo "$FILENAME" | sed -E 's/llvm-static-(.+)-${{ matrix.os }}.*/\1/') + # echo "version=$VERSION" >> $GITHUB_OUTPUT + # echo "LLVM version from artifact: $VERSION" + # shell: bash + + - name: Extract LLVM artifacts (Linux/macOS) + if: matrix.platform != 'windows' + run: | + mkdir -p llvm-install + cd llvm-artifact/llvm-static-${{ steps.llvm-version-download.outputs.version }}-${{ matrix.os }} + # Extract the tar.gz archive to the install directory + tar -xzf llvm-static-${{ steps.llvm-version-download.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../llvm-install + shell: bash + + - name: Extract LLVM artifacts (Windows) + if: matrix.platform == 'windows' + run: | + mkdir llvm-install + dir + cd llvm-artifact\llvm-static-${{ steps.llvm-version-download.outputs.version }}-${{ matrix.os }} + dir + # Extract the zip archive to the install directory + Expand-Archive -Path "llvm-static-${{ steps.llvm-version-download.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../llvm-install" + shell: pwsh + +#------------------------------------- prepare Qt dependency + + - name: Download Qt6 artifacts + uses: actions/download-artifact@v7 + with: + name: qt6-static-6.10.0-${{ matrix.os }} + path: qt6-artifact + + - name: Extract Qt6 version from artifact + id: qt6-version + run: | + cd qt6-artifact + FILENAME=$(ls qt6-static-* | head -1) + VERSION=$(echo "$FILENAME" | sed -E 's/qt6-static-(.+)-${{ matrix.os }}.*/\1/') + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Qt6 version from artifact: $VERSION" + shell: bash + + - name: Extract Qt6 artifacts (Linux/macOS) + if: matrix.platform != 'windows' + run: | + mkdir -p qt6-install + cd qt6-artifact/qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} + # Extract the tar.gz archive to the install directory + tar -xzf qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../qt6-install + shell: bash + + - name: Extract Qt6 artifacts (Windows) + if: matrix.platform == 'windows' + run: | + mkdir qt6-install + cd qt6-artifact\qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} + # Extract the zip archive to the install directory + Expand-Archive -Path "qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../qt6-install" + shell: pwsh + +#------------------------------------- prepare Xapian dependency + + - name: Download Xapian artifacts + uses: actions/download-artifact@v7 + with: + name: xapian-static-1.4.29-${{ matrix.os }} + path: xapian-artifact + + - name: Extract Xapian version from artifact + id: xapian-version + run: | + cd xapian-artifact + FILENAME=$(ls xapian-static-* | head -1) + VERSION=$(echo "$FILENAME" | sed -E 's/xapian-static-(.+)-${{ matrix.os }}.*/\1/') + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Xapian version from artifact: $VERSION" + shell: bash + + - name: Extract Xapian artifacts (Linux/macOS) + if: matrix.platform != 'windows' + run: | + mkdir -p xapian-install + cd xapian-artifact/xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }} + # Extract the tar.gz archive to the install directory + tar -xzf xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../xapian-install + shell: bash + + - name: Extract Xapian artifacts (Windows) + if: matrix.platform == 'windows' + run: | + mkdir xapian-install + cd xapian-artifact\xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }} + # Extract the zip archive to the install directory + Expand-Archive -Path "xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../xapian-install" + shell: pwsh + +#------------------------------------- configure build + + - name: Configure CMake for Doxygen (Linux) + if: matrix.platform == 'linux' + run: | + mkdir -p doxygen/build + cd doxygen/build + UUID_FLAG="-DUUID_LIB=/lib/x86_64-linux-gnu/libuuid.a" + echo "UUID_FLAG=$UUID_FLAG" + cmake .. -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/doxygen-install" \ + -DXAPIAN_LIBRARIES="${{ github.workspace }}/xapian-install/lib/libxapian.a" \ + -DXAPIAN_INCLUDE_DIR="${{ github.workspace }}/xapian-install/include" \ + -DXAPIAN_DIR="${{ github.workspace }}/xapian-install/lib/cmake/xapian" $UUID_FLAG \ + -DLLVM_DIR="${{ github.workspace }}/llvm-install/lib/cmake/llvm" \ + -DClang_DIR="${{ github.workspace }}/llvm-install/lib/cmake/clang" \ + -DQt6_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6" \ + -DQt6Core_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Core" \ + -DQt6Gui_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Gui" \ + -DQt6Widgets_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Widgets" \ + -Dbuild_doc=YES \ + -Dbuild_search=YES \ + -Dbuild_wizard=YES \ + -Duse_libclang=YES \ + -Dstatic_libclang=YES \ + -Dstatic_libxapian=YES \ + -Dforce_qt=Qt6 \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/llvm-install;${{ github.workspace }}/qt6-install;${{ github.workspace }}/xapian-install" + shell: bash + + + - name: Configure CMake for Doxygen (macOS) + if: matrix.platform == 'macos' + run: | + mkdir -p doxygen/build + cd doxygen/build + UUID_FLAG="-DUUID_LIB=$(brew --prefix ossp-uuid)/lib/libuuid.a" + echo "UUID_FLAG=$UUID_FLAG" + cmake .. -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/doxygen-install" \ + -DXAPIAN_LIBRARIES="${{ github.workspace }}/xapian-install/lib/libxapian.a" \ + -DXAPIAN_INCLUDE_DIR="${{ github.workspace }}/xapian-install/include" \ + -DXAPIAN_DIR="${{ github.workspace }}/xapian-install/lib/cmake/xapian" $UUID_FLAG \ + -DLLVM_DIR="${{ github.workspace }}/llvm-install/lib/cmake/llvm" \ + -DClang_DIR="${{ github.workspace }}/llvm-install/lib/cmake/clang" \ + -DQt6_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6" \ + -DQt6Core_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Core" \ + -DQt6Gui_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Gui" \ + -DQt6Widgets_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Widgets" \ + -Dbuild_search=YES \ + -Dbuild_wizard=YES \ + -Duse_libclang=YES \ + -Dstatic_libclang=YES \ + -Dstatic_libxapian=YES \ + -Dforce_qt=Qt6 \ + -DCMAKE_PREFIX_PATH="${{ github.workspace }}/llvm-install;${{ github.workspace }}/qt6-install;${{ github.workspace }}/xapian-install" + shell: bash + + - name: Configure CMake for Doxygen (Windows) + if: matrix.platform == 'windows' + run: | + mkdir doxygen\build + cd doxygen\build + cmake .. -G "Ninja" -Dwin_static=YES -Dbuild_search=YES -Dbuild_wizard=YES -Duse_libclang=YES -Dstatic_libclang=YES -Dforce_qt=Qt6 -Dbuild_doc=YES -Dbuild_doc_chm=YES ^ + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ^ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\doxygen-install ^ + -DXAPIAN_LIBRARIES=${{ github.workspace }}\xapian-install\lib\xapian.lib ^ + -DXAPIAN_INCLUDE_DIR=${{ github.workspace }}\xapian-install\include ^ + -DXAPIAN_DIR=${{ github.workspace }}\xapian-install\lib\cmake\xapian ^ + -DLLVM_DIR=${{ github.workspace }}\llvm-install\lib\cmake\llvm ^ + -DClang_DIR=${{ github.workspace }}\llvm-install\lib\cmake\clang ^ + -DCLANG_LIBS=${{ github.workspace }}\llvm-install\lib\libclang.lib ^ + -DQt6_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6 ^ + -DQt6Core_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Core ^ + -DQt6Gui_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Gui ^ + -DQt6Widgets_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Widgets ^ + -DZLIB_LIBRARY=${{ github.workspace }}\zlib-1.3.1\zlib.lib ^ + -DZLIB_INCLUDE_DIR=${{ github.workspace }}\zlib-1.3.1\include + shell: cmd + +#------------------------------------- build targets + + - name: Build Doxygen (Linux) + if: matrix.platform == 'linux' + run: | + cd doxygen/build + make -j$(nproc) + make docs + make install + shell: bash + + - name: Build Doxygen (macOS) + if: matrix.platform == 'macos' + run: | + cd doxygen/build + cmake --build . --parallel 2 + shell: bash + + - name: Build Doxygen (Windows) + if: matrix.platform == 'windows' + run: | + cd doxygen\build + cmake --build . --parallel + shell: cmd + + - name: Build Doxygen docs (Windows) + if: matrix.platform == 'windows' + run: | + cd doxygen\build + cmake --build . --parallel 1 --target docs + cmake --build . --parallel 1 --target docs_chm + shell: cmd + + - name: Install Doxygen (Windows) + if: matrix.platform == 'windows' + run: | + cd doxygen\build + cmake --install . + shell: cmd + +#------------------------------------- verify build results + + - name: Verify Doxygen build (Linux) + if: matrix.platform == 'linux' + run: | + echo "Checking Doxygen binary..." + ls -lh ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} + # Try to run doxygen to verify it works + ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} --version || echo "Note: doxygen version check failed (may be expected on some platforms)" + shell: bash + + - name: Verify Doxygen build (Windows) + if: matrix.platform == 'windows' + run: | + echo "Checking Doxygen binary..." + ls -lh ${{ github.workspace }}\doxygen-install\bin\doxygen${{ matrix.extension }} + ${{ github.workspace }}\doxygen-install\bin\doxygen${{ matrix.extension }} --version || echo "Note: doxygen version check failed (may be expected on some platforms)" + shell: cmd + +#------------------------------------- create installation artifacts + + - name: Create installer (Windows) + if: matrix.platform == 'windows' + run: | + subst R: ${{ github.workspace }} + mkdir installer + copy R:\llvm-install\bin\libclang.dll ${{ github.workspace }}\doxygen-install\bin + editbin R:\doxygen-install\bin\doxygen.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 + editbin R:\doxygen-install\bin\doxyindexer.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 + editbin R:\doxygen-install\bin\doxysearch.cgi.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 + Write-Host "Using version: '${{ steps.doxygen-version.outputs.version }}'" + (Get-Content .\windows\doxygen.iss -Raw) -replace '\$VERSION','${{ steps.doxygen-version.outputs.version }}' | Set-Content -Encoding ASCII .\doxygen-versioned.iss + # invoke the inno setup compiler + $iscc = Get-Command ISCC.exe -ErrorAction SilentlyContinue + if (-not $iscc) { + Write-Error "ISCC.exe not found. Checked: $($possible -join '; ') and PATH." + exit 1 + } + & iscc 'doxygen-versioned.iss' + if ($LASTEXITCODE -ne 0) { Write-Error "ISCC failed with exit code $LASTEXITCODE"; exit $LASTEXITCODE } + $doxygen_chm_files = @( + 'R:\doxygen-install\share\doc\packages\doxygen\doxygen_manual.chm' + ) + Compress-Archive -Path $doxygen_chm_files -DestinationPath 'R:\installer\doxygen_manual-${{ steps.doxygen-version.outputs.version }}.chm.zip' -Force + $doxygen_zip_files = @( + 'R:\doxygen-install\bin\doxysearch.cgi.exe', + 'R:\doxygen-install\bin\doxyindexer.exe', + 'R:\doxygen-install\bin\doxywizard.exe' + 'R:\doxygen-install\bin\doxygen.exe' + 'R:\doxygen-install\bin\libclang.dll' + ) + Compress-Archive -Path $doxygen_zip_files -DestinationPath 'R:\installer\doxygen-${{ steps.doxygen-version.outputs.version }}.x64.bin.zip' -Force + shell: powershell + + - name: Create installer (macOS) + if: matrix.platform == 'macos' + run: | + mkdir installer + + # create DMG file + mkdir image + bunzip2 -k macosx/template.sparseimage.bz2 + hdiutil attach macosx/template.sparseimage -noautoopen -quiet -mountpoint image + cp -a macosx/Doxygen.app image + cp -a macosx/Readme.rtf image + mkdir -p image/Doxygen.app/Contents/MacOS + sed -i -e "s/\$VERSION/${{ steps.doxygen-version.outputs.version }}/g" image/Doxygen.app/Contents/Info.plist + cp doxygen/build/bin/doxygen image/Doxygen.app/Contents/Resources + cp doxygen/build/bin/doxyindexer image/Doxygen.app/Contents/Resources + cp doxygen/build/bin/doxysearch.cgi image/Doxygen.app/Contents/Resources + cp doxygen/build/bin/doxywizard image/Doxygen.app/Contents/MacOS/Doxywizard + /usr/sbin/diskutil rename image Doxygen + hdiutil detach image + hdiutil convert -format UDCO -o installer/Doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.cpu }}.dmg macosx/template.sparseimage + xattr -c installer/Doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.cpu }}.dmg + + # create zip with binaries + mkdir -p doxygen-${{ steps.doxygen-version.outputs.version }} + cp doxygen/build/bin/doxygen doxygen-${{ steps.doxygen-version.outputs.version }} + cp doxygen/build/bin/doxyindexer doxygen-${{ steps.doxygen-version.outputs.version }} + cp doxygen/build/bin/doxysearch.cgi doxygen-${{ steps.doxygen-version.outputs.version }} + zip -r installer/doxygen-${{ steps.doxygen-version.outputs.version }}-mac-${{ matrix.cpu }}.zip doxygen-${{ steps.doxygen-version.outputs.version }} + + shell: bash + + - name: Create installer (Linux) + if: matrix.platform == 'linux' + run: | + VERSION=${{ steps.doxygen-version.outputs.version }} + + # create installer dir + mkdir -p installer + + # create source package + tar -C doxygen --exclude bin -c -v -f installer/doxygen-$VERSION.src.tar.gz \ + doc doc_internal deps vhdlparser libxml libversion examples addon src testing templates cmake \ + CMakeLists.txt BUILD.txt INSTALL LANGUAGE.HOWTO LICENSE README.md + + # create PDF version of the manual + cp doxygen/build/latex/doxygen_manual.pdf installer/doxygen_manual-$VERSION.pdf + cd installer + zip -m doxygen_manual-$VERSION.pdf.zip doxygen_manual-$VERSION.pdf + cd .. + + # create binary package for Linux + DESTDIR=package/doxygen-$VERSION + mkdir -p $DESTDIR + cat linux/README.bin | sed -e "s/\$VERSION/$VERSION/g" -e "s/\$DATE/`date +\"%d %B %Y\"`/g" >$DESTDIR/README + cp doxygen/LICENSE $DESTDIR + cp linux/Makefile.bin.in $DESTDIR/Makefile + cat doxygen/INSTALL | sed -e "s/\$VERSION/$VERSION/g" -e "s/\$DATE/`date +\"%d %B %Y\"`/g" >$DESTDIR/INSTALL + mkdir $DESTDIR/bin + mkdir -p $DESTDIR/man/man1 + cp -a doxygen/build/html $DESTDIR + cp -a doxygen/build/examples $DESTDIR + cp doxygen/build/bin/doxygen $DESTDIR/bin + cp doxygen/build/latex/doxygen_manual.pdf $DESTDIR/doxygen_manual-$VERSION.pdf + cp doxygen/build/bin/doxyindexer $DESTDIR/bin + cp doxygen/build/bin/doxysearch.cgi $DESTDIR/bin + cp doxygen/build/bin/doxywizard $DESTDIR/bin + cp doxygen/build/man/*.1 $DESTDIR/man/man1 + gzip $DESTDIR/man/man1/* + tar -C package -z -c -v -f installer/doxygen-$VERSION.linux.bin.tar.gz doxygen-$VERSION + shell: bash + +#------------------------------------- upload individual artifacts + + - name: Upload Doxygen build (Windows/setup.exe) + if: matrix.platform == 'windows' + uses: actions/upload-artifact@v6 + with: + name: doxygen-${{ steps.doxygen-version.outputs.version }}-setup.exe + path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}-setup.exe + + - name: Upload Doxygen build (Windows/doxygen-x64.zip) + if: matrix.platform == 'windows' + uses: actions/upload-artifact@v6 + with: + name: doxygen-${{ steps.doxygen-version.outputs.version }}.x64.bin.zip + path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.x64.bin.zip + + - name: Upload Doxygen build (Windows/doxygen_manual.chm) + if: matrix.platform == 'windows' + uses: actions/upload-artifact@v6 + with: + name: doxygen_manual-${{ steps.doxygen-version.outputs.version }}.chm.zip + path: installer/doxygen_manual-${{ steps.doxygen-version.outputs.version }}.chm.zip + + - name: Upload Doxygen build (macOS/doxygen.dmg) + if: matrix.platform == 'macos' + uses: actions/upload-artifact@v6 + with: + name: Doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.cpu }}.dmg + path: installer/Doxygen-${{ steps.doxygen-version.outputs.version }}-${{ matrix.cpu }}.dmg + + - name: Upload Doxygen build (macOS/doxygen-mac.zip) + if: matrix.platform == 'macos' + uses: actions/upload-artifact@v6 + with: + name: doxygen-${{ steps.doxygen-version.outputs.version }}-mac-${{ matrix.cpu }}.zip + path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}-mac-${{ matrix.cpu }}.zip + + - name: Upload Doxygen build (Linux/doxygen.src.tar.gz) + if: matrix.platform == 'linux' + uses: actions/upload-artifact@v6 + with: + name: doxygen-${{ steps.doxygen-version.outputs.version }}.src.tar.gz + path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.src.tar.gz + + - name: Upload Doxygen build (Linux/doxygen.linux.bin.tar.gz) + if: matrix.platform == 'linux' + uses: actions/upload-artifact@v6 + with: + name: doxygen-${{ steps.doxygen-version.outputs.version }}.linux.bin.tar.gz + path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.linux.bin.tar.gz + + - name: Upload Doxygen build (Linux/doxygen_manual.pdf.zip) + if: matrix.platform == 'linux' + uses: actions/upload-artifact@v6 + with: + name: doxygen_manual-${{ steps.doxygen-version.outputs.version }}.pdf.zip + path: installer/doxygen_manual-${{ steps.doxygen-version.outputs.version }}.pdf.zip + diff --git a/.github/workflows/build-xapian.yml b/.github/workflows/build-xapian.yml deleted file mode 100644 index 74c521b..0000000 --- a/.github/workflows/build-xapian.yml +++ /dev/null @@ -1,235 +0,0 @@ -name: Build Xapian Static - -on: - workflow_dispatch: - -env: - # Build type - BUILD_TYPE: Release - -jobs: - build-xapian: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - archive_format: tar.gz - configure_args: "" - - os: windows-latest - platform: windows - archive_format: zip - configure_args: "" - - os: macos-latest - platform: macos - archive_format: tar.gz - configure_args: "" - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies (Linux) - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - libmagic-dev \ - build-essential \ - autoconf \ - automake \ - libtool \ - git \ - zlib1g-dev \ - uuid-dev - shell: bash - - - name: Install dependencies (Windows) - if: matrix.platform == 'windows' - run: | - choco install wget -y - shell: bash - - - name: Set up MSVC dev command prompt (Windows) - if: matrix.platform == 'windows' - uses: ilammy/msvc-dev-cmd@v1 - - - name: Download zlib (Windows) - if: matrix.platform == 'windows' - run: | - curl -L -o zlib.tgz https://zlib.net/zlib-1.3.1.tar.gz - tar zxvf zlib.tgz - - - name: Build zlib (Windows) - if: matrix.platform == 'windows' - shell: cmd - run: | - cd zlib-1.3.1 - @rem nmake -f win32\Makefile.msc LOC="-MT" all - nmake -f win32\Makefile.msc LOC="-MT" zlib.lib - - - name: Install MSYS2 (Windows) - uses: msys2/setup-msys2@v2 - if: matrix.platform == 'windows' - with: - update: true - install: >- - base-devel - mingw-w64-x86_64-toolchain - autoconf - automake - libtool - jq - - - name: Install dependencies (macOS) - if: matrix.platform == 'macos' - run: | - brew install autoconf automake libtool libmagic - shell: bash - - - name: Get latest Xapian stable release tag - id: xapian-version - run: | - VERSION="1.4.29" - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Extracted version: $VERSION" - shell: bash - - - name: Cache Xapian source - id: cache-xapian-source - uses: actions/cache@v4 - with: - path: xapian - key: xapian-core-${{ steps.xapian-version.outputs.version }}.tar.xz - - - name: Download Xapian source code - if: steps.cache-xapian-source.outputs.cache-hit != 'true' - run: | - VERSION="${{ steps.xapian-version.outputs.version }}" - echo "Downloading Xapian $VERSION" - wget https://oligarchy.co.uk/xapian/$VERSION/xapian-core-$VERSION.tar.xz - tar -Jxf xapian-core-$VERSION.tar.xz - echo "Xapian source downloaded successfully" - shell: bash - - - name: Configure Xapian (Linux/macOS) - if: matrix.platform != 'windows' - run: | - VERSION="${{ steps.xapian-version.outputs.version }}" - cd xapian-core-$VERSION - ./configure \ - --prefix=${{ github.workspace }}/xapian-install \ - --enable-static=yes \ - --enable-shared=no \ - --disable-documentation \ - ${{ matrix.configure_args }} - shell: bash - - - name: Write configure script (Windows) - if: matrix.platform == 'windows' - run: | - VERSION="${{ steps.xapian-version.outputs.version }}" - cd xapian-core-$VERSION - cat <<- 'EOF' > run_me.sh - export CC="cl -nologo" - export CXX="./compile cl -nologo" - export CXXFLAGS="-EHsc" - export AR="lib" - export LD="link" - export NM="dumpbin" - export CPPFLAGS="-I../zlib-1.3.1" - export LDFLAGS="-I../zlib-1.3.1" - export PREFIX_UNIX="$(cygpath $PREFIX)" - echo "prefix=$PREFIX_UNIX" - ./configure --enable-static=yes --enable-shared=no --prefix=$PREFIX_UNIX - make - make install - EOF - chmod 755 run_me.sh - echo "====" - cat run_me.sh - echo "====" - shell: bash - - - name: Configure and Build Xapian (Windows) - if: matrix.platform == 'windows' - shell: cmd - run: | - @echo on - set VERSION=${{ steps.xapian-version.outputs.version }} - cd xapian-core-%VERSION% - set PATH=C:\msys64\usr\bin;%PATH% - set LIB=..\zlib-1.3.1;%LIB% - set PREFIX=${{ github.workspace }}\xapian-install - set MSYS2_PATH_TYPE=inherit - bash -c "./run_me.sh" - - - name: Build Xapian (Linux/macOS) - if: matrix.platform != 'windows' - run: | - VERSION="${{ steps.xapian-version.outputs.version }}" - cd xapian-core-$VERSION - make - shell: bash - - - name: Install Xapian (Linux/macOS) - if: matrix.platform != 'windows' - run: | - VERSION="${{ steps.xapian-version.outputs.version }}" - cd xapian-core-$VERSION - make install - shell: bash - - - name: Verify static build - run: | - echo "Checking Xapian static library..." - if [ "${{ matrix.platform }}" == "windows" ]; then - find "$(cygpath "${{ github.workspace }}")/xapian-install" -name "*.lib" | head -10 - else - find ${{ github.workspace }}/xapian-install -name "*.a" | head -10 - fi - shell: bash - - - name: Create build artifact (Linux/macOS) - if: matrix.platform != 'windows' - run: | - cd ${{ github.workspace }} - tar -czf xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }}.tar.gz -C xapian-install . - shell: bash - - - name: Create build artifact (Windows) - if: matrix.platform == 'windows' - run: | - Compress-Archive -Path 'xapian-install\\*' -DestinationPath 'xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }}.zip' -Force - shell: pwsh - - - name: Upload Xapian static build - uses: actions/upload-artifact@v4 - with: - name: xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }} - path: xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.platform }}.${{ matrix.archive_format }} - retention-days: 30 - - - name: Display build summary - run: | - echo "## Xapian Build Summary (${{ matrix.platform }})" >> $GITHUB_STEP_SUMMARY - echo "- **Platform**: ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY - echo "- **OS**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY - echo "- **Xapian Version**: ${{ steps.xapian-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY - echo "- **Build Type**: Static" >> $GITHUB_STEP_SUMMARY - echo "- **Static Build**: Enabled (--enable-static=yes)" >> $GITHUB_STEP_SUMMARY - echo "- **Shared Build**: Disabled (--enable-shared=no)" >> $GITHUB_STEP_SUMMARY - echo "- **Archive Format**: ${{ matrix.archive_format }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Configure Args" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo '--enable-static=yes --enable-shared=no --disable-documentation ${{ matrix.configure_args }}' >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Components" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - find ${{ github.workspace }}/xapian-install -type f -name "*.a" 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/LLVM_BUILD.md b/LLVM_BUILD.md deleted file mode 100644 index 2eed24f..0000000 --- a/LLVM_BUILD.md +++ /dev/null @@ -1,152 +0,0 @@ -# LLVM Static Build GitHub Action - -This GitHub Action automatically downloads the latest LLVM repository and builds it statically with the clang and lld projects enabled across multiple platforms. - -## Features - -- **Multi-Platform Support**: Builds on Linux (Ubuntu), Windows, and macOS -- **Automatic Latest Version**: Fetches the latest LLVM release automatically -- **Static Build**: Builds LLVM with static linking (`LIBCLANG_BUILD_STATIC=ON`) -- **libclang Static**: Enables static libclang library for all platforms -- **Essential Projects**: Builds clang and lld (`LLVM_ENABLE_PROJECTS="clang;lld"`) -- **Optimized Build**: Release build with optimizations -- **Platform-specific Caching**: Caches LLVM source code per platform to speed up subsequent builds -- **Platform-specific Artifacts**: Produces downloadable build artifacts for each platform - -## Supported Platforms - -| Platform | OS | Archive Format | Build Options | -|----------|----|----|-------| -| **Linux** | ubuntu-latest | tar.gz | PIC disabled, Terminfo disabled | -| **Windows** | windows-latest | zip | MSVC static runtime, MultiThreaded CRT | -| **macOS** | macos-latest | tar.gz | PIC disabled, macOS 10.15+ deployment target | - -All platforms build for **X86** and **AArch64** targets. - -## Build Configuration - -The action uses the following common CMake configuration for all platforms: - -- `CMAKE_BUILD_TYPE=Release` - Optimized release build -- `LLVM_ENABLE_PROJECTS="clang;lld"` - Enable clang compiler and lld linker -- `LIBCLANG_BUILD_STATIC=ON` - Build static libclang library -- `LLVM_TARGETS_TO_BUILD="X86;AArch64"` - Build for x86 and ARM64 targets -- Various optimizations and disabled features for faster, smaller builds - -### Platform-specific Configuration - -**Linux (Ubuntu):** -- `LLVM_ENABLE_PIC=OFF` - Disable position-independent code for static builds -- `LLVM_ENABLE_TERMINFO=OFF` - Disable terminfo dependency - -**Windows:** -- `LLVM_USE_CRT_RELEASE=MT` - Use static MSVC runtime -- `CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded` - Static runtime linking - -**macOS:** -- `LLVM_ENABLE_PIC=OFF` - Disable position-independent code for static builds -- `CMAKE_OSX_DEPLOYMENT_TARGET=10.15` - Target macOS 10.15 and newer - -## Triggers - -The workflow runs on: -- Manual trigger (`workflow_dispatch`) -- Push to main branch -- Pull requests to main branch - -## Usage - -### Manual Trigger - -You can manually trigger the build from the GitHub Actions tab: - -1. Go to the "Actions" tab in your repository -2. Select "Build LLVM Static" workflow -3. Click "Run workflow" - -### Automatic Trigger - -The workflow will automatically run when you: -- Push commits to the main branch -- Create a pull request targeting the main branch - -## Artifacts - -After a successful build, the workflow produces platform-specific artifacts: - -- **Linux**: `llvm-static-{version}-linux.tar.gz` - Compressed tar.gz archive -- **Windows**: `llvm-static-{version}-windows.zip` - ZIP archive -- **macOS**: `llvm-static-{version}-macos.tar.gz` - Compressed tar.gz archive -- **Retention**: All artifacts are kept for 30 days - -## Build Output - -Each platform build includes: -- LLVM core libraries (static) -- Clang compiler (with platform-appropriate extension) -- LLD linker (with platform-appropriate extension) -- libclang static library (`.a` on Unix-like, `.lib` on Windows) -- Headers and development files - -## System Requirements - -The build matrix automatically handles dependencies for each platform: - -**Linux (Ubuntu Latest):** -- build-essential, cmake, ninja-build -- git, python3, python3-pip -- zlib1g-dev, libedit-dev, libffi-dev, libxml2-dev, libtinfo-dev - -**Windows (Windows Latest):** -- Pre-installed: Visual Studio Build Tools, Python -- Auto-installed: Ninja (via Chocolatey) - -**macOS (macOS Latest):** -- Pre-installed: Xcode Command Line Tools, Python -- Auto-installed: CMake, Ninja (via Homebrew) - -## Build Summary - -After completion, each platform build provides a detailed summary including: -- Platform and OS information -- LLVM version built -- Platform-specific build configuration -- Platform-specific CMake arguments -- List of installed components -- Verification of static libraries - -## Customization - -To modify the build configuration, edit `.github/workflows/build-llvm.yml`: - -- **Add more projects**: Modify `LLVM_ENABLE_PROJECTS` (e.g., add `;compiler-rt;libcxx`) -- **Change targets**: Modify `LLVM_TARGETS_TO_BUILD` in the matrix cmake_args (e.g., add `;ARM;NVPTX`) -- **Build type**: Change `BUILD_TYPE` environment variable -- **Platform-specific options**: Add more CMake flags in the matrix cmake_args for specific platforms -- **Add new platforms**: Extend the build matrix with additional OS configurations - -## Troubleshooting - -### Build Failures - -1. Check the build logs in the GitHub Actions tab -2. Common issues: - - Out of memory: LLVM builds require significant RAM - - Disk space: Ensure sufficient storage for the build - - Dependencies: Verify all required packages are installed - -### Large Build Times - -LLVM is a large project and builds can take 1-2 hours. The workflow includes: -- Parallel builds using all available CPU cores -- Source code caching to speed up repeated builds -- Optimized tablegen for faster builds - -## Integration with Doxygen - -This static LLVM build is specifically designed for use with Doxygen, providing: -- Static libclang for parsing C/C++ code -- Clang compiler for analysis -- LLD linker for toolchain completeness - -The static nature ensures no runtime dependencies when distributing Doxygen with LLVM support. \ No newline at end of file diff --git a/QT6_BUILD.md b/QT6_BUILD.md deleted file mode 100644 index e19666d..0000000 --- a/QT6_BUILD.md +++ /dev/null @@ -1,202 +0,0 @@ -# Qt6 Static Build GitHub Action - -This GitHub Action automatically downloads the latest Qt6 release and builds it statically with only the qtbase and qtsvg modules across multiple platforms. - -## Features - -- **Multi-Platform Support**: Builds on Linux (Ubuntu), Windows, and macOS -- **Fixed Qt6 Version**: Uses Qt6 6.8.1 (LTS) for stability and reproducibility -- **Static Build**: Builds Qt6 with static linking (`BUILD_SHARED_LIBS=OFF`) -- **Minimal Modules**: Only builds qtbase and qtsvg modules (as required by Doxygen) -- **Optimized Build**: Release build with optimizations -- **Platform-specific Caching**: Caches Qt6 source code per platform to speed up subsequent builds -- **Platform-specific Artifacts**: Produces downloadable build artifacts for each platform - -## Supported Platforms - -| Platform | OS | Archive Format | Build System | -|----------|----|----|----------| -| **Linux** | ubuntu-latest | tar.gz | CMake + Ninja | -| **Windows** | windows-latest | zip | CMake + Ninja | -| **macOS** | macos-latest | tar.gz | CMake + Ninja | - -## Build Configuration - -The action uses the following common CMake configuration for all platforms: - -- `CMAKE_BUILD_TYPE=Release` - Optimized release build -- `BUILD_SHARED_LIBS=OFF` - Build static libraries -- `QT_FEATURE_static=ON` - Enable Qt static build feature -- `QT_FEATURE_shared=OFF` - Disable shared libraries -- `QT_BUILD_EXAMPLES=OFF` - Skip examples for faster build -- `QT_BUILD_TESTS=OFF` - Skip tests for faster build -- Various Qt features disabled (network, sql, opengl, etc.) to minimize build size - -### Modules Built - -Only the following Qt6 modules are built: - -1. **qtbase** - Core Qt functionality (QtCore, QtGui, QtWidgets, QtXml) -2. **qtsvg** - SVG support for Qt - -These are the only modules required by Doxygen for generating documentation. - -### Platform-specific Configuration - -**Linux (Ubuntu):** -- `CMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF` - Disable LTO for faster builds -- Full X11 and XCB development libraries installed -- OpenGL development libraries for GUI support - -**Windows:** -- `CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded` - Static runtime linking -- Uses Ninja build system with MSVC compiler - -**macOS:** -- `CMAKE_OSX_DEPLOYMENT_TARGET=10.15` - Target macOS 10.15 and newer -- Framework build disabled for static linking - -## Triggers - -The workflow runs on: -- Manual trigger (`workflow_dispatch`) **only** - -This workflow does **not** run automatically on push or pull requests. - -## Usage - -### Manual Trigger - -You can manually trigger the build from the GitHub Actions tab: - -1. Go to the "Actions" tab in your repository -2. Select "Build Qt6 Static" workflow -3. Click "Run workflow" -4. Select the branch (typically "main") -5. Click the green "Run workflow" button - -## Artifacts - -After a successful build, the workflow produces platform-specific artifacts: - -- **Linux**: `qt6-static-{version}-linux.tar.gz` - Compressed tar.gz archive -- **Windows**: `qt6-static-{version}-windows.zip` - ZIP archive -- **macOS**: `qt6-static-{version}-macos.tar.gz` - Compressed tar.gz archive -- **Retention**: All artifacts are kept for 30 days - -## Build Output - -Each platform build includes: -- Qt6 static libraries (`.a` on Unix-like, `.lib` on Windows) -- Qt6 headers and development files -- Qt6 build tools (moc, uic, rcc, etc.) -- Qt6 plugins (as static libraries) -- CMake configuration files for integration - -## System Requirements - -The build matrix automatically handles dependencies for each platform: - -**Linux (Ubuntu Latest):** -- build-essential, cmake, ninja-build -- git, python3 -- X11 development libraries (libx11-dev, libxcb-*-dev, etc.) -- XKB common development libraries -- OpenGL development libraries (libgl1-mesa-dev, libglu1-mesa-dev) -- Font libraries (libfontconfig1-dev, libfreetype6-dev) - -**Windows (Windows Latest):** -- Pre-installed: Visual Studio Build Tools, Python -- Auto-installed: Ninja (via Chocolatey) - -**macOS (macOS Latest):** -- Pre-installed: Xcode Command Line Tools, Python -- Auto-installed: CMake, Ninja (via Homebrew) - -## Build Process - -The Qt6 build is performed in two stages: - -1. **Build qtbase**: First builds the base Qt module containing QtCore, QtGui, QtWidgets, and QtXml -2. **Build qtsvg**: Then builds qtsvg module which depends on qtbase - -This two-stage approach is necessary because qtsvg depends on qtbase being already built and installed. - -## Build Summary - -After completion, each platform build provides a detailed summary including: -- Platform and OS information -- Qt6 version built -- Platform-specific build configuration -- Platform-specific CMake arguments -- List of installed static libraries -- Verification of static libraries - -## Customization - -To modify the build configuration, edit `.github/workflows/build-qt6.yml`: - -- **Update Qt6 version**: Change the `VERSION` in the "Set Qt6 version" step -- **Add more modules**: Download additional Qt modules and add build steps -- **Enable Qt features**: Modify Qt feature flags (e.g., `-DQT_FEATURE_network=ON`) -- **Build type**: Change `BUILD_TYPE` environment variable -- **Platform-specific options**: Add more CMake flags in the matrix cmake_args for specific platforms -- **Add new platforms**: Extend the build matrix with additional OS configurations - -## Troubleshooting - -### Build Failures - -1. Check the build logs in the GitHub Actions tab -2. Common issues: - - Out of memory: Qt6 builds require significant RAM (8GB+ recommended) - - Disk space: Ensure sufficient storage for the build (20GB+ recommended) - - Dependencies: Verify all required packages are installed - - Module dependencies: Ensure qtbase is built before qtsvg - -### Large Build Times - -Qt6 is a large project and builds can take 2-3 hours. The workflow includes: -- Parallel builds using all available CPU cores -- Source code caching to speed up repeated builds -- Minimal module set (only qtbase and qtsvg) -- Disabled examples and tests - -### Platform-specific Issues - -**Linux:** -- Ensure all X11 and XCB development packages are installed -- May need additional font or OpenGL libraries depending on configuration - -**Windows:** -- Builds use MSVC compiler (not MinGW) -- Static runtime linking is used for better portability -- Ensure Visual Studio Build Tools are up to date - -**macOS:** -- Framework builds are disabled for static linking -- Deployment target is set to macOS 10.15 for broad compatibility - -## Integration with Doxygen - -This static Qt6 build is specifically designed for use with Doxygen, providing: -- Static Qt6 libraries for GUI features -- QtCore, QtGui, QtWidgets for the doxywizard GUI tool -- QtXml for XML parsing -- QtSvg for SVG graphics support in documentation - -The static nature ensures no runtime dependencies when distributing Doxygen with Qt6 support. - -## About Qt6 - -Qt is a cross-platform application development framework used for developing GUI applications, among other things. Qt6 is the latest major version. - -Key features: -- Cross-platform compatibility (Linux, Windows, macOS) -- Rich widget set for GUI applications -- Signal and slot mechanism for event handling -- Internationalization support -- Vector graphics support (SVG) -- XML parsing and manipulation - -For more information, visit: https://www.qt.io/ diff --git a/README.md b/README.md index 496a2b3..9c15f78 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,9 @@ -# doxygen-deps -The goal of the repository is to provide Github actions that allow to build the external dependencies -for Doxygen for all platforms supported and used for the official binary release. +# doxygen-release +The goal of the repository is to automate the process of creating the official release assets for Doxygen using a Github action. -These dependencies are optional, so they are not shipped as part of Doxygen's repository. - -The dependencies consist of (statically) build libraries of: +This includes building the external dependencies which consist of: - libxapian (part of Xapian) - libclang (part of LLVM) - Qt6 (only the `qtbase` and `qtsvg` modules are needed) -Since there package are normally provided as shared libraries, the resulting doxygen binaries cannot easiliy be moved to a different system without recompilation. -By using statically linked versions of the dependent libraries, this can be avoided. - -These package are too big and slow to compile every time, so the idea is to trigger the Github action manually, and then use the produced artifacts. +The repository also includes some tools and files that are needed in the process. diff --git a/XAPIAN_BUILD.md b/XAPIAN_BUILD.md deleted file mode 100644 index b00180a..0000000 --- a/XAPIAN_BUILD.md +++ /dev/null @@ -1,137 +0,0 @@ -# Xapian Static Build GitHub Action - -This GitHub Action automatically downloads the latest stable Xapian release and builds it statically across multiple platforms. - -## Features - -- **Multi-Platform Support**: Builds on Linux (Ubuntu), Windows, and macOS -- **Automatic Latest Version**: Fetches the latest Xapian stable release automatically -- **Static Build**: Builds Xapian with static linking (`--enable-static=yes --enable-shared=no`) -- **Manual Trigger Only**: Workflow runs only when manually triggered -- **Optimized Build**: Release build with optimizations -- **Platform-specific Caching**: Caches Xapian source code per platform to speed up subsequent builds -- **Platform-specific Artifacts**: Produces downloadable build artifacts for each platform - -## Supported Platforms - -| Platform | OS | Archive Format | Build System | -|----------|----|----|----------| -| **Linux** | ubuntu-latest | tar.gz | autotools (configure/make) | -| **Windows** | windows-latest | zip | MSYS2 with autotools | -| **macOS** | macos-latest | tar.gz | autotools (configure/make) | - -## Build Configuration - -The action uses the following configuration for all platforms: - -- `--enable-static=yes` - Build static libraries -- `--enable-shared=no` - Disable shared libraries -- `--disable-documentation` - Skip documentation build for faster compilation - -## Triggers - -The workflow runs on: -- Manual trigger (`workflow_dispatch`) **only** - -This workflow does **not** run automatically on push or pull requests. - -## Usage - -### Manual Trigger - -You can manually trigger the build from the GitHub Actions tab: - -1. Go to the "Actions" tab in your repository -2. Select "Build Xapian Static" workflow -3. Click "Run workflow" -4. Select the branch (typically "main") -5. Click the green "Run workflow" button - -## Artifacts - -After a successful build, the workflow produces platform-specific artifacts: - -- **Linux**: `xapian-static-{version}-linux.tar.gz` - Compressed tar.gz archive -- **Windows**: `xapian-static-{version}-windows.zip` - ZIP archive -- **macOS**: `xapian-static-{version}-macos.tar.gz` - Compressed tar.gz archive -- **Retention**: All artifacts are kept for 30 days - -## Build Output - -Each platform build includes: -- Xapian core static library (`.a` files) -- Xapian headers and development files -- Command-line tools (xapian-* utilities) -- Configuration files - -## System Requirements - -The build matrix automatically handles dependencies for each platform: - -**Linux (Ubuntu Latest):** -- build-essential, autoconf, automake, libtool -- git, zlib1g-dev, uuid-dev - -**Windows (Windows Latest):** -- Pre-installed: Windows SDK, MSVC -- Auto-installed: MSYS2, base-devel, mingw-w64 toolchain, autoconf, automake, libtool - -**macOS (macOS Latest):** -- Pre-installed: Xcode Command Line Tools -- Auto-installed: autoconf, automake, libtool (via Homebrew) - -## Build Summary - -After completion, each platform build provides a detailed summary including: -- Platform and OS information -- Xapian version built -- Build configuration (static/shared) -- Configure arguments used -- List of installed static libraries -- Verification of static libraries - -## Customization - -To modify the build configuration, edit `.github/workflows/build-xapian.yml`: - -- **Add configure options**: Modify `configure_args` in the matrix for platform-specific options -- **Change installation prefix**: Modify `--prefix` in the configure step -- **Enable additional features**: Add configure flags (e.g., `--enable-backend-chert`, `--enable-backend-glass`) -- **Add new platforms**: Extend the build matrix with additional OS configurations - -## Troubleshooting - -### Build Failures - -1. Check the build logs in the GitHub Actions tab -2. Common issues: - - Missing dependencies: Verify all required packages are installed - - Bootstrap failures: Ensure autotools are properly installed - - Disk space: Ensure sufficient storage for the build - -### Windows-specific Issues - -- Windows builds use MSYS2 for Unix-like build environment -- Path translations may be required for Windows paths -- Ensure MSYS2 packages are up to date - -## Integration with Doxygen - -This static Xapian build is specifically designed for use with Doxygen, providing: -- Static Xapian library for search functionality -- No runtime dependencies for easier distribution -- Cross-platform compatibility - -The static nature ensures no runtime dependencies when distributing Doxygen with Xapian support. - -## About Xapian - -Xapian is an open-source search engine library that provides full-text search capabilities. It's used by Doxygen to enable advanced search features in generated documentation. - -Key features: -- Probabilistic relevance ranking -- Boolean queries -- Phrase and proximity searching -- Wildcard and range queries -- Faceted search -- Unicode support diff --git a/linux/Makefile.bin.in b/linux/Makefile.bin.in new file mode 100644 index 0000000..1200c0b --- /dev/null +++ b/linux/Makefile.bin.in @@ -0,0 +1,12 @@ +INSTTOOL=/usr/bin/install +INSTALL=/usr/local + +install: + $(INSTTOOL) -d $(INSTALL)/bin + $(INSTTOOL) -d $(INSTALL)/doc/doxygen + $(INSTTOOL) -d $(INSTALL)/man/man1 + $(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin + cp -r html $(INSTALL)/doc/doxygen + cp -r examples $(INSTALL)/doc/doxygen + cp doxygen_manual*.pdf $(INSTALL)/doc/doxygen + cp man/man1/* $(INSTALL)/man/man1/ diff --git a/linux/README.bin b/linux/README.bin new file mode 100644 index 0000000..a5a5cc2 --- /dev/null +++ b/linux/README.bin @@ -0,0 +1,38 @@ +DOXYGEN Version $VERSION + +The binaries are located in the bin directory. + +The manual for doxygen is included in HTML format in this package. +Other formats can be downloaded separately. + +The HTML version of the manual can be found in the html directory. +Please start reading at html/index.html. + +The examples that are included in the manual can be found in the examples +directory. + +The latest version of doxygen can be obtained at + http://www.doxygen.org + +There are three mailing lists: + doxygen-users@lists.sourceforge.net For doxygen users + doxygen-develop@lists.sourceforge.net For doxygen developers + doxygen-announce@lists.sourceforge.net Announcement of new releases only + +please follow the link in + + http://sourceforge.net/projects/doxygen + +to subscribe to the lists or to visit the archives. + +Use the bug tracker to report bugs: + + https://bugzilla.gnome.org/enter_bug.cgi?product=doxygen + +Before reporting a bug, please check that it has not already been reported. +Also, please use the bug tracker for reporting bugs rather than the help +forum. + +Enjoy, + +Dimitri van Heesch (doxygen@gmail.com) ($DATE) diff --git a/macosx/Doxygen.app/Contents/Info.plist b/macosx/Doxygen.app/Contents/Info.plist new file mode 100644 index 0000000..6fa8511 --- /dev/null +++ b/macosx/Doxygen.app/Contents/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleIdentifier + org.doxygen + CFBundleIconFile + Doxygen.icns + CFBundlePackageType + APPL + CFBundleGetInfoString + $VERSION, Copyright (c) 1997-2020 by Dimitri van Heesch + CFBundleSignature + Doxy + CFBundleExecutable + Doxywizard + CFBundleShortVersionString + $VERSION + NSPrincipalClass + NSApplication + NSHighResolutionCapable + True + + diff --git a/macosx/Doxygen.app/Contents/PkgInfo b/macosx/Doxygen.app/Contents/PkgInfo new file mode 100644 index 0000000..8220709 --- /dev/null +++ b/macosx/Doxygen.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPLDoxy diff --git a/macosx/Doxygen.app/Contents/Resources/Doxygen.icns b/macosx/Doxygen.app/Contents/Resources/Doxygen.icns new file mode 100644 index 0000000..2faadf3 Binary files /dev/null and b/macosx/Doxygen.app/Contents/Resources/Doxygen.icns differ diff --git a/macosx/Readme.rtf b/macosx/Readme.rtf new file mode 100644 index 0000000..31f83d7 --- /dev/null +++ b/macosx/Readme.rtf @@ -0,0 +1,30 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww12560\viewh15240\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0 + +\f0\fs24 \cf0 Thanks for trying doxygen on the Mac\ +\ +Installation is very simple, just drag the doxygen icon from this folder to the Applications folder, or wherever you want to keep it. To uninstall, just delete the file. It is completely self-contained. \ +\ + +\b Note: +\b0 When starting the application on Mountain Lion (10.8) or higher you may get the message that the application cannot be opened because it is from an unidentified developer. Hold the CTRL key while starting the application to temporarily bypass this restriction. \ +\ +It is recommended to also install GraphViz, so doxygen can use the 'dot' tool to render better diagrams.\ +See {\field{\*\fldinst{HYPERLINK "https://www.graphviz.org/"}}{\fldrslt https://www.graphviz.org/}}\ +To use dot from within doxygen, set HAVE_DOT to YES and DOT_PATH to /usr/local/bin\ +\ +The contents of this package is provided under the terms of the {\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/gpl2.txt"}}{\fldrslt GPL license}}.\ +\ +Please also note that this version was developed and tested with OS X 10.15 (a.k.a. Catalina). \ +It might also work with other versions of OS X, but I did not test this.\ +\ +Let me know if you spot any bugs.\ +\ +Enjoy,\ + Dimitri van Heesch ({\field{\*\fldinst{HYPERLINK "mailto:doxygen@gmail.com"}}{\fldrslt doxygen@gmail.com}})\ +\ +\ +} diff --git a/macosx/template.sparseimage.bz2 b/macosx/template.sparseimage.bz2 new file mode 100644 index 0000000..06579e1 Binary files /dev/null and b/macosx/template.sparseimage.bz2 differ diff --git a/windows/doxygen.iss b/windows/doxygen.iss new file mode 100755 index 0000000..b948b83 --- /dev/null +++ b/windows/doxygen.iss @@ -0,0 +1,147 @@ +; InnoSetup script to create doxygen installer for running in GitHub action +; r: should point to the root of GitHub action +; r:\doxygen should point to the source directory +; r:\doxygen-install should point to the installation directory +; $VERSION is a placeholder that needs to be replaced + +[Setup] +; Source and Output directories for the compiler: +SourceDir=r: +OutputDir=r:\installer\ +; Required information about doxygen +AppName=doxygen +AppVerName=doxygen $VERSION +DefaultDirName={commonpf}\doxygen +; Other standard information about doxygen: +AppPublisher=Dimitri van Heesch +AppPublisherURL=http://www.doxygen.org +AppSupportURL=http://www.doxygen.org +AppUpdatesURL=http://www.doxygen.org +AppVersion=$VERSION +; Configuration of the installer executable: +OutputBaseFilename=doxygen-$VERSION-setup +Compression=bzip/9 +LicenseFile=r:\doxygen\LICENSE +InfoAfterFile=r:\doxygen\README.md +DisableStartupPrompt=yes +; Other useful settings for the installation: +AllowRootDirectory=no +DefaultGroupName=doxygen +AllowNoIcons=yes +; AlwaysCreateUninstallIcon=yes +UninstallFilesDir={app}\system +ChangesEnvironment=true +ArchitecturesInstallIn64BitMode=x64compatible + +[Types] +; Defines which types of installation are possible +Name: "full"; Description: "Full Installation" +Name: "minimum"; Description: "Minimum Installation" +Name: "custom"; Description: "Custom Installation"; Flags: iscustom + +[Components] +; Defines collections of files, and the types of installation they can be included in +Name: "main"; Description: "doxygen Core Installation"; Types: full minimum custom; Flags: fixed +Name: "gui"; Description: "doxywizard GUI"; Types: full custom +Name: "docs_html"; Description: "doxygen manual (HTML)"; Types: full custom +Name: "docs_chm"; Description: "doxygen manual (compressed HTML)"; Types: full custom +Name: "examples"; Description: "doxygen Example Projects"; Types: full custom + +[Files] +; Defines the files to include, and which installation components they are to be included in +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\*.html"; DestDir: "{app}\html"; Flags: promptifolder; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\*.svg"; DestDir: "{app}\html"; Flags: promptifolder; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\*.png"; DestDir: "{app}\html"; Flags: promptifolder; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\*.css"; DestDir: "{app}\html"; Flags: promptifolder; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\*.js"; DestDir: "{app}\html"; Flags: promptifolder; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\search\*"; DestDir: "{app}\html\search"; Flags: promptifolder recursesubdirs; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\html\examples\*"; DestDir: "{app}\html\examples"; Flags: promptifolder recursesubdirs; Components: docs_html; +Source: "r:\doxygen-install\share\doc\packages\doxygen\*.chm"; DestDir: "{app}"; Flags: promptifolder; Components: docs_chm; +Source: "r:\doxygen\examples\*"; DestDir: "{app}\examples"; Flags: promptifolder recursesubdirs; Components: examples; +Source: "r:\doxygen-install\bin\doxygen.exe"; DestDir: "{app}\bin"; Flags: promptifolder; Components: main; +Source: "r:\doxygen-install\bin\libclang.dll"; DestDir: "{app}\bin"; Flags: promptifolder; Components: main; +Source: "r:\doxygen-install\bin\doxysearch.cgi.exe"; DestDir: "{app}\bin"; Flags: promptifolder; Components: main; +Source: "r:\doxygen-install\bin\doxyindexer.exe"; DestDir: "{app}\bin"; Flags: promptifolder; Components: main; +Source: "r:\doxygen-install\bin\doxywizard.exe"; DestDir: "{app}\bin"; Flags: promptifolder; Components: gui; + +[INI] +; Create an internet shortcut to the doxygen web site, for inclusion on the Start menu +; (An internet shortcut is actually just a specialised INI file.) +Filename: "{app}\system\doxygen.url"; Section: "InternetShortcut"; Key: "URL"; String: "https://www.doxygen.org/" + +[Icons] +; Adds icons to the Start menu. This section has to be here, but the user can +; choose not to install any icons if that is their wish. +Name: "{group}\Doxygen on the Web"; Filename: "{app}\system\doxygen.url"; Flags: createonlyiffileexists +Name: "{group}\Doxygen documentation (HTML)"; Filename: "{app}\html\index.html"; Components: docs_html; Flags: createonlyiffileexists +Name: "{group}\Doxygen documentation (compressed HTML)"; Filename: "{app}\doxygen_manual.chm"; Components: docs_chm; Flags: createonlyiffileexists +Name: "{group}\Examples Folder"; Filename: "{app}\examples\"; Components: examples +Name: "{group}\Doxywizard"; FileName: "{app}\bin\doxywizard.exe"; Comment: "GUI front-end for creating configuration files"; Components: gui; +Name: "{group}\Uninstall doxygen"; FileName: "{uninstallexe}" + +[InstallDelete] +Type: files; Name: "{app}\bin\libclang.dll" + +[UninstallDelete] +; This file has to deleted explicitly in the uninstall because it was +; created by the installer rather than just copied into place. +Type: files; Name: "{app}\system\doxygen.url" + +[code] + +const EnvironmentKey = 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'; + +procedure EnvAddPath(Path: string); +var + Paths: string; +begin + { Retrieve current path (use empty string if entry not exists) } + if not RegQueryStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) + then Paths := ''; + + { Skip if string already found in path } + if Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';') > 0 then exit; + + { App string to the end of the path variable } + Paths := Paths + ';'+ Path +';' + + { Overwrite (or create if missing) path environment variable } + if RegWriteStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) + then Log(Format('The [%s] added to PATH: [%s]', [Path, Paths])) + else Log(Format('Error while adding the [%s] to PATH: [%s]', [Path, Paths])); +end; + +procedure EnvRemovePath(Path: string); +var + Paths: string; + P: Integer; +begin + { Skip if registry entry not exists } + if not RegQueryStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) then + exit; + + { Skip if string not found in path } + P := Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';'); + if P = 0 then exit; + + { Update path variable } + Delete(Paths, P - 1, Length(Path) + 1); + + { Overwrite path environment variable } + if RegWriteStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) + then Log(Format('The [%s] removed from PATH: [%s]', [Path, Paths])) + else Log(Format('Error while removing the [%s] from PATH: [%s]', [Path, Paths])); +end; + + +procedure CurStepChanged(CurStep: TSetupStep); +begin + if CurStep = ssPostInstall + then EnvAddPath(ExpandConstant('{app}') +'\bin'); +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + if CurUninstallStep = usPostUninstall + then EnvRemovePath(ExpandConstant('{app}') +'\bin'); +end; diff --git a/windows/htmlhelp.exe b/windows/htmlhelp.exe new file mode 100644 index 0000000..b2005ac Binary files /dev/null and b/windows/htmlhelp.exe differ