mirror of https://github.com/icsharpcode/ILSpy.git
8 changed files with 118 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||||||
|
{ |
||||||
|
"solution": { |
||||||
|
"path": "ILSpy.sln", |
||||||
|
"projects": [ |
||||||
|
"ICSharpCode.Decompiler.PdbProvider.Cecil\\ICSharpCode.Decompiler.PdbProvider.Cecil.csproj", |
||||||
|
"ICSharpCode.Decompiler.Tests\\ICSharpCode.Decompiler.Tests.csproj", |
||||||
|
"ICSharpCode.Decompiler\\ICSharpCode.Decompiler.csproj", |
||||||
|
"ILSpy.BamlDecompiler.Tests\\ILSpy.BamlDecompiler.Tests.csproj", |
||||||
|
"ILSpy.BamlDecompiler\\ILSpy.BamlDecompiler.csproj", |
||||||
|
"ILSpy.ReadyToRun\\ILSpy.ReadyToRun.csproj", |
||||||
|
"ILSpy.Tests\\ILSpy.Tests.csproj", |
||||||
|
"ILSpy\\ILSpy.csproj", |
||||||
|
"ILSpy.Installer\\ILSpy.Installer.csproj", |
||||||
|
"SharpTreeView\\ICSharpCode.TreeView.csproj", |
||||||
|
"TestPlugin\\TestPlugin.csproj" |
||||||
|
] |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using System; |
||||||
|
|
||||||
|
namespace ILSpy.Installer |
||||||
|
{ |
||||||
|
internal static class AppPackage |
||||||
|
{ |
||||||
|
public static Version Version = new Version("$INSERTVERSION$"); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||||
|
|
||||||
|
<PropertyGroup> |
||||||
|
<OutputType>Exe</OutputType> |
||||||
|
<TargetFramework>net472</TargetFramework> |
||||||
|
<StartupObject>ILSpy.Installer.Builder</StartupObject> |
||||||
|
</PropertyGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<PackageReference Include="WixSharp" Version="1.19.0" /> |
||||||
|
<PackageReference Include="WixSharp.wix.bin" Version="3.11.2" /> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
</Project> |
@ -0,0 +1,53 @@ |
|||||||
|
using System; |
||||||
|
using System.IO; |
||||||
|
using System.Linq; |
||||||
|
|
||||||
|
using WixSharp; |
||||||
|
|
||||||
|
namespace ILSpy.Installer |
||||||
|
{ |
||||||
|
internal class Builder |
||||||
|
{ |
||||||
|
static public void Main() |
||||||
|
{ |
||||||
|
Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories = true; |
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
var buildConfiguration = "Debug"; |
||||||
|
#else
|
||||||
|
var buildConfiguration = "Release"; |
||||||
|
#endif
|
||||||
|
var buildOutputDir = $@"ILSpy\bin\{buildConfiguration}\net472"; |
||||||
|
|
||||||
|
var project = new Project("ILSpy", |
||||||
|
new InstallDir(@"%LocalAppData%\Programs\ILSpy", |
||||||
|
new DirFiles(Path.Combine(buildOutputDir, "*.dll")), |
||||||
|
new DirFiles(Path.Combine(buildOutputDir, "*.exe")), |
||||||
|
new DirFiles(Path.Combine(buildOutputDir, "*.config")), |
||||||
|
new Files(Path.Combine(buildOutputDir, "ILSpy.resources.dll")), |
||||||
|
new Files(Path.Combine(buildOutputDir, "ILSpy.ReadyToRun.Plugin.resources.dll")))); |
||||||
|
|
||||||
|
project.GUID = new Guid("a12fdab1-731b-4a98-9749-d481ce8692ab"); |
||||||
|
project.Version = AppPackage.Version; |
||||||
|
project.SourceBaseDir = Path.GetDirectoryName(Environment.CurrentDirectory); |
||||||
|
project.InstallScope = InstallScope.perUser; |
||||||
|
project.InstallPrivileges = InstallPrivileges.limited; |
||||||
|
project.ControlPanelInfo.ProductIcon = @"..\ILSpy\Images\ILSpy.ico"; |
||||||
|
|
||||||
|
project.MajorUpgrade = new MajorUpgrade { |
||||||
|
Schedule = UpgradeSchedule.afterInstallInitialize, |
||||||
|
AllowSameVersionUpgrades = true, |
||||||
|
DowngradeErrorMessage = "A newer release of ILSpy is already installed on this system. Please uninstall it first to continue." |
||||||
|
}; |
||||||
|
|
||||||
|
project.UI = WUI.WixUI_ProgressOnly; |
||||||
|
|
||||||
|
project.ResolveWildCards().FindFile(f => f.Name.EndsWith("ILSpy.exe")).First() |
||||||
|
.Shortcuts = new[] { |
||||||
|
new FileShortcut("ILSpy", @"%ProgramMenu%") |
||||||
|
}; |
||||||
|
|
||||||
|
Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "wix", $"ILSpy-{AppPackage.Version}.msi")); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue