@@ -72,10 +72,53 @@ if (-not (Test-Path "C:\php\bin")) {
7272 Expand-Archive " C:\php\$bname " " C:\php\bin"
7373}
7474
75- # # library dependency: "C:\php\deps"
76- # $bname = "$env:DEP-$env:VS-$env:ARCH.zip"
77- # if (-not (Test-Path "C:\php\$bname")) {
78- # echo "Download: https://windows.php.net/downloads/pecl/deps/$bname"
79- # Invoke-WebRequest "https://windows.php.net/downloads/pecl/deps/$bname" -OutFile "C:\php\$bname"
80- # Expand-Archive "C:\php\$bname" 'C:\php\deps'
81- # }
75+ # library dependency: "C:\php\deps"
76+ if (" $env: DEP " -ne " " ) {
77+ $bname = " $env: DEP -$env: VS -$env: ARCH .zip"
78+ if (-not (Test-Path " C:\php\$bname " )) {
79+ echo " Download: https://windows.php.net/downloads/pecl/deps/$bname "
80+ Invoke-WebRequest " https://windows.php.net/downloads/pecl/deps/$bname " - OutFile " C:\php\$bname "
81+ Expand-Archive " C:\php\$bname " " C:\php\deps"
82+ }
83+ }
84+
85+ # PECL apuc
86+ if ((' ' -ne $env: PECL_APCU ) -and (' 8.2' -ne $env: PHP_VER ) -and (' 8.3' -ne $env: PHP_VER )) {
87+ $apcu_version = ' 5.1.21'
88+
89+ $ts_part = ' ts'
90+ if (' nts' -eq $env: TS ) {
91+ $ts_part = ' nts'
92+ }
93+
94+ $bname = " php_apcu-$apcu_version -$env: PHP_VER -$ts_part -$env: VS -$env: ARCH .zip"
95+
96+ echo " Download: https://windows.php.net/downloads/pecl/releases/apcu/$apcu_version /$bname "
97+ Invoke-WebRequest " https://windows.php.net/downloads/pecl/releases/apcu/$apcu_version /$bname " - OutFile " C:\php\$bname "
98+ Expand-Archive " C:\php\$bname " ' C:\php\bin\ext'
99+
100+ $bname = " v$apcu_version .zip"
101+
102+ echo " Download: https://github.com/krakjoe/apcu/archive/refs/tags/$bname "
103+ Invoke-WebRequest " https://github.com/krakjoe/apcu/archive/refs/tags/$bname " - OutFile " C:\php\$bname "
104+ Expand-Archive " C:\php\$bname " ' C:\php'
105+
106+ if (-not (Test-Path ' C:\php\devel\include\ext\apcu' )) {
107+ [void ](New-Item ' C:\php\devel\include\ext\apcu' - ItemType ' directory' )
108+ }
109+
110+ Move-Item " C:\php\apcu-$apcu_version \php_apc.h" ' C:\php\devel\include\ext\apcu\php_apc.h'
111+ Move-Item " C:\php\apcu-$apcu_version \apc.h" ' C:\php\devel\include\ext\apcu\apc.h'
112+ Move-Item " C:\php\apcu-$apcu_version \apc_api.h" ' C:\php\devel\include\ext\apcu\apc_api.h'
113+ Move-Item " C:\php\apcu-$apcu_version \apc_cache.h" ' C:\php\devel\include\ext\apcu\apc_cache.h'
114+ Move-Item " C:\php\apcu-$apcu_version \apc_globals.h" ' C:\php\devel\include\ext\apcu\apc_globals.h'
115+ Move-Item " C:\php\apcu-$apcu_version \apc_iterator.h" ' C:\php\devel\include\ext\apcu\apc_iterator.h'
116+ Move-Item " C:\php\apcu-$apcu_version \apc_lock.h" ' C:\php\devel\include\ext\apcu\apc_lock.h'
117+ Move-Item " C:\php\apcu-$apcu_version \apc_mutex.h" ' C:\php\devel\include\ext\apcu\apc_mutex.h'
118+ Move-Item " C:\php\apcu-$apcu_version \apc_sma.h" ' C:\php\devel\include\ext\apcu\apc_sma.h'
119+ Move-Item " C:\php\apcu-$apcu_version \apc_serializer.h" ' C:\php\devel\include\ext\apcu\apc_serializer.h'
120+ Move-Item " C:\php\apcu-$apcu_version \apc_stack.h" ' C:\php\devel\include\ext\apcu\apc_stack.h'
121+ Move-Item " C:\php\apcu-$apcu_version \apc_windows_srwlock_kernel.h" ' C:\php\devel\include\ext\apcu\apc_windows_srwlock_kernel.h'
122+ Move-Item " C:\php\apcu-$apcu_version \apc_arginfo.h" ' C:\php\devel\include\ext\apcu\apc_arginfo.h'
123+ Move-Item " C:\php\apcu-$apcu_version \php_apc_legacy_arginfo.h" ' C:\php\devel\include\ext\apcu\php_apc_legacy_arginfo.h'
124+ }
0 commit comments