Skip to content

[IMPROVEMENT] Allow to pass --x-install-root to vcpkg #3794

Open

Description

Please confirm these before moving forward.

  • I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
  • This improvement refers to an existing feature. If you want to suggest a new feature, please use this template.
  • This improvement is not a bug. If you want to report a bug, please use this template.

Describe the improvement

I don't use the default location for installing vcpkg packages. Therefore, when I want to update them, I have to pass the --x-install-root argument to the vcpkg executable. It turns out that the uniget interface doesn't allow you to customize the package destination.

So, I have to run manually this command to update my vcpkg packages:
.\vcpkg.exe upgrade --x-install-root=E:\Home\Important\Development\Library\vcpkg_installed --no-dry-run

Describe how this improvement could help users

This enhancement will enable users to keep their vcpkg packages up to date even when they are installed in a specific folder.

Activity

  1. marticliment commented on Jun 30, 2025

    @marticliment
    Collaborator

    Please install UniGetUI 3.2.1-beta2 (https://github.com/marticliment/UniGetUI/releases/tag/3.2.1-beta2). Then, go to Package Managers -> Vcpkg, and scroll to "default install options". There you can specify default options for all vcpkg packages

  2. marticliment commented on Jun 30, 2025

    @marticliment
    Collaborator

    Please let me know if this works

  3. CyberSinh commented on Jul 23, 2025

    @CyberSinh
    Author

    Hi Martí Climent (@marticliment)

    It doesn't work in the latest stable version of UniGetUI.

    It is possible to define custom arguments for installing, updating and uninstalling packages, but NOT for searching for updates.

    .\vcpkg.exe --vcpkg-root="D:\Temporaire\Development\vcpkg" list
    No packages are installed. Did you mean `search`?
    

    To enable vcpkg to check for updates to my packages, I need to use the command:

    .\vcpkg.exe --vcpkg-root="D:\Temporaire\Development\vcpkg" --x-install-root=E:\Home\Important\Development\Library\vcpkg_installed list
    

    In short, the x-install-root argument must be able to be passed to all vcpkg commands, including the update search.

  4. marticliment commented on Jul 23, 2025

    @marticliment
    Collaborator

    Ah, I see what you mean. But you can change the package root from UniGetUI already, right?

  5. CyberSinh commented on Jul 23, 2025

    @CyberSinh
    Author

    No, "Install location can't be changed for vcpkg packages" :

    Image
  6. marticliment commented on Jul 23, 2025

    @marticliment
    Collaborator

    no, on package manager settings - > vcpkg settings there is an option to change vcpkg root

  7. CyberSinh commented on Jul 23, 2025

    @CyberSinh
    Author

    The vcpkg-root argument is different from x-install-root.

  8. marticliment commented on Jul 23, 2025

    @marticliment
    Collaborator

    My bad. I got confused.

  9. mrixner commented on Jul 24, 2025

    @mrixner
    Contributor

    This seems to be one of multiple issues wanting custom arguments passed to the check for updates / installed / etc commands - do you see a security issue with adding that to the manager settings?

  10. CyberSinh commented on Jul 24, 2025

    @CyberSinh
    Author

    The best approach would be to be able to customize globally the install location of vcpkg packages. The x-install-root argument would then be sent to all vcpkg commands in a consistent manner.

  11. marticliment commented on Jul 24, 2025

    @marticliment
    Collaborator

    This seems to be one of multiple issues wanting custom arguments passed to the check for updates / installed / etc commands - do you see a security issue with adding that to the manager settings?

    I guess if it is locked under a SecureSetting, It'd be fine.
    You could take advantage of the IPackageManager.Properties.ExecutableCallArguments

  12. mrixner commented on Jul 24, 2025

    @mrixner
    Contributor

    The best approach would be to be able to customize globally the install location of vcpkg packages. The x-install-root argument would then be sent to all vcpkg commands in a consistent manner.

    --x-install-root is an expirimental flag, I'm hesitant to implement something experimental as it could change and break any time, breaking the user experience.

  13. marticliment commented on Jul 24, 2025

    @marticliment
    Collaborator

    I think having a generic "edit arguments" option should do the job, instead of focusing on a per-parameter setting

  14. CyberSinh commented on Jul 24, 2025

    @CyberSinh
    Author

    The best approach would be to be able to customize globally the install location of vcpkg packages. The x-install-root argument would then be sent to all vcpkg commands in a consistent manner.

    --x-install-root is an expirimental flag, I'm hesitant to implement something experimental as it could change and break any time, breaking the user experience.

    I can understand the reservation, except that without support for this option, UniGetUI will be unable to achieve its primary goal of automating vcpkg package updates whenever this rather common option is used.
    Since UniGetUI relies on third-party package managers, the possibility of breaking changes is an inherent risk that must be assumed.

  15. mrixner commented on Nov 26, 2025

    @mrixner
    Contributor

    Does it not work with --vcpkg-root? I was under the impression thst it would figure it out automatically, and I'm pretty sure you can already customize that.

  16. CyberSinh commented on Nov 26, 2025

    @CyberSinh
    Author

    Does it not work with --vcpkg-root? I was under the impression thst it would figure it out automatically, and I'm pretty sure you can already customize that.

    No, --vcpkg-root is where vcpkg is installed, --x-install-root is where C++ packages are installed.

  17. mrixner commented on Nov 26, 2025

    @mrixner
    Contributor

    Yeah, but according to the Microsoft documentation the installation root defaults under the vcpkg root, which can be changed. I'll test this behavior when I can.

  18. CyberSinh commented on Nov 26, 2025

    @CyberSinh
    Author

    Yeah, but according to the Microsoft documentation the installation root defaults under the vcpkg root, which can be changed. I'll test this behavior when I can.

    Perhaps, but my C++ packages repo should not be a subfolder of the vcpk-root folder on my system.

  19. mrixner commented on Nov 26, 2025

    @mrixner
    Contributor

    I'm sorry, I had forgotten this is because you have a different installation path outside of the root.

    To be fair, we are also parsing the vcpkg results data with an "expiremental" option. I guess it could be added under a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions