[Index] Debugging for CI 2

This commit is contained in:
Ducko 2022-04-12 22:42:57 +01:00
parent 690fc2bdb5
commit 79bb6f6c45
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ global.log = (area, ...args) => console.log(`[\x1B[38;2;88;101;242mOpenAsar\x1B[
global.oaVersion = 'nightly';
log('Init', 'OpenAsar', oaVersion);
log('DEBUG2', '1');
if (process.resourcesPath.startsWith('/usr/lib/electron')) global.systemElectron = true; // Using system electron, flag for other places
process.resourcesPath = join(__dirname, '..'); // Force resourcesPath for system electron
@ -12,19 +13,22 @@ process.resourcesPath = join(__dirname, '..'); // Force resourcesPath for system
const paths = require('./paths');
paths.init();
log('DEBUG2', '2');
global.settings = require('./appSettings').getSettings();
global.oaConfig = settings.get('openasar', {});
require('./cmdSwitches')();
log('DEBUG2', '1');
log('DEBUG2', '3');
// Force u2QuickLoad (pre-"minified" ish)
const M = require('module'); // Module
const b = join(paths.getExeDir(), 'modules'); // Base dir
if (process.platform === 'win32') for (const m of require('fs').readdirSync(b)) M.globalPaths.push(join(b, m)); // For each module dir, add to globalPaths
log('DEBUG2', '2');
log('DEBUG2', '4');
if (process.argv.includes('--overlay-host')) { // If overlay
require('./utils/requireNative')('discord_overlay2', 'standalone_host.js'); // Start overlay