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

Vcpkg Package Manager #2925

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

mrixner
Copy link

@mrixner mrixner commented Nov 3, 2024

  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.

TODO before merging (for @marticliment)

  • Add the VCPkg icon to symbol icon table
  • Add the setting to specify the default triplet.

This pull request is for support for the vcpkg package manager.

I'm sorry if the code is not good, this is my first time ever working with C#. I tried to write code in the style of all the other package managers and not touch more than I needed to.

List of Added Translations:

  • vcpkg ManagerProperties Description (A popular C/C++ library manager. Full of C/C++ libraries and other C/C++-related utilities<br>Contains: <b>C/C++ libraries and related utilities</b>)
  • InvalidOperationException value (Cannot update vcpkg port files as requested: git was not installed or the VCPKG_ROOT environment variable / the custom vcpkg root setting were not set)
  • Automatic Portfile Update Setting Title (Update vcpkg's Git portfiles automatically (requires Git installed))
  • Default vcpkg Triplet Setting Title (Default vcpkg triplet)
  • Custom vcpkg Root Setting Title (Custom vcpkg root)

Manager Capabilities (for the table on the home page):

Install as administrator: yes (for vcpkg roots in an admin-locked directory)
Skip integrity checks: no (I don't think vcpkg has this capability, or if it has integrity checks to skip)
Interactive installation: no (it's being built from the command-line; there's no interactivity to show)
Install Older Versions: no (vcpkg doesn't support this on a global scale, only for projects with vcpkg.json control files)
Install a PreRelease Version: no (vcpkg doesn't have pre-release versions)
Install a Custom Architecture: not directly supported but can be easily achieved (via using a different triplet / source)
Install on a Custom Scope: no (everything just gets installed to the vcpkg directory)
Custom Install Location: no / sort of not directly supported but can be easily achieved? (everything just gets installed to the vcpkg directory; you can change which vcpkg directory via the "Custom vcpkg root" setting)
Custom Package Sources: not directly supported but can be easily achieved (it will automatically detect custom triplet / source CMake scripts dropped into %VCPKG_ROOT%\triplets or %VCPKG_ROOT%\triplets\community)

Other Potentially Unresolved Things

  • I have added a colored icon, but as src/UniGetUI.PackageEngine.Managers.Vcpkg/Vcpkg.cs:65 states, discussion How can I add an icon to my language in Tolgee #2826 brought me to believe that an outlined icon must be added by the maintainers, so if you care enough that may be one thing that needs to happen.
  • I would recommend probably squash-merging this if you weren't going to already, as I pretty much just edited the file for package manager-specific settings and the files for the package manager. Unfortunately, I accidentally forgot to commit some changes for some commits, so not all commits compile as requested in the Contributing Guidelines.
  • As mentioned in [FEATURE REQUEST] VCPKG support? #2146: The DefaultVcpkgTriplet setting isn't being set properly, but I was told to leave the UI to Marti, and so that's what I'm doing.

Closes #2146

mrixner and others added 26 commits October 14, 2024 21:41
Also add empty array returns for GetAvailableUpdates_UnSafe and GetInstalledPackages_UnSafe to allow building.
(for GetInstalledPackages_UnSafe())
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.

[FEATURE REQUEST] VCPKG support?
1 participant