Skip to content

Build and Release

EmilDeuOfficial edited this page Aug 22, 2026 · 1 revision

Build and Release

The complete path from a code change to a published release.


Requirements on the build machine

Tool Purpose Installation
Python 3.10+ Runtime python.org
PyInstaller Create the EXE pip install pyinstaller
Inno Setup 6 Create the installer winget install JRSoftware.InnoSetup
GitHub CLI Publish the release https://cli.github.com

Inno Setup is expected at %LOCALAPPDATA%\Programs\Inno Setup 6\ISCC.exe. build.py additionally checks the Program Files directories and the PATH, and offers to install it via winget if it is missing.


Process overview

Change code
    |
    v
Bump the version in config.py
    |
    v
PyInstaller  ->  dist/DeuMediaDownloader.exe
    |
    v
ISCC.exe installer.iss  ->  dist/DeuMediaDownloader_Setup.exe
    |
    v
git commit and git tag
    |
    v
git push origin master and git push origin --tags
    |
    v
gh release create  (installer only as the asset)

Step 1: Bump the version

One single place:

# config.py
APP_VERSION = "1.5.11"

Scheme:

Kind of change Example
Bugfix or small adjustment 1.5.11 becomes 1.5.12
New feature 1.5.11 becomes 1.6.0
Breaking change or major rewrite 1.5.11 becomes 2.0.0

The version number automatically appears in the Spotify downloader window title, because STRINGS interpolates it directly from APP_VERSION.


Step 2: Build the EXE

pyinstaller --noconfirm --onefile --windowed --name "DeuMediaDownloader" --icon "img/app.ico" --add-data "img;img" main.py

Output: dist/DeuMediaDownloader.exe

Flag Effect
--onefile Pack everything into a single EXE
--windowed No console window on start
--icon Application icon
--add-data "img;img" Bundle the image folder

Important: every runtime dependency has to actually end up inside the EXE. That was exactly the bug in v1.5.11, where requests and mutagen among others were missing. Always test the built EXE on a machine without Python.


Step 3: Build the installer

"/c/Users/emilo/AppData/Local/Programs/Inno Setup 6/ISCC.exe" installer.iss

Output: dist/DeuMediaDownloader_Setup.exe

What installer.iss takes care of:

Area Behavior
Target directory C:\Program Files\DeuMediaDownloader
Privileges Administrator required
Languages English and German
Language file Writes de or en to %USERPROFILE%\.spotify_downloader\language
FFmpeg Checks with where ffmpeg, installs via winget when missing
Shortcuts Start menu always, desktop optional
Compression lzma2/ultra64 with solid compression
Uninstall Removes FFmpeg via winget and deletes the data folder

The AppId is fixed and must not be changed, otherwise Windows will not recognize an update as an update of the same application.


Everything in one step

python build.py

The script cleans up old artifacts, runs PyInstaller, locates Inno Setup, installs it via winget when needed and builds the installer. If a step fails, the script exits with the corresponding exit code.


Step 4: Commit and tag

git add .
git commit -m "fix: v1.5.12 - short description"
git tag -a "v1.5.12" -m "Release v1.5.12"

Prefix fix: for bugfixes, feat: for new features.

dist/, build/, *.spec and __pycache__/ do not belong in the repository and are listed in .gitignore.


Step 5: Push

git push origin master
git push origin --tags

Step 6: GitHub release

Only the installer is published as a release asset, never the portable EXE.

Bugfix

gh release create "v1.5.12" "dist/DeuMediaDownloader_Setup.exe" --title "DeuMediaDownloader v1.5.12" --notes "## DeuMediaDownloader v1.5.12 - Bugfix

### Fix
- What was fixed

### Download
| File | Description |
|-------|-------------|
| DeuMediaDownloader_Setup.exe | Windows installer (recommended) |

### System requirements
- Windows 10 / 11
- FFmpeg (set up by the installer)"

Feature

gh release create "v1.6.0" "dist/DeuMediaDownloader_Setup.exe" --title "DeuMediaDownloader v1.6.0" --notes "## DeuMediaDownloader v1.6.0 - Feature name

### New in this version
- What was added

### Download
| File | Description |
|-------|-------------|
| DeuMediaDownloader_Setup.exe | Windows installer (recommended) |

### System requirements
- Windows 10 / 11
- FFmpeg (set up by the installer)"

When something goes wrong

Failure What to do
PyInstaller fails Print the error, do not commit
Installer build fails Print the error, optionally release the EXE only with a note
git push fails Check credentials or the SSH key
gh release fails Create the release manually through the GitHub web interface

Regenerating the icon

If img/app-icon.svg changes, img/app.ico has to be regenerated:

python tools/svg_to_ico.py

Clone this wiki locally