[Bootstrap] Make forced Electron props general and not check OS as unneeded
This commit is contained in:
parent
f8742200c4
commit
2bcbec4d44
|
@ -4,17 +4,8 @@ const { join } = require('path');
|
||||||
|
|
||||||
const Constants = require('./Constants');
|
const Constants = require('./Constants');
|
||||||
|
|
||||||
switch (process.platform) { // Discord forces these
|
process.env.PULSE_LATENCY_MSEC = process.env.PULSE_LATENCY_MSEC ?? 30;
|
||||||
case 'linux':
|
app.setAppUserModelId(Constants.APP_ID);
|
||||||
process.env.PULSE_LATENCY_MSEC = process.env.PULSE_LATENCY_MSEC ?? 30;
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'win32':
|
|
||||||
app.setAppUserModelId(Constants.APP_ID);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
app.name = 'discord'; // Force name as sometimes breaks
|
app.name = 'discord'; // Force name as sometimes breaks
|
||||||
|
|
||||||
const paths = require('./paths');
|
const paths = require('./paths');
|
||||||
|
@ -87,7 +78,7 @@ const startCore = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const startUpdate = () => {
|
const startUpdate = async () => {
|
||||||
const startMinimized = process.argv.includes('--start-minimized');
|
const startMinimized = process.argv.includes('--start-minimized');
|
||||||
|
|
||||||
paths.cleanOldVersions();
|
paths.cleanOldVersions();
|
||||||
|
@ -111,6 +102,10 @@ const startUpdate = () => {
|
||||||
log('AsarUpdate', 'Failed', e);
|
log('AsarUpdate', 'Failed', e);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
if (process.argv.includes('--config') || !oaConfig.setup) {
|
||||||
|
require('./config')();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue