mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
Update to _wix4 packages for installer
This commit is contained in:
@@ -46,6 +46,9 @@ jobs:
|
||||
- name: Install dotnet-format
|
||||
run: dotnet tool install -g dotnet-format --version "8.3.546805" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
|
||||
|
||||
- name: Install wix (locked version)
|
||||
run: dotnet tool install --global wix --version 6.0.0
|
||||
|
||||
- name: Get Version
|
||||
id: version
|
||||
shell: pwsh
|
||||
|
||||
@@ -15,10 +15,21 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixSharp" Version="1.26.0" />
|
||||
<PackageReference Include="WixSharp.wix.bin" Version="3.14.1" />
|
||||
<None Remove="*.msi" />
|
||||
<None Remove="*.exe" />
|
||||
<None Remove="*.wxs" />
|
||||
<None Remove="*.wixpdb" />
|
||||
<None Remove="*.wixobj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixSharp_wix4" Version="2.6.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="cd .\
set ide=true
"$(TargetPath)"" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Building the Installer
|
||||
|
||||
## Dependencies
|
||||
|
||||
See https://github.com/oleg-shilo/wixsharp/wiki#dependencies
|
||||
|
||||
```
|
||||
dotnet tool install --global wix
|
||||
```
|
||||
|
||||
GitHub runners installed software https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md at time
|
||||
of writing WiX Toolset 3.14.1.8722
|
||||
|
||||
|
||||
## ILSpy Binaries
|
||||
|
||||
It is mandatory to first publish(.ps1) the respective target platforms, then setup can be built, eg
|
||||
|
||||
```
|
||||
|
||||
@@ -45,8 +45,7 @@ namespace ILSpy.Installer
|
||||
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.Scope = InstallScope.perUser;
|
||||
project.ControlPanelInfo.ProductIcon = @"..\ILSpy\Images\ILSpy.ico";
|
||||
project.ControlPanelInfo.Manufacturer = "ICSharpCode Team";
|
||||
project.LocalizationFile = Path.Combine(Environment.CurrentDirectory, "winui.wxl");
|
||||
@@ -71,41 +70,7 @@ namespace ILSpy.Installer
|
||||
new FileShortcut("ILSpy", @"%ProgramMenu%")
|
||||
};
|
||||
|
||||
Compiler.WixLocation = GetWixBinLocationForPackage();
|
||||
Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "wix", $"ILSpy-{AppPackage.Version}-{buildPlatform}.msi"));
|
||||
}
|
||||
|
||||
// Copied from https://github.com/oleg-shilo/wixsharp/blob/c4f8615ce8e47c7162edb30656669d0d326f79ff/Source/src/WixSharp/Utilities/WixBinLocator.cs#L117
|
||||
private static string GetWixBinLocationForPackage()
|
||||
{
|
||||
//The global packages may be redirected with environment variable
|
||||
//https://docs.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
|
||||
|
||||
string wixBinPackageDir;
|
||||
var nugetPackagesEnvironmentVariable = Environment.GetEnvironmentVariable("NUGET_PACKAGES");
|
||||
if (nugetPackagesEnvironmentVariable.IsNotEmpty() && Directory.Exists(nugetPackagesEnvironmentVariable))
|
||||
{
|
||||
wixBinPackageDir = Path.Combine(nugetPackagesEnvironmentVariable, "wixsharp.wix.bin");
|
||||
}
|
||||
else
|
||||
{
|
||||
wixBinPackageDir = @"%userprofile%\.nuget\packages\wixsharp.wix.bin".ExpandEnvVars();
|
||||
}
|
||||
|
||||
if (Directory.Exists(wixBinPackageDir))
|
||||
{
|
||||
Version greatestWixBinVersion = System.IO.Directory.GetDirectories(wixBinPackageDir)
|
||||
.Select(dirPath => new Version(dirPath.PathGetFileName()))
|
||||
.OrderDescending()
|
||||
.FirstOrDefault();
|
||||
|
||||
if (greatestWixBinVersion != null)
|
||||
{
|
||||
return wixBinPackageDir.PathJoin(greatestWixBinVersion.ToString(), @"tools\bin");
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<WixLocalization Culture="en-US" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="VerifyReadyDlgInstallText" Overridable="yes">Click Install to begin the installation. Click Cancel to exit the wizard.
|
||||
|
||||
|
||||
ILSpy will be installed for current user into following directory:
|
||||
|
||||
[INSTALLDIR]
|
||||
</String>
|
||||
<WixLocalization Culture="en-US" xmlns="http://wixtoolset.org/schemas/v4/wxl">
|
||||
<String Id="VerifyReadyDlgInstallText" Overridable="yes" Value="Click Install to begin the installation. Click Cancel to exit the wizard.
	
	ILSpy will be installed for current user into following directory:
	
	[INSTALLDIR]"></String>
|
||||
</WixLocalization>
|
||||
Reference in New Issue
Block a user