This commit is contained in:
kudzu_cp 2008-09-21 19:10:28 +00:00
parent 29d5fc367c
commit ca8aa61b48
3 changed files with 9 additions and 6 deletions

View file

@ -68,8 +68,9 @@ namespace Cosmos.Build.Windows {
}
// Launch emulators or other final actions
System.Diagnostics.Process xQEMU;
if (mOptionsUC.rdioQEMU.IsChecked.Value) {
mBuilder.MakeQEMU(mOptions.CreateHDImage, mOptions.UseGDB
xQEMU = mBuilder.MakeQEMU(mOptions.CreateHDImage, mOptions.UseGDB
, mOptions.DebugMode != DebugMode.None, mOptions.UseNetworkTAP
, mOptionsUC.cmboNetworkCards.SelectedValue, mOptionsUC.cmboAudioCards.SelectedValue);
} else if (mOptionsUC.rdioVMWare.IsChecked.Value) {
@ -86,6 +87,7 @@ namespace Cosmos.Build.Windows {
// Problems around with DebugWindow getting stuck, this seems to work
mMainWindow.Hide();
if (xDebugWindow != null) {
//xQEMU.MainWindowHandle
xDebugWindow.ShowDialog();
}
mMainWindow.Close();

View file

@ -173,7 +173,7 @@ namespace Cosmos.Build.Windows {
Process.Start(xPath + @"Cosmos.vmx");
}
public void MakeQEMU(bool aUseHDImage, bool aGDB, bool aDebugger, bool aUseNetworkTap, object aNetworkCard, object aAudioCard) {
public Process MakeQEMU(bool aUseHDImage, bool aGDB, bool aDebugger, bool aUseNetworkTap, object aNetworkCard, object aAudioCard) {
MakeISO();
//From v0.9.1 Qemu requires forward slashes in path
@ -200,7 +200,7 @@ namespace Cosmos.Build.Windows {
}
}
Global.Call(ToolsPath + @"qemu\qemu.exe"
var xProcess = Global.Call(ToolsPath + @"qemu\qemu.exe"
// HD image
, xHDString
// Path for BIOS, VGA BIOS, and keymaps
@ -242,6 +242,7 @@ namespace Cosmos.Build.Windows {
, BuildPath + @"output.bin" + " --eval-command=\"target remote:1234\" --eval-command=\"b _CODE_REQUESTED_BREAK_\" --eval-command=\"c\""
, ToolsPath + @"qemu\", false, false);
}
return xProcess;
}
// Dont change these, these are passed directly to QEMU.

View file

@ -11,7 +11,7 @@ namespace Cosmos.Build.Windows {
Call(aEXEPathname, aArgLine, aWorkDir, true, true);
}
public static void Call(string aEXEPathname, string aArgLine, string aWorkDir, bool aWait, bool aCapture) {
public static Process Call(string aEXEPathname, string aArgLine, string aWorkDir, bool aWait, bool aCapture) {
var xStartInfo = new ProcessStartInfo();
xStartInfo.FileName = aEXEPathname;
xStartInfo.Arguments = aArgLine;
@ -25,8 +25,7 @@ namespace Cosmos.Build.Windows {
Console.WriteLine("Please wait....executing: " + xStartInfo.FileName + " " +
xStartInfo.Arguments + " from directory " + xStartInfo.WorkingDirectory);
if (!aWait && aCapture)
{
if (!aWait && aCapture) {
// we arent gonna wait till it has finished by default.
// but if there was an error the app may exit quickly and we should display it
// wait a small amount of time then check
@ -50,6 +49,7 @@ namespace Cosmos.Build.Windows {
}
}
}
return xProcess;
}
}
}