From 99814773d07bd06a9c30edbbabe15ba084b796ea Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Sat, 20 Nov 2021 01:14:56 +0100 Subject: [PATCH] Set up a MSI Builder project with WixSharp creating a basic installer --- .gitignore | 5 +- ILSpy.MsiBuilder/App.config | 6 + ILSpy.MsiBuilder/ILSpy.MsiBuilder.csproj | 82 ++++++++++++ ILSpy.MsiBuilder/Properties/AssemblyInfo.cs | 35 +++++ ILSpy.MsiBuilder/packages.config | 6 + ILSpy.MsiBuilder/setup.cs | 33 +++++ ILSpy.WithMsiBuilder.sln | 135 ++++++++++++++++++++ 7 files changed, 301 insertions(+), 1 deletion(-) create mode 100644 ILSpy.MsiBuilder/App.config create mode 100644 ILSpy.MsiBuilder/ILSpy.MsiBuilder.csproj create mode 100644 ILSpy.MsiBuilder/Properties/AssemblyInfo.cs create mode 100644 ILSpy.MsiBuilder/packages.config create mode 100644 ILSpy.MsiBuilder/setup.cs create mode 100644 ILSpy.WithMsiBuilder.sln diff --git a/.gitignore b/.gitignore index daa771ef3..d7c7919a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ bin/ obj/ +packages/ AppPackages/ BundleArtifacts/ /ICSharpCode.Decompiler/Properties/AssemblyInfo.cs @@ -18,4 +19,6 @@ _ReSharper*/ /ICSharpCode.Decompiler.Tests/TestCases/Correctness/*.exe /ICSharpCode.Decompiler.Tests/TestCases/Correctness/*.exe.config /ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec -multitargeting.props \ No newline at end of file +multitargeting.props +ILSpy.MsiBuilder/wix/*.g.wxs +ILSpy.MsiBuilder/output/ diff --git a/ILSpy.MsiBuilder/App.config b/ILSpy.MsiBuilder/App.config new file mode 100644 index 000000000..ecdcf8a54 --- /dev/null +++ b/ILSpy.MsiBuilder/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/ILSpy.MsiBuilder/ILSpy.MsiBuilder.csproj b/ILSpy.MsiBuilder/ILSpy.MsiBuilder.csproj new file mode 100644 index 000000000..b6f72f5a3 --- /dev/null +++ b/ILSpy.MsiBuilder/ILSpy.MsiBuilder.csproj @@ -0,0 +1,82 @@ + + + + + Debug + AnyCPU + {A4BA0771-DA4A-4A94-A5EC-5BA10B52816F} + Exe + ILSpy.MsiBuilder + ILSpy.MsiBuilder + v4.7.2 + 512 + true + true + + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\WixSharp.bin.1.19.0\lib\BootstrapperCore.dll + + + ..\packages\WixSharp.bin.1.19.0\lib\Microsoft.Deployment.WindowsInstaller.dll + + + + + + + + + + + ..\packages\WixSharp.bin.1.19.0\lib\WixSharp.dll + + + ..\packages\WixSharp.bin.1.19.0\lib\WixSharp.Msi.dll + + + ..\packages\WixSharp.bin.1.19.0\lib\WixSharp.UI.dll + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/ILSpy.MsiBuilder/Properties/AssemblyInfo.cs b/ILSpy.MsiBuilder/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ed190e620 --- /dev/null +++ b/ILSpy.MsiBuilder/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +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("ILSpy MSI Builder")] +[assembly: AssemblyDescription("MSI Package Builder for ILSpy")] +[assembly: AssemblyCompany("ic#code")] +[assembly: AssemblyProduct("ILSpy")] +[assembly: AssemblyCopyright("Copyright 2011-2021 AlphaSierraPapa for the SharpDevelop Team")] +[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("a4ba0771-da4a-4a94-a5ec-5ba10b52816f")] + +// 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/ILSpy.MsiBuilder/packages.config b/ILSpy.MsiBuilder/packages.config new file mode 100644 index 000000000..65a770361 --- /dev/null +++ b/ILSpy.MsiBuilder/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ILSpy.MsiBuilder/setup.cs b/ILSpy.MsiBuilder/setup.cs new file mode 100644 index 000000000..2af841913 --- /dev/null +++ b/ILSpy.MsiBuilder/setup.cs @@ -0,0 +1,33 @@ +using System; +using System.IO; + +using WixSharp; + +namespace ILSpy.MsiBuilder +{ + internal class MsiBuilder + { + static public void Main() + { + Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories = true; + + var project = new Project("ILSpy", + new Dir(@"%LocalAppData%\Programs\ILSpy", + new DirFiles(@"ILSpy\bin\Release\net472\*.dll"), + new DirFiles(@"ILSpy\bin\Release\net472\*.exe"), + new DirFiles(@"ILSpy\bin\Release\net472\*.config"), + new Files(@"ILSpy\bin\Release\net472\ILSpy.resources.dll"), + new Files(@"ILSpy\bin\Release\net472\ILSpy.ReadyToRun.Plugin.resources.dll"))); + + project.GUID = new Guid("a12fdab1-731b-4a98-9749-d481ce8692ab"); + project.Version = new Version("1.0.0.0"); + project.SourceBaseDir = Path.GetDirectoryName(Environment.CurrentDirectory); + project.InstallScope = InstallScope.perUser; + project.InstallPrivileges = InstallPrivileges.limited; + + project.UI = WUI.WixUI_Minimal; + + Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "output", "ILSpy.msi")); + } + } +} diff --git a/ILSpy.WithMsiBuilder.sln b/ILSpy.WithMsiBuilder.sln new file mode 100644 index 000000000..a217c60d3 --- /dev/null +++ b/ILSpy.WithMsiBuilder.sln @@ -0,0 +1,135 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31912.275 +MinimumVisualStudioVersion = 15.0 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E72-4000-B5AD-3A7B485A0896}" + ProjectSection(SolutionItems) = preProject + doc\Command Line.txt = doc\Command Line.txt + doc\ILAst.txt = doc\ILAst.txt + doc\IntPtr.txt = doc\IntPtr.txt + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy", "ILSpy\ILSpy.csproj", "{1E85EFF9-E370-4683-83E4-8A3D063FF791}" + ProjectSection(ProjectDependencies) = postProject + {984CC812-9470-4A13-AFF9-CC44068D666C} = {984CC812-9470-4A13-AFF9-CC44068D666C} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler", "ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj", "{984CC812-9470-4A13-AFF9-CC44068D666C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.Tests", "ICSharpCode.Decompiler.Tests\ICSharpCode.Decompiler.Tests.csproj", "{FEC0DA52-C4A6-4710-BE36-B484A20C5E22}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestPlugin", "TestPlugin\TestPlugin.csproj", "{F32EBCC8-0E53-4421-867E-05B3D6E10C70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.BamlDecompiler", "ILSpy.BamlDecompiler\ILSpy.BamlDecompiler.csproj", "{A6BAD2BA-76BA-461C-8B6D-418607591247}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.BamlDecompiler.Tests", "ILSpy.BamlDecompiler.Tests\ILSpy.BamlDecompiler.Tests.csproj", "{1169E6D1-1899-43D4-A500-07CE4235B388}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.AddIn", "ILSpy.AddIn\ILSpy.AddIn.csproj", "{9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}" + ProjectSection(ProjectDependencies) = postProject + {0313F581-C63B-43BB-AA9B-07615DABD8A3} = {0313F581-C63B-43BB-AA9B-07615DABD8A3} + {A6BAD2BA-76BA-461C-8B6D-418607591247} = {A6BAD2BA-76BA-461C-8B6D-418607591247} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.PdbProvider.Cecil", "ICSharpCode.Decompiler.PdbProvider.Cecil\ICSharpCode.Decompiler.PdbProvider.Cecil.csproj", "{B85A155A-9DD6-43BC-A624-2D8EC773D71F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.Tests", "ILSpy.Tests\ILSpy.Tests.csproj", "{B51C6636-B8D1-4200-9869-08F2689DE6C2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.ReadyToRun", "ILSpy.ReadyToRun\ILSpy.ReadyToRun.csproj", "{0313F581-C63B-43BB-AA9B-07615DABD8A3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.Console", "ICSharpCode.Decompiler.Console\ICSharpCode.Decompiler.Console.csproj", "{743B439A-E7AD-4A0A-BAB6-222E1EA83C6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.PowerShell", "ICSharpCode.Decompiler.PowerShell\ICSharpCode.Decompiler.PowerShell.csproj", "{50060E0C-FA25-41F4-B72F-8490324EC9F0}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ILSpy.AddIn.Shared", "ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.shproj", "{ACAB1E5D-B3DF-4092-AA72-692F8341E520}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.AddIn.VS2022", "ILSpy.AddIn.VS2022\ILSpy.AddIn.VS2022.csproj", "{09A03980-D14A-4705-A38C-741AD7166DEE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy.MsiBuilder", "ILSpy.MsiBuilder\ILSpy.MsiBuilder.csproj", "{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}" + ProjectSection(ProjectDependencies) = postProject + {0313F581-C63B-43BB-AA9B-07615DABD8A3} = {0313F581-C63B-43BB-AA9B-07615DABD8A3} + {A6BAD2BA-76BA-461C-8B6D-418607591247} = {A6BAD2BA-76BA-461C-8B6D-418607591247} + {1E85EFF9-E370-4683-83E4-8A3D063FF791} = {1E85EFF9-E370-4683-83E4-8A3D063FF791} + EndProjectSection +EndProject +Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{09a03980-d14a-4705-a38c-741ad7166dee}*SharedItemsImports = 5 + ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{9d7be6c0-b7b3-4a50-a54e-18a2d84a3384}*SharedItemsImports = 5 + ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{acab1e5d-b3df-4092-aa72-692f8341e520}*SharedItemsImports = 13 + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|Any CPU.Build.0 = Release|Any CPU + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.Build.0 = Release|Any CPU + {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.Build.0 = Release|Any CPU + {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|Any CPU.Build.0 = Release|Any CPU + {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|Any CPU.Build.0 = Release|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.Build.0 = Release|Any CPU + {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|Any CPU.Build.0 = Release|Any CPU + {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.Build.0 = Release|Any CPU + {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|Any CPU.Build.0 = Release|Any CPU + {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|Any CPU.Build.0 = Release|Any CPU + {0313F581-C63B-43BB-AA9B-07615DABD8A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0313F581-C63B-43BB-AA9B-07615DABD8A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0313F581-C63B-43BB-AA9B-07615DABD8A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0313F581-C63B-43BB-AA9B-07615DABD8A3}.Release|Any CPU.Build.0 = Release|Any CPU + {743B439A-E7AD-4A0A-BAB6-222E1EA83C6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {743B439A-E7AD-4A0A-BAB6-222E1EA83C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {743B439A-E7AD-4A0A-BAB6-222E1EA83C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {743B439A-E7AD-4A0A-BAB6-222E1EA83C6D}.Release|Any CPU.Build.0 = Release|Any CPU + {50060E0C-FA25-41F4-B72F-8490324EC9F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50060E0C-FA25-41F4-B72F-8490324EC9F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50060E0C-FA25-41F4-B72F-8490324EC9F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50060E0C-FA25-41F4-B72F-8490324EC9F0}.Release|Any CPU.Build.0 = Release|Any CPU + {09A03980-D14A-4705-A38C-741AD7166DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09A03980-D14A-4705-A38C-741AD7166DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09A03980-D14A-4705-A38C-741AD7166DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09A03980-D14A-4705-A38C-741AD7166DEE}.Release|Any CPU.Build.0 = Release|Any CPU + {A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C764218F-7633-4412-923D-558CE7EE0560} + EndGlobalSection +EndGlobal