mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 18:47:50 +08:00
b295670e4b
``` function Convert-Control { Param($full) .\vcpkg.exe format-manifest $full $root = $full.Substring(0, $full.Length - 7) # CONTROL $new = $root + 'vcpkg.json' $content = Get-Content -Raw $new $asJson = ConvertFrom-Json $content -AsHashtable -Depth 100 $oldVersion = $asJson['port-version'] if ($null -eq $oldVersion) { $oldVersionFull = $asJson['version-string'] Write-Host "Got version $oldVersionFull" $match = [System.Text.RegularExpressions.Regex]::Match($oldVersionFull, '^(.+)-(\d+)$') if ($match.Success -and -not [System.Text.RegularExpressions.Regex]::IsMatch($oldVersionFull, '^\d\d\d\d-\d\d-\d\d$')) { $newFullVersion = [string]$match.Groups[1].Value $oldVersion = [int]$match.Groups[2].Value Write-Host "newFullVersion $newFullVersion oldVersion $oldVersion" $newVersion = $oldVersion + 1 $asJson['version-string'] = $newFullVersion Write-Host "Previous version for $full extracted from version field -- setting version-string $newFullVersion and port-version $newVersion" } else { Write-Host "No previous version for $full -- setting 1" $newVersion = 1 } } else { $newVersion = [int]$oldVersion + 1 Write-Host "New version for $full : $newVersion" } $asJson['port-version'] = $newVersion $content = ConvertTo-Json $asJson -Depth 100 Set-Content -Path $new -Value $content .\vcpkg.exe format-manifest $new } Get-ChildItem ports\CONTROL -Recurse | Foreach-Object { Convert-Control $_.FullName } git commit -am "this message" .\vcpkg.exe x-add-version -all git commit -a --amend ```
55 lines
1.3 KiB
JSON
55 lines
1.3 KiB
JSON
{
|
|
"name": "polyhook2",
|
|
"version-string": "2021-05-09",
|
|
"port-version": 1,
|
|
"description": "C++17, x86/x64 Hooking Library v2.0",
|
|
"homepage": "https://github.com/stevemk14ebr/PolyHook_2_0",
|
|
"supports": "!(arm | uwp | linux | osx)",
|
|
"default-features": [
|
|
"capstone",
|
|
"detours",
|
|
"exception",
|
|
"inlinentd",
|
|
"pe",
|
|
"virtuals",
|
|
"zydis"
|
|
],
|
|
"features": {
|
|
"capstone": {
|
|
"description": "Capstone disassembler integration.",
|
|
"dependencies": [
|
|
{
|
|
"name": "capstone",
|
|
"features": [
|
|
"x86"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"detours": {
|
|
"description": "Implement detour functionality"
|
|
},
|
|
"exception": {
|
|
"description": "Implement all exception hooking functionality"
|
|
},
|
|
"inlinentd": {
|
|
"description": "Support inline hooks without specifying typedefs by generating callback stubs at runtime with AsmJit",
|
|
"dependencies": [
|
|
"asmjit"
|
|
]
|
|
},
|
|
"pe": {
|
|
"description": "Implement all win pe hooking functionality"
|
|
},
|
|
"virtuals": {
|
|
"description": "Implement all virtual table hooking functionality"
|
|
},
|
|
"zydis": {
|
|
"description": "Zydis disassembler integration.",
|
|
"dependencies": [
|
|
"zydis"
|
|
]
|
|
}
|
|
}
|
|
}
|