mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Update console log paths to be in OS app data directory
This commit is contained in:
parent
c8b40c2948
commit
d567c215bb
1 changed files with 10 additions and 2 deletions
|
@ -16,12 +16,22 @@ var Process = hfprocess.Process;
|
||||||
var ProcessGroup = hfprocess.ProcessGroup;
|
var ProcessGroup = hfprocess.ProcessGroup;
|
||||||
var ProcessGroupStates = hfprocess.ProcessGroupStates;
|
var ProcessGroupStates = hfprocess.ProcessGroupStates;
|
||||||
|
|
||||||
|
function getApplicationDataDirectory() {
|
||||||
|
// Taken from http://stackoverflow.com/questions/19275776/node-js-how-to-get-the-os-platforms-user-data-folder
|
||||||
|
var rootDirectory = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + 'Library/Preferences' : '/var/local')
|
||||||
|
return path.join(rootDirectory, '/High Fidelity/Console');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const ipcMain = electron.ipcMain;
|
const ipcMain = electron.ipcMain;
|
||||||
|
|
||||||
const osType = os.type();
|
const osType = os.type();
|
||||||
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
|
var logPath = path.join(getApplicationDataDirectory(), '/logs');
|
||||||
|
console.log("Log directory:", logPath);
|
||||||
|
|
||||||
const TRAY_FILENAME = (osType == "Darwin" ? "console-tray-Template.png" : "console-tray.png");
|
const TRAY_FILENAME = (osType == "Darwin" ? "console-tray-Template.png" : "console-tray.png");
|
||||||
const TRAY_ICON = path.join(__dirname, '../resources/' + TRAY_FILENAME);
|
const TRAY_ICON = path.join(__dirname, '../resources/' + TRAY_FILENAME);
|
||||||
const APP_ICON = path.join(__dirname, '../resources/console.png');
|
const APP_ICON = path.join(__dirname, '../resources/console.png');
|
||||||
|
@ -186,8 +196,6 @@ app.on('ready', function() {
|
||||||
app.dock.hide()
|
app.dock.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
var logPath = path.join(app.getAppPath(), 'logs');
|
|
||||||
|
|
||||||
// Create tray icon
|
// Create tray icon
|
||||||
tray = new Tray(TRAY_ICON);
|
tray = new Tray(TRAY_ICON);
|
||||||
tray.setToolTip('High Fidelity');
|
tray.setToolTip('High Fidelity');
|
||||||
|
|
Loading…
Reference in a new issue