Skip to content

v0.10.0 — In-app auto-updater

Choose a tag to compare

@SpaceSquare640 SpaceSquare640 released this 03 Aug 09:41
· 7 commits to main since this release

What's new — in-app auto-updater

The installed app now checks GitHub Releases for a newer version once per launch. This is the last of the four pieces from the recent GUI overhaul (rule editing, delete-all, redesign, and now this).

  • Nothing happens without confirmation. If a newer version is found, a dialog asks before anything downloads or installs — no silent background updates.
  • Won't interrupt a running engine. If the engine is active when an update is found, you're told to stop it first rather than having it cut off mid-run.
  • Real reinstall, not an overwrite. Once confirmed, it downloads the new installer, closes the app, and reinstalls silently — the same NSIS installer already used for manual installs automatically detects and removes the previous version first, so this is a clean reinstall rather than a patch-in-place. Your rules and captured template images (%APPDATA%\PixelPulse\) live outside the install directory and are untouched either way. The app reopens automatically once it's done.
  • Settings page already showed the running version (added in v0.9.0) — this is what the update check compares against.

Verified: version comparison (including the case naive string comparison gets wrong — "0.10.0" sorting before "0.9.0"), the GitHub API call and installer-asset matching, the engine-running check in both states, and the download pipeline were each tested against real endpoints. Launched an actual packaged build and confirmed the full detection path fires correctly end-to-end, reaching the confirmation dialog.

Known limitation, stated plainly: the final step — confirming the dialog and letting it actually download, quit, reinstall, and relaunch — was not exercised live in this session. That step modifies the app's own installed files, and testing it against a real, working install carried more risk than it was worth to verify in-session. If you hit anything unexpected the first time an update prompt appears, please open an issue.


新功能 — App 內建自動更新

安裝好的 App 現在每次啟動都會檢查一次 GitHub Releases 有沒有新版本。這是最近這一輪 GUI 大改版四件事裡的最後一塊(規則編輯、刪除全部、重新設計,現在加上這個)。

  • 沒有確認就什麼都不會發生。 發現新版本時會先跳出對話框詢問——在你確認之前,不會下載或安裝任何東西,沒有背景靜默更新這回事。
  • 不會打斷正在執行的引擎。 如果發現新版本時引擎正在跑,會請你先手動停止,而不是強行中斷正在執行的規則。
  • 真正的重新安裝,不是覆蓋式更新。 確認之後,會下載新的安裝檔、關閉程式、靜默重新安裝——手動安裝時本來就在用的同一套 NSIS 安裝檔,會自動偵測並先移除舊版本,所以這是乾淨重裝,不是原地覆蓋。你的規則跟擷取到的樣板圖片(%APPDATA%\PixelPulse\)不在安裝目錄裡,完全不受影響。安裝完成後會自動重新開啟。
  • 設定頁本來就會顯示目前版本(v0.9.0 加的)——更新檢查比對的就是這個版本號。

驗證方式:版本比較邏輯(包括字串比較會判斷錯誤的案例——"0.10.0" 用字串排序會排在 "0.9.0" 前面)、GitHub API 呼叫與安裝檔資產比對、引擎執行狀態的兩種情境、下載寫檔流程,都各自針對真實端點測試過。也實際啟動打包後的版本,確認整條偵測流程在真正的 Electron 主行程裡完整跑過一次,正確跳出確認對話框。

如實說明的已知限制:最後一步——按下確認之後真正下載、結束程式、重新安裝、自動重開——這次沒有做真實的端對端測試。這一步會動到 App 自己已經安裝好的檔案,拿一份真實在用的安裝去冒險測試,風險不划算。如果你第一次看到更新提示時遇到任何異常,歡迎開 issue 回報。