diff --git a/Artemis/Artemis/ArtemisBootstrapper.cs b/Artemis/Artemis/ArtemisBootstrapper.cs index 91b82acbb..65b9c478c 100644 --- a/Artemis/Artemis/ArtemisBootstrapper.cs +++ b/Artemis/Artemis/ArtemisBootstrapper.cs @@ -34,6 +34,7 @@ namespace Artemis DllManager.RestoreLogitechDll(); // Check compatibility before trying to boot further CompatibilityService.CheckRivaTuner(); + Updater.CleanSquirrel(); Initialize(); BindSpecialValues(); diff --git a/Artemis/Artemis/Utilities/Updater.cs b/Artemis/Artemis/Utilities/Updater.cs index 48dc1efe3..3e3e8494c 100644 --- a/Artemis/Artemis/Utilities/Updater.cs +++ b/Artemis/Artemis/Utilities/Updater.cs @@ -147,7 +147,7 @@ namespace Artemis.Utilities private static object ConvertBytesToMegabytes(long bytes) { - return Math.Round((bytes / 1024f) / 1024f, 2); + return Math.Round(bytes / 1024f / 1024f, 2); } /// @@ -189,6 +189,29 @@ namespace Artemis.Utilities } } + /// + /// Removes the old Squirrel-based version of Artemis if present + /// + public static void CleanSquirrel() + { + var squirrelPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Artemis"; + if (!Directory.Exists(squirrelPath)) + return; + + var psi = new ProcessStartInfo + { + FileName = squirrelPath + "\\Update.exe", + Arguments = "--uninstall", + Verb = "runas" + }; + + var process = new System.Diagnostics.Process {StartInfo = psi}; + process.Start(); + process.WaitForExit(); + + Directory.Delete(squirrelPath, true); + } + /// /// JSON default value handling can only go so far, so the update will take care of defaults /// on the offsets if they are null @@ -217,4 +240,4 @@ namespace Artemis.Utilities offsetSettings.Save(); } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 65ccb6f2f..66a29b9d2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,3 @@ -# State of the project -Currently I'm in an extremely busy period of my student life (final year) and even when I have some spare time it's hard for me to spend it on Artemis. I'll try to put out releases for app-breaking bugs but new features are very hard for me to implement right now. - -I do not consider Artemis done, I don't think I'll ever do so because it is something that can always use new features and improvements. If I have the time again I'd love to make a 2.0 with the same features but implemented in a much neater way. - -If anyone with sufficient skill in C# would like to be a maintainer alongside me, drop me a message at ```spoinky.nl@gmail.com```. It could be that at some point in the near future I'll put out a bunch of updates again but any help is appreciated :). - -PS: There are some device issues currently that I'll try to get fixed soon, I already have a few few fixes in the dev branch and a great WoW module - # Artemis [![GitHub release](https://img.shields.io/github/release/spoinkynl/Artemis.svg)]() [![Github All Releases](https://img.shields.io/github/downloads/spoinkynl/artemis/setup.exe.svg)]()