Emote request

This commit is contained in:
Jiiks 2015-12-12 22:54:46 +02:00
parent e62aa36b51
commit 191ef2b43d
2 changed files with 40 additions and 5 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Threading;
using System.Windows.Forms;
@ -242,14 +243,48 @@ namespace BetterDiscordWI.panels
File.WriteAllLines(indexloc, lines.ToArray());
Finalize();
});
t.Start();
AppendLog("Finished installation, verifying installation...");
int errors = 0;
String curPath = GetParent().DiscordPath + "\\resources\\app\\app\\index.js";
if (!File.Exists(curPath))
{
AppendLog("ERROR: FILE: " + curPath + " DOES NOT EXIST!");
errors++;
}
private void Finalize()
curPath = GetParent().DiscordPath + "\\resources\\node_modules\\BetterDiscord";
if (!Directory.Exists(curPath))
{
AppendLog("Finished installing BetterDiscord");
AppendLog("ERROR: DIRECTORY: " + curPath + " DOES NOT EXIST");
errors++;
}
String basePath = GetParent().DiscordPath + "\\resources\\node_modules\\BetterDiscord";
String[] bdFiles = {"\\package.json", "\\betterdiscord.js", "\\lib\\BetterDiscord.js", "\\lib\\config.json", "\\lib\\Utils.js"};
foreach (string s in bdFiles.Where(s => !File.Exists(basePath + s)))
{
AppendLog("ERROR: FILE: " + basePath + s + " DOES NOT EXIST");
errors++;
}
Finalize(errors);
});
}
private void Finalize(int errors)
{
AppendLog("Finished installing BetterDiscord with " + errors + " errors");
Invoke((MethodInvoker) delegate
{

File diff suppressed because one or more lines are too long