You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
873 B

const log = require('./utils/log');
global.log = log; // Make log global for easy usage everywhere
global.oaVersion = 'nightly';
log('Init', 'OpenAsar', oaVersion);
if (process.resourcesPath.startsWith('/usr/lib/electron')) global.systemElectron = true; // Using system electron, flag for other places
process.resourcesPath = require('path').join(__dirname, '..'); // Force resourcesPath for system electron
const appSettings = require('./appSettings');
global.oaConfig = appSettings.getSettings().get('openasar', {});
log('Init', 'Loaded config', oaConfig);
require('./cmdSwitches')();
if (process.argv.includes('--overlay-host')) { // If overlay
require('./utils/u2LoadModulePath')(); // Manually load updater 2 module paths (all modules)
require('discord_overlay2/standalone_host.js'); // Start overlay
} else {
require('./bootstrap')(); // Start bootstrap
}