mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
fix studio auth
This commit is contained in:
parent
f426e6d2b2
commit
c5c5ff96f3
@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
|
||||
@ -194,6 +195,7 @@ namespace Bloxstrap
|
||||
|
||||
string commandLine = "";
|
||||
bool isStudioLaunch = false;
|
||||
bool isStudioAuth = false;
|
||||
|
||||
if (IsMenuLaunch)
|
||||
{
|
||||
@ -235,12 +237,15 @@ namespace Bloxstrap
|
||||
else if (LaunchArgs[0].StartsWith("roblox-studio:"))
|
||||
{
|
||||
commandLine = ProtocolHandler.ParseUri(LaunchArgs[0]);
|
||||
if (!commandLine.Contains("-startEvent"))
|
||||
commandLine += " -startEvent www.roblox.com/robloxQTStudioStartedEvent";
|
||||
isStudioLaunch = true;
|
||||
}
|
||||
else if (LaunchArgs[0].StartsWith("roblox-studio-auth:"))
|
||||
{
|
||||
commandLine = LaunchArgs[0];
|
||||
commandLine = HttpUtility.UrlDecode(LaunchArgs[0]);
|
||||
isStudioLaunch = true;
|
||||
isStudioAuth = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -259,7 +264,7 @@ namespace Bloxstrap
|
||||
|
||||
// start bootstrapper and show the bootstrapper modal if we're not running silently
|
||||
Logger.WriteLine(LOG_IDENT, "Initializing bootstrapper");
|
||||
Bootstrapper bootstrapper = new(commandLine, isStudioLaunch);
|
||||
Bootstrapper bootstrapper = new(commandLine, isStudioLaunch, isStudioAuth);
|
||||
IBootstrapperDialog? dialog = null;
|
||||
|
||||
if (!IsQuiet)
|
||||
|
@ -27,6 +27,7 @@ namespace Bloxstrap
|
||||
|
||||
private string _launchCommandLine;
|
||||
private bool _studioLaunch;
|
||||
private bool _studioAuth;
|
||||
|
||||
private string _versionGuid
|
||||
{
|
||||
@ -61,10 +62,11 @@ namespace Bloxstrap
|
||||
#endregion
|
||||
|
||||
#region Core
|
||||
public Bootstrapper(string launchCommandLine, bool studioLaunch)
|
||||
public Bootstrapper(string launchCommandLine, bool studioLaunch, bool studioAuth)
|
||||
{
|
||||
_launchCommandLine = launchCommandLine;
|
||||
_studioLaunch = studioLaunch;
|
||||
_studioAuth = studioAuth;
|
||||
}
|
||||
|
||||
private void SetStatus(string message)
|
||||
@ -286,6 +288,8 @@ namespace Bloxstrap
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_studioAuth)
|
||||
{
|
||||
_launchCommandLine = _launchCommandLine.Replace("LAUNCHTIMEPLACEHOLDER", DateTimeOffset.Now.ToUnixTimeMilliseconds().ToString());
|
||||
|
||||
_launchCommandLine += " -channel ";
|
||||
@ -294,6 +298,7 @@ namespace Bloxstrap
|
||||
_launchCommandLine += "production";
|
||||
else
|
||||
_launchCommandLine += App.Settings.Prop.Channel.ToLowerInvariant();
|
||||
}
|
||||
|
||||
// whether we should wait for roblox to exit to handle stuff in the background or clean up after roblox closes
|
||||
bool shouldWait = false;
|
||||
@ -305,6 +310,13 @@ namespace Bloxstrap
|
||||
WorkingDirectory = _versionFolder
|
||||
};
|
||||
|
||||
if (_studioAuth)
|
||||
{
|
||||
Process.Start(startInfo);
|
||||
Dialog?.CloseBootstrapper();
|
||||
return;
|
||||
}
|
||||
|
||||
// v2.2.0 - byfron will trip if we keep a process handle open for over a minute, so we're doing this now
|
||||
int gameClientPid;
|
||||
using (Process gameClient = Process.Start(startInfo)!)
|
||||
|
Loading…
Reference in New Issue
Block a user