From f4cfbb21a1aba2f9e417f8ca48af393c59d26539 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 14 Feb 2022 08:26:33 +0000 Subject: [PATCH] [Bootstrap] Simplify logging and some modules passing to core startup --- src/bootstrap.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/bootstrap.js b/src/bootstrap.js index 94bca9a..56382e0 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -30,12 +30,8 @@ log('BuildInfo', 'Loaded build info', buildInfo); const errorHandler = require('./errorHandler'); errorHandler.init(); -// Just required for startup -const appSettings = require('./appSettings'); -const GPUSettings = require('./GPUSettings'); -const crashReporterSetup = require('./crashReporterSetup'); const splashScreen = require('./splash'); -const autoStart = require('./autoStart'); +const appSettings = require('./appSettings'); const updater = require('./updater/updater'); const moduleUpdater = require('./updater/moduleUpdater'); @@ -47,19 +43,19 @@ if (!settings.get('enableHardwareAcceleration', true)) app.disableHardwareAccele let desktopCore; const startCore = () => { desktopCore = require('discord_desktop_core'); - log('Bootstrap', 'Required desktop_core:', desktopCore); + log('Bootstrap', 'Required core'); desktopCore.startup({ paths, splashScreen, moduleUpdater, - autoStart, buildInfo, appSettings, Constants, - GPUSettings, updater, - crashReporterSetup, + GPUSettings: require('./GPUSettings'), + autoStart: require('./autoStart'), + crashReporterSetup: require('./crashReporterSetup'), }); const i = setImmediate(() => { @@ -101,7 +97,7 @@ const startUpdate = () => { startCore(); }, () => { - log('Bootstrap', 'Setting main window visible'); + log('Bootstrap', 'Main window visible'); desktopCore.setMainWindowVisible(!startMinimized); setTimeout(() => { // Try to update our asar