asarfuckery/appasar/development/app_bootstrap/index.js
2019-01-17 19:22:05 +01:00

23 lines
No EOL
581 B
JavaScript

'use strict';
const buildInfo = require('./buildInfo');
const paths = require('../common/paths');
paths.init(buildInfo);
const moduleUpdater = require('../common/moduleUpdater');
moduleUpdater.initPathsOnly(buildInfo);
const requireNative = require('./requireNative');
function getAppMode() {
if (process.argv && process.argv.includes('--overlay-host')) {
return 'overlay-host';
}
return 'app';
}
const mode = getAppMode();
if (mode === 'app') {
require('./bootstrap');
} else if (mode === 'overlay-host') {
requireNative('discord_overlay2/standalone_host.js');
}