mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 07:15:38 +08:00
feat(build): add bison and re2c to required packages; bypass phpsdk_version check for MSVC + msys2
This commit is contained in:
@@ -16,7 +16,7 @@ use StaticPHP\Util\GlobalEnvManager;
|
||||
class msys2_build_essentials
|
||||
{
|
||||
// MSYS subsystem packages required for autotools-based builds.
|
||||
private const REQUIRED_PACKAGES = ['make', 'autoconf', 'automake', 'libtool', 'pkgconf', 'perl'];
|
||||
private const REQUIRED_PACKAGES = ['make', 'autoconf', 'automake', 'libtool', 'pkgconf', 'perl', 'bison', 're2c'];
|
||||
|
||||
#[CustomBinary('msys2-build-essentials', ['windows-x86_64'])]
|
||||
public function downBinary(ArtifactDownloader $downloader): DownloadResult
|
||||
|
||||
@@ -39,6 +39,13 @@ trait windows
|
||||
InteractiveTerm::setMessage('Building php: ' . ConsoleColor::yellow('./buildconf.bat'));
|
||||
cmd()->cd($package->getSourceDir())->exec('.\buildconf.bat');
|
||||
|
||||
// Bypass the phpsdk_version check in configure.js: we use MSVC + msys2 instead of PHP SDK, so phpsdk_version is not available and the check would always fail.
|
||||
FileSystem::replaceFileStr(
|
||||
"{$package->getSourceDir()}\\configure.js",
|
||||
'check_binary_tools_sdk();',
|
||||
'/* check_binary_tools_sdk(); skipped: using MSVC + msys2 without PHP SDK */'
|
||||
);
|
||||
|
||||
if ($package->getBuildOption('enable-micro-win32') && $installer->isPackageResolved('php-micro')) {
|
||||
SourcePatcher::patchMicroWin32();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user