Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR prepares the v0.3.1 release and updates the Windows self-update mechanism to run the downloaded Inno Setup installer directly (with /CLOSEAPPLICATIONS + /RESTARTAPPLICATIONS) instead of generating a custom batch script, while also improving “running as exe” detection for Nuitka/standalone builds.
Changes:
- Bump project/package version from 0.3.0 → 0.3.1.
- Switch silent self-update install flow to directly launch the Inno Setup installer with explicit silent/restart flags.
- Improve
is_running_as_exe()detection to better cover frozen/standalone builds.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked package version to 0.3.1. |
| pyproject.toml | Bumps project version to 0.3.1. |
| AtlasToolkit.iss | Clarifies installer behavior for closing/restarting applications during updates. |
| atlas_toolkit/update/updater.py | Updates executable/frozen detection logic. |
| atlas_toolkit/update/controller.py | Replaces the batch-script based updater with direct Inno installer invocation. |
| atlas_toolkit/app/bridge.py | Updates the API surface for restart-and-install update flow. |
| atlas_toolkit/init.py | Bumps __version__ to 0.3.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
484
to
+485
| def restart_and_install_update(self) -> dict[str, Any]: | ||
| def _close_window() -> None: | ||
| if self._window: | ||
| self._window.destroy() | ||
|
|
||
| return self._updates.restart_and_install(on_success=_close_window) | ||
| return self._updates.restart_and_install() |
Comment on lines
+334
to
352
| install_cmd = build_inno_install_command(installer_path, inno_log_path) | ||
|
|
||
| try: | ||
| script_path.write_text(script_text, encoding="utf-8") | ||
| cmd_exe = os.environ.get("COMSPEC") or "cmd" | ||
| popen_kwargs: dict[str, Any] = { | ||
| "cwd": str(update_dir), | ||
| "close_fds": True, | ||
| } | ||
| if sys.platform == "win32": | ||
| popen_kwargs["creationflags"] = ( | ||
| subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP | ||
| subprocess.DETACHED_PROCESS | ||
| | subprocess.CREATE_NEW_PROCESS_GROUP | ||
| | subprocess.CREATE_NO_WINDOW | ||
| ) | ||
| else: | ||
| popen_kwargs["start_new_session"] = True | ||
|
|
||
| subprocess.Popen([cmd_exe, "/d", "/c", str(script_path)], **popen_kwargs) | ||
| on_success() | ||
| subprocess.Popen(install_cmd, **popen_kwargs) | ||
| log.info("Launched silent installer: %s", installer_path.name) | ||
| return {"ok": True} |
| @@ -44,7 +44,12 @@ class UpdateInfo(NamedTuple): | |||
|
|
|||
| def is_running_as_exe() -> bool: | |||
| """Check if running as Nuitka-compiled executable.""" | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Made with Cursor