Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/WingetCreateCLI/Commands/NewCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@ private static void PromptInstallerProperties<T>(T manifest, PropertyInfo proper
}
}

PromptForPortableAliasIfApplicable(installer);

PromptForPortableFieldsIfApplicable(installer);
foreach (var requiredProperty in requiredInstallerProperties)
{
var currentValue = requiredProperty.GetValue(installer);
Expand Down Expand Up @@ -447,7 +446,7 @@ private static void PromptInstallerSwitchesForExe<T>(T manifestInstaller)
}
}

private static void PromptForPortableAliasIfApplicable(Installer installer)
private static void PromptForPortableFieldsIfApplicable(Installer installer)
{
if (installer.InstallerType == InstallerType.Portable)
{
Expand All @@ -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;
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/WingetCreateCLI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/WingetCreateCLI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1392,4 +1392,7 @@
<data name="ArchiveBinariesDependOnPath_KeywordDescription" xml:space="preserve">
<value>Indicates whether the install location should be added directly to the PATH environment variable. Only applies to an archive containing portable packages.</value>
</data>
<data name="ConfirmZippedBinary_Message" xml:space="preserve">
<value>Does this executable depend on DLLs or any other files present in the zip archive?</value>
</data>
</root>