diff --git a/EZPPClient Installer/EZPPClient Installer.csproj b/EZPPClient Installer/EZPPClient Installer.csproj
index 9c01b47..bf7396a 100644
--- a/EZPPClient Installer/EZPPClient Installer.csproj
+++ b/EZPPClient Installer/EZPPClient Installer.csproj
@@ -143,6 +143,9 @@
0.9.4
+
+ 2.0.6
+
diff --git a/EZPPClient Installer/MainWindow.xaml b/EZPPClient Installer/MainWindow.xaml
index 91390fc..8b80bfe 100644
--- a/EZPPClient Installer/MainWindow.xaml
+++ b/EZPPClient Installer/MainWindow.xaml
@@ -10,7 +10,7 @@
ui:WindowHelper.UseModernWindowStyle="True" ResizeMode="CanMinimize" Icon="circle_new.ico" Topmost="True" WindowStartupLocation="CenterScreen">
-
+
diff --git a/EZPPClient Installer/MainWindow.xaml.cs b/EZPPClient Installer/MainWindow.xaml.cs
index e6ab2d2..428d9a0 100644
--- a/EZPPClient Installer/MainWindow.xaml.cs
+++ b/EZPPClient Installer/MainWindow.xaml.cs
@@ -15,6 +15,8 @@ using Path = System.IO.Path;
using File = System.IO.File;
using EZPPClient_Installer.Utils;
using IWshRuntimeLibrary;
+using System.Windows.Forms.VisualStyles;
+using Semver;
#if DEBUG
using MessageBox = System.Windows.MessageBox;
@@ -33,7 +35,7 @@ namespace EZPPClient_Installer
[DllImport("kernel32.dll")]
private static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, SymbolicLink dwFlags);
- private static double VERSION = 1.6;
+ private static SemVersion VERSION = new SemVersion(1, 1, 0);
public static string RELEASESTREAM;
@@ -76,6 +78,9 @@ namespace EZPPClient_Installer
bool isValidFolder = await isValidOsuFolder(osuPath);
UpdateInstallButton(!string.IsNullOrEmpty(osuPath));
+ if(string.IsNullOrEmpty(osuPath))
+ folderTextbox.Text = "";
+
if (!string.IsNullOrEmpty(osuPath) && isValidFolder)
{
bool foundInstall = isEZPPClientInstallationFound(osuPath);
@@ -134,16 +139,19 @@ namespace EZPPClient_Installer
{
client.Headers.Add("user-agent", "EZPPClientInstaller");
string newVersionString = await client.DownloadStringTaskAsync("https://new.ez-pp.farm/ezppclient?version");
- double ver = 0;
+ SemVersion newVersion = new SemVersion(9, 9, 9);
+
try
{
- ver = double.Parse(newVersionString, CultureInfo.InvariantCulture);
+ newVersion = SemVersion.Parse(newVersionString);
}
- catch (FormatException)
- {
+ catch (Exception e){
+ ShowErrorDialog(e.Message);
}
- if (ver > VERSION)
+ int versionsBehind = newVersion.CompareTo(VERSION);
+
+ if (versionsBehind > 0)
return UpdateState.UpdateFound;
}
}