From a2221dc5262b327dfbca5c39f881ae419b402ee2 Mon Sep 17 00:00:00 2001 From: Oj Date: Tue, 12 Apr 2022 22:46:27 +0100 Subject: [PATCH] [CI > Win] Try and fix freeze on run with OA --- .github/workflows/nightly.yml | 1 + src/index.js | 5 ----- src/updater/updater.js | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1584ad8..3f41117 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -107,6 +107,7 @@ jobs: mkdir discord cp -rf files/ discord/app-1.0.0 cd discord/app-1.0.0 + mkdir modules - name: Check if Discord will startup run: | diff --git a/src/index.js b/src/index.js index 20ea5dc..01e8ca0 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,6 @@ 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 @@ -13,14 +12,11 @@ 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', '3'); // Force u2QuickLoad (pre-"minified" ish) const M = require('module'); // Module @@ -28,7 +24,6 @@ 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', '4'); if (process.argv.includes('--overlay-host')) { // If overlay require('./utils/requireNative')('discord_overlay2', 'standalone_host.js'); // Start overlay diff --git a/src/updater/updater.js b/src/updater/updater.js index 68953cd..f93f50f 100644 --- a/src/updater/updater.js +++ b/src/updater/updater.js @@ -341,8 +341,6 @@ module.exports = { tryInitUpdater: (buildInfo, repository_url) => { const root_path = paths.getInstallPath(); - - log('DEBUG 1', root_path); if (root_path == null) return false; instance = new Updater({