mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-10 02:02:30 +00:00
This commit is contained in:
parent
825220a6c5
commit
736daaac0e
14 changed files with 219 additions and 257 deletions
|
|
@ -137,9 +137,11 @@ Name: {code:VSNET2010_PATH}\ProjectTemplates\Cosmos; Flags: uninsalwaysuninstall
|
|||
Name: {app}; Flags: uninsalwaysuninstall
|
||||
|
||||
[InstallDelete]
|
||||
Type: files; Name: "{code:VSNET2010_PATH}\PrivateAssemblies\Cosmos.*"
|
||||
Type: filesandordirs; Name: "{app}"
|
||||
Type: files; Name: "{code:VSNET2010_PATH}\PrivateAssemblies\Cosmos.*"
|
||||
Type: filesandordirs; Name: "{code:VSNET2010_PATH}\ProjectTemplates\Cosmos"
|
||||
Type: filesandordirs; Name: "{userdocs}\Visual Studio 2010\Templates\ProjectTemplates\Cosmos";
|
||||
Type: filesandordirs; Name: "{userdocs}\Visual Studio 2010\Templates\ItemTemplates\Visual C#\Cosmos";
|
||||
Type: filesandordirs; Name: "{code:GetCSharpExpress2010ProjectTemplatePath}\*Cosmos*.*"; Check: IsCSharpExpress2010Installed('dummy') and (not csharp2010_Installed('dummy'))
|
||||
|
||||
[Files]
|
||||
|
|
@ -383,6 +385,7 @@ Filename: {code:VSNET2010_PATH}\VSIXInstaller.exe; Parameters: "/quiet ""{app}\B
|
|||
; Forces VS to merge the resource metadata that describes menus, toolbars, and command groups from all VSPackages available.
|
||||
#if BuildConfiguration == "Devkit"
|
||||
; /setup without nosetupvstemplates takes a LONG time... so we dont run it every time.. for DevKit users, they will need to run it one time first as user kit - see new note above in X# template
|
||||
; Filename: {code:VSNET2010_PATH}\devenv.exe; Parameters: /setup Flags: waituntilterminated
|
||||
Filename: {code:VSNET2010_PATH}\devenv.exe; Parameters: /setup /nosetupvstemplates; Flags: waituntilterminated
|
||||
#else
|
||||
Filename: {code:VSNET2010_PATH}\devenv.exe; Parameters: /setup; Flags: waituntilterminated
|
||||
|
|
|
|||
|
|
@ -24,6 +24,20 @@ namespace Cosmos.Build.Common {
|
|||
set { SetProperty("Launch", value); }
|
||||
}
|
||||
|
||||
// Debug
|
||||
public bool DebugEnabled {
|
||||
get { return GetProperty("DebugEnabled", true); }
|
||||
set { SetProperty("DebugEnabled", value); }
|
||||
}
|
||||
public DebugMode DebugMode {
|
||||
get { return GetProperty("DebugMode", DebugMode.Source); }
|
||||
set { SetProperty("DebugMode", value); }
|
||||
}
|
||||
public bool IgnoreDebugStubAttribute {
|
||||
get { return GetProperty("IgnoreDebugStubAttribute", false); }
|
||||
set { SetProperty("IgnoreDebugStubAttribute", value); }
|
||||
}
|
||||
|
||||
// VMware
|
||||
public VMwareEdition VMwareEdition {
|
||||
get { return GetProperty("VMwareEdition", VMwareEdition.Player); }
|
||||
|
|
@ -48,14 +62,6 @@ namespace Cosmos.Build.Common {
|
|||
set { SetProperty("TraceAssemblies", value); }
|
||||
}
|
||||
|
||||
public DebugMode DebugMode {
|
||||
get { return GetProperty("DebugMode", DebugMode.Source); }
|
||||
set { SetProperty("DebugMode", value); }
|
||||
}
|
||||
public bool IgnoreDebugStubAttribute {
|
||||
get { return GetProperty("IgnoreDebugStubAttribute", false); }
|
||||
set { SetProperty("IgnoreDebugStubAttribute", value); }
|
||||
}
|
||||
public Boolean EnableGDB {
|
||||
get { return GetProperty("EnableGDB", false); }
|
||||
set { SetProperty("EnableGDB", value); }
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace Cosmos.Build.Common {
|
|||
Warning = 0, Error = 1, Informational = 2, Performance = 3
|
||||
}
|
||||
public enum TraceAssemblies { All, Cosmos, User };
|
||||
public enum DebugMode { None, IL, Source }
|
||||
public enum DebugMode { IL, Source }
|
||||
|
||||
public sealed class DescriptionAttribute : Attribute {
|
||||
public static String GetDescription(object value) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
</CreateProperty>
|
||||
|
||||
<IL2CPU DebugMode="$(DebugMode)"
|
||||
DebugEnabled="$(DebugEnabled)"
|
||||
TraceAssemblies="$(TraceAssemblies)"
|
||||
IgnoreDebugStubAttribute="$(IgnoreDebugStubAttribute)"
|
||||
DebugCom="1"
|
||||
|
|
|
|||
|
|
@ -15,116 +15,108 @@ using Cosmos.IL2CPU;
|
|||
using System.Reflection.Emit;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Cosmos.Build.MSBuild
|
||||
{
|
||||
public class IL2CPU : AppDomainIsolatedTask
|
||||
{
|
||||
protected IL2CPUTask mTask = new IL2CPUTask();
|
||||
namespace Cosmos.Build.MSBuild {
|
||||
public class IL2CPU : AppDomainIsolatedTask {
|
||||
protected IL2CPUTask mTask = new IL2CPUTask();
|
||||
|
||||
[Required]
|
||||
public string DebugMode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string TraceAssemblies
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool IgnoreDebugStubAttribute
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public byte DebugCom
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public bool UseNAsm
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] References
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string OutputFilename
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool EnableLogging
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool EmitDebugSymbols
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
protected void LogMessage(string aMsg) {
|
||||
Log.LogMessage(aMsg);
|
||||
}
|
||||
|
||||
protected void LogInformation(string aMsg) {
|
||||
Log.LogMessage(MessageImportance.High, aMsg);
|
||||
}
|
||||
|
||||
protected void LogWarning(string aMsg) {
|
||||
Log.LogWarning(aMsg);
|
||||
}
|
||||
|
||||
protected void LogError(string aMsg) {
|
||||
Log.LogError(aMsg);
|
||||
}
|
||||
|
||||
protected void LogException(Exception e) {
|
||||
Log.LogErrorFromException(e, true);
|
||||
}
|
||||
|
||||
public override bool Execute() {
|
||||
var xSW = Stopwatch.StartNew();
|
||||
|
||||
try
|
||||
{
|
||||
mTask.OnLogMessage = LogMessage;
|
||||
mTask.OnLogError = LogError;
|
||||
mTask.OnLogWarning = LogWarning;
|
||||
mTask.OnLogException = LogException;
|
||||
|
||||
mTask.DebugMode = DebugMode;
|
||||
mTask.TraceAssemblies = TraceAssemblies;
|
||||
mTask.DebugCom = DebugCom;
|
||||
mTask.UseNAsm = UseNAsm;
|
||||
mTask.References = References;
|
||||
mTask.OutputFilename = OutputFilename;
|
||||
mTask.EnableLogging = EnableLogging;
|
||||
mTask.EmitDebugSymbols = EmitDebugSymbols;
|
||||
mTask.IgnoreDebugStubAttribute = IgnoreDebugStubAttribute;
|
||||
return mTask.Execute();
|
||||
}
|
||||
finally
|
||||
{
|
||||
xSW.Stop();
|
||||
Log.LogMessage(MessageImportance.High, "IL2CPU task took {0}", xSW.Elapsed);
|
||||
}
|
||||
}
|
||||
[Required]
|
||||
public string DebugMode {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool DebugEnabled {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string TraceAssemblies {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool IgnoreDebugStubAttribute {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public byte DebugCom {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public bool UseNAsm {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public ITaskItem[] References {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string OutputFilename {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool EnableLogging {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public bool EmitDebugSymbols {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
protected void LogMessage(string aMsg) {
|
||||
Log.LogMessage(aMsg);
|
||||
}
|
||||
|
||||
protected void LogInformation(string aMsg) {
|
||||
Log.LogMessage(MessageImportance.High, aMsg);
|
||||
}
|
||||
|
||||
protected void LogWarning(string aMsg) {
|
||||
Log.LogWarning(aMsg);
|
||||
}
|
||||
|
||||
protected void LogError(string aMsg) {
|
||||
Log.LogError(aMsg);
|
||||
}
|
||||
|
||||
protected void LogException(Exception e) {
|
||||
Log.LogErrorFromException(e, true);
|
||||
}
|
||||
|
||||
public override bool Execute() {
|
||||
var xSW = Stopwatch.StartNew();
|
||||
|
||||
try {
|
||||
mTask.OnLogMessage = LogMessage;
|
||||
mTask.OnLogError = LogError;
|
||||
mTask.OnLogWarning = LogWarning;
|
||||
mTask.OnLogException = LogException;
|
||||
|
||||
mTask.DebugEnabled = DebugEnabled;
|
||||
mTask.DebugMode = DebugMode;
|
||||
mTask.TraceAssemblies = TraceAssemblies;
|
||||
mTask.DebugCom = DebugCom;
|
||||
mTask.UseNAsm = UseNAsm;
|
||||
mTask.References = References;
|
||||
mTask.OutputFilename = OutputFilename;
|
||||
mTask.EnableLogging = EnableLogging;
|
||||
mTask.EmitDebugSymbols = EmitDebugSymbols;
|
||||
mTask.IgnoreDebugStubAttribute = IgnoreDebugStubAttribute;
|
||||
return mTask.Execute();
|
||||
} finally {
|
||||
xSW.Stop();
|
||||
Log.LogMessage(MessageImportance.High, "IL2CPU task took {0}", xSW.Elapsed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -162,15 +162,7 @@ namespace Cosmos.Build.MSBuild {
|
|||
}
|
||||
mSearchDirs = xSearchPaths.ToArray();
|
||||
}
|
||||
if (String.IsNullOrEmpty(DebugMode)) {
|
||||
mDebugMode = Cosmos.Build.Common.DebugMode.None;
|
||||
} else {
|
||||
if (!Enum.GetNames(typeof(DebugMode)).Contains(DebugMode, StringComparer.InvariantCultureIgnoreCase)) {
|
||||
LogError("Invalid DebugMode specified");
|
||||
return false;
|
||||
}
|
||||
mDebugMode = (DebugMode)Enum.Parse(typeof(DebugMode), DebugMode);
|
||||
}
|
||||
mDebugMode = (DebugMode)Enum.Parse(typeof(DebugMode), DebugMode);
|
||||
if (String.IsNullOrEmpty(TraceAssemblies)) {
|
||||
mTraceAssemblies = Cosmos.Build.Common.TraceAssemblies.User;
|
||||
} else {
|
||||
|
|
@ -183,7 +175,8 @@ namespace Cosmos.Build.MSBuild {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected DebugMode mDebugMode = Cosmos.Build.Common.DebugMode.None;
|
||||
public bool DebugEnabled = false;
|
||||
protected DebugMode mDebugMode = Cosmos.Build.Common.DebugMode.Source;
|
||||
protected TraceAssemblies mTraceAssemblies = Cosmos.Build.Common.TraceAssemblies.All;
|
||||
protected void LogTime(string message) {
|
||||
//
|
||||
|
|
@ -202,17 +195,19 @@ namespace Cosmos.Build.MSBuild {
|
|||
return false;
|
||||
}
|
||||
var xOutputFilename = Path.Combine(Path.GetDirectoryName(OutputFilename), Path.GetFileNameWithoutExtension(OutputFilename));
|
||||
if (mDebugMode == Common.DebugMode.None) {
|
||||
if (!DebugEnabled) {
|
||||
// Default of 1 is in Cosmos.Targets. Need to change to use proj props
|
||||
DebugCom = 0;
|
||||
}
|
||||
var xAsm = new AppAssemblerNasm(DebugCom);
|
||||
using (var xDebugInfo = new DebugInfo()) {
|
||||
xDebugInfo.CreateCPDB(xOutputFilename + ".cpdb");
|
||||
xAsm.DebugInfo = xDebugInfo;
|
||||
xAsm.DebugEnabled = DebugEnabled;
|
||||
xAsm.DebugMode = mDebugMode;
|
||||
xAsm.TraceAssemblies = mTraceAssemblies;
|
||||
xAsm.IgnoreDebugStubAttribute = IgnoreDebugStubAttribute;
|
||||
if (this.DebugMode.ToLower() == "none") {
|
||||
if (DebugEnabled == false) {
|
||||
xAsm.ShouldOptimize = true;
|
||||
}
|
||||
#if OUTPUT_ELF
|
||||
|
|
|
|||
|
|
@ -104,9 +104,8 @@ namespace Cosmos.Debug.VSDebugEngine {
|
|||
mCallback = aCallback;
|
||||
mDebugInfo = aDebugInfo;
|
||||
|
||||
string xBuildTarget = aDebugInfo["Profile"].ToUpper();
|
||||
var xEnumValues = (Profile[])Enum.GetValues(typeof(Profile));
|
||||
mProfile = xEnumValues.Where(q => q.ToString().ToUpper() == xBuildTarget).First();
|
||||
string xProfile = aDebugInfo["Profile"];
|
||||
mProfile = (Profile)Enum.Parse(typeof(Profile), xProfile);
|
||||
|
||||
if (mDebugDownPipe == null) {
|
||||
mDebugDownPipe = new Cosmos.Debug.Common.PipeClient(Cosmos.Debug.Consts.Pipes.DownName);
|
||||
|
|
@ -154,7 +153,7 @@ namespace Cosmos.Debug.VSDebugEngine {
|
|||
OutputText("Preparing VMWare.");
|
||||
mProcessStartInfo.Arguments = mHost.Start(mDebugInfo["ISOFile"], xGDBDebugStub);
|
||||
} else {
|
||||
throw new Exception("Invalid BuildTarget value: '" + xBuildTarget + "'.");
|
||||
throw new Exception("Invalid Profile value: '" + xProfile + "'.");
|
||||
}
|
||||
|
||||
// Set to false for debugging, true otherwise
|
||||
|
|
@ -190,7 +189,7 @@ namespace Cosmos.Debug.VSDebugEngine {
|
|||
mDbgConnector.Connected = DebugConnectorConnected;
|
||||
}
|
||||
if (mDbgConnector == null) {
|
||||
throw new Exception("BuildTarget value not valid: '" + mProfile.ToString() + "'.");
|
||||
throw new Exception("Profile value not valid: '" + mProfile.ToString() + "'.");
|
||||
}
|
||||
|
||||
aEngine.BPMgr.SetDebugConnector(mDbgConnector);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<SccLocalPath>SAK</SccLocalPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<Profile />
|
||||
<Profile>VMware</Profile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
|
|
@ -30,9 +30,10 @@
|
|||
<IgnoreDebugStubAttribute />
|
||||
<Deployment />
|
||||
<Launch />
|
||||
<DebugEnabled>True</DebugEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<Profile />
|
||||
<Profile>VMware</Profile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
|
|
@ -48,6 +49,7 @@
|
|||
<IgnoreDebugStubAttribute />
|
||||
<Deployment />
|
||||
<Launch />
|
||||
<DebugEnabled>True</DebugEnabled>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Kernel\Debug\Cosmos.Debug.Kernel.Plugs\Cosmos.Debug.Kernel.Plugs.csproj">
|
||||
|
|
|
|||
|
|
@ -426,6 +426,7 @@ namespace Cosmos.IL2CPU.X86 {
|
|||
}
|
||||
|
||||
public TraceAssemblies TraceAssemblies;
|
||||
public bool DebugEnabled = false;
|
||||
public DebugMode DebugMode;
|
||||
public bool IgnoreDebugStubAttribute;
|
||||
|
||||
|
|
@ -441,7 +442,7 @@ namespace Cosmos.IL2CPU.X86 {
|
|||
//TODO: Each IL op should exist in IL, and descendants in IL.X86.
|
||||
// Because of this we have this hack
|
||||
return;
|
||||
} else if (DebugMode == DebugMode.None) {
|
||||
} else if (DebugEnabled == false) {
|
||||
return;
|
||||
} else if (DebugMode == DebugMode.Source) {
|
||||
// If the current position equals one of the offsets, then we have
|
||||
|
|
|
|||
|
|
@ -218,6 +218,8 @@ namespace Cosmos.VS.Package {
|
|||
};
|
||||
chckEnableDebugStub.CheckedChanged += delegate(object aSender, EventArgs e) {
|
||||
panlDebugSettings.Enabled = chckEnableDebugStub.Checked;
|
||||
mProps.DebugEnabled = chckEnableDebugStub.Checked;
|
||||
IsDirty = true;
|
||||
};
|
||||
|
||||
comboTraceMode.Items.AddRange(EnumValue.GetEnumValues(typeof(TraceAssemblies), false));
|
||||
|
|
@ -285,6 +287,20 @@ namespace Cosmos.VS.Package {
|
|||
cmboVMwareEdition.SelectedItem = EnumValue.Find(cmboVMwareEdition.Items, mProps.VMwareEdition);
|
||||
#endregion
|
||||
|
||||
#region Debug
|
||||
mProps.SetProperty("DebugEnabled", GetConfigProperty("DebugEnabled"));
|
||||
chckEnableDebugStub.Checked = mProps.DebugEnabled;
|
||||
|
||||
mProps.SetProperty("IgnoreDebugStubAttribute", GetConfigProperty("IgnoreDebugStubAttribute"));
|
||||
checkIgnoreDebugStubAttribute.Checked = mProps.IgnoreDebugStubAttribute;
|
||||
|
||||
mProps.SetProperty("DebugMode", GetConfigProperty("DebugMode"));
|
||||
comboDebugMode.SelectedItem = EnumValue.Find(comboDebugMode.Items, mProps.DebugMode);
|
||||
|
||||
mProps.SetProperty("TraceMode", GetConfigProperty("TraceMode"));
|
||||
comboTraceMode.SelectedItem = EnumValue.Find(comboTraceMode.Items, mProps.TraceAssemblies);
|
||||
#endregion
|
||||
|
||||
//TODO: Why are we copying these one by one instead of automatic?
|
||||
mProps.SetProperty("OutputPath", GetConfigProperty("OutputPath"));
|
||||
textOutputPath.Text = mProps.OutputPath;
|
||||
|
|
@ -301,15 +317,6 @@ namespace Cosmos.VS.Package {
|
|||
mProps.SetProperty("StartCosmosGDB", GetConfigProperty("StartCosmosGDB"));
|
||||
checkStartCosmosGDB.Checked = mProps.StartCosmosGDB;
|
||||
|
||||
mProps.SetProperty("IgnoreDebugStubAttribute", GetConfigProperty("IgnoreDebugStubAttribute"));
|
||||
checkIgnoreDebugStubAttribute.Checked = mProps.IgnoreDebugStubAttribute;
|
||||
|
||||
mProps.SetProperty("DebugMode", GetConfigProperty("DebugMode"));
|
||||
comboDebugMode.SelectedItem = EnumValue.Find(comboDebugMode.Items, mProps.DebugMode);
|
||||
|
||||
mProps.SetProperty("TraceMode", GetConfigProperty("TraceMode"));
|
||||
comboTraceMode.SelectedItem = EnumValue.Find(comboTraceMode.Items, mProps.TraceAssemblies);
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,24 @@
|
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>$guid1$</ProjectGuid>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<Name>$safeprojectname$</Name>
|
||||
<BinFormat>elf</BinFormat>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
<UseInternalAssembler>False</UseInternalAssembler>
|
||||
<EnableGDB>False</EnableGDB>
|
||||
<DebugMode>Source</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
<BuildTarget>VMWare</BuildTarget>
|
||||
<VMWareFlavor>Player</VMWareFlavor>
|
||||
<StartCosmosGDB>false</StartCosmosGDB>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
<UseInternalAssembler>False</UseInternalAssembler>
|
||||
<EnableGDB>False</EnableGDB>
|
||||
<DebugMode>None</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
<BuildTarget>VMWare</BuildTarget>
|
||||
<VMWareFlavor>Player</VMWareFlavor>
|
||||
<StartCosmosGDB>false</StartCosmosGDB>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.System.Plugs.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>$guid1$</ProjectGuid>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<Name>$safeprojectname$</Name>
|
||||
<BinFormat>elf</BinFormat>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<Profile>VMware</Profile>
|
||||
<DebugEnable>true</DebugEnable>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DebugMode>Source</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.System.Plugs.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
|
||||
</Project>
|
||||
|
|
@ -12,32 +12,21 @@ namespace Cosmos.VS.Package {
|
|||
private VSProject package;
|
||||
|
||||
public VSProjectFactory(VSProject package)
|
||||
: base(package)
|
||||
{
|
||||
LogUtility.LogString("Entering Cosmos.VS.Package.VSProjectFactory.ctor(VSProject)");
|
||||
this.package = package;
|
||||
LogUtility.LogString("Exiting Cosmos.VS.Package.VSProjectFactory.ctor(VSProject)");
|
||||
: base(package) {
|
||||
this.package = package;
|
||||
}
|
||||
|
||||
protected override ProjectNode CreateProject() {
|
||||
LogUtility.LogString("Entering Cosmos.VS.Package.VSProjectFactory.CreateProject()");
|
||||
try
|
||||
{
|
||||
VSProjectNode project = new VSProjectNode(this.package);
|
||||
try {
|
||||
var project = new VSProjectNode(this.package);
|
||||
|
||||
project.SetSite((IOleServiceProvider)((IServiceProvider)this.package).GetService(typeof(IOleServiceProvider)));
|
||||
LogUtility.LogString("(Result == null) = {0}", project == null);
|
||||
return project;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogUtility.LogException(E);
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogUtility.LogString("Exiting Cosmos.VS.Package.VSProjectFactory.CreateProject()");
|
||||
}
|
||||
project.SetSite((IOleServiceProvider)((IServiceProvider)this.package).GetService(typeof(IOleServiceProvider)));
|
||||
LogUtility.LogString("(Result == null) = {0}", project == null);
|
||||
return project;
|
||||
} catch (Exception E) {
|
||||
LogUtility.LogException(E);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,8 @@ namespace Cosmos.VS.Package {
|
|||
// 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
|
||||
// This is the program that gest launched after build
|
||||
string xBuildTarget = GetConfigurationProperty("Profile", true).ToUpper();
|
||||
//
|
||||
var xEnumValues = (Profile[])Enum.GetValues(typeof(Profile));
|
||||
var xTarget = xEnumValues.Where(q => q.ToString().ToUpper() == xBuildTarget).First();
|
||||
string xProfile = GetConfigurationProperty("Profile", true);
|
||||
var xTarget = (Profile)Enum.Parse(typeof(Profile), xProfile);
|
||||
|
||||
string xOutputAsm = ProjectMgr.GetOutputAssembly(ConfigName);
|
||||
string xOutputPath = Path.GetDirectoryName(xOutputAsm);
|
||||
|
|
|
|||
|
|
@ -1,47 +1,33 @@
|
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>$CosmosProjGuid$</ProjectGuid>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<Name>$CosmosProjectName$</Name>
|
||||
<BinFormat>elf</BinFormat>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
<UseInternalAssembler>False</UseInternalAssembler>
|
||||
<EnableGDB>False</EnableGDB>
|
||||
<DebugMode>Source</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
<BuildTarget>VMWare</BuildTarget>
|
||||
<VMWareFlavor>Player</VMWareFlavor>
|
||||
<StartCosmosGDB>false</StartCosmosGDB>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<Framework>MicrosoftNET</Framework>
|
||||
<UseInternalAssembler>False</UseInternalAssembler>
|
||||
<EnableGDB>False</EnableGDB>
|
||||
<DebugMode>None</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
<BuildTarget>VMWare</BuildTarget>
|
||||
<VMWareFlavor>Player</VMWareFlavor>
|
||||
<StartCosmosGDB>false</StartCosmosGDB>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include=".\$KernelName$.$ProjectTypeExtension$">
|
||||
<Name>$KernelName$</Name>
|
||||
<Project>$KernelGuid$</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.System.Plugs.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>$CosmosProjGuid$</ProjectGuid>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<Name>$CosmosProjectName$</Name>
|
||||
<BinFormat>elf</BinFormat>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<Profile>VMware</Profile>
|
||||
<DebugEnable>true</DebugEnable>
|
||||
<DebugMode>Source</DebugMode>
|
||||
<TraceMode>User</TraceMode>
|
||||
<EnableGDB>False</EnableGDB>
|
||||
<StartCosmosGDB>false</StartCosmosGDB>
|
||||
<VMWareEdition>Player</VMWareEdition>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include=".\$KernelName$.$ProjectTypeExtension$">
|
||||
<Name>$KernelName$</Name>
|
||||
<Project>$KernelGuid$</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.System.Plugs.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
|
||||
</Project>
|
||||
Loading…
Reference in a new issue