@@ -21,7 +21,7 @@ Function Add-Extension {
21
21
begin {
22
22
}
23
23
process {
24
- # TODO: Replace fetching the extension using the new extension tool
24
+ Set-GAGroup start
25
25
Invoke-WebRequest - Uri " https://pecl.php.net/get/$Extension " - OutFile " $Extension .tgz"
26
26
$currentDirectory = (Get-Location ).Path
27
27
& tar - xzf " $Extension .tgz" - C $currentDirectory
@@ -38,7 +38,7 @@ Function Add-Extension {
38
38
$bat_content = @ ()
39
39
$bat_content += " "
40
40
$bat_content += " call phpize 2>&1"
41
- $bat_content += " call configure --with-php-build=`" ..\deps`" $ ( $Config.options ) --with-prefix=$Prefix 2>&1"
41
+ $bat_content += " call configure --with-php-build=`" ..\deps`" $ ( $Config.options ) --with-mp= `" disable `" --with- prefix=$Prefix 2>&1"
42
42
$bat_content += " nmake /nologo 2>&1"
43
43
$bat_content += " exit %errorlevel%"
44
44
Set-Content - Encoding " ASCII" - Path $Extension -task.bat - Value $bat_content
@@ -52,14 +52,16 @@ Function Add-Extension {
52
52
$Config.vs_version ,
53
53
$Config.arch
54
54
) -join " -" )
55
- & $builder - c $Config.vs_version - a $Config.Arch - t $task | Tee-Object - FilePath " build-$suffix .txt"
55
+ & $builder - c $Config.vs_version - a $Config.Arch - s $Config.vs_toolset - t $task | Tee-Object - FilePath " build-$suffix .txt"
56
+ Write-Host (Get-Content " build-$suffix .txt" - Raw)
56
57
$includePath = " $currentDirectory \php-dev\include"
57
58
New-Item - Path $includePath \ext - Name $Extension - ItemType " directory" | Out-Null
58
59
Get-ChildItem - Path (Get-Location ).Path - Recurse - Include ' *.h' , ' *.c' | Copy-Item - Destination " $includePath \ext\$Extension "
59
60
Copy-Item - Path " $extensionBuildDirectory \*.dll" - Destination " $currentDirectory \php-bin\ext" - Force
60
61
Copy-Item - Path " $extensionBuildDirectory \*.lib" - Destination " $currentDirectory \php-dev\lib" - Force
61
62
Add-Content - Path " $currentDirectory \php-bin\php.ini" - Value " extension=$Extension "
62
63
Set-Location $currentDirectory
64
+ Set-GAGroup end
63
65
}
64
66
end {
65
67
}
0 commit comments