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 dmgis better thanpkgsince 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.sendto send information to renderer - Catch update infos from main process by
ipcRenderer.on. - Expose API from
electron-preload.jsto the Mainworld. - Use the API in
.vuefiles.
- See the files
electron-main.js,electron-preload.jsandApp.vue.