Skip to content

Commit

Permalink
v1.4.0: Build channel support, use rbxcdn, cleanup
Browse files Browse the repository at this point in the history
thanks clonetrooper for reminding me rbxcdn exists - don't know why i used s3 directly since it's so much slower
  • Loading branch information
pizzaboxer committed Aug 26, 2022
1 parent 4c0e7f5 commit 0a2382d
Show file tree
Hide file tree
Showing 13 changed files with 374 additions and 123 deletions.
4 changes: 2 additions & 2 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<Platforms>AnyCPU;x86</Platforms>
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
<Version>1.3.0</Version>
<FileVersion>1.3.0.0</FileVersion>
<Version>1.4.0</Version>
<FileVersion>1.4.0.0</FileVersion>
<UseWPF>True</UseWPF>
</PropertyGroup>

Expand Down
13 changes: 4 additions & 9 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ public Bootstrapper()
Client.Timeout = TimeSpan.FromMinutes(10);
}

public void Initialize(BootstrapperStyle bootstrapperStyle, string? launchCommandLine = null)
public void Initialize(string? launchCommandLine = null)
{
LaunchCommandLine = launchCommandLine;

switch (bootstrapperStyle)
switch (Program.Settings.BootstrapperStyle)
{
case BootstrapperStyle.VistaDialog:
Application.Run(new VistaDialog(this));
Expand Down Expand Up @@ -128,12 +128,7 @@ public async Task Run()
await CheckLatestVersion();

if (!Directory.Exists(VersionFolder) || Program.Settings.VersionGuid != VersionGuid)
{
Debug.WriteLineIf(!Directory.Exists(VersionFolder), $"Installing latest version (!Directory.Exists({VersionFolder}))");
Debug.WriteLineIf(Program.Settings.VersionGuid != VersionGuid, $"Installing latest version ({Program.Settings.VersionGuid} != {VersionGuid})");

await InstallLatestVersion();
}

ApplyModifications();

Expand All @@ -156,7 +151,7 @@ private async Task CheckLatestVersion()
{
Dialog.Message = "Connecting to Roblox...";

VersionGuid = await Client.GetStringAsync($"{Program.BaseUrlSetup}/version");
VersionGuid = await Client.GetStringAsync($"{DeployManager.BaseUrl}/version");
VersionFolder = Path.Combine(Directories.Versions, VersionGuid);
VersionPackageManifest = await PackageManifest.Get(VersionGuid);
}
Expand Down Expand Up @@ -587,7 +582,7 @@ private static void CheckModPreset(bool condition, string location, string base6

private async void DownloadPackage(Package package)
{
string packageUrl = $"{Program.BaseUrlSetup}/{VersionGuid}-{package.Name}";
string packageUrl = $"{DeployManager.BaseUrl}/{VersionGuid}-{package.Name}";
string packageLocation = Path.Combine(Directories.Downloads, package.Signature);
string robloxPackageLocation = Path.Combine(Program.LocalAppData, "Roblox", "Downloads", package.Signature);

Expand Down
23 changes: 5 additions & 18 deletions Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,13 @@ public async void RunBootstrapper()

public virtual void ShowSuccess(string message)
{
MessageBox.Show(
message,
Program.ProjectName,
MessageBoxButtons.OK,
MessageBoxIcon.Information
);

Program.ShowMessageBox(message, MessageBoxIcon.Information);
Program.Exit();
}

public virtual void ShowError(string message)
{
MessageBox.Show(
$"An error occurred while starting Roblox\n\nDetails: {message}",
Program.ProjectName,
MessageBoxButtons.OK,
MessageBoxIcon.Error
);

Program.ShowMessageBox($"An error occurred while starting Roblox\n\nDetails: {message}", MessageBoxIcon.Error);
Program.Exit();
}

Expand All @@ -129,11 +117,10 @@ public virtual void CloseDialog()

public void PromptShutdown()
{
DialogResult result = MessageBox.Show(
DialogResult result = Program.ShowMessageBox(
"Roblox is currently running, but needs to close. Would you like close Roblox now?",
Program.ProjectName,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Information
MessageBoxIcon.Information,
MessageBoxButtons.OKCancel
);

if (result != DialogResult.OK)
Expand Down
59 changes: 59 additions & 0 deletions Bloxstrap/Dialogs/Preferences.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a2382d

Please sign in to comment.