diff --git a/src/app/FakeLib/SquirrelHelper.fs b/src/app/FakeLib/SquirrelHelper.fs index afe712b4320..cd69fedd36f 100644 --- a/src/app/FakeLib/SquirrelHelper.fs +++ b/src/app/FakeLib/SquirrelHelper.fs @@ -26,6 +26,9 @@ type SquirrelParams = /// The full path to an optional icon, which will be used for the generated installer. SetupIcon : string option + /// Do not create an MSI file + NoMsi : bool + /// The path to Squirrel: `squirrel.exe` ToolPath : string @@ -50,6 +53,7 @@ type SquirrelParams = /// - `BootstrapperExe` - `None` /// - `LoadingGif` - `None` /// - `SetupIcon` - `None` +/// - `NoMsi` - `false` /// - `ToolPath` - The `squirrel.exe` path if it exists in a subdirectory of the current directory. /// - `TimeOut` - 10 minutes /// - `SignExecutable` - `None` @@ -63,6 +67,7 @@ let SquirrelDefaults = BootstrapperExe = None LoadingGif = None SetupIcon = None + NoMsi = false ToolPath = findToolInSubPath toolname (currentDirectory @@ "tools" @@ "Squirrel") TimeOut = TimeSpan.FromMinutes 10. SignExecutable = None @@ -84,6 +89,7 @@ let internal buildSquirrelArgs parameters nugetPackage = |> appendIfNotNullOrEmpty parameters.ReleaseDir "--releaseDir=" |> appendIfSome parameters.LoadingGif (sprintf "\"--loadingGif=%s\"") |> appendIfSome parameters.SetupIcon (sprintf "\"--setupIcon=%s\"") + |> appendIfTrue parameters.NoMsi "--no-msi" |> appendIfSome parameters.BootstrapperExe (sprintf "\"--bootstrapperExe=%s\"") |> appendIfSome parameters.SignExecutable (fun s -> createSigningArgs parameters) |> toText diff --git a/src/test/Test.FAKECore/SquirrelHelperSpec.cs b/src/test/Test.FAKECore/SquirrelHelperSpec.cs index 077a0725893..a2f9b87012c 100644 --- a/src/test/Test.FAKECore/SquirrelHelperSpec.cs +++ b/src/test/Test.FAKECore/SquirrelHelperSpec.cs @@ -35,6 +35,7 @@ internal class When_using_the_default_parameters It should_not_include_releasedir = () => Arguments.ShouldNotContain("--releaseDir="); It should_not_include_loading_gif = () => Arguments.ShouldNotContain("--loadingGif="); It should_not_include_setup_icon = () => Arguments.ShouldNotContain("--setupIcon="); + It should_not_include_nomsi = () => Arguments.ShouldNotContain("--no-msi"); It should_not_include_bootstrapper_exe = () => Arguments.ShouldNotContain("--bootstrapperExe="); } @@ -71,6 +72,14 @@ internal class When_specifying_setup_icon It should_include_setup_icon = () => Arguments.ShouldContain("--setupIcon=" + SetupIcon); } + internal class When_specifying_nomsi + : BuildArgumentsSpecsBase + { + Establish context = () => Parameters = Parameters.With(p => p.NoMsi, true); + + It should_include_nomsi = () => Arguments.ShouldContain("--no-msi"); + } + internal class When_specifying_bootstrapper_exe : BuildArgumentsSpecsBase {