Skip to content

Latest commit

 

History

History
115 lines (82 loc) · 2.57 KB

File metadata and controls

115 lines (82 loc) · 2.57 KB

Summary

vcpkg registry for GlobalPlatform library.

Manual Registry Version Update Instructions

NOTE: The existing workflow updates the registry automatically on version updates of the GlobalPlatform library.

Update the GlobalPlatform library version:

nano ports/globalplatform/vcpkg.json

Set the version accordingly:

"version": "8.0.0",

Update the tag and set the SHA512 to 0:

nano ports/globalplatform/portfile.cmake 

Set the tag:

REF <tag>

Copy the failed hash value from the install command:

rm ~/vcpkg/downloads/kaoh-globalplatform*
~/vcpkg/vcpkg install globalplatform --overlay-ports=./ports

You will see a message like:

error: failing download because the expected SHA512 was all zeros, please change the expected SHA512 to: 0a66f9254390fbc27f048a76f96f9a9f858a903f55fbc67c42dd083a55b8537e6a7c436d76d67d71d327b9dd153b0832b5b46dcacce2284e9ca6bd5108d576ab

Replace the SHA512 value:

nano ports/globalplatform/portfile.cmake
~/vcpkg/vcpkg x-add-version globalplatform --x-builtin-ports-root=./ports --x-builtin-registry-versions-dir=./versions --overwrite-version

Registry User Instructions

Create vcpkg.json in the project:

{
  "name": "globalplatform-consumer",
  "version-string": "0.0.0",
  "dependencies": [
    "globalplatform"
  ],
  "builtin-baseline": "aa2d37682e3318d93aef87efa7b0e88e81cd3d59"
}

Create vcpkg-configuration.json in the project:

{
  "registries": [
    {
      "kind": "git",
      "baseline": "fd4199d65c3dabbc653f5e741b77753252b7eab6",
      "repository": "https://github.com/kaoh/globalplatform-vcpkg-registry",
      "packages": [
        "globalplatform"
      ]
    }
  ]
}

Update baseline:

~/vcpkg/vcpkg x-update-baseline --add-initial-baseline 

Create a CMake project like:

cmake_minimum_required(VERSION 3.20)
project(globalplatform_consumer C)

find_package(globalplatform CONFIG REQUIRED)
find_package(gppcscconnectionplugin CONFIG REQUIRED)

add_executable(test_gp main.c)
if(WIN32)
target_compile_definitions(test_gp PRIVATE UNICODE _UNICODE)
endif()
target_link_libraries(test_gp PRIVATE globalplatform::globalplatform)
target_link_libraries(test_gp PRIVATE gppcscconnectionplugin::gppcscconnectionplugin)

get_target_property(_type globalplatform::globalplatform TYPE)

Then run CMake:

cmake -S . -B build -G Ninja \
  -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \
  -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake 

cmake --build build