Conversation
|
Resolves #270 |
| # 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 |
There was a problem hiding this comment.
I haven't been able to get differential updates to work yet, but we do need blockmaps at the root level to support them.
| // Check current update status on mount | ||
| window.api.updater.getUpdateStatus().then(status => { | ||
| if (status.updateAvailable) { | ||
| setIsUpdateAvailable(true) | ||
| } | ||
| if (status.updateDownloaded) { | ||
| setUpdateDownloaded(true) | ||
| } | ||
| }) |
There was a problem hiding this comment.
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.', |
There was a problem hiding this comment.
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' | |||
There was a problem hiding this comment.
wrong autoupdater
| // @ts-expect-error -- autoUpater field that isnt exposed but needs to change | ||
| autoUpdater.updateDownloaded = true | ||
| autoUpdater.quitAndInstall() | ||
| autoUpdater.quitAndInstall(true, true) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
I don't think we need Setup in the name
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Only significant updates made (other than moving all auto updater related things to this file) were allowing for local dev updating.
| // Poll for updates every 10 minutes | ||
| setInterval( | ||
| () => { | ||
| autoUpdater.checkForUpdates() | ||
| }, | ||
| 10 * 60 * 1000, | ||
| ) |
There was a problem hiding this comment.
This is for users who never quit ito
There was a problem hiding this comment.
Also, running this multiple times does not affect the auto update
| createDesktopShortcut: false, | ||
| createStartMenuShortcut: true, | ||
| oneClick: false, | ||
| perMachine: false, |
There was a problem hiding this comment.
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
No description provided.