asarfuckery/appasar/stable/app_bootstrap/index.js

23 lines
571 B
JavaScript
Raw Normal View History

2019-01-17 18:22:05 +00:00
'use strict';
var buildInfo = require('./buildInfo');
var paths = require('../common/paths');
paths.init(buildInfo);
var moduleUpdater = require('../common/moduleUpdater');
moduleUpdater.initPathsOnly(buildInfo);
var requireNative = require('./requireNative');
function getAppMode() {
if (process.argv && process.argv.includes('--overlay-host')) {
return 'overlay-host';
}
return 'app';
}
var mode = getAppMode();
if (mode === 'app') {
require('./bootstrap');
} else if (mode === 'overlay-host') {
requireNative('discord_overlay2/standalone_host.js');
}