Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

ITO-270: Auto updater improvements#299

Merged
fulltimemike merged 4 commits intodevfrom
ito-270
Oct 1, 2025
Merged

ITO-270: Auto updater improvements#299
fulltimemike merged 4 commits intodevfrom
ito-270

Conversation

@fulltimemike
Copy link
Collaborator

No description provided.

@github-actions
Copy link

Resolves #270

Comment on lines +310 to +311
# Exclude .blockmap files from deletion to preserve differential update capability
comm -23 <(sort existing_files.txt) <(sort uploaded_root_files.txt) | grep -v '\.blockmap$' > stale_files.txt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to get differential updates to work yet, but we do need blockmaps at the root level to support them.

Comment on lines +37 to +45
// Check current update status on mount
window.api.updater.getUpdateStatus().then(status => {
if (status.updateAvailable) {
setIsUpdateAvailable(true)
}
if (status.updateDownloaded) {
setUpdateDownloaded(true)
}
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves the edge case where a user opens the app and the update downloads before getting to home page screen

if (
confirm(
'Are you sure you want to install the update? The app will quit to install.',
'Are you sure you want to install the update? The app will restart.',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this text change as windows + mac auto updater now restarts the app. Opening the app as it installs the update will show some errors as electron-updater swaps out the files, but it will complete.

@@ -1,4 +1,5 @@
import { BrowserWindow, ipcMain, shell, app, autoUpdater } from 'electron'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong autoupdater

// @ts-expect-error -- autoUpater field that isnt exposed but needs to change
autoUpdater.updateDownloaded = true
autoUpdater.quitAndInstall()
autoUpdater.quitAndInstall(true, true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are windows only params to install silently and then restart the app after updating


# Copy versioned installer to static name for CDN
if ls dist/Ito-Setup-*.exe 1> /dev/null 2>&1; then
if ls dist/Ito-*.exe 1> /dev/null 2>&1; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need Setup in the name

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary for doing auto updates locally on dev without going through a full build process. Only works on windows though.

}

// Allow auto-updater in development mode if VITE_DEV_AUTO_UPDATE is set
const enableDevUpdater = import.meta.env.VITE_DEV_AUTO_UPDATE === 'true'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only significant updates made (other than moving all auto updater related things to this file) were allowing for local dev updating.

Comment on lines +59 to +65
// Poll for updates every 10 minutes
setInterval(
() => {
autoUpdater.checkForUpdates()
},
10 * 60 * 1000,
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for users who never quit ito

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, running this multiple times does not affect the auto update

createDesktopShortcut: false,
createStartMenuShortcut: true,
oneClick: false,
perMachine: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perMachine false installs per user, perMachine true installs per whole computer. This makes the windows side similar to Mac where it's installed in the root directory applications instead of user/Applications

Copy link
Collaborator

@julgmz julgmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just had a q

@fulltimemike fulltimemike merged commit bc57778 into dev Oct 1, 2025
4 checks passed
@fulltimemike fulltimemike deleted the ito-270 branch November 20, 2025 18:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants