Windows port, part 3a: desktop app build, Task Scheduler task and installer (W3 part 1) #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "windows-w3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Windows port, phase W3, part 1: the desktop app builds and starts on Windows, the background re-compression runs from the Task Scheduler, and there is a per-user installer and a portable zip. It builds on #31 (W2). See plan sections 1.3-1.6, 5, 6 and 7.
Desktop app on Windows
ogc-gui.exeis built forx86_64-pc-windows-gnullvmagainst MSYS2 CLANG64 (UCRT; never msvcrt).packaging/windows/msys2.lockpins 82 packages by version and SHA-256 (gtk4 4.24.1, libadwaita 1.10.0, pango 1.58.2).msys2-lock.pywrites the lock only from aclang64.dbwhose signaturegpgvaccepts against MSYS2's packaging keys, which are pinned by fingerprint inpackaging/windows/msys2-keyring.ascandmsys2-keys.txt.fetch-msys2.shchecks every package's hash. It takes a lock and unpacks atomically, so parallel runs are safe.build-gui.sh,bundle-gui.py), 71 MiB:ogc.exe,ogc-gui.exeandogc-background.exewith their 63 DLLs;scripts/check-bundle-windows.shwalks every import. It fails on any DLL that is not in the bundle or Windows' own, on msvcrt, and on any API set not listed by exact name.check.shanddist.shapply the same exact list toogc.exeandogc-background.exe.gui::system::FEATURES): migration pages, helper detection, dedupe, the No_COW and snapshot hints, and the Proton-prefix switch. The timer settings are wired to the Task Scheduler but stay hidden until the next round, because their rows are systemd's.GSK_RENDERER=cairoand stays up with no critical errors (gui-smoke.sh). Its Windows parts are tested under Wine (gui-test.sh). The Linux GUI is unchanged.Background re-compression (
scheduler,ogc-background.exe)\OpenGameCompressor Auto-<SID>in the library root.LeastPrivilege,InteractiveToken.schtasksis called through a replaceable runner.ogc timer enable/disable/statuswork on Windows.TimerStatusis shared with systemd; Linux output is unchanged.ogc-background.exe(GUI subsystem, no console window):ogc.exe auto, it checks the lock, battery, running games andSHQueryUserNotificationState(fullscreen, busy, presentation).ogc.exerather than compressing itself, because only a console program is told about logoff and shutdown.background-run.json, and never a hand-startedogc auto.Installer and portable zip (
packaging/windows/)installer.sh, built with makensis in the container):RequestExecutionLevel user, so no UAC prompt. Installs to%LOCALAPPDATA%\Programs\OpenGameCompressor.LevelXStudios.OpenGameCompressor, set through the shell'sIPropertyStorewith NSIS's own System plugin./REMOVEDATA.ogc.exeis started withoutcmd.exe, and its UTF-8 output is shown correctly.dist.shbuildsOpenGameCompressor-<ver>-x64-portable.zip(28 MiB) and-setup.exe(18 MiB) from the bundle, plus the test package. The test package'srun-tests.ps1gains part 3 for the next real-PC run: install, read the shortcut's AppUserModelID, uninstall.in-container.shnow passes the scripts'OGC_*settings into the container.Tests
OGC_TEST_REQUIRE_BTRFS=1 cargo test, and the Broadway suite.check.shandwine-test.sh(lib 362, ogc 77, ogc-background 10, plus the timer smoke with a fake schtasks).check-gui.sh(including the Python tests for the lock, its signature check and the bundle check),build-gui.sh,gui-smoke.sh,gui-test.sh.packaging/windows/test/wine-test.shcovers install, upgrade, running programs, failing task setup, uninstall and data removal.dist.shwith the app installs, upgrades and uninstalls the real bundle under Wine.Not verified yet (needs a real Windows PC)
schtasksaccepts the task and its name for a standard user, and what it prints in other languages.SHQueryUserNotificationStatereports during a game.Known gaps for the next rounds
-Daccesskit=enabledis needed before release.ogc compress);