mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Install phalcon v4 from PECL on windows
This commit is contained in:
parent
c4317135df
commit
9f21c80d24
@ -14,6 +14,10 @@ $tick = ([char]8730)
|
||||
$domain = 'https://github.com'
|
||||
$php_dir = 'C:\tools\php'
|
||||
$ext_dir = $php_dir + '\ext'
|
||||
if($extension -eq "phalcon4") {
|
||||
Install-Phpextension psr -MinimumStability stable -Path $php_dir
|
||||
Install-Phpextension phalcon -MinimumStability stable -Path $php_dir
|
||||
} else {
|
||||
$installed = Get-Php -Path $php_dir
|
||||
$extension_version = $extension.substring($extension.Length - 1)
|
||||
$nts = if(! $installed.ThreadSafe ) { "_nts" } else { "" }
|
||||
@ -22,6 +26,6 @@ $zip_file = $match.Matches[0].Groups[1].Value
|
||||
Invoke-WebRequest -UseBasicParsing -Uri $domain/$zip_file -OutFile $ENV:RUNNER_TOOL_CACHE\phalcon.zip >$null 2>&1
|
||||
Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\phalcon.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\phalcon -Force >$null 2>&1
|
||||
New-Item -ItemType SymbolicLink -Path $ext_dir\php_phalcon.dll -Target $ENV:RUNNER_TOOL_CACHE\phalcon\php_phalcon.dll >$null 2>&1
|
||||
Install-Phpextension psr -MinimumStability stable -Path $php_dir
|
||||
Enable-PhpExtension -Extension phalcon -Path $php_dir
|
||||
}
|
||||
printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $tick $extension "Installed and enabled"
|
Loading…
Reference in New Issue
Block a user