Packaging into an executable

The project uses PyInstaller to package the CLI and the GUI into standalone executables, Python and GDAL included. The release workflow builds them for every tag.

Requirements, in a development environment:

  • the packaging extra: python -m pip install -e .[gdal,gui,packaging]

  • the compiled translations (.qm), embedded in the GUI: see translations

Each script makes one file executable in dist/.

Windows

python -O .\builder\pyinstaller_build_windows_cli.py
python -O .\builder\pyinstaller_build_windows_gui.py

Outputs: dist\DicoGIS-cli.exe, dist\DicoGIS-gui.exe.

Both scripts embed a version resource in the executable (its file properties in Windows: version, author, description…), built from dicogis/__about__.py by builder/win_version_info.py. The version comes from the git tags (see the release workflow): build from a git clone, after installing the package.

Ubuntu

python -O ./builder/pyinstaller_build_ubuntu_cli.py
python -O ./builder/pyinstaller_build_ubuntu_gui.py

Outputs: dist/DicoGIS-cli.bin, dist/DicoGIS-gui.bin.