Track app assets

This commit is contained in:
2026-10-09 02:57:04 +02:00
parent e05d973a8d
commit c1e0bddfff
11 changed files with 13 additions and 15 deletions

1
.gitattributes vendored
View File

@@ -4,3 +4,4 @@
*.bin binary *.bin binary
*.png binary *.png binary
*.ico binary *.ico binary
*.jpg binary

3
.gitignore vendored
View File

@@ -10,9 +10,6 @@ dist/
external/ external/
logs/ logs/
# Arkham City artwork imported by tools/make_assets.py (Warner Bros.; kept local, bundled in your builds)
app/assets/
# game data, audio and dumps: never commit Arkham City files # game data, audio and dumps: never commit Arkham City files
*.wad *.wad
*.wem *.wem

View File

@@ -79,3 +79,5 @@
the divider is dragged). Windows installer: tools/installer (Install.cmd -> install.ps1/uninstall.ps1, per-user, the divider is dragged). Windows installer: tools/installer (Install.cmd -> install.ps1/uninstall.ps1, per-user,
HKCU uninstall entry), copied into the build by build_app.py; install/upgrade/uninstall cycle verified. HKCU uninstall entry), copied into the build by build_app.py; install/upgrade/uninstall cycle verified.
User chose no new software (no Inno Setup). User chose no new software (no Inno Setup).
- 2026-10-09: app/assets is committed (user: public artwork and generated content, not Warner Bros. pictures).
build_app.py regenerates it only when missing or with --art; after changing make_assets.py run it by hand.

BIN
app/assets/app_icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
app/assets/app_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
app/assets/wallpaper.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

View File

@@ -11,7 +11,7 @@ py -3.14 -m venv .venv (Python 3.10-3.14)
.venv\Scripts\python -m pytest -q .venv\Scripts\python -m pytest -q
.venv\Scripts\python tools\build_app.py .venv\Scripts\python tools\build_app.py
``` ```
That one command does everything, offline. If `app/assets/` (git-ignored icon and wallpaper) is missing, it is That one command does everything, offline. If `app/assets/` (committed icon and wallpaper) is missing, it is
made from `bac_logo_full.png` and `wallpaper.jpg` in `Downloads\Arkham City` (or `--art FOLDER`); without those made from `bac_logo_full.png` and `wallpaper.jpg` in `Downloads\Arkham City` (or `--art FOLDER`); without those
images the build still works, with a plain icon and no wallpaper. images the build still works, with a plain icon and no wallpaper.
Output: `dist\UnheardCity\UnheardCity.exe` and `dist\UnheardCity-<ver>-windows-amd64.zip` Output: `dist\UnheardCity\UnheardCity.exe` and `dist\UnheardCity-<ver>-windows-amd64.zip`

View File

@@ -90,9 +90,8 @@ limit but means LZO recompression of large engine packages: out of scope, high r
- **Artwork:** the app icon (the Arkham City logo bat in flat black over a red audio waveform of rounded bars, on a - **Artwork:** the app icon (the Arkham City logo bat in flat black over a red audio waveform of rounded bars, on a
white rounded tile; shown only in the window/taskbar and the toolbar corner) and the default background wallpaper come from images supplied by the user. white rounded tile; shown only in the window/taskbar and the toolbar corner) and the default background wallpaper come from images supplied by the user.
`tools/make_assets.py <folder>` turns `bac_logo_full.png` + `wallpaper.jpg` into `app/assets/` (app_icon.png, `tools/make_assets.py <folder>` turns `bac_logo_full.png` + `wallpaper.jpg` into `app/assets/` (app_icon.png,
app_icon.ico, wallpaper.jpg), which the build bundles. The folder is git-ignored because it is Warner Bros. app_icon.ico, wallpaper.jpg), which the build bundles. The folder is committed (public artwork and generated
artwork: keep builds that contain it for personal use. Without the assets the app falls back to a plain content). Without the assets the app falls back to a plain waveform icon and no wallpaper.
waveform icon and no wallpaper.
- Background: the wallpaper sits only behind the filter panel, scaled to the panel height so its left part fills - Background: the wallpaper sits only behind the filter panel, scaled to the panel height so its left part fills
the panel, under a light veil. Settings -> Background toggles it and sets its strength (default 10 %). the panel, under a light veil. Settings -> Background toggles it and sets its strength (default 10 %).
- Loading feedback stays where the work is, never modal: a spinner inside the waveform being loaded (sound or - Loading feedback stays where the work is, never modal: a spinner inside the waveform being loaded (sound or

View File

@@ -2,8 +2,8 @@
python tools/build_app.py [--art FOLDER] -> dist/UnheardCity/ and dist/UnheardCity-<ver>-<os>.zip|.tar.gz python tools/build_app.py [--art FOLDER] -> dist/UnheardCity/ and dist/UnheardCity-<ver>-<os>.zip|.tar.gz
One command does everything: artwork (app/assets, made from FOLDER - default ~/Downloads/Arkham City - when One command does everything: artwork (app/assets, committed; remade from ~/Downloads/Arkham City when missing,
missing or older than tools/make_assets.py), PyInstaller bundle, THIRD_PARTY_LICENSES.txt, docs, archive. or from FOLDER with --art), PyInstaller bundle, THIRD_PARTY_LICENSES.txt, docs, archive.
Requirements: the dev environment (`pip install -e .[app,dev]`). All native libraries come from the pinned Requirements: the dev environment (`pip install -e .[app,dev]`). All native libraries come from the pinned
PyPI wheels (Qt, libsndfile with libvorbis/FLAC/opus/mpg123, soxr); no external programs are bundled or PyPI wheels (Qt, libsndfile with libvorbis/FLAC/opus/mpg123, soxr); no external programs are bundled or
@@ -38,8 +38,7 @@ def main():
assets = os.path.join(ROOT, "app", "assets") assets = os.path.join(ROOT, "app", "assets")
art = sys.argv[sys.argv.index("--art") + 1] if "--art" in sys.argv else None art = sys.argv[sys.argv.index("--art") + 1] if "--art" in sys.argv else None
ico = os.path.join(assets, "app_icon.ico") ico = os.path.join(assets, "app_icon.ico")
stale = not os.path.exists(ico) or os.path.getmtime(ico) < os.path.getmtime(os.path.join(ROOT, "tools", "make_assets.py")) if art or not os.path.exists(ico):
if art or stale:
import make_assets import make_assets
src = art or make_assets.DEFAULT_SRC src = art or make_assets.DEFAULT_SRC
if os.path.exists(os.path.join(src, "bac_logo_full.png")): if os.path.exists(os.path.join(src, "bac_logo_full.png")):

View File

@@ -2,11 +2,11 @@
python tools/make_assets.py ["C:/Users/<you>/Downloads/Arkham City"] python tools/make_assets.py ["C:/Users/<you>/Downloads/Arkham City"]
tools/build_app.py runs this by itself when app/assets is missing or older than this script (from the default tools/build_app.py runs this by itself when app/assets is missing (from the default folder) or with --art FOLDER.
folder or --art FOLDER). After changing this script, run it by hand and commit the new app/assets.
Input folder: bac_logo_full.png (logo with transparent background) and wallpaper.jpg. Input folder: bac_logo_full.png (logo with transparent background) and wallpaper.jpg.
Output (app/assets/, git-ignored because it is Warner Bros. artwork): Output (app/assets/, committed: public artwork and generated content):
wallpaper.jpg background of the filter panel wallpaper.jpg background of the filter panel
app_icon.png 256 px icon: the logo bat in black over a red audio waveform, on a white rounded tile app_icon.png 256 px icon: the logo bat in black over a red audio waveform, on a white rounded tile
app_icon.ico Windows icon (16-256 px) app_icon.ico Windows icon (16-256 px)

View File

@@ -32,7 +32,7 @@ def main():
app = QApplication([]) app = QApplication([])
with tempfile.TemporaryDirectory() as td: with tempfile.TemporaryDirectory() as td:
os.environ["ACKIT_HOME"] = td # do not touch the real settings/notes os.environ["ACKIT_HOME"] = td # do not touch the real settings/notes
# docs show no wallpaper (Warner Bros. artwork stays out of the repository; the app still shows it) # docs show no wallpaper (the app still shows it)
st = {"full_backup": True, "background_enabled": False} st = {"full_backup": True, "background_enabled": False}
theme.apply(app) theme.apply(app)
w = MainWindow(settings=st, runner=Runner(sync=True), game_dir=a.game) w = MainWindow(settings=st, runner=Runner(sync=True), game_dir=a.game)