From 4a75a7476991be513bfbe70c086f05ab8d2e004c Mon Sep 17 00:00:00 2001 From: Daniel Siegl <41949368+danielsiegl@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:09:50 +0100 Subject: [PATCH] Enhanced existing installer to support EA 64Bit. (#5) Add support for EA 64Bit to installer --- .github/workflows/Build.yml | 20 ++- .gitignore | 5 + MTIP.sln | 6 + MTIPInstaller/MTIPInstaller.vdproj | 204 ++++++++++++++++++++++--- RegAsmProxy/App.config | 6 + RegAsmProxy/Program.cs | 51 +++++++ RegAsmProxy/Properties/AssemblyInfo.cs | 36 +++++ RegAsmProxy/RegAsmProxy.csproj | 54 +++++++ RegAsmProxy/RegAsmProxy.csproj.user | 6 + 9 files changed, 359 insertions(+), 29 deletions(-) create mode 100644 RegAsmProxy/App.config create mode 100644 RegAsmProxy/Program.cs create mode 100644 RegAsmProxy/Properties/AssemblyInfo.cs create mode 100644 RegAsmProxy/RegAsmProxy.csproj create mode 100644 RegAsmProxy/RegAsmProxy.csproj.user diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index d0b1e0a..412dc05 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -5,8 +5,8 @@ name: Build MTIP.sln on: [push] env: - VisualStudioPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe - DisableOutOfProcPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\ + VisualStudioPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe + DisableOutOfProcPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild\ jobs: build: runs-on: [self-hosted, ea] @@ -30,11 +30,21 @@ jobs: run: .\DisableOutOfProcBuild.exe #wait 60 seconds as the devenv build is asyncronous + #sadly this is not really stable and will fail on the agent currently - name: Build Setup with Devenv run: | - &"${{env.VisualStudioPath}}" ".\MTIP.sln" /Build "Release|Any CPU" /out out2.log - Start-Sleep -Seconds 60 - type out2.log + $file = "out.log" + &"${{env.VisualStudioPath}}" ".\MTIPInstaller\MTIPInstaller.vdproj" /Build "Release|Any CPU" /out $file + Start-Sleep -Seconds 30 + if ([System.IO.File]::Exists($file)) + { + echo "Seems to have worked" + type $file + } + else + { + echo "creating the setup on the agent failed" + } - name: Publish Binary Artifact uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index e340492..589c747 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ .vs/**/*.* MTIP/obj/**/*.* MTIP/bin/**/*.* +RegAsmProxy/obj/**/*.* +RegAsmProxy/bin/**/*.* +MTIPInstaller/Debug/**/*.* +MTIPInstaller/Release/**/*.* + diff --git a/MTIP.sln b/MTIP.sln index a1f0812..060c1a7 100644 --- a/MTIP.sln +++ b/MTIP.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTIP", "MTIP\MTIP.csproj", EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "MTIPInstaller", "MTIPInstaller\MTIPInstaller.vdproj", "{A1D16950-6FFB-4B23-9AA6-E95F5B1DD65B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegAsmProxy", "RegAsmProxy\RegAsmProxy.csproj", "{FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {A1D16950-6FFB-4B23-9AA6-E95F5B1DD65B}.Debug|Any CPU.Build.0 = Debug {A1D16950-6FFB-4B23-9AA6-E95F5B1DD65B}.Release|Any CPU.ActiveCfg = Release {A1D16950-6FFB-4B23-9AA6-E95F5B1DD65B}.Release|Any CPU.Build.0 = Release + {FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/MTIPInstaller/MTIPInstaller.vdproj b/MTIPInstaller/MTIPInstaller.vdproj index 3c18d62..240ffdf 100644 --- a/MTIPInstaller/MTIPInstaller.vdproj +++ b/MTIPInstaller/MTIPInstaller.vdproj @@ -13,6 +13,18 @@ "SccProvider" = "8:" "Hierarchy" { + "Entry" + { + "MsmKey" = "8:_00449A6B8FEF41F6AF686D734B9D5D9C" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_0D7613BF9C8D2307922F5A554F076A2E" + "OwnerKey" = "8:_0E2200DEA6714C16ACB8140497B114F5" + "MsmSig" = "8:_UNDEFINED" + } "Entry" { "MsmKey" = "8:_0E2200DEA6714C16ACB8140497B114F5" @@ -27,8 +39,8 @@ } "Entry" { - "MsmKey" = "8:_8144FFA0E3804774DF39636F148BEE99" - "OwnerKey" = "8:_0E2200DEA6714C16ACB8140497B114F5" + "MsmKey" = "8:_6B0FC6FE6D3ADA3E9FD5453D6947DE06" + "OwnerKey" = "8:_00449A6B8FEF41F6AF686D734B9D5D9C" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -40,6 +52,12 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_00449A6B8FEF41F6AF686D734B9D5D9C" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_6B0FC6FE6D3ADA3E9FD5453D6947DE06" "MsmSig" = "8:_UNDEFINED" } @@ -115,6 +133,36 @@ { "CustomAction" { + "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_0AB61E6AAFCC43D8A5311A556EC85924" + { + "Name" = "8:Primary output from RegAsmProxy (Active)" + "Condition" = "8:" + "Object" = "8:_00449A6B8FEF41F6AF686D734B9D5D9C" + "FileType" = "3:2" + "InstallAction" = "3:4" + "Arguments" = "8:/u '[TARGETDIR]\\MTIP.dll' /codebase" + "EntryPoint" = "8:" + "Sequence" = "3:1" + "Identifier" = "8:_589DADB5_C3B8_4FBE_A33A_8223E3CD6F34" + "InstallerClass" = "11:FALSE" + "CustomActionData" = "8:" + "Run64Bit" = "11:TRUE" + } + "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_6662C253DD7148B79F846C858F3C5D86" + { + "Name" = "8:Primary output from RegAsmProxy (Active)" + "Condition" = "8:" + "Object" = "8:_00449A6B8FEF41F6AF686D734B9D5D9C" + "FileType" = "3:2" + "InstallAction" = "3:1" + "Arguments" = "8:'[TARGETDIR]\\MTIP.dll' /codebase" + "EntryPoint" = "8:" + "Sequence" = "3:1" + "Identifier" = "8:_3A95127D_837B_4BDA_ABD9_E78DB63C758C" + "InstallerClass" = "11:FALSE" + "CustomActionData" = "8:" + "Run64Bit" = "11:TRUE" + } } "DefaultFeature" { @@ -138,21 +186,10 @@ } "File" { - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6B0FC6FE6D3ADA3E9FD5453D6947DE06" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_0D7613BF9C8D2307922F5A554F076A2E" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" - "ScatterAssemblies" - { - "_6B0FC6FE6D3ADA3E9FD5453D6947DE06" - { - "Name" = "8:System.Net.Http.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:System.Net.Http.dll" - "TargetName" = "8:" + "SourcePath" = "8:MTIP.tlb" + "TargetName" = "8:MTIP.tlb" "Tag" = "8:" "Folder" = "8:_2EE99A1C9DEA4016A69E87866A364607" "Condition" = "8:" @@ -169,10 +206,21 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8144FFA0E3804774DF39636F148BEE99" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6B0FC6FE6D3ADA3E9FD5453D6947DE06" { - "SourcePath" = "8:MTIP.tlb" - "TargetName" = "8:MTIP.tlb" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + "ScatterAssemblies" + { + "_6B0FC6FE6D3ADA3E9FD5453D6947DE06" + { + "Name" = "8:System.Net.Http.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:System.Net.Http.dll" + "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_2EE99A1C9DEA4016A69E87866A364607" "Condition" = "8:" @@ -184,7 +232,7 @@ "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" - "Register" = "3:2" + "Register" = "3:1" "Exclude" = "11:FALSE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" @@ -206,6 +254,50 @@ { } } + "{1525181F-901A-416C-8A58-119130FE478E}:_1678A3BB34AE4706BE6C1EBAFE8E12A3" + { + "Name" = "8:#1924" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:WindowsFolder" + "Folders" + { + "{9EF0B969-E518-4E46-987F-47570745A589}:_4D4D9956600A492BB3FC8F53C5B33F30" + { + "Name" = "8:Microsoft.NET" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_0AFA72AA9A9F4AB5BB3B9040CC58BF00" + "Folders" + { + "{9EF0B969-E518-4E46-987F-47570745A589}:_D3653408EFC34740AA55C2BD6DA45BB6" + { + "Name" = "8:Framework64" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_CD8B78C7D93F4017BE63FFEFFC3B30A9" + "Folders" + { + "{9EF0B969-E518-4E46-987F-47570745A589}:_7B5A4993E60845C0AD58408124423608" + { + "Name" = "8:v4.0.30319" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_A362470769D948D29FC0AAF8DB66B770" + "Folders" + { + } + } + } + } + } + } + } + } "{3C67513D-01DD-4637-8A68-80971EB9504F}:_2EE99A1C9DEA4016A69E87866A364607" { "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" @@ -239,14 +331,14 @@ "MsiBootstrapper" { "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" + "RequiresElevation" = "11:TRUE" } "Product" { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:MTIP" "ProductCode" = "8:{1156D7CC-3C58-40CB-9C8D-CC99A4FB548E}" - "PackageCode" = "8:{597EE2FB-18FB-4C85-AD56-97CE70DF2A3E}" + "PackageCode" = "8:{3281001B-44A2-4B0C-91AC-8D3C0F79B142}" "UpgradeCode" = "8:{23596B83-2DEF-4D33-BF75-C0D69956284A}" "AspNetVersion" = "8:2.0.50727.0" "RestartWWWService" = "11:FALSE" @@ -348,8 +440,8 @@ { "Name" = "8:EAAddins" "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" + "AlwaysCreate" = "11:TRUE" + "DeleteAtUninstall" = "11:TRUE" "Transitive" = "11:FALSE" "Keys" { @@ -380,6 +472,42 @@ { } } + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_BA4D94DF9648446D8CB88D6423CF4520" + { + "Name" = "8:EAAddins64" + "Condition" = "8:" + "AlwaysCreate" = "11:TRUE" + "DeleteAtUninstall" = "11:TRUE" + "Transitive" = "11:FALSE" + "Keys" + { + "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_4495FA5030E04C0785715C22D42E6D46" + { + "Name" = "8:MTIP" + "Condition" = "8:" + "AlwaysCreate" = "11:FALSE" + "DeleteAtUninstall" = "11:FALSE" + "Transitive" = "11:FALSE" + "Keys" + { + } + "Values" + { + "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_37DE56706C574B02B5D5990935E4C01C" + { + "Name" = "8:" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "ValueTypes" = "3:1" + "Value" = "8:MTIP.MTIP" + } + } + } + } + "Values" + { + } + } } "Values" { @@ -815,6 +943,34 @@ } "ProjectOutput" { + "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_00449A6B8FEF41F6AF686D734B9D5D9C" + { + "SourcePath" = "8:..\\RegAsmProxy\\obj\\Debug\\RegAsmProxy.exe" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_2EE99A1C9DEA4016A69E87866A364607" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + "ProjectOutputGroupRegister" = "3:1" + "OutputConfiguration" = "8:" + "OutputGroupCanonicalName" = "8:Built" + "OutputProjectGuid" = "8:{FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4}" + "ShowKeyOutput" = "11:TRUE" + "ExcludeFilters" + { + } + } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_0E2200DEA6714C16ACB8140497B114F5" { "SourcePath" = "8:..\\MTIP\\obj\\Debug\\MTIP.dll" diff --git a/RegAsmProxy/App.config b/RegAsmProxy/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/RegAsmProxy/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/RegAsmProxy/Program.cs b/RegAsmProxy/Program.cs new file mode 100644 index 0000000..51eb83e --- /dev/null +++ b/RegAsmProxy/Program.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace RegAsmProxy +{ + class Program + { + const string Regasm32 = @"c:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe"; + const string Regasm64 = @"c:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe"; + + static void Main(string[] args) + { + //This is required to get proper "" around the filename - if I specify them in the custom action they got lost. + string fullParams = string.Join(" ", args).Replace("'","\""); + + Run(Regasm32, fullParams); + Run(Regasm64, fullParams); + } + + private static void Run(string toolPath, string paramString) + { + + if (File.Exists(toolPath)) + { + var proc = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = toolPath, + Arguments = paramString, + UseShellExecute = false, + RedirectStandardOutput = true, + CreateNoWindow = false + } + }; + proc.Start(); + while (!proc.StandardOutput.EndOfStream) + { + string line = proc.StandardOutput.ReadLine(); + Debug.WriteLine(line); + } + } + } + } +} diff --git a/RegAsmProxy/Properties/AssemblyInfo.cs b/RegAsmProxy/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..22e12cc --- /dev/null +++ b/RegAsmProxy/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("RegAsmProxy")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RegAsmProxy")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ff50ba01-4b0b-4dcf-ac88-4f773f8fcfd4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RegAsmProxy/RegAsmProxy.csproj b/RegAsmProxy/RegAsmProxy.csproj new file mode 100644 index 0000000..4713b1a --- /dev/null +++ b/RegAsmProxy/RegAsmProxy.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {FF50BA01-4B0B-4DCF-AC88-4F773F8FCFD4} + Exe + RegAsmProxy + RegAsmProxy + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/RegAsmProxy/RegAsmProxy.csproj.user b/RegAsmProxy/RegAsmProxy.csproj.user new file mode 100644 index 0000000..65e9741 --- /dev/null +++ b/RegAsmProxy/RegAsmProxy.csproj.user @@ -0,0 +1,6 @@ + + + + /u %27C:\GitHub\mtip-sparx\MTIP\bin\Debug\MTIP.dll%27 /codebase + + \ No newline at end of file