mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
Move property names to a separate class.
This commit is contained in:
parent
a05e3d3229
commit
fc39e1e040
12 changed files with 147 additions and 123 deletions
|
|
@ -10,14 +10,15 @@ namespace Cosmos.TestRunner.Core
|
||||||
{
|
{
|
||||||
partial class Engine
|
partial class Engine
|
||||||
{
|
{
|
||||||
private void RunIsoInBochs(string iso)
|
private void RunIsoInBochs(string iso, string harddisk)
|
||||||
{
|
{
|
||||||
var xBochsConfig = Path.Combine(mBaseWorkingDirectory, "Kernel.bochsrc");
|
var xBochsConfig = Path.Combine(mBaseWorkingDirectory, "Kernel.bochsrc");
|
||||||
var xParams = new NameValueCollection();
|
var xParams = new NameValueCollection();
|
||||||
|
|
||||||
xParams.Add("ISOFile", iso);
|
xParams.Add("ISOFile", iso);
|
||||||
xParams.Add(BuildProperties.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial");
|
xParams.Add(BuildPropertyNames.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial");
|
||||||
xParams.Add(BuildProperties.EnableBochsDebugString, RunWithGDB.ToString());
|
xParams.Add(BuildPropertyNames.EnableBochsDebugString, RunWithGDB.ToString());
|
||||||
|
BuildProperties.
|
||||||
|
|
||||||
var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName);
|
var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName);
|
||||||
InitializeDebugConnector(xDebugConnector);
|
InitializeDebugConnector(xDebugConnector);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ namespace Cosmos.TestRunner.Core
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("debugConnector");
|
throw new ArgumentNullException("debugConnector");
|
||||||
}
|
}
|
||||||
|
|
||||||
debugConnector.OnDebugMsg = s => OutputHandler.LogDebugMessage(s);
|
debugConnector.OnDebugMsg = s => OutputHandler.LogDebugMessage(s);
|
||||||
debugConnector.CmdChannel = ChannelPacketReceived;
|
debugConnector.CmdChannel = ChannelPacketReceived;
|
||||||
debugConnector.CmdStarted = () =>
|
debugConnector.CmdStarted = () =>
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ namespace Cosmos.TestRunner.Core
|
||||||
var xParams = new NameValueCollection();
|
var xParams = new NameValueCollection();
|
||||||
|
|
||||||
xParams.Add("ISOFile", iso);
|
xParams.Add("ISOFile", iso);
|
||||||
xParams.Add(BuildProperties.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial");
|
xParams.Add(BuildPropertyNames.VisualStudioDebugPortString, "Pipe: Cosmos\\Serial");
|
||||||
xParams.Add(BuildProperties.VMwareEditionString, "Workstation");
|
xParams.Add(BuildPropertyNames.VMwareEditionString, "Workstation");
|
||||||
|
|
||||||
var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName);
|
var xDebugConnector = new DebugConnectorPipeServer(DebugConnectorPipeServer.DefaultCosmosPipeName);
|
||||||
InitializeDebugConnector(xDebugConnector);
|
InitializeDebugConnector(xDebugConnector);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Cosmos.Build.Common {
|
||||||
// for C# a field which is readonly keyword would have both true but a const field would have only IsLiteral equal to true
|
// for C# a field which is readonly keyword would have both true but a const field would have only IsLiteral equal to true
|
||||||
if (xField.IsLiteral && !xField.IsInitOnly && xField.FieldType == typeof(string)) {
|
if (xField.IsLiteral && !xField.IsInitOnly && xField.FieldType == typeof(string)) {
|
||||||
string xName = (string)xField.GetValue(null);
|
string xName = (string)xField.GetValue(null);
|
||||||
if (xName != BuildProperties.ProfileString) {
|
if (xName != BuildPropertyNames.ProfileString) {
|
||||||
PropNames.Add(xName);
|
PropNames.Add(xName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -28,7 +28,8 @@ namespace Cosmos.Build.Common {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override string[] ProjectIndependentProperties
|
public override string[] ProjectIndependentProperties
|
||||||
{
|
{
|
||||||
get { return new string[] { BinFormatString }; }
|
get { return new string[] {
|
||||||
|
BuildPropertyNames.BinFormatString }; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -119,84 +120,79 @@ namespace Cosmos.Build.Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Profile
|
// Profile
|
||||||
public const string ProfileString = "Profile";
|
|
||||||
public string Profile {
|
public string Profile {
|
||||||
get { return GetProperty(ProfileString, "VMware"); }
|
get { return GetProperty(BuildPropertyNames.ProfileString, "VMware"); }
|
||||||
set { SetProperty(ProfileString, value); }
|
set { SetProperty(BuildPropertyNames.ProfileString, value); }
|
||||||
}
|
}
|
||||||
public const string NameString = "Name";
|
|
||||||
public string Name {
|
public string Name {
|
||||||
get { return GetProperty(NameString, ""); }
|
get { return GetProperty(BuildPropertyNames.NameString, ""); }
|
||||||
set { SetProperty(NameString, value); }
|
set { SetProperty(BuildPropertyNames.NameString, value); }
|
||||||
}
|
}
|
||||||
public const string DescriptionString = "Description";
|
|
||||||
public string Description {
|
public string Description {
|
||||||
get { return GetProperty(DescriptionString, ""); }
|
get { return GetProperty(BuildPropertyNames.DescriptionString, ""); }
|
||||||
set { SetProperty(DescriptionString, value); }
|
set { SetProperty(BuildPropertyNames.DescriptionString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deployment
|
// Deployment
|
||||||
public const string DeploymentString = "Deployment";
|
|
||||||
public DeploymentType Deployment {
|
public DeploymentType Deployment {
|
||||||
get { return GetProperty(DeploymentString, DeploymentType.ISO); }
|
get { return GetProperty(BuildPropertyNames.DeploymentString, DeploymentType.ISO); }
|
||||||
set { SetProperty(DeploymentString, value); }
|
set { SetProperty(BuildPropertyNames.DeploymentString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launch
|
// Launch
|
||||||
public const string LaunchString = "Launch";
|
|
||||||
public LaunchType Launch {
|
public LaunchType Launch {
|
||||||
get { return GetProperty(LaunchString, LaunchType.VMware); }
|
get { return GetProperty(BuildPropertyNames.LaunchString, LaunchType.VMware); }
|
||||||
set { SetProperty(LaunchString, value); }
|
set { SetProperty(BuildPropertyNames.LaunchString, value); }
|
||||||
}
|
}
|
||||||
public const string ShowLaunchConsoleString = "ShowLaunchConsole";
|
|
||||||
public bool ShowLaunchConsole {
|
public bool ShowLaunchConsole {
|
||||||
get { return GetProperty(ShowLaunchConsoleString, false); }
|
get { return GetProperty(BuildPropertyNames.ShowLaunchConsoleString, false); }
|
||||||
set { SetProperty(ShowLaunchConsoleString, value); }
|
set { SetProperty(BuildPropertyNames.ShowLaunchConsoleString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
public const string DebugEnabledString = "DebugEnabled";
|
|
||||||
public bool DebugEnabled {
|
public bool DebugEnabled {
|
||||||
get { return GetProperty(DebugEnabledString, true); }
|
get { return GetProperty(BuildPropertyNames.DebugEnabledString, true); }
|
||||||
set { SetProperty(DebugEnabledString, value); }
|
set { SetProperty(BuildPropertyNames.DebugEnabledString, value); }
|
||||||
}
|
}
|
||||||
public const string StackCorruptionDetectionEnabledString = "StackCorruptionDetectionEnabled";
|
|
||||||
public bool StackCorruptionDetectionEnabled
|
public bool StackCorruptionDetectionEnabled
|
||||||
{
|
{
|
||||||
get { return GetProperty(StackCorruptionDetectionEnabledString, true); }
|
get { return GetProperty(BuildPropertyNames.StackCorruptionDetectionEnabledString, true); }
|
||||||
set { SetProperty(StackCorruptionDetectionEnabledString, value); }
|
set { SetProperty(BuildPropertyNames.StackCorruptionDetectionEnabledString, value); }
|
||||||
}
|
}
|
||||||
public const string DebugModeString = "DebugMode";
|
|
||||||
public DebugMode DebugMode {
|
public DebugMode DebugMode {
|
||||||
get { return GetProperty(DebugModeString, DebugMode.Source); }
|
get { return GetProperty(BuildPropertyNames.DebugModeString, DebugMode.Source); }
|
||||||
set { SetProperty(DebugModeString, value); }
|
set { SetProperty(BuildPropertyNames.DebugModeString, value); }
|
||||||
}
|
}
|
||||||
public const string IgnoreDebugStubAttributeString = "IgnoreDebugStubAttribute";
|
|
||||||
public bool IgnoreDebugStubAttribute {
|
public bool IgnoreDebugStubAttribute {
|
||||||
get { return GetProperty(IgnoreDebugStubAttributeString, false); }
|
get { return GetProperty(BuildPropertyNames.IgnoreDebugStubAttributeString, false); }
|
||||||
set { SetProperty(IgnoreDebugStubAttributeString, value); }
|
set { SetProperty(BuildPropertyNames.IgnoreDebugStubAttributeString, value); }
|
||||||
}
|
}
|
||||||
public const string CosmosDebugPortString = "CosmosDebugPort";
|
|
||||||
public string CosmosDebugPort {
|
public string CosmosDebugPort {
|
||||||
get { return GetProperty(CosmosDebugPortString, "Serial: COM1"); }
|
get { return GetProperty(BuildPropertyNames.CosmosDebugPortString, "Serial: COM1"); }
|
||||||
set { SetProperty(CosmosDebugPortString, value); }
|
set { SetProperty(BuildPropertyNames.CosmosDebugPortString, value); }
|
||||||
}
|
}
|
||||||
public const string VisualStudioDebugPortString = "VisualStudioDebugPort";
|
|
||||||
public string VisualStudioDebugPort {
|
public string VisualStudioDebugPort {
|
||||||
get { return GetProperty(VisualStudioDebugPortString, "Serial: COM1"); }
|
get { return GetProperty(BuildPropertyNames.VisualStudioDebugPortString, "Serial: COM1"); }
|
||||||
set { SetProperty(VisualStudioDebugPortString, value); }
|
set { SetProperty(BuildPropertyNames.VisualStudioDebugPortString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// PXE
|
// PXE
|
||||||
public const string PxeInterfaceString = "PxeInterface";
|
|
||||||
public string PxeInterface {
|
public string PxeInterface {
|
||||||
get { return GetProperty(PxeInterfaceString, "192.168.42.1"); }
|
get { return GetProperty(BuildPropertyNames.PxeInterfaceString, "192.168.42.1"); }
|
||||||
set { SetProperty(PxeInterfaceString, value); }
|
set { SetProperty(BuildPropertyNames.PxeInterfaceString, value); }
|
||||||
}
|
}
|
||||||
public const string SlavePortString = "SlavePort";
|
|
||||||
public string SlavePort {
|
public string SlavePort {
|
||||||
get { return GetProperty(SlavePortString, "None"); }
|
get { return GetProperty(BuildPropertyNames.SlavePortString, "None"); }
|
||||||
set { SetProperty(SlavePortString, value); }
|
set { SetProperty(BuildPropertyNames.SlavePortString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bochs
|
// Bochs
|
||||||
|
|
@ -212,64 +208,54 @@ namespace Cosmos.Build.Common {
|
||||||
}
|
}
|
||||||
|
|
||||||
// VMware
|
// VMware
|
||||||
public const string VMwareEditionString = "VMwareEdition";
|
|
||||||
public VMwareEdition VMwareEdition {
|
public VMwareEdition VMwareEdition {
|
||||||
get { return GetProperty(VMwareEditionString, VMwareEdition.Player); }
|
get { return GetProperty(BuildPropertyNames.VMwareEditionString, VMwareEdition.Player); }
|
||||||
set { SetProperty(VMwareEditionString, value); }
|
set { SetProperty(BuildPropertyNames.VMwareEditionString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string OutputPathString = "OutputPath";
|
|
||||||
public String OutputPath {
|
public String OutputPath {
|
||||||
get { return GetProperty(OutputPathString, @"bin\debug"); }
|
get { return GetProperty(BuildPropertyNames.OutputPathString, @"bin\debug"); }
|
||||||
set { SetProperty(OutputPathString, value); }
|
set { SetProperty(BuildPropertyNames.OutputPathString, value); }
|
||||||
}
|
}
|
||||||
public const string FrameworkString = "Framework";
|
|
||||||
public Framework Framework {
|
public Framework Framework {
|
||||||
get { return GetProperty(FrameworkString, Common.Framework.MicrosoftNET); }
|
get { return GetProperty(BuildPropertyNames.FrameworkString, Common.Framework.MicrosoftNET); }
|
||||||
set { SetProperty(FrameworkString, value); }
|
set { SetProperty(BuildPropertyNames.FrameworkString, value); }
|
||||||
}
|
}
|
||||||
public const string UseInternalAssemblerString = "UseInternalAssembler";
|
|
||||||
public Boolean UseInternalAssembler {
|
public Boolean UseInternalAssembler {
|
||||||
get { return GetProperty(UseInternalAssemblerString, false); }
|
get { return GetProperty(BuildPropertyNames.UseInternalAssemblerString, false); }
|
||||||
set { SetProperty(UseInternalAssemblerString, value); }
|
set { SetProperty(BuildPropertyNames.UseInternalAssemblerString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string TraceAssembliesString = "TraceAssemblies";
|
|
||||||
public TraceAssemblies TraceAssemblies {
|
public TraceAssemblies TraceAssemblies {
|
||||||
get { return GetProperty(TraceAssembliesString, TraceAssemblies.User); }
|
get { return GetProperty(BuildPropertyNames.TraceAssembliesString, TraceAssemblies.User); }
|
||||||
set { SetProperty(TraceAssembliesString, value); }
|
set { SetProperty(BuildPropertyNames.TraceAssembliesString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string EnableGDBString = "EnableGDB";
|
|
||||||
public Boolean EnableGDB {
|
public Boolean EnableGDB {
|
||||||
get { return GetProperty(EnableGDBString, false); }
|
get { return GetProperty(BuildPropertyNames.EnableGDBString, false); }
|
||||||
set { SetProperty(EnableGDBString, value); }
|
set { SetProperty(BuildPropertyNames.EnableGDBString, value); }
|
||||||
}
|
}
|
||||||
public const string StartCosmosGDBString = "StartCosmosGDB";
|
|
||||||
public bool StartCosmosGDB {
|
public bool StartCosmosGDB {
|
||||||
get { return GetProperty(StartCosmosGDBString, false); }
|
get { return GetProperty(BuildPropertyNames.StartCosmosGDBString, false); }
|
||||||
set { SetProperty(StartCosmosGDBString, value); }
|
set { SetProperty(BuildPropertyNames.StartCosmosGDBString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public const string EnableBochsDebugString = "EnableBochsDebug";
|
|
||||||
public Boolean EnableBochsDebug
|
public Boolean EnableBochsDebug
|
||||||
{
|
{
|
||||||
get { return GetProperty(EnableBochsDebugString, false); }
|
get { return GetProperty(BuildPropertyNames.EnableBochsDebugString, false); }
|
||||||
set { SetProperty(EnableBochsDebugString, value); }
|
set { SetProperty(BuildPropertyNames.EnableBochsDebugString, value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Name of the configuration property in the project file.
|
|
||||||
/// </summary>
|
|
||||||
public const string BinFormatString = "BinFormat";
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets binary format which is used for producing kernel image.
|
/// Gets or sets binary format which is used for producing kernel image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BinFormat BinFormat
|
public BinFormat BinFormat
|
||||||
{
|
{
|
||||||
get { return GetProperty(BinFormatString, BinFormat.Bin); }
|
get { return GetProperty(BuildPropertyNames.BinFormatString, BinFormat.Bin); }
|
||||||
set { SetProperty(BinFormatString, value); }
|
set { SetProperty(BuildPropertyNames.BinFormatString, value); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
37
source/Cosmos.Build.Common/BuildPropertyNames.cs
Normal file
37
source/Cosmos.Build.Common/BuildPropertyNames.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Cosmos.Build.Common
|
||||||
|
{
|
||||||
|
public static class BuildPropertyNames
|
||||||
|
{
|
||||||
|
public const string StackCorruptionDetectionEnabledString = "StackCorruptionDetectionEnabled";
|
||||||
|
public const string ProfileString = "Profile";
|
||||||
|
public const string NameString = "Name";
|
||||||
|
public const string DescriptionString = "Description";
|
||||||
|
public const string DeploymentString = "Deployment";
|
||||||
|
public const string LaunchString = "Launch";
|
||||||
|
public const string ShowLaunchConsoleString = "ShowLaunchConsole";
|
||||||
|
public const string DebugEnabledString = "DebugEnabled";
|
||||||
|
public const string DebugModeString = "DebugMode";
|
||||||
|
public const string IgnoreDebugStubAttributeString = "IgnoreDebugStubAttribute";
|
||||||
|
public const string CosmosDebugPortString = "CosmosDebugPort";
|
||||||
|
public const string VisualStudioDebugPortString = "VisualStudioDebugPort";
|
||||||
|
public const string PxeInterfaceString = "PxeInterface";
|
||||||
|
public const string SlavePortString = "SlavePort";
|
||||||
|
public const string VMwareEditionString = "VMwareEdition";
|
||||||
|
public const string OutputPathString = "OutputPath";
|
||||||
|
public const string FrameworkString = "Framework";
|
||||||
|
public const string UseInternalAssemblerString = "UseInternalAssembler";
|
||||||
|
public const string TraceAssembliesString = "TraceAssemblies";
|
||||||
|
public const string EnableGDBString = "EnableGDB";
|
||||||
|
public const string StartCosmosGDBString = "StartCosmosGDB";
|
||||||
|
public const string EnableBochsDebugString = "EnableBochsDebug";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name of the configuration property in the project file.
|
||||||
|
/// </summary>
|
||||||
|
public const string BinFormatString = "BinFormat";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -78,6 +78,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BinFormat.cs" />
|
<Compile Include="BinFormat.cs" />
|
||||||
<Compile Include="BuildProperties.cs" />
|
<Compile Include="BuildProperties.cs" />
|
||||||
|
<Compile Include="BuildPropertyNames.cs" />
|
||||||
<Compile Include="CosmosPaths.cs" />
|
<Compile Include="CosmosPaths.cs" />
|
||||||
<Compile Include="Enums.cs" />
|
<Compile Include="Enums.cs" />
|
||||||
<Compile Include="EnumValue.cs" />
|
<Compile Include="EnumValue.cs" />
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ namespace Cosmos.Debug.VSDebugEngine
|
||||||
{
|
{
|
||||||
mDbgConnector = null;
|
mDbgConnector = null;
|
||||||
|
|
||||||
string xPort = mDebugInfo[BuildProperties.VisualStudioDebugPortString];
|
string xPort = mDebugInfo[BuildPropertyNames.VisualStudioDebugPortString];
|
||||||
|
|
||||||
// using (var xDebug = new StreamWriter(@"e:\debug.info", false))
|
// using (var xDebug = new StreamWriter(@"e:\debug.info", false))
|
||||||
// {
|
// {
|
||||||
|
|
@ -294,7 +294,7 @@ namespace Cosmos.Debug.VSDebugEngine
|
||||||
|
|
||||||
if (String.IsNullOrWhiteSpace(xPort))
|
if (String.IsNullOrWhiteSpace(xPort))
|
||||||
{
|
{
|
||||||
xPort = mDebugInfo[BuildProperties.CosmosDebugPortString];
|
xPort = mDebugInfo[BuildPropertyNames.CosmosDebugPortString];
|
||||||
}
|
}
|
||||||
|
|
||||||
var xParts = (null == xPort) ? null : xPort.Split(' ');
|
var xParts = (null == xPort) ? null : xPort.Split(' ');
|
||||||
|
|
@ -308,7 +308,7 @@ namespace Cosmos.Debug.VSDebugEngine
|
||||||
string xPortType = xParts[0].ToLower();
|
string xPortType = xParts[0].ToLower();
|
||||||
string xPortParam = xParts[1].ToLower();
|
string xPortParam = xParts[1].ToLower();
|
||||||
|
|
||||||
var xLaunch = mDebugInfo[BuildProperties.LaunchString];
|
var xLaunch = mDebugInfo[BuildPropertyNames.LaunchString];
|
||||||
|
|
||||||
OutputText("Starting debug connector.");
|
OutputText("Starting debug connector.");
|
||||||
switch (xPortType)
|
switch (xPortType)
|
||||||
|
|
@ -373,7 +373,7 @@ namespace Cosmos.Debug.VSDebugEngine
|
||||||
mCallback = aCallback;
|
mCallback = aCallback;
|
||||||
mDebugInfo = aDebugInfo;
|
mDebugInfo = aDebugInfo;
|
||||||
|
|
||||||
mLaunch = (LaunchType)Enum.Parse(typeof(LaunchType), aDebugInfo[BuildProperties.LaunchString]);
|
mLaunch = (LaunchType)Enum.Parse(typeof(LaunchType), aDebugInfo[BuildPropertyNames.LaunchString]);
|
||||||
|
|
||||||
if (mDebugDownPipe == null)
|
if (mDebugDownPipe == null)
|
||||||
{
|
{
|
||||||
|
|
@ -397,11 +397,11 @@ namespace Cosmos.Debug.VSDebugEngine
|
||||||
OutputText("Using ISO file " + mISO + ".");
|
OutputText("Using ISO file " + mISO + ".");
|
||||||
mProjectFile = mDebugInfo["ProjectFile"];
|
mProjectFile = mDebugInfo["ProjectFile"];
|
||||||
//
|
//
|
||||||
bool xUseGDB = string.Equals(mDebugInfo[BuildProperties.EnableGDBString], "true", StringComparison.InvariantCultureIgnoreCase);
|
bool xUseGDB = string.Equals(mDebugInfo[BuildPropertyNames.EnableGDBString], "true", StringComparison.InvariantCultureIgnoreCase);
|
||||||
OutputText("GDB " + (xUseGDB ? "Enabled" : "Disabled") + ".");
|
OutputText("GDB " + (xUseGDB ? "Enabled" : "Disabled") + ".");
|
||||||
//
|
//
|
||||||
var xGDBClient = false;
|
var xGDBClient = false;
|
||||||
Boolean.TryParse(mDebugInfo[BuildProperties.StartCosmosGDBString], out xGDBClient);
|
Boolean.TryParse(mDebugInfo[BuildPropertyNames.StartCosmosGDBString], out xGDBClient);
|
||||||
|
|
||||||
switch (mLaunch)
|
switch (mLaunch)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace Cosmos.Debug.VSDebugEngine.Host
|
||||||
InitializeKeyValues();
|
InitializeKeyValues();
|
||||||
GenerateConfiguration(configurationFile.FullName);
|
GenerateConfiguration(configurationFile.FullName);
|
||||||
_bochsConfigurationFile = configurationFile;
|
_bochsConfigurationFile = configurationFile;
|
||||||
bool parseSucceeded = bool.TryParse(aParams[BuildProperties.EnableBochsDebugString], out _useDebugVersion);
|
bool parseSucceeded = bool.TryParse(aParams[BuildPropertyNames.EnableBochsDebugString], out _useDebugVersion);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Cosmos.Debug.VSDebugEngine.Host {
|
||||||
|
|
||||||
public Slave(NameValueCollection aParams, bool aUseGDB)
|
public Slave(NameValueCollection aParams, bool aUseGDB)
|
||||||
: base(aParams, aUseGDB) {
|
: base(aParams, aUseGDB) {
|
||||||
var xPort = mParams[BuildProperties.SlavePortString];
|
var xPort = mParams[BuildPropertyNames.SlavePortString];
|
||||||
if (xPort == "None") {
|
if (xPort == "None") {
|
||||||
throw new Exception("No slave port is set.");
|
throw new Exception("No slave port is set.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace Cosmos.Debug.VSDebugEngine.Host {
|
||||||
|
|
||||||
CheckIfHyperVServiceIsRunning();
|
CheckIfHyperVServiceIsRunning();
|
||||||
|
|
||||||
string xFlavor = aParams[BuildProperties.VMwareEditionString].ToUpper();
|
string xFlavor = aParams[BuildPropertyNames.VMwareEditionString].ToUpper();
|
||||||
mEdition = VMwareEdition.Player;
|
mEdition = VMwareEdition.Player;
|
||||||
if (xFlavor == "WORKSTATION") {
|
if (xFlavor == "WORKSTATION") {
|
||||||
mEdition = VMwareEdition.Workstation;
|
mEdition = VMwareEdition.Workstation;
|
||||||
|
|
|
||||||
|
|
@ -607,7 +607,7 @@ namespace Cosmos.VS.Package {
|
||||||
|
|
||||||
// Reset cache only on first one
|
// Reset cache only on first one
|
||||||
// Get selected profile
|
// Get selected profile
|
||||||
mProps.SetProperty(BuildProperties.ProfileString, ProjectConfigs[0].GetConfigurationProperty(BuildProperties.ProfileString, true));
|
mProps.SetProperty(BuildPropertyNames.ProfileString, ProjectConfigs[0].GetConfigurationProperty(BuildPropertyNames.ProfileString, true));
|
||||||
|
|
||||||
LoadProjectProps();
|
LoadProjectProps();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ namespace Cosmos.VS.Package {
|
||||||
// On first call, reset the cache, following calls will use the cached values
|
// On first call, reset the cache, following calls will use the cached values
|
||||||
// Think we will change this to a dummy program when we get our debugger working
|
// Think we will change this to a dummy program when we get our debugger working
|
||||||
// This is the program that gest launched after build
|
// This is the program that gest launched after build
|
||||||
var xDeployment = (DeploymentType)Enum.Parse(typeof(DeploymentType), GetConfigurationProperty(BuildProperties.DeploymentString, true));
|
var xDeployment = (DeploymentType)Enum.Parse(typeof(DeploymentType), GetConfigurationProperty(BuildPropertyNames.DeploymentString, true));
|
||||||
var xLaunch = (LaunchType)Enum.Parse(typeof(LaunchType), GetConfigurationProperty(BuildProperties.LaunchString, false));
|
var xLaunch = (LaunchType)Enum.Parse(typeof(LaunchType), GetConfigurationProperty(BuildPropertyNames.LaunchString, false));
|
||||||
var xVSDebugPort = GetConfigurationProperty(BuildProperties.VisualStudioDebugPortString, false);
|
var xVSDebugPort = GetConfigurationProperty(BuildPropertyNames.VisualStudioDebugPortString, false);
|
||||||
|
|
||||||
string xOutputAsm = ProjectMgr.GetOutputAssembly(ConfigName);
|
string xOutputAsm = ProjectMgr.GetOutputAssembly(ConfigName);
|
||||||
string xOutputPath = Path.GetDirectoryName(xOutputAsm);
|
string xOutputPath = Path.GetDirectoryName(xOutputAsm);
|
||||||
|
|
@ -49,7 +49,7 @@ namespace Cosmos.VS.Package {
|
||||||
} else if (xDeployment == DeploymentType.PXE)
|
} else if (xDeployment == DeploymentType.PXE)
|
||||||
{
|
{
|
||||||
string xPxePath = Path.Combine(CosmosPaths.Build, "PXE");
|
string xPxePath = Path.Combine(CosmosPaths.Build, "PXE");
|
||||||
string xPxeIntf = GetConfigurationProperty(BuildProperties.PxeInterfaceString, false);
|
string xPxeIntf = GetConfigurationProperty(BuildPropertyNames.PxeInterfaceString, false);
|
||||||
File.Copy(xBinFile, Path.Combine(xPxePath, "Cosmos.bin"), true);
|
File.Copy(xBinFile, Path.Combine(xPxePath, "Cosmos.bin"), true);
|
||||||
Process.Start(Path.Combine(CosmosPaths.Tools, "Cosmos.Deploy.Pixie.exe"), xPxeIntf + " \"" + xPxePath + "\"");
|
Process.Start(Path.Combine(CosmosPaths.Tools, "Cosmos.Deploy.Pixie.exe"), xPxeIntf + " \"" + xPxePath + "\"");
|
||||||
}else if (xDeployment == DeploymentType.BinaryImage)
|
}else if (xDeployment == DeploymentType.BinaryImage)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue