diff --git a/Setup2/Cosmos.iss b/Setup2/Cosmos.iss
index 6f1dac81b..e19093161 100644
--- a/Setup2/Cosmos.iss
+++ b/Setup2/Cosmos.iss
@@ -286,17 +286,16 @@ Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{8355452D-6D2F-4
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\mscoree.dll
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.Debug.VSDebugEngine.dll
-; X# file generator type
-Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: none; Flags: uninsdeletekey
-Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: Assembly; ValueData: Cosmos.VS.Package
-Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.FileGenerators.XSharpGenerator
-Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\mscoree.dll
-Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.VS.Package.dll
-
; X# custom tool registration
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\Generators\{{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\CosmosXSharpGenerator; ValueType: none; Flags: uninsdeletekey
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\Generators\{{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\CosmosXSharpGenerator; ValueType: string; ValueName: CLSID; ValueData: {{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA};
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\Generators\{{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\CosmosXSharpGenerator; ValueType: dword; ValueName: GeneratesDesignTimeSource; ValueData: 1
+; X# file generator type
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: none; Flags: uninsdeletekey
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: Assembly; ValueData: Cosmos.VS.XSharp
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.XSharp.FileGenerator
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: InprocServer32; ValueData: {sys}\mscoree.dll
+Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{D6F57DE8-E50E-4C91-99E1-FA2E262BC4EA}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.VS.XSharp.dll
; program provider
Root: HKLM; SubKey: Software\Microsoft\VisualStudio\10.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: none; Flags: uninsdeletekey
diff --git a/source2/Users/Kudzu/Kudzu-Notes.html b/source2/Users/Kudzu/Kudzu-Notes.html
index 50ced236d..76153fdc4 100644
--- a/source2/Users/Kudzu/Kudzu-Notes.html
+++ b/source2/Users/Kudzu/Kudzu-Notes.html
@@ -4,7 +4,7 @@
Public Tasks
- Comsmos.VS.Windows - use vsix reg tool
- - X# custom tool generator - Move to Cosmos.VS.XSharp probably
+ - iss - call vsix unreg on uninstall
- VIX - Shutdown VMWare
@@ -17,7 +17,7 @@
Matthijs
- - File New : "CosmosProject", "Cosmos"
+
Kudzu
diff --git a/source2/Users/Matthijs/MatthijsPlayground/Test.cs b/source2/Users/Matthijs/MatthijsPlayground/Test.cs
index 2b53789c4..cf592d0c6 100644
--- a/source2/Users/Matthijs/MatthijsPlayground/Test.cs
+++ b/source2/Users/Matthijs/MatthijsPlayground/Test.cs
@@ -14,6 +14,7 @@ new Comment("This next line allows emission of standard yucky Intel mnemonics");
new LiteralAssemblerCode("Mov EAX, 1");
new Comment("This is X# code");
new Move{DestinationReg = RegistersEnum.EAX, SourceValue = 1};
+new Move{DestinationReg = RegistersEnum.EDX, SourceValue = 2};
new Move{DestinationReg = RegistersEnum.EDX, SourceValue = 2};
}
}
diff --git a/source2/Users/Matthijs/MatthijsPlayground/Test.xs b/source2/Users/Matthijs/MatthijsPlayground/Test.xs
index a2a4d808e..a047b4160 100644
--- a/source2/Users/Matthijs/MatthijsPlayground/Test.xs
+++ b/source2/Users/Matthijs/MatthijsPlayground/Test.xs
@@ -6,3 +6,4 @@
# This is X# code
EAX = 1
EDX = 2
+EDX = 2
diff --git a/source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj b/source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj
index 2e6113481..f490d66c7 100644
--- a/source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj
+++ b/source2/VSIP/Cosmos.VS.Package/Cosmos.VS.Package.csproj
@@ -121,7 +121,6 @@
DebugPageSub.cs
-
diff --git a/source2/VSIP/Cosmos.VS.Package/FileGenerators/XSharpGenerator.cs b/source2/VSIP/Cosmos.VS.Package/FileGenerators/XSharpGenerator.cs
deleted file mode 100644
index 917f429d3..000000000
--- a/source2/VSIP/Cosmos.VS.Package/FileGenerators/XSharpGenerator.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.Shell.Interop;
-using Microsoft.VisualStudio;
-using System.Runtime.InteropServices;
-using System.IO;
-
-namespace Cosmos.VS.Package.FileGenerators
-{
- public class XSharpGenerator : IVsSingleFileGenerator
- {
- public int DefaultExtension(out string pbstrDefaultExtension)
- {
- pbstrDefaultExtension = ".cs";
- return VSConstants.S_OK;
- }
-
- public int Generate(string wszInputFilePath, string bstrInputFileContents, string wszDefaultNamespace, IntPtr[] rgbOutputFileContents,
- out uint pcbOutput, IVsGeneratorProgress pGenerateProgress)
- {
- var xGeneratedCode = DoGenerate(wszInputFilePath, bstrInputFileContents, wszDefaultNamespace);
- var xBytes = Encoding.UTF8.GetBytes(xGeneratedCode);
-
- if (xBytes.Length > 0)
- {
- rgbOutputFileContents[0] = Marshal.AllocCoTaskMem(xBytes.Length);
- Marshal.Copy(xBytes, 0, rgbOutputFileContents[0], xBytes.Length);
- pcbOutput = (uint)xBytes.Length;
- }
- else
- {
- rgbOutputFileContents[0] = IntPtr.Zero;
- pcbOutput = 0;
- }
- return VSConstants.S_OK;
- }
-
- private static string DoGenerate(string inputFileName, string inputFileContents, string defaultNamespace)
- {
- using (var xInput = new StringReader(inputFileContents))
- {
- using (var xOut = new StringWriter())
- {
- Cosmos.Compiler.XSharp.Generator.Execute(xInput, inputFileName, xOut, defaultNamespace);
- return xOut.ToString();
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj
index 4a88fb033..1b25ab2eb 100644
--- a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj
@@ -127,6 +127,7 @@
+
diff --git a/source2/VSIP/Cosmos.VS.XSharp/FileGenerator.cs b/source2/VSIP/Cosmos.VS.XSharp/FileGenerator.cs
new file mode 100644
index 000000000..76ead0b3c
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/FileGenerator.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.VisualStudio.Shell.Interop;
+using Microsoft.VisualStudio;
+using System.Runtime.InteropServices;
+using System.IO;
+
+namespace Cosmos.VS.XSharp {
+
+ // This is the custom tool used to compile .XS files to .CS files in VS
+ public class FileGenerator : IVsSingleFileGenerator {
+ public int DefaultExtension(out string pbstrDefaultExtension) {
+ pbstrDefaultExtension = ".cs";
+ return VSConstants.S_OK;
+ }
+
+ public int Generate(string wszInputFilePath, string bstrInputFileContents, string wszDefaultNamespace, IntPtr[] rgbOutputFileContents,
+ out uint pcbOutput, IVsGeneratorProgress pGenerateProgress) {
+ var xGeneratedCode = DoGenerate(wszInputFilePath, bstrInputFileContents, wszDefaultNamespace);
+ var xBytes = Encoding.UTF8.GetBytes(xGeneratedCode);
+
+ if (xBytes.Length > 0) {
+ rgbOutputFileContents[0] = Marshal.AllocCoTaskMem(xBytes.Length);
+ Marshal.Copy(xBytes, 0, rgbOutputFileContents[0], xBytes.Length);
+ pcbOutput = (uint)xBytes.Length;
+ } else {
+ rgbOutputFileContents[0] = IntPtr.Zero;
+ pcbOutput = 0;
+ }
+ return VSConstants.S_OK;
+ }
+
+ private static string DoGenerate(string inputFileName, string inputFileContents, string defaultNamespace) {
+ using (var xInput = new StringReader(inputFileContents)) {
+ using (var xOut = new StringWriter()) {
+ Cosmos.Compiler.XSharp.Generator.Execute(xInput, inputFileName, xOut, defaultNamespace);
+ return xOut.ToString();
+ }
+ }
+ }
+ }
+}
\ No newline at end of file