Hi! This PR focuses on bug fixes and general behavioral changes around Mosa.Utility.Launcher, alongside a few minor features. Here's what been changed:
On Linux, the GUI launcher is used in the script files in the Demos folder instead of the console launcher
Added a Demos/Console directory which contains scripts that use the console launcher instead of the GUI one
In Mosa.Utility.Configuration:
Added new app locations for Bochs' BIOS and VGA BIOS. This is because, on Linux, the launch code would try to get the files under /bin, which is simply incorrect
The setting Emulator.SVGA has been renamed to Emulator.Graphics
Added a new setting Emulator.Acceleration, which currently enables hardware acceleration (WHPX on Windows, HVF on macOS, and KVM on Linux) for QEMU
In Mosa.Utility.Launcher:
Removed the BaseLauncher.Quote() method. Instead, string interpolation is used at all times and when instead a StringBuilder is present, strings are appended directly to it instead of concatenation to decrease any potential memory allocations
Removed the BaseLauncher.NullOrEmpty() method because it was only used once, and it was trivial to implement anyway
The BaseLauncher.GetResource(string) method now throws if a manifest resource isn't found
In the Builder.Build() method, the Stopwatch.Start() method is called instead of Stopwatch.StartNew() because else it wouldn't start the instantiated Stopwatch, but instead it'd create a new one and discard it immediately
The Builder.Build() method no longer checks if MosaSettings.TemporaryFolder and MosaSettings.ImageFolder exist before creating them, because Directory.CreateDirectory() already does that. Furthermore, it'll create any subdirectories, removing the need for creating MosaSettings.TemporaryFolder
In the SimpleTCP class, incrementations and decrementations of the volatile lines field have been replaced with Interlocked.Increment() and Interlocked.Decrement() respectively
The Starter.IsSucccessful property has been renamed to Starter.IsSuccessful
In the Starter class, the lockObject field has been introduced to avoid locking using this
Hi! This PR focuses on bug fixes and general behavioral changes around Mosa.Utility.Launcher, alongside a few minor features. Here's what been changed:
Demos
folder instead of the console launcherDemos/Console
directory which contains scripts that use the console launcher instead of the GUI one/bin
, which is simply incorrectEmulator.SVGA
has been renamed toEmulator.Graphics
Emulator.Acceleration
, which currently enables hardware acceleration (WHPX on Windows, HVF on macOS, and KVM on Linux) for QEMUBaseLauncher.Quote()
method. Instead, string interpolation is used at all times and when instead a StringBuilder is present, strings are appended directly to it instead of concatenation to decrease any potential memory allocationsBaseLauncher.NullOrEmpty()
method because it was only used once, and it was trivial to implement anywayBaseLauncher.GetResource(string)
method now throws if a manifest resource isn't foundBuilder.Build()
method, theStopwatch.Start()
method is called instead ofStopwatch.StartNew()
because else it wouldn't start the instantiatedStopwatch
, but instead it'd create a new one and discard it immediatelyBuilder.Build()
method no longer checks ifMosaSettings.TemporaryFolder
andMosaSettings.ImageFolder
exist before creating them, becauseDirectory.CreateDirectory()
already does that. Furthermore, it'll create any subdirectories, removing the need for creatingMosaSettings.TemporaryFolder
SimpleTCP
class, incrementations and decrementations of the volatilelines
field have been replaced withInterlocked.Increment()
andInterlocked.Decrement()
respectivelyStarter.IsSucccessful
property has been renamed toStarter.IsSuccessful
Starter
class, thelockObject
field has been introduced to avoid locking usingthis