diff --git a/src/WingetCreateCLI/Commands/NewCommand.cs b/src/WingetCreateCLI/Commands/NewCommand.cs index 93670c72..0a0b12be 100644 --- a/src/WingetCreateCLI/Commands/NewCommand.cs +++ b/src/WingetCreateCLI/Commands/NewCommand.cs @@ -386,8 +386,7 @@ private static void PromptInstallerProperties(T manifest, PropertyInfo proper } } - PromptForPortableAliasIfApplicable(installer); - + PromptForPortableFieldsIfApplicable(installer); foreach (var requiredProperty in requiredInstallerProperties) { var currentValue = requiredProperty.GetValue(installer); @@ -447,7 +446,7 @@ private static void PromptInstallerSwitchesForExe(T manifestInstaller) } } - private static void PromptForPortableAliasIfApplicable(Installer installer) + private static void PromptForPortableFieldsIfApplicable(Installer installer) { if (installer.InstallerType == InstallerType.Portable) { @@ -468,6 +467,12 @@ private static void PromptForPortableAliasIfApplicable(Installer installer) { installer.NestedInstallerFiles.First().PortableCommandAlias = portableCommandAlias.Trim(); } + + // No need to set explicitly in else case as WinGet CLI defaults to using false + if (Prompt.Confirm(Resources.ConfirmZippedBinary_Message)) + { + installer.ArchiveBinariesDependOnPath = true; + } } } diff --git a/src/WingetCreateCLI/Properties/Resources.Designer.cs b/src/WingetCreateCLI/Properties/Resources.Designer.cs index 5010840b..5e7fb4b1 100644 --- a/src/WingetCreateCLI/Properties/Resources.Designer.cs +++ b/src/WingetCreateCLI/Properties/Resources.Designer.cs @@ -393,6 +393,15 @@ public static string ConfirmPortablePackage_Message { } } + /// + /// Looks up a localized string similar to Does this executable depend on DLLs or any other files present in the zip archive?. + /// + public static string ConfirmZippedBinary_Message { + get { + return ResourceManager.GetString("ConfirmZippedBinary_Message", resourceCulture); + } + } + /// /// Looks up a localized string similar to The package copyright. /// diff --git a/src/WingetCreateCLI/Properties/Resources.resx b/src/WingetCreateCLI/Properties/Resources.resx index 65f945fc..c1faa830 100644 --- a/src/WingetCreateCLI/Properties/Resources.resx +++ b/src/WingetCreateCLI/Properties/Resources.resx @@ -1392,4 +1392,7 @@ Indicates whether the install location should be added directly to the PATH environment variable. Only applies to an archive containing portable packages. + + Does this executable depend on DLLs or any other files present in the zip archive? + \ No newline at end of file