From 655fc5e34ac2192df1dd6c8d49b2bfd7944c853d Mon Sep 17 00:00:00 2001 From: mterwoord_cp <7cd3fd84a0151ea055c2f79e4d2eef9576fe9afesxUZAwxD> Date: Tue, 16 Mar 2010 18:08:44 +0000 Subject: [PATCH] VS intergateion works now when insalled using installer --- Build/VSIP/install.bat | 11 +- Setup2/Cosmos.iss | 209 ++++++++++++++++++ .../Build/Cosmos.Build.MSBuild/Cosmos.targets | 8 +- source2/Build/Cosmos.Build.MSBuild/IL2CPU.cs | 7 + .../Debug/Cosmos.Debug.HostProcess/Program.cs | 7 +- .../AD7.Impl/AD7Process.cs | 6 +- .../Cosmos.Debug.VSDebugEngine.csproj | 1 + .../PathUtilities.cs | 44 ++++ .../Cosmos.Debug.VSRegister.csproj | 1 + .../Debug/Cosmos.Debug.VSRegister/Program.cs | 135 +++++++---- .../Cosmos.Debug.VSRegister/ProgramOld.cs | 64 ++++++ source2/VSIP/Cosmos.VS.Package/VSProject.cs | 7 +- 12 files changed, 445 insertions(+), 55 deletions(-) create mode 100644 Setup2/Cosmos.iss create mode 100644 source2/Debug/Cosmos.Debug.VSDebugEngine/PathUtilities.cs create mode 100644 source2/Debug/Cosmos.Debug.VSRegister/ProgramOld.cs diff --git a/Build/VSIP/install.bat b/Build/VSIP/install.bat index 121f1d1c8..f4a281d51 100644 --- a/Build/VSIP/install.bat +++ b/Build/VSIP/install.bat @@ -12,16 +12,21 @@ xcopy /Y ..\Tools\Cosmos.Hardware\Cosmos.Build.Common.* . xcopy /Y ..\Tools\Cosmos.Hardware\Cosmos.IL2CPU.* . xcopy /Y ..\Tools\Cosmos.Hardware\Cosmos.Kernel.Plugs.* . xcopy /Y ..\Tools\Cosmos.Hardware\Cosmos.Sys.Plugs.* . +xcopy /Y ..\Tools\Cosmos.Hardware\Cosmos.Hardware.Plugs.* . xcopy /Y ..\..\source2\Build\Cosmos.Build.MSBuild\bin\Debug\Cosmos.Build.MSBuild.* . xcopy /Y ..\..\source2\Build\Cosmos.Build.MSBuild\Cosmos.targets . xcopy /Y ..\..\source2\Debug\Cosmos.Debug.HostProcess\bin\Debug\Cosmos.Debug.HostProcess.exe . xcopy /Y ..\..\source2\Debug\Cosmos.Debug.HostProcess\bin\Debug\Cosmos.Debug.HostProcess.pdb . xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSDebugEngine\bin\Debug\Cosmos.Debug.VSDebugEngine.* . +xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSDebugEngine\bin\Debug\Cosmos.Debug.Common.* . +xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSDebugEngine\bin\Debug\Cosmos.Compiler.Debug.* . +xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSDebugEngine\bin\Debug\corapi.* . +xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSDebugEngine\bin\Debug\raw.* . xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSRegister\bin\Debug\Cosmos.Debug.VSRegister.pdb . xcopy /Y ..\..\source2\Debug\Cosmos.Debug.VSRegister\bin\Debug\Cosmos.Debug.VSRegister.exe . xcopy /Y ..\..\source2\VSIP\Cosmos.VS.Package\bin\Debug\Cosmos.VS.Package.* . -echo Create msbuild file -md "%ProgramFiles%\MSBuild\Cosmos\" -xcopy /Y .\cosmos.targets "%ProgramFiles%\MSBuild\Cosmos\" +rem echo Create msbuild file +rem md "%ProgramFiles%\MSBuild\Cosmos\" +rem xcopy /Y .\cosmos.targets "%ProgramFiles%\MSBuild\Cosmos\" pause \ No newline at end of file diff --git a/Setup2/Cosmos.iss b/Setup2/Cosmos.iss new file mode 100644 index 000000000..66db8e5da --- /dev/null +++ b/Setup2/Cosmos.iss @@ -0,0 +1,209 @@ +; Cosmos Registry key +; Install assemblies +; Delete old user kit installer and task asm + +[Setup] +AppName=Cosmos User Kit +AppVerName=Cosmos User Kit Milestone 5 +AppCopyright=Copyright © 2007-2010 The Cosmos Project +AppPublisher=Cosmos Project +AppPublisherURL=http://www.gocosmos.org/ +AppSupportURL=http://www.gocosmos.org/ +AppUpdatesURL=http://www.gocosmos.org/ +DefaultDirName={userappdata}\Cosmos User Kit +DefaultGroupName=Cosmos User Kit +OutputDir=.\Setup2\Output +OutputBaseFilename=CosmosUserKit5 +Compression=lzma/ultra64 +SolidCompression=true +SourceDir=.. +;Left Image should be 164x314 +WizardImageFile=.\setup\images\cosmos.bmp +;Small Image should be 55x55 +WizardSmallImageFile=.\setup\images\cosmos_small.bmp + + +; If you want all languages to be listed in the "Select Setup Language" +; dialog, even those that can't be displayed in the active code page, +; uncomment the following two lines. +InternalCompressLevel=ultra64 +UninstallLogMode=overwrite +[LangOptions] +LanguageCodePage=0 + +[Languages] +Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: .\setup\Readme.txt +;Name: eu; MessagesFile: "..\setup\Languages\Basque-1-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: ca; MessagesFile: "..\setup\Languages\Catalan-4-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: cs; MessagesFile: "..\setup\Languages\Czech-5-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: da; MessagesFile: "..\setup\Languages\Danish-4-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: nl; MessagesFile: "..\setup\Languages\Dutch-8-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: fi; MessagesFile: "..\setup\Languages\Finnish-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: fr; MessagesFile: "..\setup\Languages\French-15-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: de; MessagesFile: "..\setup\Languages\German-2-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: hu; MessagesFile: "..\setup\Languages\Hungarian-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: it; MessagesFile: "..\setup\Languages\Italian-14-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: no; MessagesFile: "..\setup\Languages\Norwegian-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: pl; MessagesFile: "..\setup\Languages\Polish-8-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: pt; MessagesFile: "..\setup\Languages\PortugueseStd-1-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: ru; MessagesFile: "..\setup\Languages\Russian-19-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: sk; MessagesFile: "..\setup\Languages\Slovak-6-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: sl; MessagesFile: "..\setup\Languages\Slovenian-3-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;;InOffical: +;Name: bg; MessagesFile: "..\setup\Languages\InOfficial\Bulgarian-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: el; MessagesFile: "..\setup\Languages\InOfficial\Greek-4-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: is; MessagesFile: "..\setup\Languages\InOfficial\Icelandic-1-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: id; MessagesFile: "..\setup\Languages\InOfficial\Indonesian-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: ja; MessagesFile: "..\setup\Languages\InOfficial\Japanese-5-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: ko; MessagesFile: "..\setup\Languages\InOfficial\Korean-5-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: ms; MessagesFile: "..\setup\Languages\InOfficial\Malaysian-2-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: es; MessagesFile: "..\setup\Languages\InOfficial\SpanishStd-2-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: sv; MessagesFile: "..\setup\Languages\InOfficial\Swedish-8-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: tr; MessagesFile: "..\setup\Languages\InOfficial\Turkish-3-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: uk; MessagesFile: "..\setup\Languages\InOfficial\Ukrainian-5-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: cn; MessagesFile: "..\setup\Languages\InOfficial\ChineseSimp-11-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" +;Name: tw; MessagesFile: "..\setup\Languages\InOfficial\ChineseTrad-2-5.1.0.isl"; InfoBeforeFile: "..\setup\Readme.txt" + +[Messages] +en.BeveledLabel=English +;eu.BeveledLabel=Basque +;ca.BeveledLabel=Catalan +;cs.BeveledLabel=Czech +;da.BeveledLabel=Danish +;nl.BeveledLabel=Dutch +;fi.BeveledLabel=Finnish +;fr.BeveledLabel=French +;de.BeveledLabel=German +;hu.BeveledLabel=Hungarian +;it.BeveledLabel=Italian +;no.BeveledLabel=Norwegian +;pl.BeveledLabel=Polish +;pt.BeveledLabel=Portuguese +;ru.BeveledLabel=Russian +;sk.BeveledLabel=Slovak +;sl.BeveledLabel=Slovenian +;;InOffical: +;bg.BeveledLabel=Bulgarian +;el.BeveledLabel=Greek +;is.BeveledLabel=Icelandic +;id.BeveledLabel=Indonesian +;ja.BeveledLabel=Japanese +;ko.BeveledLabel=Korean +;ms.BeveledLabel=Malaysian +;es.BeveledLabel=Spanish +;sv.BeveledLabel=Swedish +;tr.BeveledLabel=Turkish +;uk.BeveledLabel=Ukrainian +;cn.BeveledLabel=Chinese Simplified +;tw.BeveledLabel=Chinese Traditional + +[Files] +Source: .\Build\Tools\*.exe; DestDir: {app}\Build\Tools +Source: .\Build\Tools\NAsm\*.exe; DestDir: {app}\Build\Tools\NAsm +Source: .\Build\Tools\Qemu\*; DestDir: {app}\Build\Tools\Qemu; Flags: recursesubdirs createallsubdirs +Source: .\Build\Tools\Cygwin\*; DestDir: {app}\Build\Tools\cygwin +Source: .\Build\Tools\Cosmos.Hardware\*; DestDir: {app}\Build\Tools\Cosmsos.Hardware; Flags: recursesubdirs createallsubdirs +Source: .\Build\Tools\Cosmos.Hardware.Plugs\*; DestDir: {app}\Build\Tools\Cosmsos.Hardware.Plugs; Flags: recursesubdirs createallsubdirs +Source: .\Build\Tools\Cosmos.Kernel.Plugs\*; DestDir: {app}\Build\Tools\Cosmsos.Kernel.Plugs; Flags: recursesubdirs createallsubdirs +Source: .\Build\Tools\Cosmos.Sys.Plugs\*; DestDir: {app}\Build\Tools\Cosmsos.Sys.Plugs; Flags: recursesubdirs createallsubdirs +Source: .\Build\VSIP\*; DestDir: {app}\Build\VSIP\; Flags: recursesubdirs createallsubdirs +Source: .\Build\VSIP\Cosmos.targets; DestDir: {pf32}\MSBuild\Cosmos; + +; gac-ed assemblies: +Source: .\Build\VSIP\Cosmos.Build.Common.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "Cosmos.Build.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\Cosmos.Debug.Common.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "Cosmos.Debug.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\Cosmos.Compiler.Debug.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "Cosmos.Compiler.Debug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\Cosmos.Debug.VSDebugEngine.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "Cosmos.Debug.VSDebugEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\corapi.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "corapi, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ebb8d478f63174c0, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\raw.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "raw, Version=2.1.0.0, Culture=neutral, PublicKeyToken=ebb8d478f63174c0, ProcessorArchitecture=MSIL"; Flags: gacinstall +Source: .\Build\VSIP\Cosmos.VS.Package.dll; DestDir: {app}\Build\GAC; StrongAssemblyName: "Cosmos.VS.Package, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4d94ac959d59ec3, ProcessorArchitecture=MSIL"; Flags: gacinstall + +;Source: ".\Build\Tools\*"; DestDir: "{app}\Build\Tools"; Excludes: "*.log;*.asm;output.bin;output.o;output.obj;output.map;cosmos.iso"; Flags: recursesubdirs createallsubdirs; +;Source: ".\Build\VSIP\*"; DestDir: "{app}\Build\VSIP"; Excludes: "*.pkgdef"; Flags: recursesubdirs createallsubdirs; + + + +[Registry] +Root: HKLM; Subkey: Software\Microsoft\VisualStudio\9.0\InstalledProducts\Cosmos Visual Studio Integration Package; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\InstalledProducts\Cosmos Visual Studio Integration Package; ValueType: string; ValueName: ; ValueData: Cosmos Visual Studio Integration Package; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\InstalledProducts\Cosmos Visual Studio Integration Package; ValueType: dword; ValueName: UseRegNameAsSplashName; ValueData: $00000001; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\InstalledProducts\Cosmos Visual Studio Integration Package; ValueType: string; ValueName: ProductDetails; ValueData: www.gocosmos.org; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\InstalledProducts\Cosmos Visual Studio Integration Package; ValueType: string; ValueName: PID; ValueData: 1.0; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; Subkey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.VSProject, Cosmos.VS.Package, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4d94ac959d59ec3; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: InprocServer32; ValueData: C:\Windows\SYSTEM32\MSCOREE.DLL; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.VSProject; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: Assembly; ValueData: Cosmos.VS.Package, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4d94ac959d59ec3; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: dword; ValueName: ID; ValueData: $000003E9; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: MinEdition; ValueData: Standard; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: ProductVersion; ValueData: 1.0; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: ProductName; ValueData: Cosmos Visual Studio Integration Package; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Packages\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: string; ValueName: CompanyName; ValueData: Cosmos; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.BuildOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: InprocServer32; ValueData: C:\Windows\SYSTEM32\MSCOREE.DLL; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.BuildOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.VS.Package.dll; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{d33a2d29-c4fd-4e12-a510-4c01a14d63e1}; ValueType: string; ValueName: ThreadingModel; ValueData: Both; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.DebugOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: InprocServer32; ValueData: C:\Windows\SYSTEM32\MSCOREE.DLL; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.DebugOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.VS.Package.dll; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{39801176-289f-405f-9425-2931a2c03912}; ValueType: string; ValueName: ThreadingModel; ValueData: Both; Flags: uninsdeletevalue uninsdeletekeyifempty deletekey deletevalue; Languages: + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ; ValueData: Cosmos.VS.Package.VMOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: InprocServer32; ValueData: C:\Windows\SYSTEM32\MSCOREE.DLL; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: Class; ValueData: Cosmos.VS.Package.VMOptionsPropertyPage; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: CodeBase; ValueData: {app}\build\vsip\Cosmos.VS.Package.dll; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{3b72bb68-7363-45a2-9eba-55c8d5f36e36}; ValueType: string; ValueName: ThreadingModel; ValueData: Both; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: ; ValueData: VSProjectFactory; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: DisplayName; ValueData: Cosmos; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: DisplayProjectFileExtensions; ValueData: "Cosmos Project Files (*.Cosmos);*.Cosmos"; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: Package; ValueData: {{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: DefaultProjectExtension; ValueData: Cosmos; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: PossibleProjectExtensions; ValueData: Cosmos; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: ProjectTemplatesDir; ValueData: {app}\build\vsip\..\Templates\Projects\CosmosProject; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\Projects\{{471ec4bb-e47e-4229-a789-d1f5f83b52d4}; ValueType: string; ValueName: Language(VsTemplate); ValueData: CosmosProject; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}\/1; ValueType: string; ValueName: ; ValueData: Cosmos; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}\/1; ValueType: dword; ValueName: SortPriority; ValueData: $00000064; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\NewProjectTemplates\TemplateDirs\{{4cae44ed-88b9-4b7c-822b-b040f18fcee3}\/1; ValueType: string; ValueName: TemplatesDir; ValueData: {app}\build\vsip\..\Templates\Projects\CosmosProject; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: ; ValueData: guidCosmosDebugEngine; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: CLSID; ValueData: {{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: ProgramProvider; ValueData: {{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: dword; ValueName: Attach; ValueData: $00000001; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: dword; ValueName: AddressBP; ValueData: $00000000; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: dword; ValueName: AutoSelectPriority; ValueData: $00000004; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: dword; ValueName: CallstackBP; ValueData: $00000001; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: Name; ValueData: Cosmos Debug Engine; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: PortSupplier; ValueData: {{708C1ECA-FF48-11D2-904F-00C04FA302A1}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: guidCOMPlusNativeEng; ValueData: {{92EF0900-2251-11D2-B72E-0000F87572EF}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: guidCOMPlusOnlyEng; ValueData: {{449EC4CC-30D2-4032-9256-EE18EB41B62B}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: guidNativeOnlyEng; ValueData: {{449EC4CC-30D2-4032-9256-EE18EB41B62B}; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{{FA1DA3A6-66FF-4c65-B077-E65F7164EF83}; ValueType: string; ValueName: guidScriptEng; ValueData: {{F200A7E7-DEA5-11D0-B854-00A0244A1DE2}; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: Assembly; ValueData: Cosmos.Debug.VSDebugEngine; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: Class; ValueData: Cosmos.Debug.VSDebugEngine.AD7Engine; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: InprocServer32; ValueData: c:\windows\system32\mscoree.dll; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{8355452D-6D2F-41B0-89B8-BB2AA2529E94}; ValueType: string; ValueName: CodeBase; ValueData: {app}\Build\VSIP\Cosmos.Debug.VSDebugEngine.dll; Flags: uninsdeletevalue uninsdeletekeyifempty + +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: string; ValueName: Assembly; ValueData: Cosmos.Debug.VSDebugEngine; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: string; ValueName: Class; ValueData: Cosmos.Debug.VSDebugEngine.AD7ProgramProvider; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: string; ValueName: InprocServer32; ValueData: c:\windows\system32\mscoree.dll; Flags: uninsdeletevalue uninsdeletekeyifempty +Root: HKLM; SubKey: Software\Microsoft\VisualStudio\9.0\CLSID\{{B4DE9307-C062-45F1-B1AF-9A5FB25402D5}; ValueType: string; ValueName: CodeBase; ValueData: {app}\Build\VSIP\Cosmos.Debug.VSDebugEngine.dll; Flags: uninsdeletevalue uninsdeletekeyifempty + +; AssemblyFolder +Root: HKLM; SubKey: Software\Cosmos; ValueType: none; Flags: uninsdeletekey +Root: HKLM; SubKey: Software\Cosmos; ValueType: string; ValueName: ; ValueData: "{app}" diff --git a/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets b/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets index 050426322..25571b1b0 100644 --- a/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets +++ b/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets @@ -7,16 +7,22 @@ - $(Registry:HKEY_CURRENT_USER\Environment@Cosmos) + $(Registry:HKEY_LOCAL_MACHINE\Software\Cosmos) $(CosmosDir)\Build\Tools\Nasm\nasm.exe $(OutputPath)$(AssemblyName) $(FullAssemblyName).exe $(FullAssemblyName).iso + + + + + + diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/PathUtilities.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/PathUtilities.cs new file mode 100644 index 000000000..15c6afbb5 --- /dev/null +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/PathUtilities.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using Microsoft.Win32; + +namespace Cosmos.Debug.VSDebugEngine +{ + public static class PathUtilities + { + /// + /// Gets the root of the + /// + /// + public static string GetCosmosDir() + { + using(var xKey = Registry.LocalMachine.OpenSubKey("Software\\Cosmos")){ + return xKey.GetValue(null).ToString(); + } + //return Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(typeof(PathUtilities).Assembly.Location))); + } + + public static string GetBuildDir() + { + return Path.Combine(GetCosmosDir(), "Build"); + } + + public static string GetToolsDir() + { + return Path.Combine(GetBuildDir(), "Tools"); + } + + public static string GetQEmuDir() + { + return Path.Combine(GetToolsDir(), "qemu"); + } + + public static string GetVSIPDir() + { + return Path.Combine(GetBuildDir(), "VSIP"); + } + } +} \ No newline at end of file diff --git a/source2/Debug/Cosmos.Debug.VSRegister/Cosmos.Debug.VSRegister.csproj b/source2/Debug/Cosmos.Debug.VSRegister/Cosmos.Debug.VSRegister.csproj index 71bea4a9f..9dc7296e4 100644 --- a/source2/Debug/Cosmos.Debug.VSRegister/Cosmos.Debug.VSRegister.csproj +++ b/source2/Debug/Cosmos.Debug.VSRegister/Cosmos.Debug.VSRegister.csproj @@ -71,6 +71,7 @@ + diff --git a/source2/Debug/Cosmos.Debug.VSRegister/Program.cs b/source2/Debug/Cosmos.Debug.VSRegister/Program.cs index 184a9e5d8..84c73712c 100644 --- a/source2/Debug/Cosmos.Debug.VSRegister/Program.cs +++ b/source2/Debug/Cosmos.Debug.VSRegister/Program.cs @@ -4,61 +4,106 @@ using System.Linq; using System.Text; using Microsoft.Win32; using Cosmos.Debug.VSDebugEngine; +using System.IO; -namespace Cosmos.Debugger.VSRegister { +namespace Cosmos.Debugger.VSRegister +{ //Note - This can maybe be moved to the COM registration routine, except that it appears //the debugger does not have to be fully registered as a COM lib. But still this could //be moved somewhere else, maybe into the VSIP pkg, or install routine. - class Program { - static void Main(string[] args) { - Register(); - } + class Program + { + static void Main(string[] args) + { + Register(); + } - static protected string GuidStr(Type aType) { - return "{" + aType.GUID.ToString().ToUpper() + "}"; - } + static protected string GuidStr(Type aType) + { + return "{" + aType.GUID.ToString().ToUpper() + "}"; + } - static protected void RegisterCLSID(RegistryKey aKey, string aASMName, Type aType) { - var xKey = aKey.CreateSubKey(@"CLSID\" + GuidStr(aType)); - ////TODO: Extract from class directly - xKey.SetValue("Assembly", aASMName); - xKey.SetValue("Class", aType.FullName); - //TODO: Get windows system32 path from API - xKey.SetValue("InprocServer32", @"c:\windows\system32\mscoree.dll"); - xKey.SetValue("CodeBase", aType.Assembly.Location); - } + static protected void RegisterCLSID(TextWriter aOut, string aKey, string aASMName, Type aType) + { + var xKey = aKey + @"\CLSID\" + GuidStr(aType); + WriteKey(aOut, xKey); + ////TODO: Extract from class directly + WriteValue(aOut, "Assembly", aASMName); + WriteValue(aOut, "Class", aType.FullName); + //TODO: Get windows system32 path from API + WriteValue(aOut, "InprocServer32", @"c:\windows\system32\mscoree.dll"); + WriteValue(aOut, "CodeBase", aType.Assembly.Location); + } - static protected void RegisterRoot(RegistryKey aRootKey, string aVSVer) { - var xVSKey = aRootKey.OpenSubKey(@"Software\Microsoft\VisualStudio\" + aVSVer, true); - RegistryKey xKey; + private static void WriteKey(TextWriter aOut, string key) + { + aOut.WriteLine("[{0}]", key); + } - xKey = xVSKey.CreateSubKey(@"AD7Metrics\Engine"); - xKey = xKey.CreateSubKey("{" + AD7Engine.ID + "}"); - xKey.SetValue(null, "guidCosmosDebugEngine"); - xKey.SetValue("CLSID", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7Engine))); - xKey.SetValue("ProgramProvider", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider))); - xKey.SetValue("Attach", 1); - xKey.SetValue("AddressBP", 0); - xKey.SetValue("AutoSelectPriority", 4); - xKey.SetValue("CallstackBP", 1); - xKey.SetValue("Name", "Cosmos Debug Engine"); - // Default VS Port Supplier. I think we bypass this anyways? Or it reads from DebugEngine? - // I think the former - xKey.SetValue("PortSupplier", "{708C1ECA-FF48-11D2-904F-00C04FA302A1}"); + private static void WriteValue(TextWriter aOut, string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + name = "@"; + } + else + { + name = "\"" + name + "\""; + } + aOut.WriteLine("{0}=\"{1}\"", name, value.Replace("\\", "\\\\")); + } - xKey = xKey.CreateSubKey("IncompatibleList"); - xKey.SetValue("guidCOMPlusNativeEng", "{92EF0900-2251-11D2-B72E-0000F87572EF}"); - xKey.SetValue("guidCOMPlusOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); - xKey.SetValue("guidNativeOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); - xKey.SetValue("guidScriptEng", "{F200A7E7-DEA5-11D0-B854-00A0244A1DE2}"); + private static void WriteValue(TextWriter aOut, string name, int value) + { + if (String.IsNullOrEmpty(name)) + { + name = "@"; + } + else + { + name = "\"" + name + "\""; + } + aOut.WriteLine("{0}=dword:{1}", name, value.ToString("X8")); + } - RegisterCLSID(xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7Engine)); - RegisterCLSID(xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider)); - } + static protected void RegisterRoot(TextWriter aOut, string aRootKey, string aVSVer) + { + var xVSKey = aRootKey + "\\" + @"Software\Microsoft\VisualStudio\" + aVSVer; - static public void Register() { - RegisterRoot(Registry.LocalMachine, "9.0"); - RegisterRoot(Registry.CurrentUser, @"9.0Exp\Configuration"); - } + var xKey = xVSKey + @"\AD7Metrics\Engine"; + xKey += "\\{" + AD7Engine.ID + "}"; + WriteKey(aOut, xKey); + WriteValue(aOut, null, "guidCosmosDebugEngine"); + WriteValue(aOut, "CLSID", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7Engine))); + WriteValue(aOut, "ProgramProvider", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider))); + WriteValue(aOut, "Attach", 1); + WriteValue(aOut, "AddressBP", 0); + WriteValue(aOut, "AutoSelectPriority", 4); + WriteValue(aOut, "CallstackBP", 1); + WriteValue(aOut, "Name", "Cosmos Debug Engine"); + // Default VS Port Supplier. I think we bypass this anyways? Or it reads from DebugEngine? + // I think the former + WriteValue(aOut, "PortSupplier", "{708C1ECA-FF48-11D2-904F-00C04FA302A1}"); + + xKey = xKey + @"\IncompatibleList"; + WriteValue(aOut, "guidCOMPlusNativeEng", "{92EF0900-2251-11D2-B72E-0000F87572EF}"); + WriteValue(aOut, "guidCOMPlusOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); + WriteValue(aOut, "guidNativeOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); + WriteValue(aOut, "guidScriptEng", "{F200A7E7-DEA5-11D0-B854-00A0244A1DE2}"); + + RegisterCLSID(aOut, xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7Engine)); + RegisterCLSID(aOut, xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider)); + } + + static public void Register() + { + var xStreamWriter = Console.Out; + { + xStreamWriter.WriteLine("REGEDIT4"); + xStreamWriter.WriteLine(); + RegisterRoot(xStreamWriter, "HKEY_LOCAL_MACHINE", "9.0"); + RegisterRoot(xStreamWriter, "HKEY_CURRENT_USER", @"9.0Exp\Configuration"); + } + } } } diff --git a/source2/Debug/Cosmos.Debug.VSRegister/ProgramOld.cs b/source2/Debug/Cosmos.Debug.VSRegister/ProgramOld.cs new file mode 100644 index 000000000..12d2d05a5 --- /dev/null +++ b/source2/Debug/Cosmos.Debug.VSRegister/ProgramOld.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Win32; +using Cosmos.Debug.VSDebugEngine; + +namespace Cosmos.Debug.VSRegister +{ + class ProgramOld + { + static protected string GuidStr(Type aType) + { + return "{" + aType.GUID.ToString().ToUpper() + "}"; + } + + static protected void RegisterCLSID(RegistryKey aKey, string aASMName, Type aType) + { + var xKey = aKey.CreateSubKey(@"CLSID\" + GuidStr(aType)); + ////TODO: Extract from class directly + xKey.SetValue("Assembly", aASMName); + xKey.SetValue("Class", aType.FullName); + //TODO: Get windows system32 path from API + xKey.SetValue("InprocServer32", @"c:\windows\system32\mscoree.dll"); + xKey.SetValue("CodeBase", aType.Assembly.Location); + } + + static protected void RegisterRoot(RegistryKey aRootKey, string aVSVer) + { + var xVSKey = aRootKey.OpenSubKey(@"Software\Microsoft\VisualStudio\" + aVSVer, true); + RegistryKey xKey; + + xKey = xVSKey.CreateSubKey(@"AD7Metrics\Engine"); + xKey = xKey.CreateSubKey("{" + AD7Engine.ID + "}"); + xKey.SetValue(null, "guidCosmosDebugEngine"); + xKey.SetValue("CLSID", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7Engine))); + xKey.SetValue("ProgramProvider", GuidStr(typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider))); + xKey.SetValue("Attach", 1); + xKey.SetValue("AddressBP", 0); + xKey.SetValue("AutoSelectPriority", 4); + xKey.SetValue("CallstackBP", 1); + xKey.SetValue("Name", "Cosmos Debug Engine"); + // Default VS Port Supplier. I think we bypass this anyways? Or it reads from DebugEngine? + // I think the former + xKey.SetValue("PortSupplier", "{708C1ECA-FF48-11D2-904F-00C04FA302A1}"); + + xKey = xKey.CreateSubKey("IncompatibleList"); + xKey.SetValue("guidCOMPlusNativeEng", "{92EF0900-2251-11D2-B72E-0000F87572EF}"); + xKey.SetValue("guidCOMPlusOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); + xKey.SetValue("guidNativeOnlyEng", "{449EC4CC-30D2-4032-9256-EE18EB41B62B}"); + xKey.SetValue("guidScriptEng", "{F200A7E7-DEA5-11D0-B854-00A0244A1DE2}"); + + RegisterCLSID(xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7Engine)); + RegisterCLSID(xVSKey, "Cosmos.Debug.VSDebugEngine", typeof(Cosmos.Debug.VSDebugEngine.AD7ProgramProvider)); + } + + static public void Register() + { + + RegisterRoot(Registry.LocalMachine, "9.0"); + RegisterRoot(Registry.CurrentUser, @"9.0Exp\Configuration"); + } + } +} diff --git a/source2/VSIP/Cosmos.VS.Package/VSProject.cs b/source2/VSIP/Cosmos.VS.Package/VSProject.cs index 3ba0fda32..488214d7e 100644 --- a/source2/VSIP/Cosmos.VS.Package/VSProject.cs +++ b/source2/VSIP/Cosmos.VS.Package/VSProject.cs @@ -68,13 +68,14 @@ namespace Cosmos.VS.Package { // This is used in the MSBuild files to locate Cosmos tasks // Will likely be used by other things in the future as well private void SetCosmosVar() { - Trace.WriteLine("Todo: implement set cosmos var, or find something else for it.."); + // MtW: we can just use typeof(VSProject).Assembly.Location + //Trace.WriteLine("Todo: implement set cosmos var, or find something else for it.."); //string xPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //int xPos = xPath.LastIndexOf(@"\source2\", StringComparison.InvariantCultureIgnoreCase); //xPath = xPath.Substring(0, xPos); - var xPath = @"E:\Cosmos"; - System.Environment.SetEnvironmentVariable("Cosmos", xPath, EnvironmentVariableTarget.User); + // var xPath = @"E:\Cosmos"; + //System.Environment.SetEnvironmentVariable("Cosmos", xPath, EnvironmentVariableTarget.User); } /////////////////////////////////////////////////////////////////////////////