How can I use a forked version of vcpkg? #43857
-
I am the upstream maintainer of a package that is a candidate to be added to vcpkg (see #43752). There is a PR with the new package which is called morphologica. I have cloned vcpkg from the PR (rremilian's fork) and I successfully installed morphologica with I am now trying to use this fork of vcpkg with Visual Studio 2022 to compile a program that uses morphologica as a library. The problem I have is that after I create
The message Does anyone have any idea why creating the manifest files is problematic? best wishes, Seb James |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
I thought I'd solved it. I found https://learn.microsoft.com/en-us/vcpkg/consume/git-registries#3---add-private-registries-to-your-vcpkg-configuration-file which helped me to hand-write my new The original was: {
"default-registry": {
"kind": "git",
"baseline": "aeb9a78803c8457984b73e6e5ac3b979725fa0d1",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "artifact",
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
"name": "microsoft"
}
]
} Which I replaced with: {
"default-registry": {
"kind": "git",
"baseline": "aeb9a78803c8457984b73e6e5ac3b979725fa0d1",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "git",
"repository": "https://github.com/rremilian/vcpkg",
"reference": "vcpkg-registry",
"baseline": "aeb9a78803c8457984b73e6e5ac3b979725fa0d1",
"packages": [ "morphologica" ]
}
]
} But this is not yet the solution. The output from an attempt to build the program:
|
Beta Was this translation helpful? Give feedback.
-
Progress! In a git bash terminal (because I am familiar with bash), copy morphologica into custom-ports in my Visual Studio Project repository: sebj@sebrog MINGW64 ~/vcpkg (morphologica-v3.2)
$ pwd
/c/Users/sebj/vcpkg
sebj@sebrog MINGW64 ~/vcpkg (morphologica-v3.2)
$ mkdir ../source/repos/Morphtest2/custom-ports
sebj@sebrog MINGW64 ~/vcpkg (morphologica-v3.2)
$ cp -Ra ports/morphologica ../source/repos/Morphtest2/custom-ports/
sebj@sebrog MINGW64 ~/vcpkg (morphologica-v3.2)
$ ls ../source/repos/Morphtest2/custom-ports/
morphologica/
sebj@sebrog MINGW64 ~/vcpkg (morphologica-v3.2) Switch to a powershell terminal (I don't know why, I guess because I believe superstitiously that it might be 'closer' to Visual Studio in Microsoft world :) and:
|
Beta Was this translation helpful? Give feedback.
-
I think this is happening because when
Given the fact that This is the correct definition:
|
Beta Was this translation helpful? Give feedback.
I think this is happening because when
vcpkg new --application
is executed, it will create avcpkg-configuration.json
file, which will contain the registry in which to search for packages.Given the fact that
microsoft/vcpkg
doesn't currently havemorphologica
, it will not work.You can use a custom port or a custom registry which will point to my fork. I think your first approach was good, but you have to add the
reference
to the custom registry.This is the correct definition: