Allow install without enable extension
param (
[string]$ExtName,
[string]$PhpBin= "php",
- [string]$ExtPath = "."
+ [string]$ExtPath = ".",
+ [bool]$Enable = $true
)
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition
@@ -26,6 +27,7 @@ if(-Not (Test-Path "$env:BUILD_DIR\php_$ExtName.dll" -PathType Leaf)){
info "Copy $env:BUILD_DIR\php_$ExtName.dll to $extdir"
Copy-Item "$env:BUILD_DIR\php_$ExtName.dll" $extdir | Out-Null
+if($Enable){
try{
$ini = Get-Content $inipath
}catch{
@@ -43,6 +45,8 @@ extension=$ExtName
"
$content | Out-File -Encoding utf8 -Append $inipath
}
+}
+
info "Run 'php --ri $ExtName'"
& $PhpBin --ri $ExtName
