mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Use PhpManager for all PHP versions on v1
This commit is contained in:
parent
3aa870b0fe
commit
e030852d0e
@ -277,7 +277,6 @@ $github = 'https://github.com'
|
|||||||
$composer_bin = "$env:APPDATA\Composer\vendor\bin"
|
$composer_bin = "$env:APPDATA\Composer\vendor\bin"
|
||||||
$composer_json = "$env:APPDATA\Composer\composer.json"
|
$composer_json = "$env:APPDATA\Composer\composer.json"
|
||||||
$composer_lock = "$env:APPDATA\Composer\composer.lock"
|
$composer_lock = "$env:APPDATA\Composer\composer.lock"
|
||||||
$master_version = '8.0'
|
|
||||||
$arch = 'x64'
|
$arch = 'x64'
|
||||||
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
|
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
|
||||||
$arch = 'x86'
|
$arch = 'x86'
|
||||||
@ -308,13 +307,7 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
|
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if ($version -eq $master_version) {
|
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
||||||
$version = 'master'
|
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/shivammathur/php-builder-windows/releases/latest/download/Get-Php.ps1 -OutFile $php_dir\Get-Php.ps1 > $null 2>&1
|
|
||||||
& $php_dir\Get-Php.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir
|
|
||||||
} else {
|
|
||||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
|
||||||
}
|
|
||||||
} catch { }
|
} catch { }
|
||||||
} else {
|
} else {
|
||||||
$status = "Found"
|
$status = "Found"
|
||||||
|
Loading…
Reference in New Issue
Block a user