-
Notifications
You must be signed in to change notification settings - Fork 0
Build and Release
The complete path from a code change to a published release.
| 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.
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)
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.
pyinstaller --noconfirm --onefile --windowed --name "DeuMediaDownloader" --icon "img/app.ico" --add-data "img;img" main.pyOutput: 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
requestsandmutagenamong others were missing. Always test the built EXE on a machine without Python.
"/c/Users/emilo/AppData/Local/Programs/Inno Setup 6/ISCC.exe" installer.issOutput: 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.
python build.pyThe 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.
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.
git push origin master
git push origin --tagsOnly the installer is published as a release asset, never the portable EXE.
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)"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)"| 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 |
If img/app-icon.svg changes, img/app.ico has to be regenerated:
python tools/svg_to_ico.pyDeuMediaDownloader - for personal use only, with content you have the right to download. Respect the terms of service of Spotify, YouTube and TikTok as well as applicable copyright law.