2 Building the EXE
david edited this page 2026-06-23 12:59:20 -07:00

Building the EXE

BoobaRecovery.exe is a self-contained PyInstaller bundle (~23 MB). It includes the Python runtime, all Python dependencies, and the LibreDWG binaries for DWG → DXF conversion. No installation required on the target machine.


Requirements

  • Windows 10 or later (or Wine on Linux for cross-compilation)
  • Python 3.11 or 3.12 (64-bit)
  • The libredwg/ subdirectory containing:
    • dwg2dxf.exe
    • libredwg-0.dll
    • libiconv-2.dll
    • libpcre2-8-0.dll
    • libpcre2-16-0.dll

Build steps

REM Install Python dependencies including PyInstaller
pip install pyinstaller openpyxl ezdxf

REM Build the EXE using the pre-configured spec
build.bat

build.bat simply calls:

pyinstaller BoobaRecovery.spec

Output: dist\BoobaRecovery.exe


What BoobaRecovery.spec bundles

  • gui.py as the entry point
  • booba_recover.py imported at runtime
  • All Python dependencies (openpyxl, ezdxf, tkinter, etc.)
  • The libredwg/ binaries as data files (extracted to _MEIPASS at runtime)

Automated releases via CI

Every time a v* tag is pushed, the Forgejo Actions workflow (.forgejo/workflows/release.yml) automatically:

  1. Checks out the repo on the registered Windows runner
  2. Installs Python + dependencies
  3. Runs PyInstaller
  4. Looks up or creates the Forgejo release for this tag
  5. Uploads dist\BoobaRecovery.exe as a release asset

The Windows runner must be registered under Settings → Actions → Runners → Add Runner.


Manual release with release.sh

Use this when building the EXE locally or releasing from Linux:

./release.sh 1.5.0          # bump VERSION to 1.5.0, tag, and release
./release.sh                 # release the current VERSION as-is
./release.sh --notes "text"  # override the release notes

The script:

  1. Bumps VERSION, commits, and pushes to main
  2. Creates and pushes a git tag v<version>
  3. Creates a Forgejo release via API
  4. Uploads dist/BoobaRecovery.exe if it exists

If you are on Linux and don't have the EXE yet, run release.sh without it and attach the EXE manually to the release after building on Windows.


Registering the Windows runner

The Forgejo Actions runner needs to be running on a Windows machine that can reach repository.spitzerhome.com:

  1. Go to Settings → Actions → Runners on the repo
  2. Click Add Runner, copy the registration token
  3. On the Windows machine, download the Forgejo runner binary and register it:
    forgejo-runner register --url https://repository.spitzerhome.com --token <token> --labels windows
    forgejo-runner daemon
    
  4. The runner label windows matches the runs-on: windows in the workflow YAML