Skip to content

Commit 19fb3a2

Browse files
committed
Update scripts for vs17
1 parent 6976a50 commit 19fb3a2

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

scripts/Get-Php.ps1

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff 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"
8381
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
8482
Expand-Archive -Path $Path\master.zip -DestinationPath $Path -Force

scripts/Get-PhpNightly.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if($ThreadSafe) {
7070
if($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

0 commit comments

Comments
 (0)