Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add studio support #739

Merged
merged 46 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a70ed1a
create studio guid property
bluepilledgreat Oct 4, 2023
2c1c2a3
add studio protocols
bluepilledgreat Oct 4, 2023
e70dc6d
fix still installed check
bluepilledgreat Oct 4, 2023
bb5b46a
check for studio arg
bluepilledgreat Oct 4, 2023
1fcd050
add studio support
bluepilledgreat Oct 4, 2023
05c643a
forgot to set this
bluepilledgreat Oct 4, 2023
c8b6395
fix getinfo cache
bluepilledgreat Oct 4, 2023
8f6c95f
add studio launch to launch settings
bluepilledgreat Oct 4, 2023
b9d32fc
add libraries to common packages
bluepilledgreat Oct 4, 2023
db33276
add extracontent scripts to studio packages
bluepilledgreat Oct 4, 2023
6306242
add redist to studio packages
bluepilledgreat Oct 4, 2023
f407aa6
add faster zip implementation
bluepilledgreat Oct 4, 2023
9b1f4ee
disable activity tracking if studio
bluepilledgreat Oct 4, 2023
cc4e5d1
update event name
bluepilledgreat Oct 4, 2023
5292625
add task to uri map
bluepilledgreat Oct 4, 2023
35c1a36
add other uri args
bluepilledgreat Oct 4, 2023
c0b972e
log arguments for debug builds
bluepilledgreat Oct 4, 2023
f426e6d
fix studio auth handling
bluepilledgreat Oct 4, 2023
c5c5ff9
fix studio auth
bluepilledgreat Oct 4, 2023
dc65f62
register rbxl and rbxlx extensions
bluepilledgreat Oct 4, 2023
92bcd04
add product format to setstatus
bluepilledgreat Oct 4, 2023
1ae9578
fix roblox running check
bluepilledgreat Oct 4, 2023
dce26a1
fix rbxl opening
bluepilledgreat Oct 4, 2023
f971be3
disable multi instance launching for studio
bluepilledgreat Oct 4, 2023
63ba260
close studios on uninstall
bluepilledgreat Oct 4, 2023
2040dde
add studio constant and update process checks
bluepilledgreat Oct 4, 2023
ba031a6
update byfron dialog player location
bluepilledgreat Oct 4, 2023
9dc836f
make register function cleaner
bluepilledgreat Oct 4, 2023
0b25566
use sharpziplib instead
bluepilledgreat Oct 4, 2023
78d345f
fix RegisterProgramSize
bluepilledgreat Oct 4, 2023
6dafc22
fix version being deleted after install
bluepilledgreat Oct 4, 2023
8f6f687
change player & studio sizes to int
bluepilledgreat Oct 4, 2023
ed62491
forgot
bluepilledgreat Oct 4, 2023
47e8618
add studio to start menu
bluepilledgreat Oct 4, 2023
276ea26
make shortcut name use project name
bluepilledgreat Oct 4, 2023
ae1051c
add studio to force roblox reinstall
bluepilledgreat Oct 5, 2023
c46a4ec
forgot to add studio to get
bluepilledgreat Oct 5, 2023
cf963c4
use a function for byfron dialog version text
bluepilledgreat Oct 5, 2023
1dc52d2
add sharpziplib to licenses
bluepilledgreat Oct 5, 2023
c206858
make the 3rd argument null
bluepilledgreat Oct 5, 2023
fba342b
fix debug build warning
bluepilledgreat Oct 5, 2023
12faf50
fix ide check
bluepilledgreat Oct 6, 2023
50c5cf0
set package directories in constructor
bluepilledgreat Oct 6, 2023
e1d2d84
remove version file manifest
bluepilledgreat Oct 6, 2023
4a0df1e
remove protocolstring todo
bluepilledgreat Oct 6, 2023
d7f2579
Merge branch 'version-2.5.3' into feature/studio
pizzaboxer Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Reflection;
using System.Web;
using System.Windows;
using System.Windows.Threading;

Expand All @@ -14,7 +15,8 @@ public partial class App : Application
{
public const string ProjectName = "Bloxstrap";
public const string ProjectRepository = "pizzaboxer/bloxstrap";
public const string RobloxAppName = "RobloxPlayerBeta";
public const string RobloxPlayerAppName = "RobloxPlayerBeta";
public const string RobloxStudioAppName = "RobloxStudioBeta";

// used only for communicating between app and menu - use Directories.Base for anything else
public static string BaseDirectory = null!;
Expand Down Expand Up @@ -49,7 +51,9 @@ public partial class App : Application
)
);

#if RELEASE
private static bool _showingExceptionDialog = false;
#endif

public static void Terminate(ErrorCode exitCode = ErrorCode.ERROR_SUCCESS)
{
Expand Down Expand Up @@ -120,6 +124,10 @@ protected override void OnStartup(StartupEventArgs e)

LaunchArgs = e.Args;

#if DEBUG
Logger.WriteLine(LOG_IDENT, $"Arguments: {string.Join(' ', LaunchArgs)}");
#endif

HttpClient.Timeout = TimeSpan.FromSeconds(30);
HttpClient.DefaultRequestHeaders.Add("User-Agent", ProjectRepository);

Expand Down Expand Up @@ -189,6 +197,8 @@ protected override void OnStartup(StartupEventArgs e)
#endif

string commandLine = "";
bool isStudioLaunch = false;
bool isStudioAuth = false;

if (IsMenuLaunch)
{
Expand Down Expand Up @@ -227,6 +237,25 @@ protected override void OnStartup(StartupEventArgs e)

commandLine = $"--app --deeplink {LaunchArgs[0]}";
}
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 = HttpUtility.UrlDecode(LaunchArgs[0]);
isStudioLaunch = true;
isStudioAuth = true;
}
else if (LaunchArgs[0] == "-ide")
{
isStudioLaunch = true;
if (LaunchArgs.Length >= 2)
commandLine = $"-task EditFile -localPlaceFile \"{LaunchArgs[1]}\"";
}
Comment on lines +240 to +258
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply pass Studio -protocolString, the same can be said for player by simply providing the launch URI, as player and studio can handle the URI independently!

else
{
commandLine = "--app";
Expand All @@ -244,7 +273,7 @@ protected override void OnStartup(StartupEventArgs e)

// start bootstrapper and show the bootstrapper modal if we're not running silently
Logger.WriteLine(LOG_IDENT, "Initializing bootstrapper");
Bootstrapper bootstrapper = new(commandLine);
Bootstrapper bootstrapper = new(commandLine, isStudioLaunch, isStudioAuth);
IBootstrapperDialog? dialog = null;

if (!IsQuiet)
Expand All @@ -261,7 +290,7 @@ protected override void OnStartup(StartupEventArgs e)

Mutex? singletonMutex = null;

if (Settings.Prop.MultiInstanceLaunching)
if (Settings.Prop.MultiInstanceLaunching && !isStudioLaunch)
{
Logger.WriteLine(LOG_IDENT, "Creating singleton mutex");

Expand Down
1 change: 1 addition & 0 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="securifybv.ShellLink" Version="0.1.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading