public override bool Execute() { IHost xHost = null; switch (mLaunchType) { case LaunchTypeEnum.Bochs: xHost = new Bochs(false, Path.GetFullPath(ConfigurationFile), Path.GetFullPath(ISO), null, false, false); break; case LaunchTypeEnum.VMware: //xHost = new VMware(); break; case LaunchTypeEnum.HyperV: //xHost = new HyperV(true, "", ""); break; default: Log.LogError($"Unknown launch type! Launch type: '{mLaunchType}'"); return(false); } Log.LogMessage(MessageImportance.High, "LAUNCHING"); xHost.Start(); return(true); }
private void RunIsoInBochs(string iso, string harddisk) { if (!File.Exists(harddisk)) { throw new FileNotFoundException("Harddisk file not found!", harddisk); } var xBochsConfig = Path.Combine(mBaseWorkingDirectory, "Kernel.bochsrc"); var xParams = new NameValueCollection(); xParams.Add("ISOFile", iso); xParams.Add(BuildPropertyNames.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial"); xParams.Add(BuildPropertyNames.EnableBochsDebugString, RunWithGDB.ToString()); xParams.Add(BuildPropertyNames.StartBochsDebugGui, StartBochsDebugGui.ToString()); var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName); InitializeDebugConnector(xDebugConnector); var xBochs = new Bochs(xParams, RunWithGDB, new FileInfo(xBochsConfig), harddisk); xBochs.OnShutDown = (a, b) => { }; xBochs.RedirectOutput = false; xBochs.LogError = s => OutputHandler.LogDebugMessage(s); xBochs.LogOutput = s => OutputHandler.LogDebugMessage(s); HandleRunning(xDebugConnector, xBochs); }
public override bool Execute() { var xParams = new Dictionary <string, string>() { ["ISOFile"] = IsoFile, [BuildPropertyNames.EnableBochsDebugString] = "False", [BuildPropertyNames.StartBochsDebugGui] = "False", ["VisualStudioDebugPort"] = @"Pipe: Cosmos\Serial" }; var xBochs = new Bochs(xParams, false, new FileInfo(ConfigurationFile)); xBochs.Start(); return(true); }
private void RunIsoInBochs(string iso) { var xBochsConfig = Path.Combine(mBaseWorkingDirectory, "Kernel.bochsrc"); var xParams = new NameValueCollection(); xParams.Add(BuildProperties.EnableBochsDebugString, "false"); xParams.Add("ISOFile", iso); xParams.Add(BuildProperties.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial"); var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName); InitializeDebugConnector(xDebugConnector); var xBochs = new Bochs(xParams, false, new FileInfo(xBochsConfig)); xBochs.OnShutDown = (a, b) => { }; xBochs.RedirectOutput = true; xBochs.LogError = s => OutputHandler.LogDebugMessage(s); xBochs.LogOutput = s => OutputHandler.LogDebugMessage(s); HandleRunning(xDebugConnector, xBochs); }