mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
--msi is now just a boolean flag now that we ask for runtime architecture
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Squirrel.CommandLine.Commands
|
||||
|
||||
public string AppIcon { get; private set; }
|
||||
|
||||
public string BuildMsi { get; private set; }
|
||||
public bool BuildMsi { get; private set; }
|
||||
|
||||
public string MsiVersion { get; private set; }
|
||||
|
||||
@@ -126,9 +126,8 @@ namespace Squirrel.CommandLine.Commands
|
||||
.RequiresExtension(".ico");
|
||||
|
||||
if (SquirrelRuntimeInfo.IsWindows) {
|
||||
|
||||
AddOption<string>((v) => BuildMsi = v, "--msi")
|
||||
.SetDescription("Compile a .msi machine-wide deployment tool with the specified bitness.")
|
||||
AddOption<bool>((v) => BuildMsi = v, "--msi")
|
||||
.SetDescription("Compile a .msi machine-wide deployment tool.")
|
||||
.SetArgumentHelpName("BITNESS");
|
||||
|
||||
AddOption<string>((v) => MsiVersion = v, "--msiVersion")
|
||||
|
||||
@@ -254,10 +254,9 @@ namespace Squirrel.CommandLine.Windows
|
||||
Log.Warn($"DEBUG OPTION: Setup bundle copied on top of '{options.DebugSetupExe}'. Recompile before creating a new bundle.");
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(options.BuildMsi)) {
|
||||
if (options.BuildMsi) {
|
||||
if (SquirrelRuntimeInfo.IsWindows) {
|
||||
bool x64 = options.BuildMsi.Equals("x64");
|
||||
var msiPath = createMsiPackage(targetSetupExe, bundledzp, x64, options.MsiVersion);
|
||||
var msiPath = createMsiPackage(targetSetupExe, bundledzp, options.TargetRuntime.Architecture == RuntimeCpu.x64, options.MsiVersion);
|
||||
setupFilesToSign.Add(msiPath);
|
||||
} else {
|
||||
Log.Warn("Unable to create MSI (only supported on windows).");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.NETCore.Platforms
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
// https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.NETCore.Platforms
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
@@ -193,19 +193,6 @@ namespace Squirrel.CommandLine.Tests.Commands
|
||||
//Assert.Equal(command.AppIcon, parseResult.Errors[0].SymbolResult?.Symbol.Parents.Single());
|
||||
Assert.Contains(file, parseResult.Errors[0].Message);
|
||||
}
|
||||
|
||||
[WindowsOnlyTheory]
|
||||
[InlineData("x86")]
|
||||
[InlineData("x64")]
|
||||
public void BuildMsi_WithBitness_ParsesValue(string bitness)
|
||||
{
|
||||
var command = new T();
|
||||
|
||||
string cli = GetRequiredDefaultOptions() + $"--msi \"{bitness}\"";
|
||||
ParseResult parseResult = command.ParseAndApply(cli);
|
||||
|
||||
Assert.Equal(bitness, command.BuildMsi);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReleasifyWindowsCommandTests : ReleaseCommandTests<ReleasifyWindowsCommand>
|
||||
|
||||
Reference in New Issue
Block a user