Skip to content

Commit

Permalink
configure forge platforms, add squirrel startup require
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Jan 25, 2024
1 parent 5044718 commit 3672620
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
5 changes: 5 additions & 0 deletions hostd/electron-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ app.on('will-quit', async () => {
// even though closing windows is not really possible
app.on('window-all-closed', app.quit)

// https://github.com/mongodb-js/electron-squirrel-startup
if (require('electron-squirrel-startup')) {
app.quit()
}

async function quitDaemonAndApp() {
state.isQuitting = true
await stopDaemon()
Expand Down
20 changes: 16 additions & 4 deletions hostd/forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ module.exports = {
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
platforms: ['win32'],
config: {
arch: ['x64'],
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
config: {
arch: ['arm64', 'x64'],
},
},
{
name: '@electron-forge/maker-deb',
config: {},
platforms: ['linux'],
config: {
arch: ['arm64', 'x64'],
},
},
{
name: '@electron-forge/maker-rpm',
config: {},
platforms: ['linux'],
config: {
arch: ['arm64', 'x64'],
},
},
],
plugins: [
Expand All @@ -27,4 +39,4 @@ module.exports = {
config: {},
},
],
};
}
5 changes: 5 additions & 0 deletions renterd/electron-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ app.on('will-quit', async () => {
// even though closing windows is not really possible
app.on('window-all-closed', app.quit)

// https://github.com/mongodb-js/electron-squirrel-startup
if (require('electron-squirrel-startup')) {
app.quit()
}

async function quitDaemonAndApp() {
state.isQuitting = true
await stopDaemon()
Expand Down
20 changes: 16 additions & 4 deletions renterd/forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ module.exports = {
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
platforms: ['win32'],
config: {
arch: ['x64'],
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
config: {
arch: ['arm64', 'x64'],
},
},
{
name: '@electron-forge/maker-deb',
config: {},
platforms: ['linux'],
config: {
arch: ['arm64', 'x64'],
},
},
{
name: '@electron-forge/maker-rpm',
config: {},
platforms: ['linux'],
config: {
arch: ['arm64', 'x64'],
},
},
],
plugins: [
Expand All @@ -27,4 +39,4 @@ module.exports = {
config: {},
},
],
};
}

0 comments on commit 3672620

Please sign in to comment.