UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

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

Open CyberSinh opened this issue 5 months ago • 19 comments

Please confirm these before moving forward.

  • [x] I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
  • [x] This improvement refers to an existing feature. If you want to suggest a new feature, please use this template.
  • [x] 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.

CyberSinh avatar Jun 30 '25 10:06 CyberSinh

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

marticliment avatar Jun 30 '25 12:06 marticliment

Please let me know if this works

marticliment avatar Jun 30 '25 12:06 marticliment

Hi @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.

CyberSinh avatar Jul 23 '25 08:07 CyberSinh

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

marticliment avatar Jul 23 '25 13:07 marticliment

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

Image

CyberSinh avatar Jul 23 '25 13:07 CyberSinh

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

marticliment avatar Jul 23 '25 14:07 marticliment

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

CyberSinh avatar Jul 23 '25 14:07 CyberSinh

My bad. I got confused.

marticliment avatar Jul 23 '25 18:07 marticliment

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?

mrixner avatar Jul 24 '25 04:07 mrixner

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.

CyberSinh avatar Jul 24 '25 08:07 CyberSinh

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

marticliment avatar Jul 24 '25 13:07 marticliment

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.

mrixner avatar Jul 24 '25 16:07 mrixner

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

marticliment avatar Jul 24 '25 17:07 marticliment

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.

CyberSinh avatar Jul 24 '25 17:07 CyberSinh

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.

mrixner avatar Nov 26 '25 14:11 mrixner

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.

CyberSinh avatar Nov 26 '25 19:11 CyberSinh

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.

mrixner avatar Nov 26 '25 20:11 mrixner

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.

CyberSinh avatar Nov 26 '25 20:11 CyberSinh

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.

mrixner avatar Nov 26 '25 20:11 mrixner