Fix Linux icon

This commit is contained in:
Scott E. Graves
2019-05-28 22:17:54 -05:00
parent dcafafaba9
commit 18aa23c5d8
2 changed files with 9 additions and 1 deletions

View File

@@ -70,7 +70,6 @@
], ],
"linux": { "linux": {
"category": "Utility", "category": "Utility",
"icon": "./build/logo.png",
"target": "AppImage" "target": "AppImage"
}, },
"mac": { "mac": {

View File

@@ -31,6 +31,7 @@ let firstMountCheck = true;
let manualMountDetection = {}; let manualMountDetection = {};
let isQuiting = false; let isQuiting = false;
app.on('before-quit', function () { app.on('before-quit', function () {
isQuiting = true; isQuiting = true;
}); });
@@ -66,6 +67,13 @@ function setWindowVisibility(show) {
function createWindow() { function createWindow() {
loadUiSettings(); loadUiSettings();
let extra = {};
if (os.platform() === 'linux') {
extra = {
icon: path.join(__dirname, '../', 'icon.png'),
}
}
// Create the browser window. // Create the browser window.
const height = (process.env.ELECTRON_START_URL || (os.platform() === 'darwin') ? 364 : 344) - ((os.platform() === 'win32') ? 0 : 20); const height = (process.env.ELECTRON_START_URL || (os.platform() === 'darwin') ? 364 : 344) - ((os.platform() === 'win32') ? 0 : 20);
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
@@ -75,6 +83,7 @@ function createWindow() {
resizable: false, resizable: false,
show: !launchHidden, show: !launchHidden,
title: 'Repertory UI', title: 'Repertory UI',
...extra,
webPreferences: { webPreferences: {
webSecurity: !process.env.ELECTRON_START_URL webSecurity: !process.env.ELECTRON_START_URL
} }