Browse Source

Add start menu shortcut on installation

pull/2558/head
Andreas Weizel 4 years ago
parent
commit
59e1f8e64f
  1. 9
      ILSpy.Installer/setup.cs

9
ILSpy.Installer/setup.cs

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Linq;
using WixSharp;
@ -12,7 +13,7 @@ namespace ILSpy.Installer @@ -12,7 +13,7 @@ namespace ILSpy.Installer
Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories = true;
var project = new Project("ILSpy",
new Dir(@"%LocalAppData%\Programs\ILSpy",
new InstallDir(@"%LocalAppData%\Programs\ILSpy",
new DirFiles(@"ILSpy\bin\Release\net472\*.dll"),
new DirFiles(@"ILSpy\bin\Release\net472\*.exe"),
new DirFiles(@"ILSpy\bin\Release\net472\*.config"),
@ -24,6 +25,7 @@ namespace ILSpy.Installer @@ -24,6 +25,7 @@ namespace ILSpy.Installer
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,
@ -33,6 +35,11 @@ namespace ILSpy.Installer @@ -33,6 +35,11 @@ namespace ILSpy.Installer
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, "output", "ILSpy.msi"));
}
}

Loading…
Cancel
Save