Refactor nasm,php-sdk-binary-tools,strawberry-perl,vswhere

This commit is contained in:
crazywhalecc 2026-02-06 14:46:57 +08:00
parent 368461d1ad
commit c72a2b6228
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
7 changed files with 22 additions and 24 deletions

View File

@ -1,21 +0,0 @@
{
"nasm": {
"type": "target",
"artifact": "nasm"
},
"php-sdk-binary-tools": {
"type": "target",
"artifact": "php-sdk-binary-tools"
},
"strawberry-perl": {
"type": "target",
"artifact": "strawberry-perl"
},
"vswhere": {
"type": "target",
"artifact": "vswhere",
"static-bins@windows": [
"vswhere.exe"
]
}
}

View File

@ -0,0 +1,5 @@
nasm:
type: target
artifact:
binary:
windows-x86_64: { type: url, url: 'https://dl.static-php.dev/static-php-cli/deps/nasm/nasm-2.16.01-win64.zip', extract: { nasm.exe: '{php_sdk_path}/bin/nasm.exe', ndisasm.exe: '{php_sdk_path}/bin/ndisasm.exe' } }

View File

@ -0,0 +1,5 @@
php-sdk-binary-tools:
type: target
artifact:
binary:
windows-x86_64: { type: git, rev: master, url: 'https://github.com/php/php-sdk-binary-tools.git', extract: '{php_sdk_path}' }

View File

@ -0,0 +1,5 @@
strawberry-perl:
type: target
artifact:
binary:
windows-x86_64: { type: url, url: 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_5380_5361/strawberry-perl-5.38.0.1-64bit-portable.zip', extract: '{pkg_root_path}/strawberry-perl' }

View File

@ -0,0 +1,5 @@
vswhere:
type: target
artifact:
binary:
windows-x86_64: { type: url, url: 'https://github.com/microsoft/vswhere/releases/download/3.1.7/vswhere.exe', extract: '{pkg_root_path}/bin/vswhere.exe' }

View File

@ -16,8 +16,7 @@
"config": [
"config/pkg/lib/",
"config/pkg/target/",
"config/pkg/ext/",
"config/pkg.target.json"
"config/pkg/ext/"
]
},
"artifact": {

View File

@ -534,7 +534,7 @@ class PackageInstaller
{
// target and library must have at least source or platform binary
if (in_array($package->getType(), ['library', 'target']) && !$package->getArtifact()?->hasSource() && !$package->getArtifact()?->hasPlatformBinary()) {
throw new WrongUsageException("Validation failed: Target package '{$package->getName()}' has no source or platform binary defined.");
throw new WrongUsageException("Validation failed: Target package '{$package->getName()}' has no source or current platform (" . SystemTarget::getCurrentPlatformString() . ') binary defined.');
}
}