bump version, browserTrackerId, update in temp

so turns out the browserTrackerId is actually necessary lol oops
This commit is contained in:
pizzaboxer 2023-03-09 00:43:58 +00:00
parent d1b75f6874
commit 4050b1c2e6
5 changed files with 9 additions and 11 deletions

View File

@ -7,8 +7,8 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms> <UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon> <ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
<Version>2.0.0</Version> <Version>2.1.0</Version>
<FileVersion>2.0.0.0</FileVersion> <FileVersion>2.1.0.0</FileVersion>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>

View File

@ -195,9 +195,7 @@ namespace Bloxstrap
// 64-bit is always the first option // 64-bit is always the first option
GithubReleaseAsset asset = releaseInfo.Assets[Environment.Is64BitOperatingSystem ? 0 : 1]; GithubReleaseAsset asset = releaseInfo.Assets[Environment.Is64BitOperatingSystem ? 0 : 1];
string downloadLocation = Path.Combine(Directories.Updates, asset.Name); string downloadLocation = Path.Combine(Directories.LocalAppData, "Temp", asset.Name);
Directory.CreateDirectory(Directories.Updates);
App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Downloading {releaseInfo.Name}..."); App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Downloading {releaseInfo.Name}...");
@ -205,7 +203,7 @@ namespace Bloxstrap
{ {
var response = await App.HttpClient.GetAsync(asset.BrowserDownloadUrl); 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); await response.Content.CopyToAsync(fileStream);
} }

View File

@ -18,7 +18,6 @@ namespace Bloxstrap.Helpers
public static string Integrations { get; private set; } = ""; public static string Integrations { get; private set; } = "";
public static string Versions { get; private set; } = ""; public static string Versions { get; private set; } = "";
public static string Modifications { get; private set; } = ""; public static string Modifications { get; private set; } = "";
public static string Updates { get; private set; } = "";
public static string Application { get; private set; } = ""; public static string Application { get; private set; } = "";
@ -31,7 +30,6 @@ namespace Bloxstrap.Helpers
Integrations = Path.Combine(Base, "Integrations"); Integrations = Path.Combine(Base, "Integrations");
Versions = Path.Combine(Base, "Versions"); Versions = Path.Combine(Base, "Versions");
Modifications = Path.Combine(Base, "Modifications"); Modifications = Path.Combine(Base, "Modifications");
Updates = Path.Combine(Base, "Updates");
Application = Path.Combine(Base, $"{App.ProjectName}.exe"); Application = Path.Combine(Base, $"{App.ProjectName}.exe");
} }

View File

@ -14,11 +14,12 @@ namespace Bloxstrap.Helpers
// map uri keys to command line args // map uri keys to command line args
private static readonly IReadOnlyDictionary<string, string> UriKeyArgMap = new Dictionary<string, string>() private static readonly IReadOnlyDictionary<string, string> UriKeyArgMap = new Dictionary<string, string>()
{ {
// excluding roblox-player and browsertrackerid // excluding roblox-player and launchtime
{ "launchmode", "--" }, { "launchmode", "--" },
{ "gameinfo", "-t " }, { "gameinfo", "-t " },
{ "placelauncherurl", "-j "}, { "placelauncherurl", "-j "},
// { "launchtime", "--launchtime=" }, we'll set this when launching the game client // { "launchtime", "--launchtime=" }, we'll set this when launching the game client
{ "browsertrackerid", "-b " },
{ "robloxLocale", "--rloc " }, { "robloxLocale", "--rloc " },
{ "gameLocale", "--gloc " }, { "gameLocale", "--gloc " },
{ "channel", "-channel " } { "channel", "-channel " }
@ -47,7 +48,7 @@ namespace Bloxstrap.Helpers
val = "app"; val = "app";
if (key == "placelauncherurl") if (key == "placelauncherurl")
val = HttpUtility.UrlDecode(val).Replace("browserTrackerId", "lol"); val = HttpUtility.UrlDecode(val);
if (key == "channel") if (key == "channel")
{ {

View File

@ -14,7 +14,8 @@ namespace Bloxstrap.Helpers
if (Environment.ProcessPath is null || !File.Exists(Directories.Application) || Environment.ProcessPath == Directories.Application) if (Environment.ProcessPath is null || !File.Exists(Directories.Application) || Environment.ProcessPath == Directories.Application)
return; return;
bool isAutoUpgrade = Environment.ProcessPath.StartsWith(Directories.Updates); // 2.0.0 downloads updates to <BaseFolder>/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 // if downloaded version doesn't match, replace installed version with downloaded version
FileVersionInfo currentVersionInfo = FileVersionInfo.GetVersionInfo(Environment.ProcessPath); FileVersionInfo currentVersionInfo = FileVersionInfo.GetVersionInfo(Environment.ProcessPath);