Use legacy --enable-micro-win32 way to workaround

This commit is contained in:
crazywhalecc
2026-04-08 22:13:21 +08:00
parent 2bc0d05242
commit a5a3a990bf
2 changed files with 23 additions and 1 deletions

View File

@@ -35,11 +35,17 @@ trait windows
}
#[Stage]
public function buildconfForWindows(TargetPackage $package): void
public function buildconfForWindows(TargetPackage $package, PackageInstaller $installer): void
{
InteractiveTerm::setMessage('Building php: ' . ConsoleColor::yellow('./buildconf.bat'));
V2CompatLayer::emitPatchPoint('before-php-buildconf');
cmd()->cd($package->getSourceDir())->exec('.\buildconf.bat');
if ($package->getBuildOption('enable-micro-win32') && $installer->isPackageResolved('php-micro')) {
SourcePatcher::patchMicroWin32();
} else {
SourcePatcher::unpatchMicroWin32();
}
}
#[Stage]