Create stub.js

This commit is contained in:
Alexei Stukov 2019-02-01 09:08:21 +02:00 committed by GitHub
parent 8fbd75ce94
commit 033f3472cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

17
installer/stub.js Normal file
View File

@ -0,0 +1,17 @@
const { paths } = require('./bd.json');
const { app } = require('electron');
const path = require('path');
const fs = require('fs');
const Module = require('module');
const packagePath = path.join(__dirname, '..', 'app.asar');
app.getAppPath = () => packagePath;
function loadBd() {
const { BetterDiscord } = require(paths.core);
const instance = new BetterDiscord();
}
app.on('ready', loadBd);
Module._load(app.getAppPath(), null, true);