|
|
|
@ -2,14 +2,23 @@ const { app, BrowserWindow } = require('electron');
|
|
|
|
|
const { readFileSync } = require('fs');
|
|
|
|
|
const { join } = require('path');
|
|
|
|
|
|
|
|
|
|
if (process.platform === 'linux') { // Discord is a well-made app which properly implements WebRTC
|
|
|
|
|
if (process.env.PULSE_LATENCY_MSEC === undefined) {
|
|
|
|
|
process.env.PULSE_LATENCY_MSEC = 30;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const Constants = require('./Constants');
|
|
|
|
|
|
|
|
|
|
log('Bootstrap', 'Forcing Electron props');
|
|
|
|
|
app.name = 'discord'; // Force name as sometimes breaks data path even with "discord" name (also fixes kernel?)
|
|
|
|
|
|
|
|
|
|
switch (process.platform) { // Discord forces these
|
|
|
|
|
case 'linux':
|
|
|
|
|
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.allowRendererProcessReuse = false;
|
|
|
|
|
|
|
|
|
|
const requireNative = require('./utils/requireNative');
|
|
|
|
|
|
|
|
|
@ -31,7 +40,6 @@ const appSettings = require('./appSettings');
|
|
|
|
|
const GPUSettings = require('./GPUSettings');
|
|
|
|
|
const crashReporterSetup = require('./crashReporterSetup');
|
|
|
|
|
const splashScreen = require('./splash');
|
|
|
|
|
const Constants = require('./Constants');
|
|
|
|
|
const autoStart = require('./autoStart');
|
|
|
|
|
|
|
|
|
|
const updater = require('./updater/updater');
|
|
|
|
|