Skip to content

Commit

Permalink
Merge branch 'main' into feature/improve-studio-support
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Nov 5, 2024
2 parents 14c5ca5 + 7bc95e7 commit eb9e134
Show file tree
Hide file tree
Showing 48 changed files with 810 additions and 327 deletions.
14 changes: 13 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Do NOT open an issue if you're getting an error saying "`The given key 'redist.zip' was not present in the dictionary.`", or if you're getting stuck on "Configuring Roblox...".
> This problem has been fixed in the latest version of Bloxstrap. You either have auto-updates disabled or are using someone's custom build of an old version.
> Download the latest version [here](https://github.com/pizzaboxer/bloxstrap/releases/latest).
### **Preliminary instructions**
- Before opening an issue, please [check the Wiki first](https://github.com/pizzaboxer/bloxstrap/wiki/) to see if your problem has been addressed there.
- If it isn't, please confirm which pages that you read that were relevant to your issue.
Expand All @@ -26,6 +30,14 @@ body:
- label: I am using the latest version of Bloxstrap.
required: true
- label: I did not answer truthfully to all the above checkboxes.
- type: input
id: version
attributes:
label: Bloxstrap Version
description: "What version of Bloxstrap are you using? Find it in the 'About' section of the Settings"
placeholder: "v1.0.0"
validations:
required: true
- type: textarea
id: what-happened
attributes:
Expand All @@ -39,4 +51,4 @@ body:
label: Bloxstrap Log
description: If you're getting a Bloxstrap Exception error, upload your log file here. Otherwise, just leave it empty.
value: "N/A"
#render: text
render: text
28 changes: 11 additions & 17 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,17 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')

steps:
# - name: Sign and download artifact
# uses: signpath/github-action-submit-signing-request@v1
# with:
# api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
# organization-id: '107b3de5-057b-42fc-a985-3546e4261775'
# project-slug: 'bloxstrap'
# signing-policy-slug: 'release-signing'
# artifact-configuration-slug: 'github-ci'
# github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
# wait-for-completion: true
# output-artifact-directory: 'release'

- name: Download x64 release artifact
uses: actions/download-artifact@v4
- name: Sign and download artifact
uses: signpath/github-action-submit-signing-request@v1
with:
name: Bloxstrap (Release) (${{ github.sha }})
path: release
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '107b3de5-057b-42fc-a985-3546e4261775'
project-slug: 'bloxstrap'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'github-ci'
github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'release'

- name: Rename binaries
run: mv release/Bloxstrap.exe Bloxstrap-${{ github.ref_name }}.exe
Expand All @@ -79,7 +73,7 @@ jobs:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '107b3de5-057b-42fc-a985-3546e4261775'
project-slug: 'bloxstrap'
signing-policy-slug: 'test-signing'
signing-policy-slug: 'release-signing'
artifact-configuration-slug: 'github-ci'
github-artifact-id: '${{ needs.build.outputs.artifact-id }}'
wait-for-completion: true
Expand Down
32 changes: 31 additions & 1 deletion Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Reflection;
using System.Security.Cryptography;
using System.Windows;
using System.Windows.Shell;
using System.Windows.Threading;

using Microsoft.Win32;
Expand Down Expand Up @@ -35,6 +36,8 @@ public partial class App : Application

public static string Version = Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];

public static Bootstrapper? Bootstrapper { get; set; } = null!;

public static bool IsActionBuild => !String.IsNullOrEmpty(BuildMetadata.CommitRef);

public static bool IsProductionBuild => IsActionBuild && BuildMetadata.CommitRef.StartsWith("tag", StringComparison.Ordinal);
Expand Down Expand Up @@ -106,6 +109,16 @@ public static void FinalizeExceptionHandling(Exception ex, bool log = true)

_showingExceptionDialog = true;

SendLog();

if (Bootstrapper?.Dialog != null)
{
if (Bootstrapper.Dialog.TaskbarProgressValue == 0)
Bootstrapper.Dialog.TaskbarProgressValue = 1; // make sure it's visible

Bootstrapper.Dialog.TaskbarProgressState = TaskbarItemProgressState.Error;
}

Frontend.ShowExceptionDialog(ex);

Terminate(ErrorCode.ERROR_INSTALL_FAILURE);
Expand Down Expand Up @@ -150,6 +163,24 @@ public static async void SendStat(string key, string value)
}
}

public static async void SendLog()
{
if (!Settings.Prop.EnableAnalytics || !IsProductionBuild)
return;

try
{
await HttpClient.PostAsync(
$"https://bloxstraplabs.com/metrics/post-exception",
new StringContent(Logger.AsDocument)
);
}
catch (Exception ex)
{
Logger.WriteException("App::SendLog", ex);
}
}

protected override void OnStartup(StartupEventArgs e)
{
const string LOG_IDENT = "App::OnStartup";
Expand Down Expand Up @@ -209,7 +240,6 @@ protected override void OnStartup(StartupEventArgs e)
else
{
// check if user profile folder has been renamed
// honestly, i'll be expecting bugs from this
var match = Regex.Match(value, @"^[a-zA-Z]:\\Users\\([^\\]+)", RegexOptions.IgnoreCase);

if (match.Success)
Expand Down
1 change: 1 addition & 0 deletions Bloxstrap/AppData/CommonAppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public abstract class CommonAppData
{ "content-textures3.zip", @"PlatformContent\pc\textures\" },
{ "content-terrain.zip", @"PlatformContent\pc\terrain\" },
{ "content-platform-fonts.zip", @"PlatformContent\pc\fonts\" },
{ "content-platform-dictionaries.zip", @"PlatformContent\pc\shared_compression_dictionaries\" },

{ "extracontent-luapackages.zip", @"ExtraContent\LuaPackages\" },
{ "extracontent-translations.zip", @"ExtraContent\translations\" },
Expand Down
4 changes: 2 additions & 2 deletions Bloxstrap/AppData/IAppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ internal interface IAppData

string ExecutableName { get; }

string StartEvent { get; }

string Directory { get; }

string OldDirectory { get; }

string LockFilePath { get; }

string ExecutablePath { get; }
Expand Down
4 changes: 2 additions & 2 deletions Bloxstrap/AppData/RobloxPlayerData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class RobloxPlayerData : CommonAppData, IAppData

public override string ExecutableName => "RobloxPlayerBeta.exe";

public string StartEvent => "www.roblox.com/robloxStartedEvent";

public override string Directory => Path.Combine(Paths.Roblox, "Player");

public string OldDirectory => Path.Combine(Paths.Roblox, "Player.old");

public AppState State => App.State.Prop.Player;

public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>()
Expand Down
6 changes: 3 additions & 3 deletions Bloxstrap/AppData/RobloxStudioData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class RobloxStudioData : CommonAppData, IAppData

public override string ExecutableName => "RobloxStudioBeta.exe";

public string StartEvent => "www.roblox.com/robloxStudioStartedEvent";

public override string Directory => Path.Combine(Paths.Roblox, "Studio");


public string OldDirectory => Path.Combine(Paths.Roblox, "Studio.old");

public AppState State => App.State.Prop.Studio;

public override IReadOnlyDictionary<string, string> PackageDirectoryMap { get; set; } = new Dictionary<string, string>()
Expand Down
4 changes: 2 additions & 2 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<UseWPF>true</UseWPF>
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
<Version>2.8.0</Version>
<FileVersion>2.8.0</FileVersion>
<Version>2.8.1</Version>
<FileVersion>2.8.1</FileVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
Expand Down
Loading

0 comments on commit eb9e134

Please sign in to comment.