Skip to content

Add auto-update download and install functionality#17

Open
JuliaKnoth wants to merge 1 commit intoLioncat6:mainfrom
JuliaKnoth:self-updater
Open

Add auto-update download and install functionality#17
JuliaKnoth wants to merge 1 commit intoLioncat6:mainfrom
JuliaKnoth:self-updater

Conversation

@JuliaKnoth
Copy link
Copy Markdown
Contributor

Introduces a function to download the latest .exe release from GitHub, prepare an updater script, and trigger an update on application exit. The update popup now offers a 'Download and Install' button, streamlining the update process for users by automating download, replacement, and restart of the application.

This pull request adds an automated update and installation feature to the application, allowing users to download and install new versions directly from within the app. The update process now downloads the latest executable, prepares a Windows batch script to handle the replacement and restart, and informs users that the app will restart to apply the update.

Automated update and installation process:

  • Added a new function download_and_update to handle downloading the latest .exe from GitHub releases, saving it, and preparing an updater batch script that replaces the current executable and restarts the application upon exit. This function also provides user feedback on success or failure.
  • Updated the update notification window to include a "Download and Install" button (renamed from "Download") and inform users that the application will restart to apply the update. The update process is now triggered within the app, and the app will exit and relaunch after the update is installed.

Dependency and import updates:

  • Added an import for the sys module to support locating the current executable and managing file paths for the update process.

Introduces a function to download the latest .exe release from GitHub, prepare an updater script, and trigger an update on application exit. The update popup now offers a 'Download and Install' button, streamlining the update process for users by automating download, replacement, and restart of the application.
@Lioncat6
Copy link
Copy Markdown
Owner

The OCT executable can't just be downloaded and swapped out with the existing one, due to how pyinstaller works... not to mention the exe on github is the installer... which can't run if the OCT process is open at all.

@JuliaKnoth
Copy link
Copy Markdown
Contributor Author

JuliaKnoth commented Oct 30, 2025

The OCT executable can't just be downloaded and swapped out with the existing one, due to how pyinstaller works... not to mention the exe on github is the installer... which can't run if the OCT process is open at all.

I know, it downloads the installer, kills the OCT and then runs the installer. When you installed it though the installer it gives you the option to launch the OCT again (updated with the last installer).

At least thats what it was supposed to do and did in local testing.

@JuliaKnoth
Copy link
Copy Markdown
Contributor Author

@Lioncat6 Bump

@JuliaKnoth JuliaKnoth marked this pull request as ready for review November 17, 2025 22:03
@JuliaKnoth
Copy link
Copy Markdown
Contributor Author

@Lioncat6 Bump

@Lioncat6
Copy link
Copy Markdown
Owner

The install.bat can just be placed in the assets folder as It's included during the build process with inno setup ( I need to publish the inno playbook file)

I'd like the button for opening the releases page to remain in addition to the new button, and I want more security around which EXE the program downloads, since I may in the future add a release with multiple exe files... you could probably match the name with regex

I can implement these changes myself, but I want to clean up a few things first..

@Lioncat6
Copy link
Copy Markdown
Owner

The reason I've been slow with OCT is because I would like to start over from the ground up with a new chatbox project (Will reatain the spirit of OCT but just written in a newer framework), so I've just been making sure it isn't broken.

That and I don't exactly like people creating PRs using LLMs so I've been rather critical of the one's you've created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants