I am building on a Linux machine.
- Specify this in
quasar.config.js
- Just build it.
- Specify this in
quasar.config.js
- The window installer program. We need to specify main entrance file, add
"main": "src-electron/electron-main.js"
inpackage.json
.
- Specify this in
quasar.config.js
dmg
is better thanpkg
since we don't need to worry about the uninstaller.
Use the docker image sickcodes/Docker-OSX
, we can run macos on linux. Use that to build dmg
.
- Get github personal access token
- Set the personal access token as environmental variable
- Add
"repository": "https://github.com/ResearchHelper/auto-update-test"
inpackage.json
quasar build -m electron -T [win32|linux|darwin] -P always
See build.sh
.
- The repository must be public.
- The product name must not contain space, otherwise we need to manually change it to dash
-
.
- Check for updates in
electron-main.js
- Use
mainWindow.webContents.send
to send information to renderer - Catch update infos from main process by
ipcRenderer.on
. - Expose API from
electron-preload.js
to the Mainworld. - Use the API in
.vue
files.
- See the files
electron-main.js
,electron-preload.js
andApp.vue
.