add studio command line parsing

This commit is contained in:
bluepilledgreat 2024-10-16 21:07:24 +01:00
parent 9edd5fe2da
commit 0ffaec74ea

View File

@ -53,6 +53,10 @@ namespace Bloxstrap
{ {
const string LOG_IDENT = "LaunchSettings"; const string LOG_IDENT = "LaunchSettings";
#if DEBUG
App.Logger.WriteLine(LOG_IDENT, $"Launched with arguments: {string.Join(' ', args)}");
#endif
Args = args; Args = args;
// build flag map // build flag map
@ -112,7 +116,23 @@ namespace Bloxstrap
{ {
RobloxLaunchMode = LaunchMode.Studio; RobloxLaunchMode = LaunchMode.Studio;
// TODO: do this later if (String.IsNullOrEmpty(data))
return;
if (data.StartsWith("roblox-studio:"))
{
RobloxLaunchArgs = data;
}
else if (data.StartsWith("roblox-studio-auth:"))
{
RobloxLaunchMode = LaunchMode.StudioAuth;
RobloxLaunchArgs = data;
}
else
{
// likely a local path
RobloxLaunchArgs = $"-task EditFile -localPlaceFile \"{data}\"";
}
} }
} }
} }