mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Give wix absolute path to extensions
This commit is contained in:
@@ -429,8 +429,6 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
|
||||
return null;
|
||||
}
|
||||
|
||||
List<string> wixExtensions = ["WixToolset.UI.wixext"];
|
||||
|
||||
var shortcuts = GetShortcuts().ToHashSet();
|
||||
string title = GetEffectiveTitle();
|
||||
string authors = GetEffectiveAuthors();
|
||||
@@ -692,16 +690,13 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
|
||||
|
||||
progress(30);
|
||||
|
||||
Log.Info("Compiling WiX Template (dotnet build)");
|
||||
Log.Info("Compiling WiX Template");
|
||||
|
||||
foreach (var extension in wixExtensions) {
|
||||
//TODO: Should extensions be versioned independently?
|
||||
AddWixExtension(extension, HelperFile.WixVersion);
|
||||
}
|
||||
List<string> wixExtensions = [HelperFile.WixUiExtPath];
|
||||
|
||||
//When localization is supported in Velopack, we will need to add -culture here:
|
||||
//https://docs.firegiant.com/wix/tools/wixext/wixui/
|
||||
var buildCommand = $"{HelperFile.WixPath} build -platform {(packageAs64Bit ? "x64" : "x86")} -outputType Package -pdbType none {string.Join(" ", wixExtensions.Select(x => $"-ext {x}"))} -loc \"{localization}\" -out \"{msiFilePath}\" \"{wxs}\"";
|
||||
var buildCommand = $"\"{HelperFile.WixPath}\" build -platform {(packageAs64Bit ? "x64" : "x86")} -outputType Package -pdbType none {string.Join(" ", wixExtensions.Select(x => $"-ext \"{x}\""))} -loc \"{localization}\" -out \"{msiFilePath}\" \"{wxs}\"";
|
||||
|
||||
_ = Exe.RunHostedCommand(buildCommand);
|
||||
|
||||
@@ -715,13 +710,6 @@ public class WindowsPackCommandRunner : PackageBuilder<WindowsPackOptions>
|
||||
}
|
||||
}
|
||||
progress(100);
|
||||
|
||||
|
||||
static void AddWixExtension(string extension, string version)
|
||||
{
|
||||
var addCommand = $"{HelperFile.WixPath} extension add -g {extension}/{version}";
|
||||
_ = Exe.RunHostedCommand(addCommand);
|
||||
}
|
||||
}
|
||||
|
||||
protected override string[] GetMainExeSearchPaths(string packDirectory, string mainExeName)
|
||||
|
||||
@@ -69,6 +69,9 @@ public static class HelperFile
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static string WixPath => FindHelperFile($"wix\\{WixVersion}\\wix.exe");
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public static string WixUiExtPath => FindHelperFile($"wix\\{WixVersion}\\WixToolset.UI.wixext.dll");
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
public const string WixVersion = "5.0.2";
|
||||
|
||||
BIN
vendor/wix/5.0.2/WixToolset.UI.wixext.dll
vendored
Normal file
BIN
vendor/wix/5.0.2/WixToolset.UI.wixext.dll
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user