[IMPROVEMENT] Allow to pass --x-install-root to vcpkg
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.
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
Please let me know if this works
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.
Ah, I see what you mean. But you can change the package root from UniGetUI already, right?
No, "Install location can't be changed for vcpkg packages" :
no, on package manager settings - > vcpkg settings there is an option to change vcpkg root
The vcpkg-root argument is different from x-install-root.
My bad. I got confused.
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?
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.
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
The best approach would be to be able to customize globally the install location of vcpkg packages. The
x-install-rootargument 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 think having a generic "edit arguments" option should do the job, instead of focusing on a per-parameter setting
The best approach would be to be able to customize globally the install location of vcpkg packages. The
x-install-rootargument would then be sent to all vcpkg commands in a consistent manner.
--x-install-rootis 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.
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.
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.
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.
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.
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.