Merge pull request #122 from WebTools-NG/#119-MacOS

#119 mac os
This commit is contained in:
Tommy Mikkelsen 2020-08-31 00:43:46 +02:00 committed by GitHub
commit ea3ebc5ef0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "webtools-ng",
"version": "0.1.1",
"version": "0.1.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -74,11 +74,9 @@ const wtutils = new class WTUtils {
}
get LogMac() {
// does this work?
console.log('******* Need Help here ***********');
console.log('Mac Log dir detected as : ' + wtutils.Home + '/Library/Logs/' + wtutils.AppName);
console.log('********* Is that correct? ********** ');
return wtutils.Home + '/Library/Logs/' + wtutils.AppName;
const logDir = wtutils.Home.replace('Application Support', 'Logs');
log.info(`Log directory on Mac is detected as: ${logDir}`)
return logDir;
}
/*
@ -95,9 +93,15 @@ const wtutils = new class WTUtils {
{
localHome = __dirname.replace('node_modules\\electron\\dist\\resources\\electron.asar\\renderer', 'public/locales');
}
else if (wtutils.isMac)
{
console.log('Ged MAC dir: ' + __dirname)
localHome = __dirname.replace('node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer', 'public/locales');
}
else
{
localHome = __dirname.replace('node_modules/electron/dist/resources/electron.asar/renderer', 'public/locales');
}
}
else