build: drop the local Python release method, return to CI-only installer builds
Removes the single-command Python packaging method (build/make_release.py + build/build_portable_zip.py + build/macos/build_zip.sh) and the portable .zip artifacts it produced. Release builds go back to the original GitHub Actions process: the CI matrix builds one installer per platform (.dmg / .exe / .AppImage) on tag push and attaches them to a GitHub Release. Tesseract OCR bundling is preserved: the fetch helpers the workflow depends on (fetch_tessdata, fetch_tesseract_for_platform) are extracted into a standalone build/tesseract.py, which build.yml now imports. Docs (README, build/README, DEVELOPER, TECHNICAL, USER-GUIDE, vendor README, es translations) updated to drop the portable-zip flavor and point at the new module. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
72
.github/workflows/build.yml
vendored
72
.github/workflows/build.yml
vendored
@@ -1,18 +1,17 @@
|
||||
name: Build installers
|
||||
|
||||
# Triggers:
|
||||
# * Tag push (v*) → produces installers + portable zips, attaches them
|
||||
# to a GitHub Release.
|
||||
# * Manual dispatch → uploads everything as workflow artifacts only.
|
||||
# * Tag push (v*) → produces installers, attaches them to a GitHub Release.
|
||||
# * Manual dispatch → uploads the installers as workflow artifacts only.
|
||||
#
|
||||
# Outputs per platform (downloadable by buyers):
|
||||
# * macOS: .dmg installer + portable .zip (signed .app inside).
|
||||
# * Windows: .exe installer + portable .zip (no-install).
|
||||
# * Linux: .AppImage (already portable; no separate zip).
|
||||
# * macOS: .dmg installer
|
||||
# * Windows: .exe installer
|
||||
# * Linux: .AppImage (already portable; no separate installer step)
|
||||
#
|
||||
# Self-contained: every artifact ships its own Python interpreter + every
|
||||
# runtime dep through PyInstaller. No pre/post install steps on the
|
||||
# buyer's machine.
|
||||
# runtime dep (including bundled Tesseract OCR) through PyInstaller. No
|
||||
# pre/post install steps on the buyer's machine.
|
||||
#
|
||||
# What this workflow doesn't do (yet):
|
||||
# * Code signing (Mac Developer ID, Windows code-signing cert).
|
||||
@@ -40,16 +39,16 @@ jobs:
|
||||
include:
|
||||
- os: macos-latest
|
||||
platform: mac
|
||||
installer_glob: dist/DataTools-*-mac.dmg
|
||||
portable_glob: dist/DataTools-*-mac-portable.zip
|
||||
artifact_name: DataTools-mac.dmg
|
||||
artifact_path: dist/DataTools-*-mac.dmg
|
||||
- os: windows-latest
|
||||
platform: win
|
||||
installer_glob: dist/DataTools-*-win-setup.exe
|
||||
portable_glob: dist/DataTools-*-win-portable.zip
|
||||
artifact_name: DataTools-win.exe
|
||||
artifact_path: dist/DataTools-*-win-setup.exe
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
installer_glob: dist/DataTools-*-linux-x86_64.AppImage
|
||||
portable_glob: '' # AppImage is already a portable single file
|
||||
artifact_name: DataTools-linux.AppImage
|
||||
artifact_path: dist/DataTools-*-linux-x86_64.AppImage
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -66,7 +65,7 @@ jobs:
|
||||
pip install pyinstaller pillow
|
||||
|
||||
# ---- Tesseract bundling cache --------------------------------
|
||||
# The fetch logic inside build/make_release.py downloads:
|
||||
# The fetch logic inside build/tesseract.py downloads:
|
||||
# * build/vendor/tessdata/eng.traineddata (~16 MB, shared)
|
||||
# * build/_tesseract/<platform>/ (binary + libs, 30-120 MB)
|
||||
# Cache both so iterative CI runs don't re-download. The
|
||||
@@ -80,9 +79,9 @@ jobs:
|
||||
build/vendor/tessdata
|
||||
key: tesseract-${{ runner.os }}-5.5.0-tessdata_best-v1
|
||||
|
||||
# ---- Linux: install patchelf so make_release.py can rewrite
|
||||
# ---- Linux: install patchelf so tesseract.py can rewrite
|
||||
# RPATH on the bundled tesseract binary. apt-get install
|
||||
# tesseract-ocr is handled inside make_release.py itself. -----
|
||||
# tesseract-ocr is handled inside tesseract.py itself. --------
|
||||
- name: Install Linux build prereqs for Tesseract bundling
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
@@ -99,9 +98,9 @@ jobs:
|
||||
- name: Generate platform icons
|
||||
run: python build/generate_icons.py
|
||||
|
||||
# Stage Tesseract before PyInstaller. The make_release.py
|
||||
# helpers handle the per-platform fetch (UB-Mannheim on Win,
|
||||
# brew on Mac, apt on Linux) and stage the binary + libs into
|
||||
# Stage Tesseract before PyInstaller. The tesseract.py helpers
|
||||
# handle the per-platform fetch (UB-Mannheim on Win, brew on
|
||||
# Mac, apt on Linux) and stage the binary + libs into
|
||||
# build/_tesseract/<platform>/ where the spec picks them up.
|
||||
# We invoke a tiny inline Python so the workflow doesn't have
|
||||
# to know the per-platform target string.
|
||||
@@ -113,7 +112,7 @@ jobs:
|
||||
python - <<'PY'
|
||||
import os, sys
|
||||
sys.path.insert(0, "build")
|
||||
from make_release import fetch_tessdata, fetch_tesseract_for_platform
|
||||
from tesseract import fetch_tessdata, fetch_tesseract_for_platform
|
||||
target = os.environ["DATATOOLS_PLATFORM"]
|
||||
fetch_tessdata()
|
||||
fetch_tesseract_for_platform(target)
|
||||
@@ -133,10 +132,6 @@ jobs:
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: bash build/macos/build_dmg.sh "${{ steps.version.outputs.version }}"
|
||||
|
||||
- name: Package macOS portable .zip
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: bash build/macos/build_zip.sh "${{ steps.version.outputs.version }}"
|
||||
|
||||
- name: Install Inno Setup (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: choco install innosetup --no-progress -y
|
||||
@@ -147,10 +142,6 @@ jobs:
|
||||
run: |
|
||||
iscc /DAppVersion=${{ steps.version.outputs.version }} build\installer.iss
|
||||
|
||||
- name: Package Windows portable .zip
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: python build/build_portable_zip.py win ${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Install AppImage tooling (Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
@@ -168,29 +159,14 @@ jobs:
|
||||
- name: Upload installer artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: DataTools-${{ matrix.platform }}-installer
|
||||
path: ${{ matrix.installer_glob }}
|
||||
name: ${{ matrix.artifact_name }}
|
||||
path: ${{ matrix.artifact_path }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload portable artifact
|
||||
if: matrix.portable_glob != ''
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: DataTools-${{ matrix.platform }}-portable
|
||||
path: ${{ matrix.portable_glob }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Attach installer to Release (tag push only)
|
||||
- name: Attach to Release (tag push only)
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ matrix.installer_glob }}
|
||||
files: ${{ matrix.artifact_path }}
|
||||
fail_on_unmatched_files: true
|
||||
generate_release_notes: true
|
||||
|
||||
- name: Attach portable to Release (tag push only)
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.portable_glob != ''
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ matrix.portable_glob }}
|
||||
fail_on_unmatched_files: true
|
||||
|
||||
Reference in New Issue
Block a user