-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from tehaksbrid/dev
1.1.0 Release codebase
- Loading branch information
Showing
11 changed files
with
2,869 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
backup | ||
data | ||
app-config.json | ||
.DS_STORE | ||
.idea | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const path = require('path'); | ||
const electron_notarize = require('electron-notarize'); | ||
|
||
module.exports = async function (params) { | ||
// Only notarize the app on Mac OS only. | ||
if (process.platform !== 'darwin') { | ||
return; | ||
} | ||
console.log('Notarization requested:', params); | ||
|
||
// Same appId in electron-builder. | ||
let appId = 'ShopDatabaser' | ||
|
||
let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`); | ||
|
||
console.log(`Notarizing ${appId} found at ${appPath}`); | ||
|
||
try { | ||
await electron_notarize.notarize({ | ||
appBundleId: appId, | ||
appPath: appPath, | ||
appleId: process.env.appleid, | ||
appleIdPassword: '@keychain:SD_PASSWORD', | ||
}); | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
|
||
console.log(`Done notarizing ${appId}`); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,8 @@ const path = require('path'); | |
const {Menu, Tray, app, BrowserWindow, ipcMain, shell, dialog} = require('electron'); | ||
const electron_is_dev = require('electron-is-dev'); | ||
const controller = new AppController(); | ||
|
||
const singleInstanceLock = app.requestSingleInstanceLock(); | ||
if (!singleInstanceLock) return app.quit(); | ||
/** | ||
* Setup and open windows | ||
*/ | ||
|
@@ -69,7 +70,7 @@ app.whenReady().then(() => { | |
width: 800, | ||
height: 600, | ||
frame: false, | ||
icon: path.join(__dirname, './icon.png'), | ||
icon: path.join(__dirname, './view/assets/icons/icon.png'), | ||
webPreferences: { | ||
nodeIntegration: true, | ||
enableRemoteModule: true | ||
|
@@ -95,7 +96,7 @@ app.whenReady().then(() => { | |
return false; | ||
}); | ||
|
||
tray = new Tray(path.join(__dirname, './icon.png')); | ||
tray = new Tray(path.join(__dirname, process.platform === "darwin" ? './view/assets/icons/[email protected]' : './view/assets/icons/icon.png')); | ||
let contextMenu = Menu.buildFromTemplate([ | ||
{ | ||
label: 'Close application', click: () => { | ||
|
@@ -127,10 +128,19 @@ app.whenReady().then(() => { | |
}); | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin' || trueQuit === true) { | ||
if (trueQuit === true) { | ||
app.quit() | ||
} | ||
}) | ||
}); | ||
|
||
app.on('second-instance', () => { | ||
view.show(); | ||
view.focus(); | ||
}); | ||
|
||
app.on('activate', (ev, hasWindow) => { | ||
if (!hasWindow) view.show(); | ||
}); | ||
|
||
/** | ||
* IPCs | ||
|
Oops, something went wrong.