velopack#546
Conversation
Replace the sdist-based build with a direct editable-install build. Previously the script created an sdist and extracted it to a temp lib directory; now deploy.py builds directly against the installed package, passing the Nuitka package-config YAML as an absolute path. Also fix macOS app bundle handling: read the binary name from CFBundleExecutable (avoids assumptions about casing) and glob for the .app bundle directory at zip time instead of hardcoding tilia.app. Removes the "build" package from the build dependency group and the now-unnecessary nuitka-package.config.yml entry from package-data (which was only present for the sdist extraction path).
Without --repo the gh CLI falls back to the remote inferred from the working directory, which may not be set in the deploy job environment. Explicitly pass github.repository so the asset-count check always targets the correct repository.
- lifecycle.py: platform.init() handles Velopack install/uninstall hooks and OS file-association wiring (Windows registry, macOS Info.plist, Linux MIME/desktop); guarded by __compiled__ in boot.py - boot.py: call platform.init() before QApplication inside __compiled__ block
- updates.py: background thread checks Velopack (compiled builds) or git fetch (source runs); posts APP_UPDATE_AVAILABLE with manager+info - dialogs/update.py: show_update_dialog() dispatches to Velopack (download + restart) or git (pull + os.execv) path - qtui.py: listens on APP_UPDATE_AVAILABLE, marshals to main thread via QTimer.singleShot before showing dialog - menus.py: "Check for Updates..." item in Help menu - errors.py: VELOPACK_MANIFEST_NOT_FOUND, VELOPACK_UPDATE_FAILED, GIT_PULL_FAILED
- deploy.py: add _build_velopack() — runs vpk pack after Nuitka, downloads previous release nupkg for delta generation, writes vpk-outdir and pack-version to GITHUB_OUTPUT; --noPortable applied only for non-Linux (vpk on Linux does not support the flag); standalone mode per-platform (app on macOS, standalone on Windows/Linux); _semver_version() validates strict MAJOR.MINOR.PATCH (Velopack runtime requires exactly 3 parts; 4-part versions cause a semver parse error at install time); _patch_macos_plist() adds .tla file associations and returns CFBundleExecutable; Nuitka entry point changed from tilia/__main__.py to tilia/ (package mode) - build.yml: installs .NET 10 via brew with continue-on-error (setup-dotnet fails on Intel macOS runners); installs vpk CLI via dotnet tool; test steps run Setup.pkg/Setup.exe installers; release asset check verifies one full.nupkg per channel rather than a fixed total count; GH_TOKEN added to build env for gh release download - pyproject.toml: velopack in build group; remove onefile-tempdir-spec and mode="app" (now set per-platform in deploy.py)
Temporary — revert before merging to main: - GIT_BRANCH: "main" -> "feat/velopack" - Repository URL -> https://github.com/azfoo/TiLiA - version: "0.6.2" -> "0.0.1"
Temporary — revert before merging to main: - version: "0.6.2" -> "0.0.2"
Compiled builds resolved version to 0.0.0 because Nuitka dropped the bundled distribution metadata. Two causes, both fixed: (1) find_namespace_packages swept a stray top-level htmlcov/ into tilia.egg-info top_level.txt, so Nuitka treated htmlcov as the metadata owner and skipped embedding -- constrained discovery with include = [tilia*]; (2) added --include-distribution-metadata so the embed uses reason 'user requested', which bypasses Nuitka's hasDoneModule gate and fails loudly instead of silently degrading.
Velopack Setup/Update pass --veloapp-install/-updated/-obsolete/-uninstall/-firstrun, not --velopack-*. The misspelled prefix meant the file-association hook never fired and .tla files were never registered on install. Fixed the prefix in the dispatch table and the _hook_mode gate.
Published releases were un-updatable: clients found the GitHub release but check_for_updates() returned None because no releases.<channel>.json was present. vpk pack emits releases.<channel>.json / assets.<channel>.json / RELEASES-<channel>, but the upload-artifact glob matched only *.nupkg / *-Setup.* / *.AppImage, dropping the manifests before the deploy job's release upload (files: build/velopack/**). Without releases.<channel>.json Velopack's GitHub source enumerates zero releases, so no update is ever offered. Add the manifest globs. (The Check output step stayed green because it validates only full.nupkg + user-downloads, not the update manifest.)
|
Pushed 3 commits to this branch implementing the fixes below (bbd1012, 8bc7957, b3da5da): Built + installed the Windows Velopack package locally and exercised the install, file-association, and update flows. Three defects: 1. Distribution metadata not embedded → app reports version 2. 3. Updates never offered — every published release is un-updatable (main issue) Also: the "Check output" step validates only Verified the full path (detect → download → apply → restart) locally by packing a 0.0.3 release and pointing the updater at it; post-update |
|
The 0.0.1 release works on Mac with the same bugs it had on Windows. I imagine the last commits fix it. I will let a local build running and test tomorrow. |
|
@azfoo, could you fix CI too? |
On macOS the locator was Windows-shaped (Update.exe, <root>/packages, wrong root), so UpdateManager raised "not properly installed" and the Check for Updates dialog showed the misleading "TiLiA is running from source" message. Branch _make_locator by OS: use Contents/MacOS/UpdateMac and stage packages under ~/Library/Caches, since the .pkg-installed bundle is read-only. Also rework _run_check error handling. Previously a failed UpdateManager construction was swallowed into "running from source", and a failed check_for_updates masqueraded as "up to date". Split these into distinct, surfaced messages (build / install / network), tighten the bare `except Exception` to RuntimeError (everything Velopack raises), and add a thread-boundary backstop so an unexpected error can never kill the daemon thread silently.
Cover _make_locator OS-specific paths (UpdateMac vs Update.exe, the Library/Caches packages dir, non-fatal mkdir on read-only homes) and _run_check routing of every outcome: git fallback in dev, import/locator/ construct/network failures each producing their own surfaced message, up-to-date posting, update-available, silent-check gating, and the daemon-thread backstop. The velopack extension is a build-only dependency, so it is faked to keep these runnable in the source test environment.
FelipeDefensor
left a comment
There was a problem hiding this comment.
The Mac build worked, after applying the changes I commited. I wasn' t able to run it on Linux. Could you do that after you review my code?
Summary
.nupkgpackages for incremental updates.tilia/lifecycle.py) for install/uninstall and OS file-association registration (.tla files).Changes
scripts/deploy.py— removed sdist-based build path: previously the script created an sdist, extracted it to a temp lib directory, and built from there; now builds directly from the editable install, dropping thebuildpackage from the build dependency group. Added_build_velopack(): runsvpk packafter Nuitka, downloads the previous release nupkg fordelta generation, writes
vpk-outdirandpack-versionto GITHUB_OUTPUT;--noPortableon macOS/Windows only (not supported on Linux); strict semver validation;_patch_macos_plist()adds.tlaassociations and returns CFBundleExecutable; Nuitka entry point changed fromtilia/__main__.pytotilia/(package mode)..github/workflows/build.yml— .NET 10 via brew on macOS (setup-dotnetfails on Intel runners);vpkCLI viadotnet tool; CI tests run the actual Setup installers instead of extracting zip archives; upload path filters bypack-versionto exclude old nupkgs from delta generation; release check verifies onefull.nupkgper channel rather than a fixed count; GH_TOKEN added to build env forgh release download.tilia/lifecycle.py(new) — handles Velopack install/uninstall hooks and OS file-association wiring (Windows registry, macOSInfo.plist, Linux MIME/desktop). Called fromboot.pyinside__compiled__guard.tilia/updates.py(new) — background thread polls for updates via Velopack on compiled builds orgit fetchon source runs; postsAPP_UPDATE_AVAILABLEwith manager + info payload.tilia/ui/dialogs/update.py(new) — update dialog dispatches to Velopack (download + restart) or git (pull +os.execv) path.To verify