Skip to content

Commit

Permalink
Merge commit '806690f3555a5e147fc5c8bee80876bffc8ceda8' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Jun 6, 2024
2 parents 5f655d9 + 806690f commit 4b993bd
Show file tree
Hide file tree
Showing 3 changed files with 655 additions and 351 deletions.
4 changes: 3 additions & 1 deletion electron-builder-win.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
"createDesktopShortcut": false
},
"msi": {
"artifactName": "${productName}-${version}.${ext}"
"artifactName": "${productName}-${version}.${ext}",
"runAfterFinish": false,
"createDesktopShortcut": false
},
"portable": {
"artifactName": "${productName}-${version}-windows-no-installer.${ext}"
Expand Down
10 changes: 8 additions & 2 deletions src/main/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ import contextMenu from 'electron-context-menu';
import {spawn} from 'child_process';
import {disableUpdate as disUpPkg} from './disableUpdate.js';
const disableUpdate = disUpPkg() ||
process.env.DRAWIO_DISABLE_UPDATE === 'true' ||
process.env.DRAWIO_DISABLE_UPDATE === 'true' ||
process.argv.indexOf('--disable-update') !== -1 ||
fs.existsSync('/.flatpak-info'); //This file indicates running in flatpak sandbox
const silentUpdate = !disableUpdate && (process.env.DRAWIO_SILENT_UPDATE === 'true' ||
process.argv.indexOf('--silent-update') !== -1);
autoUpdater.logger = log
autoUpdater.logger.transports.file.level = 'error'
autoUpdater.logger.transports.console.level = 'error'
autoUpdater.autoDownload = false
autoUpdater.autoDownload = silentUpdate
autoUpdater.autoInstallOnAppQuit = silentUpdate

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

Expand Down Expand Up @@ -1157,6 +1161,8 @@ autoUpdater.on('error', e => log.error('@error@\n', e))

autoUpdater.on('update-available', (a, b) =>
{
if (silentUpdate) return;

dialog.showMessageBox(
{
type: 'question',
Expand Down
Loading

0 comments on commit 4b993bd

Please sign in to comment.