From dca56f330f7efebdfba26246105c8bbb1ac21354 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Tue, 25 May 2021 17:59:35 +0200 Subject: [PATCH] Now creating symlinks to Songs and Skins Folder, copying collection and scores db to the EZPPClient dir --- EZPPClient Installer/DownloadUtil.cs | 12 +- EZPPClient Installer/MainWindow.xaml | 4 +- EZPPClient Installer/MainWindow.xaml.cs | 198 ++++++++++++++++++++++-- 3 files changed, 200 insertions(+), 14 deletions(-) diff --git a/EZPPClient Installer/DownloadUtil.cs b/EZPPClient Installer/DownloadUtil.cs index f9d8f06..592a59f 100644 --- a/EZPPClient Installer/DownloadUtil.cs +++ b/EZPPClient Installer/DownloadUtil.cs @@ -50,6 +50,9 @@ namespace EZPPClient_Installer if (!directoryExists) { +#if DEBUG + MessageBox.Show("Folder does not exist: " + pathToEZPP); +#endif foreach (MD5File md5File in md5Files) downloadList.Add(md5File.getName()); } @@ -67,6 +70,9 @@ namespace EZPPClient_Installer { string onlineHash = md5file.getMD5(); string pcHash = MD5Util.CalculateMD5(file); +#if DEBUG + MessageBox.Show("Filename: " + md5file.getName() + "\nOnline-Hash: " + onlineHash + "\n PC-Hash: " + pcHash); +#endif if (!string.Equals(onlineHash, pcHash)) { downloadList.Add(md5file.getName()); @@ -86,7 +92,11 @@ namespace EZPPClient_Installer if (!Directory.Exists(path)) Directory.CreateDirectory(path); - foreach(string filename in files) + foreach(string file in files) + if (File.Exists(path + @"\" + file)) + File.Delete(path + @"\" + file); + + foreach (string filename in files) { await DownloadFile(filename, path); diff --git a/EZPPClient Installer/MainWindow.xaml b/EZPPClient Installer/MainWindow.xaml index 5ea1b37..6b07954 100644 --- a/EZPPClient Installer/MainWindow.xaml +++ b/EZPPClient Installer/MainWindow.xaml @@ -12,8 +12,8 @@