Skip to content

Commit 6926ca4

Browse files
authored
Prompt for zipped binaries in NewCommand flow (#567)
1 parent 94c5d21 commit 6926ca4

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

src/WingetCreateCLI/Commands/NewCommand.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,7 @@ private static void PromptInstallerProperties<T>(T manifest, PropertyInfo proper
386386
}
387387
}
388388

389-
PromptForPortableAliasIfApplicable(installer);
390-
389+
PromptForPortableFieldsIfApplicable(installer);
391390
foreach (var requiredProperty in requiredInstallerProperties)
392391
{
393392
var currentValue = requiredProperty.GetValue(installer);
@@ -447,7 +446,7 @@ private static void PromptInstallerSwitchesForExe<T>(T manifestInstaller)
447446
}
448447
}
449448

450-
private static void PromptForPortableAliasIfApplicable(Installer installer)
449+
private static void PromptForPortableFieldsIfApplicable(Installer installer)
451450
{
452451
if (installer.InstallerType == InstallerType.Portable)
453452
{
@@ -468,6 +467,12 @@ private static void PromptForPortableAliasIfApplicable(Installer installer)
468467
{
469468
installer.NestedInstallerFiles.First().PortableCommandAlias = portableCommandAlias.Trim();
470469
}
470+
471+
// No need to set explicitly in else case as WinGet CLI defaults to using false
472+
if (Prompt.Confirm(Resources.ConfirmZippedBinary_Message))
473+
{
474+
installer.ArchiveBinariesDependOnPath = true;
475+
}
471476
}
472477
}
473478

src/WingetCreateCLI/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/WingetCreateCLI/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,4 +1392,7 @@
13921392
<data name="ArchiveBinariesDependOnPath_KeywordDescription" xml:space="preserve">
13931393
<value>Indicates whether the install location should be added directly to the PATH environment variable. Only applies to an archive containing portable packages.</value>
13941394
</data>
1395+
<data name="ConfirmZippedBinary_Message" xml:space="preserve">
1396+
<value>Does this executable depend on DLLs or any other files present in the zip archive?</value>
1397+
</data>
13951398
</root>

0 commit comments

Comments
 (0)