Skip to content

Commit

Permalink
One more project template fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Apr 11, 2017
1 parent bf7c30e commit a771616
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions source/Cosmos.VS.Wizards/CosmosProjectWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void ProjectFinishedGenerating(Project project)

xInputString = xInputString.Replace("$KernelProjectGuid$", mGuidKernel.ToString("b"));
xInputString = xInputString.Replace("$CosmosProjectGuid$", mGuidCosmosProj.ToString("b"));
xInputString = xInputString.Replace("$KernelName$", project.Name);
xInputString = xInputString.Replace("$KernelProjectName$", project.Name);
xInputString = xInputString.Replace("$CosmosProjectName$", project.Name + "Boot");
xInputString = xInputString.Replace("$ProjectTypeExtension$", extension);
var xFilename = Path.GetDirectoryName(project.FullName);
Expand All @@ -75,38 +75,6 @@ public void ProjectFinishedGenerating(Project project)
return;
}

//This throws an error - ProjectIDGuid not found on xCosmosBootProjectObj
//Also this doesn't seem to do anything... and the reference from Boot proj to Library proj makes it dependant anyway...
//try
//{ // make .Cosmos project dependent on library project.
// var xEnu = project.DTE.Solution.SolutionBuild.BuildDependencies.GetEnumerator();
// dynamic xCosmosBootProjectObj = xCosmosProject.Object; // VSProjectNode
// var xCosmosBootGuid = xCosmosBootProjectObj.ProjectIDGuid;
// while (xEnu.MoveNext())
// {
// EnvDTE.BuildDependency bd = (EnvDTE.BuildDependency)xEnu.Current;

// dynamic xDependencyGUID = bd.Project.Object;
// if (xDependencyGUID.ProjectIDGuid == xCosmosBootGuid)
// {
// bd.AddProject(project.UniqueName);
// break;
// }
// }
//}
//catch { MessageBox.Show("Failed to make Boot project dependant on Library project."); }

//Bochs file removed...
// Copy Bochs configuration file.
//xInputString = GetBochsConfigurationFileTemplate();
//if (xInputString == null) {
// return;
//}
//xInputString = xInputString.Replace("$CosmosProjectName$", project.Name + "Boot");
//xFilename = Path.GetDirectoryName(project.FullName);
//xFilename = Path.Combine(xFilename, BochsConfigurationFileName);
//File.WriteAllText(xFilename, xInputString);

// set Cosmos Boot as startup project
project.DTE.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer).Activate();
EnvDTE.UIHierarchy hierarchy = project.DTE.ActiveWindow.Object as EnvDTE.UIHierarchy;
Expand Down

0 comments on commit a771616

Please sign in to comment.