mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-19 00:51:30 -07:00
fix version argument not working
This commit is contained in:
parent
68556c42b4
commit
5ab1076530
@ -45,8 +45,8 @@ namespace Bloxstrap
|
||||
private readonly FastZipEvents _fastZipEvents = new();
|
||||
private readonly CancellationTokenSource _cancelTokenSource = new();
|
||||
|
||||
private readonly IAppData AppData;
|
||||
private readonly LaunchMode _launchMode;
|
||||
private IAppData AppData;
|
||||
private LaunchMode _launchMode;
|
||||
|
||||
private string _launchCommandLine = App.LaunchSettings.RobloxLaunchArgs;
|
||||
private string _latestVersionGuid = null!;
|
||||
@ -91,6 +91,11 @@ namespace Bloxstrap
|
||||
_fastZipEvents.DirectoryFailure += (_, e) => throw e.Exception;
|
||||
_fastZipEvents.ProcessFile += (_, e) => e.ContinueRunning = !_cancelTokenSource.IsCancellationRequested;
|
||||
|
||||
SetupAppData();
|
||||
}
|
||||
|
||||
private void SetupAppData()
|
||||
{
|
||||
AppData = IsStudioLaunch ? new RobloxStudioData() : new RobloxPlayerData();
|
||||
Deployment.BinaryType = AppData.BinaryType;
|
||||
}
|
||||
@ -347,6 +352,18 @@ namespace Bloxstrap
|
||||
var pkgManifestData = await App.HttpClient.GetStringAsync(pkgManifestUrl);
|
||||
|
||||
_versionPackageManifest = new(pkgManifestData);
|
||||
|
||||
// this can happen if version is set through arguments
|
||||
if (_launchMode == LaunchMode.Unknown)
|
||||
{
|
||||
App.Logger.WriteLine(LOG_IDENT, "Identifying launch mode from package manifest");
|
||||
|
||||
bool isPlayer = _versionPackageManifest.Exists(x => x.Name == "RobloxApp.zip");
|
||||
App.Logger.WriteLine(LOG_IDENT, $"isPlayer: {isPlayer}");
|
||||
|
||||
_launchMode = isPlayer ? LaunchMode.Player : LaunchMode.Studio;
|
||||
SetupAppData(); // we need to set it up again
|
||||
}
|
||||
}
|
||||
|
||||
private void StartRoblox()
|
||||
|
@ -3,6 +3,10 @@
|
||||
public enum LaunchMode
|
||||
{
|
||||
None,
|
||||
/// <summary>
|
||||
/// Launch mode will be determined inside the bootstrapper. Only works if the VersionFlag is set.
|
||||
/// </summary>
|
||||
Unknown,
|
||||
Player,
|
||||
Studio,
|
||||
StudioAuth
|
||||
|
@ -139,6 +139,9 @@ namespace Bloxstrap
|
||||
}
|
||||
}
|
||||
|
||||
if (VersionFlag.Active)
|
||||
RobloxLaunchMode = LaunchMode.Unknown; // determine in bootstrapper
|
||||
|
||||
if (PlayerFlag.Active)
|
||||
ParsePlayer(PlayerFlag.Data);
|
||||
else if (StudioFlag.Active)
|
||||
|
Loading…
Reference in New Issue
Block a user