for 0.0.279
This commit is contained in:
parent
8e5c36a863
commit
dbf017225e
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* BetterDiscordApp Installer v0.3
|
||||
* BetterDiscordApp Installer v0.3.1
|
||||
*/
|
||||
|
||||
var dver = "0.0.278";
|
||||
var dver = "0.0.279";
|
||||
|
||||
var asar = require('asar');
|
||||
var wrench = require('wrench');
|
||||
|
@ -57,39 +57,39 @@ function install() {
|
|||
|
||||
asar.extractAll(_discordPath + _appArchive, _discordPath + _appFolder);
|
||||
|
||||
fs.exists(_discordPath + _appFolder, function(exists) {
|
||||
if(exists) {
|
||||
console.log("Extracted to: " + _discordPath + _appFolder);
|
||||
console.log("Injecting index.js");
|
||||
|
||||
var data = fs.readFileSync(_discordPath + _index).toString().split("\n");
|
||||
data.splice(80, 0, 'var _betterDiscord = require(\'betterdiscord\');\n');
|
||||
data.splice(409, 0, '_betterDiscord = new _betterDiscord.BetterDiscord(mainWindow); \n _betterDiscord.init(); \n');
|
||||
|
||||
|
||||
fs.writeFile(_discordPath + _index, data.join("\n"), function(err) {
|
||||
if(err) return console.log(err);
|
||||
|
||||
console.log("Injected index.js");
|
||||
console.log("Injecting package.json");
|
||||
|
||||
var data = fs.readFileSync(_discordPath + _packageJson).toString().split("\n");
|
||||
data.splice(9, 0, '"betterdiscord":"^0.1.2",');
|
||||
|
||||
fs.writeFile(_discordPath + _packageJson, data.join("\n"), function(err) {
|
||||
if(err) return console.log(err);
|
||||
|
||||
console.log("Injected package.json");
|
||||
console.log("Looks like were done here :)");
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log("Something went wrong, rerun.");
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
fs.exists(_discordPath + _appFolder, function(exists) {
|
||||
if(exists) {
|
||||
console.log("Extracted to: " + _discordPath + _appFolder);
|
||||
console.log("Injecting index.js");
|
||||
|
||||
var data = fs.readFileSync(_discordPath + _index).toString().split("\n");
|
||||
data.splice(83, 0, 'var _betterDiscord = require(\'betterdiscord\');\n');
|
||||
data.splice(539, 0, '_betterDiscord = new _betterDiscord.BetterDiscord(mainWindow); \n _betterDiscord.init(); \n');
|
||||
|
||||
|
||||
fs.writeFile(_discordPath + _index, data.join("\n"), function(err) {
|
||||
if(err) return console.log(err);
|
||||
|
||||
console.log("Injected index.js");
|
||||
console.log("Injecting package.json");
|
||||
|
||||
var data = fs.readFileSync(_discordPath + _packageJson).toString().split("\n");
|
||||
data.splice(10, 0, '"betterdiscord":"^0.1.2",');
|
||||
|
||||
fs.writeFile(_discordPath + _packageJson, data.join("\n"), function(err) {
|
||||
if(err) return console.log(err);
|
||||
|
||||
console.log("Injected package.json");
|
||||
console.log("Looks like were done here :)");
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log("Something went wrong, rerun.");
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log("Discord resources not found at: " + _discordPath);
|
||||
|
@ -128,4 +128,4 @@ function init() {
|
|||
});
|
||||
}
|
||||
|
||||
init();
|
||||
init();
|
||||
|
|
Loading…
Reference in New Issue