Cosmos/Users/Orvid/OtherStuff/ONLIntegration.patch

769 lines
35 KiB
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Index: Setup2/Cosmos.iss
===================================================================
--- Setup2/Cosmos.iss (revision 79470)
+++ Setup2/Cosmos.iss (working copy)
@@ -236,6 +236,13 @@
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.VMPage
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\cosmos.vs.package.dll
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ThreadingModel; ValueData: Both
+; ExternalLibs configuration page
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: none; Flags: uninsdeletekey
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.ExternalLibPage
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\MSCOREE.DLL
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.ExternalLibPage
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\cosmos.vs.package.dll
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8}; ValueType: string; ValueName: ThreadingModel; ValueData: Both
; project type factory
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: none; Flags: uninsdeletekey
Index: source2/Build/Cosmos.Build.Common/Cosmos.Build.Common.csproj
===================================================================
--- source2/Build/Cosmos.Build.Common/Cosmos.Build.Common.csproj (revision 79470)
+++ source2/Build/Cosmos.Build.Common/Cosmos.Build.Common.csproj (working copy)
@@ -73,6 +73,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="BuildProperties.cs" />
+ <Compile Include="ExternalLibsProperties.cs" />
<Compile Include="CosmosPaths.cs" />
<Compile Include="DebugProperties.cs" />
<Compile Include="Enums.cs" />
Index: source2/Build/Cosmos.Build.MSBuild/Cosmos.targets
===================================================================
--- source2/Build/Cosmos.Build.MSBuild/Cosmos.targets (revision 79470)
+++ source2/Build/Cosmos.Build.MSBuild/Cosmos.targets (working copy)
@@ -47,6 +47,7 @@
<Ld CosmosBuildDir="$(CosmosDir)\Build"
WorkingDir="$(TargetDir)"
Arguments="-Ttext 0x500000 -Tdata 0x200000 -e Kernel_Start -o '$(TargetDir)$(MSBuildProjectName).bin' '$(TargetDir)$(MSBuildProjectName).obj'"
+ ExternalLibs="$(ExternalLibsForArgs)"
Condition="$(IsELF) == 'true'"/>
<Delete Files="$(TargetDir)$(MSBuildProjectName).obj" Condition="$(IsELF) == 'true'"/>
<ExtractMapFromElfFile InputFile="$(TargetDir)$(MSBuildProjectName).bin"
Index: source2/Build/Cosmos.Build.MSBuild/Ld.cs
===================================================================
--- source2/Build/Cosmos.Build.MSBuild/Ld.cs (revision 79470)
+++ source2/Build/Cosmos.Build.MSBuild/Ld.cs (working copy)
@@ -30,11 +30,25 @@
set;
}
+ public string ExternalLibs
+ {
+ get;
+ set;
+ }
+
public override bool Execute()
{
+ // Get the final arguments
+ string fargs = Arguments.Replace('\\', '/');
+ if (ExternalLibs != "" && ExternalLibs != null)
+ {
+ fargs += " '";
+ fargs += ExternalLibs.Replace("~~~~~~", "' '").Replace('\\','/');
+ fargs += "'";
+ }
return base.ExecuteTool(WorkingDir,
Path.Combine(CosmosBuildDir, @"tools\cygwin\ld.exe"),
- Arguments.Replace('\\', '/'),
+ fargs,
"ld");
}
}
Index: source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj
===================================================================
--- source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj (revision 79470)
+++ source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj (working copy)
@@ -103,6 +103,12 @@
<Compile Include="ConfigurationBase.Designer.cs">
<DependentUpon>ConfigurationBase.cs</DependentUpon>
</Compile>
+ <Compile Include="ExteralLibPage.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="ExteralLibPage.Designer.cs">
+ <DependentUpon>ExteralLibPage.cs</DependentUpon>
+ </Compile>
<Compile Include="CustomPropertyPage.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -157,6 +163,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="ExteralLibPage.resx">
+ <DependentUpon>ExteralLibPage.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
</EmbeddedResource>
@@ -234,9 +243,9 @@
<ZipItem Include="Templates\Projects\CosmosProject %28C#%29\AssemblyInfo.cs">
<RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
</ZipItem>
- <ZipItem Include="Templates\Projects\CosmosProject %28C#%29\Kernel.cs">
- <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
- </ZipItem>
+ <ZipItem Include="Templates\Projects\CosmosProject %28C#%29\Kernel.cs">
+ <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
+ </ZipItem>
<ZipItem Include="Templates\Projects\Cosmos\CosmosProject.Cosmos">
<RootPath>Templates\Projects\Cosmos</RootPath>
</ZipItem>
@@ -246,27 +255,27 @@
<ZipItem Include="Templates\Projects\Cosmos\Cosmos.vstemplate">
<RootPath>Templates\Projects\Cosmos</RootPath>
</ZipItem>
- <None Include="Templates\Projects\CosmosProject %28C#%29\Proj\CosmosProj.vstemplate">
- <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
- </None>
- <None Include="Templates\Projects\CosmosProject %28C#%29\Proj\Kernel.ico">
- <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
- </None>
- <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\Kernel.ico">
- <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
- </ZipItem>
- <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\FSharpProj.vstemplate">
- <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
- </ZipItem>
- <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\FSharpProject.fsproj">
- <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
- </ZipItem>
- <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\AssemblyInfo.fs">
- <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
- </ZipItem>
- <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\Kernel.fs">
- <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
- </ZipItem>
+ <None Include="Templates\Projects\CosmosProject %28C#%29\Proj\CosmosProj.vstemplate">
+ <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
+ </None>
+ <None Include="Templates\Projects\CosmosProject %28C#%29\Proj\Kernel.ico">
+ <RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
+ </None>
+ <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\Kernel.ico">
+ <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
+ </ZipItem>
+ <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\FSharpProj.vstemplate">
+ <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
+ </ZipItem>
+ <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\FSharpProject.fsproj">
+ <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
+ </ZipItem>
+ <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\AssemblyInfo.fs">
+ <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
+ </ZipItem>
+ <ZipItem Include="Templates\Projects\CosmosProject %28F#%29\Kernel.fs">
+ <RootPath>Templates\Projects\CosmosProject %28F#%29</RootPath>
+ </ZipItem>
<EmbeddedResource Include="BuildPage.resx">
<DependentUpon>BuildPage.cs</DependentUpon>
</EmbeddedResource>
Index: source2/VSIP/Cosmos.VS.Package/DebugPage.Designer.cs
===================================================================
--- source2/VSIP/Cosmos.VS.Package/DebugPage.Designer.cs (revision 79470)
+++ source2/VSIP/Cosmos.VS.Package/DebugPage.Designer.cs (working copy)
@@ -33,10 +33,8 @@
//
// panelSubPage
//
- this.panelSubPage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
this.panelSubPage.AutoScroll = true;
+ this.panelSubPage.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelSubPage.Location = new System.Drawing.Point(0, 41);
this.panelSubPage.Margin = new System.Windows.Forms.Padding(0);
this.panelSubPage.Name = "panelSubPage";
@@ -50,7 +48,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panelSubPage);
this.Controls.Add(this.labelNoConfig);
- this.Font = new System.Drawing.Font("Segoe UI", 8.25F);
+ this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
this.Name = "DebugPage";
this.Title = "Debug";
this.Controls.SetChildIndex(this.labelNoConfig, 0);
Index: source2/VSIP/Cosmos.VS.Package/DebugPage.resx
===================================================================
--- source2/VSIP/Cosmos.VS.Package/DebugPage.resx (revision 79470)
+++ source2/VSIP/Cosmos.VS.Package/DebugPage.resx (working copy)
@@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
Index: source2/VSIP/Cosmos.VS.Package/ExteralLibPage.cs
===================================================================
--- source2/VSIP/Cosmos.VS.Package/ExteralLibPage.cs (revision 0)
+++ source2/VSIP/Cosmos.VS.Package/ExteralLibPage.cs (revision 0)
@@ -0,0 +1,156 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using Cosmos.Build.Common;
+
+namespace Cosmos.VS.Package
+{
+ public partial class ExternalLibPage : CustomPropertyPage
+ {
+ List<String> ExternalLibraries = new List<string>();
+
+ public ExternalLibPage()
+ {
+ InitializeComponent();
+ }
+
+ protected ExternalLibsProperties mProps = new ExternalLibsProperties();
+ public override PropertiesBase Properties
+ {
+ get { return mProps; }
+ }
+
+ private List<String> ConvertToList(String str)
+ {
+ if (str != null && str != "" && str != "\r\n" && str != "\r" && str != "\n")
+ {
+ return new List<String>(str.Split("~~~~~~".ToCharArray()));
+ }
+ else
+ {
+ return new List<string>();
+ }
+ }
+
+ private String ConvertFromList(List<string> lst)
+ {
+ string externalLibsForArgs = "";
+ bool first = true;
+ foreach (string s in lst)
+ {
+ if (!first)
+ {
+ externalLibsForArgs += "~~~~~~"; // That's 6 of them, this separates the libs.
+ }
+ externalLibsForArgs += s;
+ }
+ return externalLibsForArgs;
+ }
+
+ protected override void FillProperties()
+ {
+ base.FillProperties();
+ mProps.Reset();
+
+ mProps.SetProperty("ExternalLibsForArgs", GetConfigProperty("ExternalLibsForArgs"));
+ ExternalLibraries = ConvertToList(mProps.ExternalLibraries);
+ foreach (string s in ExternalLibraries)
+ {
+ ExternalLibsListBox.Items.Add(s);
+ }
+ }
+
+ #region Relative Path
+ private string GetRelativePath(string fullPath)
+ {
+ string fromDirectory = Project.FullName.Substring(0, (Project.FullName.Length - Project.FileName.Length));
+
+ if (fullPath == null)
+ throw new ArgumentNullException("fullPath");
+
+ bool isRooted = (System.IO.Path.IsPathRooted(fromDirectory) && System.IO.Path.IsPathRooted(fullPath));
+
+ if (isRooted)
+ {
+ bool isDifferentRoot = (string.Compare(System.IO.Path.GetPathRoot(fromDirectory), System.IO.Path.GetPathRoot(fullPath), true) != 0);
+
+ if (isDifferentRoot)
+ return fullPath;
+ }
+
+ List<string> relativePath = new List<string>();
+ string[] fromDirectories = fromDirectory.Split(System.IO.Path.DirectorySeparatorChar);
+
+ string[] toDirectories = fullPath.Split(System.IO.Path.DirectorySeparatorChar);
+
+ int length = Math.Min(fromDirectories.Length, toDirectories.Length);
+
+ int lastCommonRoot = -1;
+
+ // find common root
+ for (int x = 0; x < length; x++)
+ {
+ if (string.Compare(fromDirectories[x], toDirectories[x], true) != 0)
+ break;
+
+ lastCommonRoot = x;
+ }
+
+ if (lastCommonRoot == -1)
+ return fullPath;
+
+ // add relative folders in from path
+ for (int x = lastCommonRoot + 1; x < fromDirectories.Length; x++)
+ {
+ if (fromDirectories[x].Length > 0)
+ relativePath.Add("..");
+ }
+
+ // add to folders to path
+ for (int x = lastCommonRoot + 1; x < toDirectories.Length; x++)
+ {
+ relativePath.Add(toDirectories[x]);
+ }
+
+ // create relative path
+ string[] relativeParts = new string[relativePath.Count];
+ relativePath.CopyTo(relativeParts, 0);
+
+ string newPath = string.Join(System.IO.Path.DirectorySeparatorChar.ToString(), relativeParts);
+
+ return newPath;
+ }
+ #endregion
+
+ private void AddButton_Click(object sender, EventArgs e)
+ {
+ if (openFileDialog1.ShowDialog() == DialogResult.OK)
+ {
+ if (!ExternalLibraries.Contains(openFileDialog1.FileName))
+ {
+ string fpath = GetRelativePath(openFileDialog1.FileName);
+ ExternalLibraries.Add(fpath);
+ ExternalLibsListBox.Items.Add(fpath);
+ mProps.ExternalLibraries = ConvertFromList(ExternalLibraries);
+ IsDirty = true;
+ }
+ }
+ }
+
+ private void RemoveButton_Click(object sender, EventArgs e)
+ {
+ if (ExternalLibsListBox.SelectedIndex > -1)
+ {
+ ExternalLibraries.Remove((string)ExternalLibsListBox.Items[ExternalLibsListBox.SelectedIndex]);
+ ExternalLibsListBox.Items.Remove(ExternalLibsListBox.Items[ExternalLibsListBox.SelectedIndex]);
+ mProps.ExternalLibraries = ConvertFromList(ExternalLibraries);
+ IsDirty = true;
+ }
+ }
+
+ }
+}
Index: source2/VSIP/Cosmos.VS.Package/ExteralLibPage.Designer.cs
===================================================================
--- source2/VSIP/Cosmos.VS.Package/ExteralLibPage.Designer.cs (revision 0)
+++ source2/VSIP/Cosmos.VS.Package/ExteralLibPage.Designer.cs (revision 0)
@@ -0,0 +1,172 @@
+namespace Cosmos.VS.Package
+{
+ partial class ExternalLibPage
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.AddButton = new System.Windows.Forms.Button();
+ this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+ this.RemoveButton = new System.Windows.Forms.Button();
+ this.ExternalLibsListBox = new System.Windows.Forms.ListBox();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.tableLayoutPanel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+ this.splitContainer2.Panel1.SuspendLayout();
+ this.splitContainer2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 75F));
+ this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.ExternalLibsListBox, 0, 0);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 1;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(439, 245);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.IsSplitterFixed = true;
+ this.splitContainer1.Location = new System.Drawing.Point(364, 0);
+ this.splitContainer1.Margin = new System.Windows.Forms.Padding(0);
+ this.splitContainer1.Name = "splitContainer1";
+ this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.AddButton);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
+ this.splitContainer1.Size = new System.Drawing.Size(75, 245);
+ this.splitContainer1.SplitterDistance = 25;
+ this.splitContainer1.SplitterWidth = 1;
+ this.splitContainer1.TabIndex = 0;
+ this.splitContainer1.TabStop = false;
+ //
+ // AddButton
+ //
+ this.AddButton.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.AddButton.Location = new System.Drawing.Point(0, 0);
+ this.AddButton.Name = "AddButton";
+ this.AddButton.Size = new System.Drawing.Size(75, 25);
+ this.AddButton.TabIndex = 0;
+ this.AddButton.Text = "Add";
+ this.AddButton.UseVisualStyleBackColor = true;
+ this.AddButton.Click += new System.EventHandler(this.AddButton_Click);
+ //
+ // splitContainer2
+ //
+ this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer2.IsSplitterFixed = true;
+ this.splitContainer2.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer2.Margin = new System.Windows.Forms.Padding(0);
+ this.splitContainer2.Name = "splitContainer2";
+ this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer2.Panel1
+ //
+ this.splitContainer2.Panel1.Controls.Add(this.RemoveButton);
+ this.splitContainer2.Size = new System.Drawing.Size(75, 219);
+ this.splitContainer2.SplitterDistance = 25;
+ this.splitContainer2.SplitterWidth = 1;
+ this.splitContainer2.TabIndex = 0;
+ this.splitContainer2.TabStop = false;
+ //
+ // RemoveButton
+ //
+ this.RemoveButton.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.RemoveButton.Location = new System.Drawing.Point(0, 0);
+ this.RemoveButton.Name = "RemoveButton";
+ this.RemoveButton.Size = new System.Drawing.Size(75, 25);
+ this.RemoveButton.TabIndex = 0;
+ this.RemoveButton.Text = "Remove";
+ this.RemoveButton.UseVisualStyleBackColor = true;
+ this.RemoveButton.Click += new System.EventHandler(this.RemoveButton_Click);
+ //
+ // ExternalLibsListBox
+ //
+ this.ExternalLibsListBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ExternalLibsListBox.FormattingEnabled = true;
+ this.ExternalLibsListBox.Location = new System.Drawing.Point(3, 3);
+ this.ExternalLibsListBox.Name = "ExternalLibsListBox";
+ this.ExternalLibsListBox.Size = new System.Drawing.Size(358, 239);
+ this.ExternalLibsListBox.TabIndex = 1;
+ //
+ // openFileDialog1
+ //
+ this.openFileDialog1.Filter = "Object Files (*.obj) |*.obj";
+ //
+ // ExternalLibPage
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Margin = new System.Windows.Forms.Padding(0);
+ this.Name = "ExternalLibPage";
+ this.Size = new System.Drawing.Size(439, 245);
+ this.Title = "External Libraries";
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+ this.splitContainer1.ResumeLayout(false);
+ this.splitContainer2.Panel1.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+ this.splitContainer2.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.Button AddButton;
+ private System.Windows.Forms.SplitContainer splitContainer2;
+ private System.Windows.Forms.Button RemoveButton;
+ private System.Windows.Forms.ListBox ExternalLibsListBox;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+
+
+ }
+}
Index: source2/VSIP/Cosmos.VS.Package/ExteralLibPage.resx
===================================================================
--- source2/VSIP/Cosmos.VS.Package/ExteralLibPage.resx (revision 0)
+++ source2/VSIP/Cosmos.VS.Package/ExteralLibPage.resx (revision 0)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>25</value>
+ </metadata>
+</root>
\ No newline at end of file
Index: source2/VSIP/Cosmos.VS.Package/Guids.cs
===================================================================
--- source2/VSIP/Cosmos.VS.Package/Guids.cs (revision 79470)
+++ source2/VSIP/Cosmos.VS.Package/Guids.cs (working copy)
@@ -10,7 +10,8 @@
// These GUIDs are also used in the .iss, as are the prop page names. If you change names
// or GUIDs you need to update the .iss as well.
public const string BuildPage = "d33a2d29-c4fd-4e12-a510-4c01a14d63e1";
- public const string DebugPage = "39801176-289f-405f-9425-2931a2c03912";
+ public const string DebugPage = "39801176-289f-405f-9425-2931a2c03912";
+ public const string ExternalLibPage = "6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8";
public const string VMPage = "3b72bb68-7363-45a2-9eba-55c8d5f36e36";
public static readonly Guid guidProjectCmdSet = new Guid(guidProjectCmdSetString);
Index: source2/VSIP/Cosmos.VS.Package/VSProjectNode.cs
===================================================================
--- source2/VSIP/Cosmos.VS.Package/VSProjectNode.cs (revision 79470)
+++ source2/VSIP/Cosmos.VS.Package/VSProjectNode.cs (working copy)
@@ -11,7 +11,7 @@
public class VSProjectNode : ProjectNode
{
internal static int imageIndex;
- public override int ImageIndex
+ public override int ImageIndex
{
get { return imageIndex; }
}
@@ -44,9 +44,9 @@
public override MSBuildResult Build(uint vsopts, string config, IVsOutputWindowPane output, string target)
{
- // remove it, no really function in it Trivalik
+ // remove it, no really function in it Trivalik
//var xReferenceContainer = GetReferenceContainer();
-
+
return base.Build(vsopts, config, output, target);
}
@@ -69,18 +69,19 @@
{
uiThreadCallback(MSBuildResult.Successful, "Skipped");
output.OutputStringThreadSafe("Project skipped, as it's not necessary for running");
+ output.OutputStringThreadSafe("\r\n");
return;
}
}
}
- }
+ }
base.BuildAsync(vsopts, config, output, target, uiThreadCallback);
}
protected override MSBuildResult InvokeMsBuild(string target)
{
- // if the project is not set as startup project, don't build the iso
-
+ // if the project is not set as startup project, don't build the iso
+
return base.InvokeMsBuild(target);
}
@@ -113,13 +114,15 @@
LogUtility.LogString("Entering Cosmos.VS.Package.VSProjectNode.GetConfigurationIndependentPropertyPages()");
try
{
- return new Guid[] {
- // typeof(PropPageEnvironment).GUID,
- //typeof(PropPageTest).GUID,
- typeof(BuildPage).GUID,
- typeof(DebugPage).GUID,
- typeof(VMPage).GUID,
- };
+ return new Guid[]
+ {
+ // typeof(PropPageEnvironment).GUID,
+ //typeof(PropPageTest).GUID,
+ typeof(BuildPage).GUID,
+ typeof(DebugPage).GUID,
+ typeof(VMPage).GUID,
+ new Guid("6F41DDF7-6BF2-46D0-96DC-3FEC494B8EE8"), // ExternalLibPage
+ };
}
finally
{
@@ -142,8 +145,7 @@
get { return "CosmosProjectType"; }
}
- public override void AddFileFromTemplate(
- string source, string target)
+ public override void AddFileFromTemplate(string source, string target)
{
LogUtility.LogString("Entering Cosmos.VS.Package.VSProjectNode.AddFileFromTemplate('{0}', '{1}')", source, target);
try