File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,15 @@ if($ThreadSafe) {
6868 $ts = ' '
6969}
7070$branch = ' master'
71- if ($Version -eq ' 8.0' ) {
72- $branch = ' PHP-8.0'
73- } elseif ($Version -eq ' 8.1' ) {
74- $branch = ' PHP-8.1'
75- } elseif ($Version -eq ' 8.2' ) {
76- $branch = ' PHP-8.2'
77- } elseif ($Version -eq ' 8.3' ) {
78- $branch = ' PHP-8.3'
71+ if ($Version -match ' 8.[0-4]' ) {
72+ $branch = " PHP-$Version "
73+ }
74+ $vs = ' vs17'
75+ if ($Version -match ' 8.[0-3]' ) {
76+ $vs = ' vs16'
7977}
8078$semver = Get-File - Url " https://raw.githubusercontent.com/php/php-src/$branch /main/php_version.h" - FallbackUrl " https://cdn.jsdelivr.net/gh/php/php-src@$branch /main/php_version.h" - TimeoutSec 3 | Where-Object { $_ -match ' PHP_VERSION "(.*)"' } | Foreach-Object {$Matches [1 ]}
81- $file = " php-$semver$ts -Win32-vs16 -$Architecture .zip"
79+ $file = " php-$semver$ts -Win32-$vs -$Architecture .zip"
8280$repo = " shivammathur/php-builder-windows"
8381Get-File - Url " https://github.com/$repo /releases/download/php$Version /$file " - FallbackUrl " https://dl.cloudsmith.io/public/$repo /raw/files/$file " - OutFile $Path \master.zip - Retries 3
8482Expand-Archive - Path $Path \master.zip - DestinationPath $Path - Force
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ if($ThreadSafe) {
7070if ($Version -match ' 8.[0-3]' ) {
7171 Install-Php - Version $Version - Architecture $Architecture - ThreadSafe $ThreadSafe - InstallVC - Path $Path - TimeZone UTC - InitialPhpIni Production - Force
7272} else {
73- $file = " php-$Version .0-dev$ts -Win32-vs16 -$Architecture .zip"
73+ $file = " php-$Version .0-dev$ts -Win32-vs17 -$Architecture .zip"
7474 $repo = " shivammathur/php-builder-windows"
7575 Get-File - Url " https://github.com/$repo /releases/download/php$Version /$file " - FallbackUrl " https://dl.cloudsmith.io/public/$repo /raw/files/$file " - OutFile $Path \master.zip - Retries 3
7676 Expand-Archive - Path $Path \master.zip - DestinationPath $Path - Force
You can’t perform that action at this time.
0 commit comments