diff --git a/config/pkg.target.json b/config/pkg.target.json deleted file mode 100644 index 59c6c65a..00000000 --- a/config/pkg.target.json +++ /dev/null @@ -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" - ] - } -} diff --git a/config/pkg/target/nasm.yml b/config/pkg/target/nasm.yml new file mode 100644 index 00000000..3f483e8b --- /dev/null +++ b/config/pkg/target/nasm.yml @@ -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' } } diff --git a/config/pkg/target/php-sdk-binary-tools.yml b/config/pkg/target/php-sdk-binary-tools.yml new file mode 100644 index 00000000..81180007 --- /dev/null +++ b/config/pkg/target/php-sdk-binary-tools.yml @@ -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}' } diff --git a/config/pkg/target/strawberry-perl.yml b/config/pkg/target/strawberry-perl.yml new file mode 100644 index 00000000..9e2e3187 --- /dev/null +++ b/config/pkg/target/strawberry-perl.yml @@ -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' } diff --git a/config/pkg/target/vswhere.yml b/config/pkg/target/vswhere.yml new file mode 100644 index 00000000..d7f8670c --- /dev/null +++ b/config/pkg/target/vswhere.yml @@ -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' } diff --git a/spc.registry.json b/spc.registry.json index cf49c6c8..b55f63a6 100644 --- a/spc.registry.json +++ b/spc.registry.json @@ -16,8 +16,7 @@ "config": [ "config/pkg/lib/", "config/pkg/target/", - "config/pkg/ext/", - "config/pkg.target.json" + "config/pkg/ext/" ] }, "artifact": { diff --git a/src/StaticPHP/Package/PackageInstaller.php b/src/StaticPHP/Package/PackageInstaller.php index 80ea1aef..169630f9 100644 --- a/src/StaticPHP/Package/PackageInstaller.php +++ b/src/StaticPHP/Package/PackageInstaller.php @@ -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.'); } }