Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use INSTALLDIR as install location switch for WiX installers #2671

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SpecterShell
Copy link
Contributor

@SpecterShell SpecterShell commented Nov 4, 2022


MSI installers built by WiX Toolset use different switches such as INSTALLDIR instead of TARGETDIR as install location parameter. While adding new packages and reworking old packages, I noticed that most WiX installers are using INSTALLDIR. I felt that it is necessary to replace the current install location switch with INSTALLDIR since some new building toolchains like Tauri Builder are using WiX as the default installer builder, where developers are less likely to modify the WiX template and don't know what switches should be used for WinGet manifest.

However, the custom location switch may vary among WiX installers according to #1857 (comment). In case of potential conner cases, I will draft this PR and look into the remaining packages in winget-pkgs repo to see the proportion of switches they are using.


Some of the conner cases:

  • INSTALLLOCATION
    • LiErHeXun.Quicker
Microsoft Reviewers: Open in CodeFlow

Comment on lines +559 to +565
return
{
{InstallerSwitchType::Silent, ManifestInstaller::string_t("/quiet /norestart")},
{InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/passive /norestart")},
{InstallerSwitchType::Log, ManifestInstaller::string_t("/log \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")},
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("INSTALLDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")}
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously, InstallerTypeEnum::Burn case would fallthrough to InstallerTypeEnum::Msi, but now is going to fallthrough to this code? 🤔

@Trenly
Copy link
Contributor

Trenly commented Mar 7, 2024

@SpecterShell - I'm assuming this will need to be rebased and/or have the merge conflicts resolved, if this is something which you still want to raise the PR for

@SpecterShell SpecterShell marked this pull request as ready for review March 8, 2024 11:41
@SpecterShell SpecterShell requested a review from a team as a code owner March 8, 2024 11:41
@SpecterShell SpecterShell marked this pull request as draft March 8, 2024 11:41
@SpecterShell SpecterShell marked this pull request as ready for review March 18, 2024 05:55
@SpecterShell
Copy link
Contributor Author

Among all the MSI installers I have processed so far, some of them use INSTALLDIR, some of them use APPLICATIONFOLDER, but almost none of them use TARGETDIR. I think it should be safe to merge this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants