mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
(v1.4.4) Add support for multiple game instances
This commit is contained in:
parent
dd6af1d741
commit
e3803bc58c
@ -9,8 +9,8 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
<Platforms>AnyCPU;x86</Platforms>
|
||||||
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
||||||
<Version>1.4.3</Version>
|
<Version>1.4.4</Version>
|
||||||
<FileVersion>1.4.3.0</FileVersion>
|
<FileVersion>1.4.4.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -70,9 +70,9 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
private string? LaunchCommandLine;
|
private string? LaunchCommandLine;
|
||||||
|
|
||||||
private string VersionGuid;
|
private string VersionGuid = null!;
|
||||||
private PackageManifest VersionPackageManifest;
|
private PackageManifest VersionPackageManifest = null!;
|
||||||
private string VersionFolder;
|
private string VersionFolder = null!;
|
||||||
|
|
||||||
private readonly bool FreshInstall;
|
private readonly bool FreshInstall;
|
||||||
|
|
||||||
@ -101,7 +101,9 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
await CheckLatestVersion();
|
await CheckLatestVersion();
|
||||||
|
|
||||||
if (!Directory.Exists(VersionFolder) || Program.Settings.VersionGuid != VersionGuid)
|
// if bloxstrap is installing for the first time but is running, prompt to close roblox
|
||||||
|
// if roblox needs updating but is running, ignore update for now
|
||||||
|
if (!Directory.Exists(VersionFolder) && CheckIfRunning(true) || Program.Settings.VersionGuid != VersionGuid && !CheckIfRunning(false))
|
||||||
await InstallLatestVersion();
|
await InstallLatestVersion();
|
||||||
|
|
||||||
ApplyModifications();
|
ApplyModifications();
|
||||||
@ -130,11 +132,15 @@ namespace Bloxstrap
|
|||||||
VersionPackageManifest = await PackageManifest.Get(VersionGuid);
|
VersionPackageManifest = await PackageManifest.Get(VersionGuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckIfRunning()
|
private bool CheckIfRunning(bool shutdown)
|
||||||
{
|
{
|
||||||
Process[] processes = Process.GetProcessesByName("RobloxPlayerBeta");
|
Process[] processes = Process.GetProcessesByName("RobloxPlayerBeta");
|
||||||
|
|
||||||
if (processes.Length > 0)
|
if (processes.Length == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (shutdown)
|
||||||
|
{
|
||||||
Dialog.PromptShutdown();
|
Dialog.PromptShutdown();
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -150,6 +156,9 @@ namespace Bloxstrap
|
|||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private async Task StartRoblox()
|
private async Task StartRoblox()
|
||||||
{
|
{
|
||||||
string startEventName = Program.ProjectName.Replace(" ", "") + "StartEvent";
|
string startEventName = Program.ProjectName.Replace(" ", "") + "StartEvent";
|
||||||
@ -321,7 +330,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
private void Uninstall()
|
private void Uninstall()
|
||||||
{
|
{
|
||||||
CheckIfRunning();
|
CheckIfRunning(true);
|
||||||
|
|
||||||
Dialog.Message = $"Uninstalling {Program.ProjectName}...";
|
Dialog.Message = $"Uninstalling {Program.ProjectName}...";
|
||||||
|
|
||||||
@ -368,8 +377,6 @@ namespace Bloxstrap
|
|||||||
#region Roblox Install
|
#region Roblox Install
|
||||||
private async Task InstallLatestVersion()
|
private async Task InstallLatestVersion()
|
||||||
{
|
{
|
||||||
CheckIfRunning();
|
|
||||||
|
|
||||||
if (FreshInstall)
|
if (FreshInstall)
|
||||||
Dialog.Message = "Installing Roblox...";
|
Dialog.Message = "Installing Roblox...";
|
||||||
else
|
else
|
||||||
|
@ -9,7 +9,7 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
|
|
||||||
public async Task<bool> SetPresence(string placeId)
|
public async Task<bool> SetPresence(string placeId)
|
||||||
{
|
{
|
||||||
string placeThumbnail;
|
string placeThumbnail = "roblox";
|
||||||
|
|
||||||
var placeInfo = await Utilities.GetJson<RobloxAsset>($"https://economy.roblox.com/v2/assets/{placeId}/details");
|
var placeInfo = await Utilities.GetJson<RobloxAsset>($"https://economy.roblox.com/v2/assets/{placeId}/details");
|
||||||
|
|
||||||
@ -18,10 +18,8 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
|
|
||||||
var thumbnailInfo = await Utilities.GetJson<RobloxThumbnails>($"https://thumbnails.roblox.com/v1/places/gameicons?placeIds={placeId}&returnPolicy=PlaceHolder&size=512x512&format=Png&isCircular=false");
|
var thumbnailInfo = await Utilities.GetJson<RobloxThumbnails>($"https://thumbnails.roblox.com/v1/places/gameicons?placeIds={placeId}&returnPolicy=PlaceHolder&size=512x512&format=Png&isCircular=false");
|
||||||
|
|
||||||
if (thumbnailInfo is null)
|
if (thumbnailInfo is not null)
|
||||||
placeThumbnail = "roblox"; //fallback
|
placeThumbnail = thumbnailInfo.Data![0].ImageUrl!;
|
||||||
else
|
|
||||||
placeThumbnail = thumbnailInfo.Data[0].ImageUrl;
|
|
||||||
|
|
||||||
DiscordRPC.Button[]? buttons = null;
|
DiscordRPC.Button[]? buttons = null;
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace Bloxstrap.Helpers.Integrations
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
lastReleasePublish = DateTime.Parse(releaseInfo.CreatedAt);
|
lastReleasePublish = DateTime.Parse(releaseInfo.CreatedAt);
|
||||||
downloadUrl = releaseInfo.Assets[0].BrowserDownloadUrl;
|
downloadUrl = releaseInfo.Assets![0].BrowserDownloadUrl!;
|
||||||
|
|
||||||
Directory.CreateDirectory(folderLocation);
|
Directory.CreateDirectory(folderLocation);
|
||||||
|
|
||||||
|
@ -56,12 +56,6 @@ namespace Bloxstrap
|
|||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
|
|
||||||
if (Process.GetProcessesByName(ProjectName).Length > 1)
|
|
||||||
{
|
|
||||||
ShowMessageBox($"{ProjectName} is already running. Please close any currently open {ProjectName} window.\nIf you have Discord Rich Presence enabled, then close Roblox if it's running.", MessageBoxIcon.Error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
LocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||||
StartMenu = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs", ProjectName);
|
StartMenu = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs", ProjectName);
|
||||||
|
|
||||||
@ -105,6 +99,12 @@ namespace Bloxstrap
|
|||||||
{
|
{
|
||||||
if (args[0] == "-preferences")
|
if (args[0] == "-preferences")
|
||||||
{
|
{
|
||||||
|
if (Process.GetProcessesByName(ProjectName).Length > 1)
|
||||||
|
{
|
||||||
|
ShowMessageBox($"{ProjectName} is already running. Please close any currently open Bloxstrap or Roblox window before opening the configuration menu.", MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Application.Run(new Dialogs.Preferences());
|
Application.Run(new Dialogs.Preferences());
|
||||||
}
|
}
|
||||||
else if (args[0].StartsWith("roblox-player:"))
|
else if (args[0].StartsWith("roblox-player:"))
|
||||||
|
23
README.md
23
README.md
@ -1,33 +1,34 @@
|
|||||||
# <img src="https://github.com/pizzaboxer/bloxstrap/raw/main/Bloxstrap/Resources/IconBloxstrap-png.png" width="48"/> Bloxstrap
|
# <img src="https://github.com/pizzaboxer/bloxstrap/raw/main/Bloxstrap/Resources/IconBloxstrap-png.png" width="48"/> Bloxstrap
|
||||||
|
  
|
||||||
|
|
||||||
An open, customizable, feature-packed alternative bootstrapper for Roblox.
|
An open, customizable, feature-packed alternative bootstrapper for Roblox.
|
||||||
|
|
||||||
## What is this?
|
This a seamless replacement for the stock Roblox bootstrapper, working more or less how you'd expect it to, while providing additional useful features.
|
||||||
This is intended to be a seamless replacement for the stock Roblox bootstrapper, working more or less how you'd expect it to, while providing new and useful features.
|
|
||||||
|
|
||||||
Please keep in mind that **Bloxstrap is in very early development**, and you'll no doubt encounter some bugs. If you do, or you would like to suggest a feature, please submit an issue!
|
If you encounter a bug, or would like to suggest a feature, please submit an issue!
|
||||||
|
|
||||||
Bloxstrap is only supported for PCs running Windows.
|
Bloxstrap is only supported for PCs running Windows.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
Here's some of the features that Bloxstrap provides over the stock Roblox bootstrapper:
|
Here's some of the features that Bloxstrap provides over the stock Roblox bootstrapper:
|
||||||
|
|
||||||
* Support for persistent file modifications (including re-adding the old death sound!)
|
* Doesn't force you to launch Roblox in the Desktop App
|
||||||
* Ability to choose where Roblox is installed to
|
* Support for persistent file modifications (e.g. re-adding the old death sound)
|
||||||
* Ability to choose which Roblox build channel to download from
|
* Lets you choose where to install Roblox to
|
||||||
|
* Gives you the ability to opt-in to pre-release testing channels
|
||||||
* Integration with Discord Rich Presence and [rbxfpsunlocker](https://github.com/axstin/rbxfpsunlocker)
|
* Integration with Discord Rich Presence and [rbxfpsunlocker](https://github.com/axstin/rbxfpsunlocker)
|
||||||
* Custom bootstrapper styles (includes old versions and dark theme)
|
* Bootstrapper styling
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
Download the [latest release of Bloxstrap](https://github.com/pizzaboxer/bloxstrap/releases/latest), and run it. Configure your preferences if needed, and install. That's about it!
|
Download the [latest release of Bloxstrap](https://github.com/pizzaboxer/bloxstrap/releases/latest), and run it. Configure your preferences if needed, and install. That's about it!
|
||||||
|
|
||||||
Bloxstrap requires the [x86 .NET 6 Desktop Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.8-windows-x86-installer). If you don't already have it installed, you'll be prompted to install it when trying to run Bloxstrap.
|
You will also need the [x86 .NET 6 Desktop Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.8-windows-x86-installer). If you don't already have it installed, you'll be prompted to install it anyway.
|
||||||
|
|
||||||
It's not unlikely that Windows Smartscreen will show a popup when you run Bloxstrap for the first time. This happens because it's an unknown program, not because it's actually detected as being malicious. To dismiss it, just click on "More info" and then "Run anyway".
|
It's not unlikely that Windows Smartscreen will show a popup when you run Bloxstrap for the first time. This happens because it's an unknown program, not because it's actually detected as being malicious. To dismiss it, just click on "More info" and then "Run anyway".
|
||||||
|
|
||||||
Bloxstrap is added to your Start Menu, where you can change your preferences if needed.
|
Once installed, Bloxstrap is added to your Start Menu, where you can change your preferences if needed.
|
||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
* [Roblox Studio Mod Manager](https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager) by [MaximumADHD](https://www.roblox.com/users/2032622/profile) - some utility code was borrowed to help with Bloxstrap's bootstrapper functionality. They're all under Bloxstrap.Helpers.RSMM, with some having slight modifications. Besides, it's a great project.
|
* [Roblox Studio Mod Manager](https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager) by [MaximumADHD](https://www.roblox.com/users/2032622/profile) - some slightly modified utility code was borrowed to help with Bloxstrap's bootstrapper functionality (Bloxstrap.Helpers.RSMM). Besides, it's a great project.
|
||||||
* [skulyire](https://www.roblox.com/users/2485612194/profile) - Making the Bloxstrap logo
|
* [skulyire](https://www.roblox.com/users/2485612194/profile) - Making the Bloxstrap logo
|
||||||
* [rbxfpsunlocker](https://github.com/axstin/rbxfpsunlocker) by axstin - FPS unlocker for Roblox.
|
* [rbxfpsunlocker](https://github.com/axstin/rbxfpsunlocker) by axstin - Added as a Bloxstrap integration.
|
||||||
|
Loading…
Reference in New Issue
Block a user