diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index eca361c..184539f 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -7,8 +7,8 @@ true True Bloxstrap.ico - 2.0.0 - 2.0.0.0 + 2.1.0 + 2.1.0.0 app.manifest diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 3324ec5..2150dc4 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -195,9 +195,7 @@ namespace Bloxstrap // 64-bit is always the first option GithubReleaseAsset asset = releaseInfo.Assets[Environment.Is64BitOperatingSystem ? 0 : 1]; - string downloadLocation = Path.Combine(Directories.Updates, asset.Name); - - Directory.CreateDirectory(Directories.Updates); + string downloadLocation = Path.Combine(Directories.LocalAppData, "Temp", asset.Name); App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Downloading {releaseInfo.Name}..."); @@ -205,7 +203,7 @@ namespace Bloxstrap { var response = await App.HttpClient.GetAsync(asset.BrowserDownloadUrl); - await using var fileStream = new FileStream(Path.Combine(Directories.Updates, asset.Name), FileMode.CreateNew); + await using var fileStream = new FileStream(downloadLocation, FileMode.CreateNew); await response.Content.CopyToAsync(fileStream); } diff --git a/Bloxstrap/Helpers/Directories.cs b/Bloxstrap/Helpers/Directories.cs index 87005bc..ee42591 100644 --- a/Bloxstrap/Helpers/Directories.cs +++ b/Bloxstrap/Helpers/Directories.cs @@ -18,7 +18,6 @@ namespace Bloxstrap.Helpers public static string Integrations { get; private set; } = ""; public static string Versions { get; private set; } = ""; public static string Modifications { get; private set; } = ""; - public static string Updates { get; private set; } = ""; public static string Application { get; private set; } = ""; @@ -31,7 +30,6 @@ namespace Bloxstrap.Helpers Integrations = Path.Combine(Base, "Integrations"); Versions = Path.Combine(Base, "Versions"); Modifications = Path.Combine(Base, "Modifications"); - Updates = Path.Combine(Base, "Updates"); Application = Path.Combine(Base, $"{App.ProjectName}.exe"); } diff --git a/Bloxstrap/Helpers/Protocol.cs b/Bloxstrap/Helpers/Protocol.cs index 0bcf17b..8524566 100644 --- a/Bloxstrap/Helpers/Protocol.cs +++ b/Bloxstrap/Helpers/Protocol.cs @@ -14,11 +14,12 @@ namespace Bloxstrap.Helpers // map uri keys to command line args private static readonly IReadOnlyDictionary UriKeyArgMap = new Dictionary() { - // excluding roblox-player and browsertrackerid + // excluding roblox-player and launchtime { "launchmode", "--" }, { "gameinfo", "-t " }, { "placelauncherurl", "-j "}, // { "launchtime", "--launchtime=" }, we'll set this when launching the game client + { "browsertrackerid", "-b " }, { "robloxLocale", "--rloc " }, { "gameLocale", "--gloc " }, { "channel", "-channel " } @@ -47,7 +48,7 @@ namespace Bloxstrap.Helpers val = "app"; if (key == "placelauncherurl") - val = HttpUtility.UrlDecode(val).Replace("browserTrackerId", "lol"); + val = HttpUtility.UrlDecode(val); if (key == "channel") { diff --git a/Bloxstrap/Helpers/Updater.cs b/Bloxstrap/Helpers/Updater.cs index abf2593..35f6fe8 100644 --- a/Bloxstrap/Helpers/Updater.cs +++ b/Bloxstrap/Helpers/Updater.cs @@ -14,7 +14,8 @@ namespace Bloxstrap.Helpers if (Environment.ProcessPath is null || !File.Exists(Directories.Application) || Environment.ProcessPath == Directories.Application) return; - bool isAutoUpgrade = Environment.ProcessPath.StartsWith(Directories.Updates); + // 2.0.0 downloads updates to /Updates so lol + bool isAutoUpgrade = Environment.ProcessPath.StartsWith(Path.Combine(Directories.Base, "Updates")) || Environment.ProcessPath.StartsWith(Path.Combine(Directories.LocalAppData, "Temp")); // if downloaded version doesn't match, replace installed version with downloaded version FileVersionInfo currentVersionInfo = FileVersionInfo.GetVersionInfo(Environment.ProcessPath);