Skip to content

Commit

Permalink
X# launch.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed Aug 29, 2017
1 parent bdb956d commit 3c4f1ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/XSharp.Build/Launch/Bochs.Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private string GetDefaultConfiguration()
{
var xConfiguration = "";

using (var xStream = GetType().Assembly.GetManifestResourceStream(GetType(), "Cosmos.bxrc"))
using (var xStream = GetType().Assembly.GetManifestResourceStream("XSharp.Build.Resources.Cosmos.bxrc"))
{
using (var xReader = new StreamReader(xStream))
{
Expand Down
15 changes: 10 additions & 5 deletions source/XSharp.Build/Launch/Bochs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ protected string DisplayLibrary
}

private DisplayLibraryOptions mDisplayLibraryOptions;

public bool RedirectOutput { get; private set; }
public Action<string> LogOutput { get; private set; }
public Action<string> LogError { get; private set; }

/// <summary>
/// Instantiation occurs when debugging engine is invoked to launch the process in suspended
Expand All @@ -99,7 +103,8 @@ protected string DisplayLibrary
/// </summary>
public Bochs(bool aUseGDB, string aConfigurationFile, string aIsoFile, string aPipeServerName,
bool aUseDebugVersion, bool aStartDebugGui, string aHardDisk = null, string aBochsDirectory = null,
string aDisplayLibrary = null, DisplayLibraryOptions aDisplayLibraryOptions = DisplayLibraryOptions.None)
string aDisplayLibrary = null, DisplayLibraryOptions aDisplayLibraryOptions = DisplayLibraryOptions.None,
bool aRedirectOutput = false, Action<string> aLogOutput = null, Action<string> aLogError = null)
: base(aUseGDB)
{
mBochsConfigurationFile = aConfigurationFile ?? throw new ArgumentNullException(nameof(aConfigurationFile));
Expand All @@ -115,6 +120,10 @@ public Bochs(bool aUseGDB, string aConfigurationFile, string aIsoFile, string aP
mDisplayLibrary = aDisplayLibrary;
mDisplayLibraryOptions = aDisplayLibraryOptions;

RedirectOutput = aRedirectOutput;
LogOutput = aLogOutput;
LogError = aLogError;

if (String.IsNullOrWhiteSpace(aBochsDirectory) || !Directory.Exists(aBochsDirectory))
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -172,10 +181,6 @@ internal void FixBochsConfiguration(KeyValuePair<string, string>[] symbols)
}
}

public bool RedirectOutput = false;
public Action<string> LogOutput;
public Action<string> LogError;

/// <summary>Initialize and start the Bochs process.</summary>
public override void Start()
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion source/XSharp.Build/XSharp.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Launch\Cosmos.bxrc" />
<EmbeddedResource Include="Resources\Cosmos.bxrc" />
<EmbeddedResource Include="Resources\Cosmos.nvram" />
<EmbeddedResource Include="Resources\Cosmos.vmx" />
<EmbeddedResource Include="Resources\FileSystem.vmdk" />
Expand Down

0 comments on commit 3c4f1ae

Please sign in to comment.