installer fixed
This commit is contained in:
parent
f373d77542
commit
701ae43120
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* BetterDiscordApp Installer v0.2
|
* BetterDiscordApp Installer v0.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var dver = "0.0.278";
|
var dver = "0.0.278";
|
||||||
|
@ -32,16 +32,17 @@ function install() {
|
||||||
console.log("Deleted " + _discordPath + _appFolder + " folder.");
|
console.log("Deleted " + _discordPath + _appFolder + " folder.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fs.existsSync(_discordPath + "\\node_modules")) {
|
if(fs.existsSync(_discordPath + "\\node_modules\\BetterDiscord")) {
|
||||||
console.log("Deleting " + _discordPath + "\\node_modules" + " folder.");
|
console.log("Deleting " + _discordPath + "\\node_modules\\BetterDiscord" + " folder.");
|
||||||
wrench.rmdirSyncRecursive(_discordPath + "\\node_modules");
|
wrench.rmdirSyncRecursive(_discordPath + "\\node_modules\\BetterDiscord");
|
||||||
console.log("Deleted " + _discordPath + "\\node_modules" + " folder.");
|
console.log("Deleted " + _discordPath + "\\node_modules\\BetterDiscord" + " folder.");
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Copying BetterDiscord");
|
console.log("Copying BetterDiscord");
|
||||||
|
|
||||||
fs.mkdirSync(_discordPath + "\\node_modules");
|
fs.mkdirSync(_discordPath + "\\node_modules\\BetterDiscord");
|
||||||
wrench.copyDirSyncRecursive(__dirname + "\\BetterDiscord\\", _discordPath + "\\node_modules\\BetterDiscord\\");
|
|
||||||
|
wrench.copyDirSyncRecursive(__dirname + "\\BetterDiscord\\", _discordPath + "\\node_modules\\BetterDiscord\\", {forceDelete: true});
|
||||||
|
|
||||||
console.log("Looking for app archive");
|
console.log("Looking for app archive");
|
||||||
if(fs.existsSync(_discordPath + _appArchive)) {
|
if(fs.existsSync(_discordPath + _appArchive)) {
|
||||||
|
@ -102,12 +103,12 @@ function install() {
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
|
||||||
console.log("BetterDiscord Simple Installer v0.1 for Discord "+dver+" by Jiiks.");
|
console.log("BetterDiscord Simple Installer v0.3 for Discord "+dver+" by Jiiks.");
|
||||||
console.log("If Discord has updated then download the latest installer.");
|
console.log("If Discord has updated then download the latest installer.");
|
||||||
|
|
||||||
var rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
var rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
||||||
|
|
||||||
rl.question("The following directories will be deleted if they exists: discorpath\\app, discordpath\\node_modules, is this ok? Y/N", function(answer) {
|
rl.question("The following directories will be deleted if they exists: discorpath\\app, discordpath\\node_modules\\BetterDiscord, is this ok? Y/N", function(answer) {
|
||||||
|
|
||||||
var alc = answer.toLowerCase();
|
var alc = answer.toLowerCase();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue