Skip to content

Commit

Permalink
Tiny adjustments on how both Windows and Mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldzou committed Aug 11, 2024
1 parent 451d979 commit 7af829c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const createWindow = () => {
preload: path.join(__dirname, 'preload.js')
}
})

win.maximize();
win.loadFile('index.html')

win.isElectron = true
Expand All @@ -20,5 +20,5 @@ app.whenReady().then(() => {
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit()
app.quit()
})
24 changes: 23 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,40 @@
"version": "4.0.0",
"description": "",
"main": "index.js",
"productName": "WGDashboard Desktop",
"scripts": {
"electron start": "electron .",
"electron dist": "electron-builder"
"electron dist": "electron-builder --mac --win"
},
"build": {
"appId": "wgdashboard.donaldzou.app",
"copyright": "Copyright © 2024 ${author}",
"productName": "WGDashboard Desktop",
"mac": {
"target": [
{
"target": "dmg",
"arch": [
"universal"
]
}
]
},
"dmg": {
"title": "${productName} ${version}",
"backgroundColor": "#1b1e21",
"icon": "favicon.png"
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
}
},
"author": "Donald Zou",
Expand Down
4 changes: 1 addition & 3 deletions preload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { contextBridge } = require('electron')

contextBridge.exposeInMainWorld('electron', {

})
contextBridge.exposeInMainWorld('IS_WGDASHBOARD_DESKTOP', true)

0 comments on commit 7af829c

Please sign in to comment.