mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-03-24 09:02:12 +01:00
Compare commits
31 Commits
php-sdk-2.
...
pgo_84_ini
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ff0577ff7 | ||
|
|
d1036b5b3d | ||
|
|
19c8ccbf07 | ||
|
|
abe66fdf5b | ||
|
|
775cf0dbfa | ||
|
|
6ee0f9557b | ||
|
|
3a4163b0fa | ||
|
|
cc7c11adad | ||
|
|
d929b4aa7f | ||
|
|
c56dfe3e27 | ||
|
|
33bbf07e51 | ||
|
|
f29db9b574 | ||
|
|
e88df96780 | ||
|
|
75fdf46b45 | ||
|
|
e93a98a22b | ||
|
|
a00a4ff668 | ||
|
|
1bb6a4adb5 | ||
|
|
7893436c79 | ||
|
|
f6d81cff66 | ||
|
|
571063120d | ||
|
|
3562ee4586 | ||
|
|
9d638cbb32 | ||
|
|
73c01dfa10 | ||
|
|
677fe52847 | ||
|
|
2aef6dbdf2 | ||
|
|
37e9248d0f | ||
|
|
b3f507b55f | ||
|
|
743aedd52c | ||
|
|
1bb2ac6540 | ||
|
|
050caa59e5 | ||
|
|
27ea9be829 |
11
README.md
11
README.md
@@ -14,7 +14,7 @@ The PHP SDK 2.2+ is compatible with PHP 7.2 and above.
|
||||
|
||||
The PHP SDK 2.1 is required to build PHP 7.1 or 7.0.
|
||||
|
||||
The legacy binary tools SDK is available from the [legacy branch](https://github.com/Microsoft/php-sdk-binary-tools/tree/legacy) and is suitable to build PHP 5.
|
||||
The legacy binary tools SDK is available from the [legacy branch](https://github.com/php/php-sdk-binary-tools/tree/legacy) and is suitable to build PHP 5.
|
||||
|
||||
# Requirements
|
||||
|
||||
@@ -67,7 +67,7 @@ It is not required to hold the source in the PHP SDK directory. It could be usef
|
||||
|
||||
## Basic usage example
|
||||
|
||||
- `git clone https://github.com/Microsoft/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- `git clone https://github.com/php/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- `cd c:\php-sdk`
|
||||
- `git checkout php-sdk-2.1.9` or later
|
||||
- invoke `phpsdk-vc15-x64.bat`
|
||||
@@ -80,7 +80,7 @@ More extensive documentation can be found on the [wiki](https://wiki.php.net/int
|
||||
|
||||
## The old way
|
||||
|
||||
- `git clone https://github.com/Microsoft/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- `git clone https://github.com/php/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- follow the instructions on the PHP [wiki page](https://wiki.php.net/internals/windows/stepbystepbuild "PHP wiki page")
|
||||
|
||||
# Customizing
|
||||
@@ -122,7 +122,9 @@ As of the version 2.1.0, the SDK includes a tool for the [PGO](https://docs.micr
|
||||
## Preparing PGO training environment
|
||||
- the pgo folder in the SDK root dir contains templates and scenarios for PGO training
|
||||
- adjust and execute [doc/phpsdk_pgo_prep_elevated.bat.example](doc/phpsdk_pgo_prep_elevated.bat.example) to open ports required for PHP SDK training servers
|
||||
- run `phpsdk_pgo --init`
|
||||
- run `phpsdk_pgo --init`. Note that composer requires huge amounts of memory, so
|
||||
it may be necessary to set the environment variable `COMPOSER_MEMORY_LIMIT=-1`.
|
||||
The PGO initialization may not succeed in x86 enviroments.
|
||||
|
||||
## Creating PGO build
|
||||
- compile PHP configured using `--enable-pgi`
|
||||
@@ -204,4 +206,3 @@ previously.
|
||||
- `7za` should be preferred over `unzip` and `zip` for compatibility reasons.
|
||||
- If you experience some strange crashes on MSYS2 tools, try the phpsdk_rebase_msys2 tool. MSYS2 tools might be have unstable
|
||||
on ASLR enabled systems.
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/php/libsqlite3.dll
Normal file
BIN
bin/php/libsqlite3.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/php/php.exe
BIN
bin/php/php.exe
Binary file not shown.
Binary file not shown.
@@ -20,13 +20,16 @@ if "%PHP_SDK_ARCH%" NEQ "" (
|
||||
goto create_all
|
||||
) else (
|
||||
:create_all
|
||||
for %%i in (vc14 vc15 vs16) do (
|
||||
for %%i in (vc14 vc15 vs16 vs17) do (
|
||||
MD %_%\%%i\x86\deps\bin
|
||||
MD %_%\%%i\x86\deps\lib
|
||||
MD %_%\%%i\x86\deps\include
|
||||
MD %_%\%%i\x64\deps\bin
|
||||
MD %_%\%%i\x64\deps\lib
|
||||
MD %_%\%%i\x64\deps\include
|
||||
MD %_%\%%i\arm64\deps\bin
|
||||
MD %_%\%%i\arm64\deps\lib
|
||||
MD %_%\%%i\arm64\deps\include
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ function usage(int $code = -1)
|
||||
echo "Usage: ", PHP_EOL, PHP_EOL;
|
||||
echo "Configuration:", PHP_EOL;
|
||||
echo " -b --branch Branch name, eg. 7.0, 7.1, etc. If omited, several guess methods apply.", PHP_EOL;
|
||||
echo " -a --arch Architecture, x86 or x64. If omited, cl.exe is used to guess.", PHP_EOL;
|
||||
echo " -a --arch Architecture, x86 or x64 or arm64. If omited, cl.exe is used to guess.", PHP_EOL;
|
||||
echo " -t --crt CRT, marked by the corresponding VC++ version, eg. vc11, vc14, etc.", PHP_EOL;
|
||||
echo " -s --stability One of stable or staging.", PHP_EOL, PHP_EOL;
|
||||
echo "Commands:", PHP_EOL;
|
||||
|
||||
@@ -12,18 +12,8 @@ echo.
|
||||
call %PHP_SDK_BIN_PATH%\phpsdk_version.bat
|
||||
echo.
|
||||
|
||||
if "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
echo OS architecture: 64-bit
|
||||
) else (
|
||||
echo OS architecture: 32-bit
|
||||
)
|
||||
|
||||
if "%PHP_SDK_ARCH%"=="x64" (
|
||||
echo Build architecture: 64-bit
|
||||
) else (
|
||||
echo Build architecture: 32-bit
|
||||
)
|
||||
|
||||
echo OS architecture: %PHP_SDK_OS_ARCH%
|
||||
echo Build architecture: %PHP_SDK_ARCH%
|
||||
echo Visual C++: %PHP_SDK_VC_TOOLSET_VER%
|
||||
echo PHP-SDK path: %PHP_SDK_ROOT_PATH%
|
||||
|
||||
|
||||
@@ -44,32 +44,65 @@ if 14 gtr %TMP_CHK% (
|
||||
set PHP_SDK_VS_NUM=%TMP_CHK%
|
||||
set TMP_CHK=
|
||||
|
||||
if /i not "%2"=="x64" (
|
||||
if /i not "%2"=="x86" (
|
||||
echo Unsupported arch "%2"
|
||||
goto out_error
|
||||
)
|
||||
rem check target arch
|
||||
if "%2"=="x86" set PHP_SDK_ARCH=%2
|
||||
if "%2"=="x64" set PHP_SDK_ARCH=%2
|
||||
if "%2"=="x86_64" set PHP_SDK_ARCH=x64
|
||||
if "%2"=="amd64" set PHP_SDK_ARCH=x64
|
||||
if "%2"=="arm64" set PHP_SDK_ARCH=%2
|
||||
if "%PHP_SDK_ARCH%"=="" (
|
||||
echo Unsupported target arch %2 >&2
|
||||
goto out_error
|
||||
)
|
||||
|
||||
set PHP_SDK_ARCH=%2
|
||||
set TOOLSET=
|
||||
if NOT "%3"=="" SET TOOLSET=%3
|
||||
|
||||
rem check OS arch
|
||||
set TMPKEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
reg query "%TMPKEY%" /v "ProgramFilesDir (x86)" >nul 2>nul
|
||||
if not errorlevel 1 (
|
||||
set PHP_SDK_OS_ARCH=x64
|
||||
) else (
|
||||
if /i "%PHP_SDK_ARCH%"=="x64" (
|
||||
echo 32-bit OS detected, native 64-bit toolchain is unavailable.
|
||||
goto out_error
|
||||
)
|
||||
set PHP_SDK_OS_ARCH=x86
|
||||
rem todo: allow user choose host sdk arch (i.e. x64 target can be compiled at x64(native) or x86(cross))
|
||||
for /f "usebackq tokens=1*" %%i in (`wmic cpu get Architecture /value /format:table ^| findstr /r "[1234567890][1234567890]*"`) do (
|
||||
set PHP_SDK_OS_ARCH_NUM=%%i
|
||||
)
|
||||
set TMPKEY=
|
||||
|
||||
goto os_arch_cases
|
||||
:os_arch_error
|
||||
echo Unsupported OS arch %PHP_SDK_OS_ARCH% >&2
|
||||
goto out_error
|
||||
|
||||
:os_arch_cases
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="0" set PHP_SDK_OS_ARCH=x86
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="1" (set PHP_SDK_OS_ARCH=mips && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="2" (set PHP_SDK_OS_ARCH=alpha && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="3" (set PHP_SDK_OS_ARCH=ppc && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="4" (set PHP_SDK_OS_ARCH=shx && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="5" (set PHP_SDK_OS_ARCH=arm32 && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="6" (set PHP_SDK_OS_ARCH=ia64 && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="7" (set PHP_SDK_OS_ARCH=alpha64 && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="8" (set PHP_SDK_OS_ARCH=msil && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="9" set PHP_SDK_OS_ARCH=x64
|
||||
rem wow64
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="10" set PHP_SDK_OS_ARCH=x86
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="11" (set PHP_SDK_OS_ARCH=neutral && goto os_arch_error)
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="12" set PHP_SDK_OS_ARCH=arm64
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="13" (set PHP_SDK_OS_ARCH=arm32 && goto os_arch_error)
|
||||
rem woa64
|
||||
if "%PHP_SDK_OS_ARCH_NUM%"=="14" set PHP_SDK_OS_ARCH=x86
|
||||
if "%PHP_SDK_OS_ARCH%"=="" (
|
||||
goto os_arch_error
|
||||
)
|
||||
|
||||
set PHP_SDK_OS_ARCH_NUM=
|
||||
|
||||
rem cross compile is ok, so we donot need this
|
||||
rem if not /i "%PHP_SDK_ARCH%"=="PHP_SDK_OS_ARCH" (
|
||||
rem echo 32-bit OS detected, native 64-bit toolchain is unavailable.
|
||||
rem goto out_error
|
||||
rem )
|
||||
|
||||
rem get vc base dir
|
||||
if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
rem for arch other than x86, use WOW6432
|
||||
if /i not "%PHP_SDK_OS_ARCH%"=="x86" (
|
||||
set TMPKEY=HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%PHP_SDK_VS:~2%.0\Setup\VC
|
||||
) else (
|
||||
set TMPKEY=HKLM\SOFTWARE\Microsoft\VisualStudio\%PHP_SDK_VS:~2%.0\Setup\VC
|
||||
@@ -85,16 +118,22 @@ if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
set /a PHP_SDK_VS_RANGE=PHP_SDK_VS_NUM + 1
|
||||
set PHP_SDK_VS_RANGE="[%PHP_SDK_VS_NUM%,!PHP_SDK_VS_RANGE%!)"
|
||||
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo -version !PHP_SDK_VS_RANGE! -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text') do (
|
||||
set APPEND=x86.x64
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="arm64" (
|
||||
set APPEND=ARM64
|
||||
)
|
||||
set VS_VERSION_ARGS="-latest"
|
||||
if "%TOOLSET%"=="" set VS_VERSION_ARGS=-version !PHP_SDK_VS_RANGE!
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo !VS_VERSION_ARGS! -requires Microsoft.VisualStudio.Component.VC.Tools.!APPEND! -property installationPath -format text') do (
|
||||
set PHP_SDK_VC_DIR=%%b\VC
|
||||
)
|
||||
if not exist "!PHP_SDK_VC_DIR!" (
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo -version !PHP_SDK_VS_RANGE! -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text') do (
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo !VS_VERSION_ARGS! -products Microsoft.VisualStudio.Product.BuildTools -requires Microsoft.VisualStudio.Component.VC.Tools.!APPEND! -property installationPath -format text') do (
|
||||
set PHP_SDK_VC_DIR=%%b\VC
|
||||
)
|
||||
if not exist "!PHP_SDK_VC_DIR!" (
|
||||
rem check for a preview release
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo -version !PHP_SDK_VS_RANGE! -prerelease -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text') do (
|
||||
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo !VS_VERSION_ARGS! -prerelease -requires Microsoft.VisualStudio.Component.VC.Tools.!APPEND! -property installationPath -format text') do (
|
||||
set PHP_SDK_VC_DIR=%%b\VC
|
||||
)
|
||||
if not exist "!PHP_SDK_VC_DIR!" (
|
||||
@@ -105,13 +144,15 @@ if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
)
|
||||
set VSCMD_ARG_no_logo=nologo
|
||||
)
|
||||
set APPEND=
|
||||
set TMPKEY=
|
||||
set PHP_SDK_VS_RANGE=
|
||||
|
||||
if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
rem get sdk dir
|
||||
rem if 10.0 is available, it's ok
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
rem for arch other than x86, use WOW6432
|
||||
if /i not "%PHP_SDK_OS_ARCH%"=="x86" (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||
) else (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||
@@ -125,7 +166,8 @@ if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
)
|
||||
|
||||
rem Otherwise 8.1 should be available anyway
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
rem for arch other than x86, use WOW6432
|
||||
if /i not "%PHP_SDK_OS_ARCH%"=="x86" (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1
|
||||
) else (
|
||||
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1
|
||||
@@ -143,19 +185,39 @@ if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
)
|
||||
|
||||
if /i "%PHP_SDK_ARCH%"=="x64" (
|
||||
if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" amd64
|
||||
) else (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
)
|
||||
set TARGET_ARCH_NAME=amd64
|
||||
) else (
|
||||
if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" x86
|
||||
) else (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" x86
|
||||
)
|
||||
set TARGET_ARCH_NAME=%PHP_SDK_ARCH%
|
||||
)
|
||||
|
||||
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
|
||||
set HOST_ARCH_NAME=amd64
|
||||
) else (
|
||||
set HOST_ARCH_NAME=%PHP_SDK_ARCH%
|
||||
)
|
||||
|
||||
if "%HOST_ARCH_NAME%"=="%TARGET_ARCH_NAME%" (
|
||||
set VCVARSALL_ARCH_NAME=%HOST_ARCH_NAME%
|
||||
) else if "%HOST_ARCH_NAME%_%TARGET_ARCH_NAME%"=="amd64_x86" (
|
||||
set VCVARSALL_ARCH_NAME=%TARGET_ARCH_NAME%
|
||||
) else (
|
||||
set VCVARSALL_ARCH_NAME=%HOST_ARCH_NAME%_%TARGET_ARCH_NAME%
|
||||
)
|
||||
if 15 gtr %PHP_SDK_VS_NUM% (
|
||||
if NOT "%TOOLSET%"=="" (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" !VCVARSALL_ARCH_NAME! -vcvars_ver=%TOOLSET%
|
||||
) else (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" !VCVARSALL_ARCH_NAME!
|
||||
)
|
||||
) else (
|
||||
if NOT "%TOOLSET%"=="" (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" !VCVARSALL_ARCH_NAME! -vcvars_ver=%TOOLSET%
|
||||
) else (
|
||||
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" !VCVARSALL_ARCH_NAME!
|
||||
)
|
||||
)
|
||||
set VCVARSALL_ARCH_NAME=
|
||||
|
||||
rem echo Visual Studio VC path %PHP_SDK_VC_DIR%
|
||||
rem echo Windows SDK path %PHP_SDK_WIN_SDK_DIR%
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rem netsh advfirewall set allprofiles state off
|
||||
|
||||
rem NGINX
|
||||
netsh advfirewall firewall add rule name="NGINX for PGO" dir=in action=allow program="C:\php-snap-build\php-sdk\pgo\work\server\nginx\nginx.exe" profile=private
|
||||
for \l %%p in (8081, 1, 8091) do (
|
||||
for /l %%p in (8081, 1, 8091) do (
|
||||
netsh advfirewall firewall add rule name="Open Port %%p for PHP PGO" dir=in action=allow protocol=TCP localport=%%p profile=private
|
||||
netsh advfirewall firewall add rule name="Open Port %%p for PHP PGO" dir=in action=allow protocol=UDP localport=%%p profile=private
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@ class NGINX extends Abstracts\Server implements Interfaces\Server\HTTP
|
||||
$h = popen("start /b .\\nginx.exe 2>&1", "r");
|
||||
if (!is_resource($h)) {
|
||||
chdir($cwd);
|
||||
throw new Exception("Failed to start MariaDB.");
|
||||
throw new Exception("Failed to start NGINX.");
|
||||
}
|
||||
sleep(3);
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ use SDK\Build\Dependency\Fetcher;
|
||||
class Config
|
||||
{
|
||||
/* Config variables. */
|
||||
protected static $depsHost = 'windows.php.net';
|
||||
protected static $depsHost = 'downloads.php.net';
|
||||
protected static $depsPort = 443;
|
||||
protected static $depsUriScheme = "https";
|
||||
protected static $depsBaseUri = "/downloads/php-sdk/deps";
|
||||
protected static $depsBaseUri = "/~windows/php-sdk/deps";
|
||||
|
||||
/* protected static $sdkNugetFeedUrl = "http://127.0.0.1/sdk/nuget"; */
|
||||
|
||||
@@ -47,8 +47,8 @@ class Config
|
||||
{/*{{{*/
|
||||
$arch = strtolower($arch);
|
||||
|
||||
if ("x64" != $arch && "x86" != $arch) {
|
||||
throw new Exception("Unknown arch keyword, either x86 or x64 is accepted");
|
||||
if ("x64" != $arch && "x86" != $arch && "arm64" != $arch) {
|
||||
throw new Exception("Unknown arch keyword, x86 or x64 or arm64 is accepted");
|
||||
}
|
||||
|
||||
self::$currentArchName = $arch;
|
||||
@@ -72,6 +72,8 @@ class Config
|
||||
self::setCurrentArchName("x64");
|
||||
} elseif (preg_match(",x86,", $out[0])) {
|
||||
self::setCurrentArchName("x86");
|
||||
} elseif (preg_match(",arm64,", $out[0])) {
|
||||
self::setCurrentArchName("arm64");
|
||||
} else {
|
||||
throw new Exception("Couldn't determine Arch.");
|
||||
}
|
||||
@@ -146,7 +148,7 @@ class Config
|
||||
$tmp = $fetcher->getByUri(self::$depsBaseUri . "/series/");
|
||||
if (false !== $tmp) {
|
||||
$data = array();
|
||||
if (preg_match_all(",/packages-(.+)-(v[cs]\d+)-(x86|x64)-(stable|staging)\.txt,U", $tmp, $m, PREG_SET_ORDER)) {
|
||||
if (preg_match_all(",packages-(.+)-(v[cs]\d+)-(x86|x64|arm64)-(stable|staging)\.txt,Us", $tmp, $m, PREG_SET_ORDER)) {
|
||||
foreach ($m as $b) {
|
||||
if (!isset($data[$b[1]])) {
|
||||
$data[$b[1]] = array();
|
||||
@@ -276,7 +278,7 @@ class Config
|
||||
}
|
||||
}
|
||||
if (!$cur_crt_usable) {
|
||||
throw new Exception("The passed CRT '$cur_crt' doesn't match any availbale for branch '$current_branch_name'");
|
||||
throw new Exception("The passed CRT '$cur_crt' doesn't match any available for branch '$current_branch_name'");
|
||||
}
|
||||
$data = $branches[$current_branch_name][$cur_crt];
|
||||
} else {
|
||||
@@ -284,7 +286,7 @@ class Config
|
||||
$crt = key($branches[$current_branch_name]);
|
||||
$data = $branches[$current_branch_name][$crt];
|
||||
if ($crt != $cur_crt) {
|
||||
throw new Exception("The passed CRT '$cur_crt' doesn't match any availbale for branch '$current_branch_name'");
|
||||
throw new Exception("The passed CRT '$cur_crt' doesn't match any available for branch '$current_branch_name'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,9 @@ retry:
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
|
||||
// workaround for <https://github.com/microsoft/php-sdk-binary-tools/issues/69>
|
||||
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
|
||||
$ret = curl_exec($ch);
|
||||
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
0
pgo/cases/drupal/inactive
Normal file
0
pgo/cases/drupal/inactive
Normal file
0
pgo/cases/joomla/inactive
Normal file
0
pgo/cases/joomla/inactive
Normal file
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"joomla_zip_url": "https://github.com/joomla/joomla-cms/releases/download/3.8.11/Joomla_3.8.11-Stable-Full_Package.zip",
|
||||
"joomla_zip_url": "https://github.com/joomla/joomla-cms/releases/download/3.9.13/Joomla_3.9.13-Stable-Full_Package.zip",
|
||||
"type": "web",
|
||||
"srv_http": "nginx",
|
||||
"srv_db": "mariadb"
|
||||
|
||||
@@ -97,6 +97,18 @@ class TrainingCaseHandler extends Abstracts\TrainingCase implements Interfaces\T
|
||||
$class = preg_replace(",function Faculty,", "function __construct", $class);
|
||||
file_put_contents($fl, $class);
|
||||
|
||||
// patch <https://github.com/intel/php_pgo_training_scripts/pull/4>
|
||||
$fl = $htdocs . DIRECTORY_SEPARATOR . "standard_calls.php";
|
||||
$standard_calls = file_get_contents($fl);
|
||||
$standard_calls = preg_replace(",parse_str\(\\\$var1\),", "parse_str(\$var1, \$dummy)", $standard_calls);
|
||||
file_put_contents($fl, $standard_calls);
|
||||
|
||||
// patch <https://github.com/intel/php_pgo_training_scripts/pull/5>
|
||||
$fl = $htdocs . DIRECTORY_SEPARATOR . "init.php";
|
||||
$standard_calls = file_get_contents($fl);
|
||||
$standard_calls = preg_replace(",^initDB\(\);$,m", "mysqli_report(MYSQLI_REPORT_OFF);\n$0", $standard_calls);
|
||||
file_put_contents($fl, $standard_calls);
|
||||
|
||||
//$php->exec($cmd, NULL, $env);
|
||||
/* TODO check status or switch to cli. */
|
||||
$out = file_get_contents("http://$http_host:$http_port/init.php");
|
||||
|
||||
0
pgo/cases/symfony_demo/inactive
Normal file
0
pgo/cases/symfony_demo/inactive
Normal file
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"symfony_phar_url": "https://symfony.com/installer",
|
||||
"symfony_phar_url": "https://get.symfony.com/symfony.phar",
|
||||
"type": "web",
|
||||
"srv_http": "nginx",
|
||||
"srv_db": null
|
||||
|
||||
@@ -21,7 +21,7 @@ doctrine:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
orm:
|
||||
auto_generate_proxy_classes: '%kernel.debug%'
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
|
||||
0
pgo/cases/symfony_demo_pdo_mysql/inactive
Normal file
0
pgo/cases/symfony_demo_pdo_mysql/inactive
Normal file
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"symfony_demo_version": "v1.2.5",
|
||||
"symfony_demo_version": "v1.5.1",
|
||||
"type": "web",
|
||||
"srv_http": "nginx",
|
||||
"srv_db": "mariadb"
|
||||
|
||||
0
pgo/cases/wordpress/inactive
Normal file
0
pgo/cases/wordpress/inactive
Normal file
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"wp_cli_phar_url": "https://github.com/wp-cli/wp-cli/releases/download/v2.0.0/wp-cli-2.0.0.phar",
|
||||
"wp_cli_phar_url": "https://github.com/wp-cli/wp-cli/releases/download/v2.4.0/wp-cli-2.4.0.phar",
|
||||
"wptest_zip_url": "https://github.com/poststatus/wptest/archive/master.zip",
|
||||
"type": "web",
|
||||
"srv_http": "nginx",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"pkg_url": "https://downloads.mariadb.com/MariaDB/mariadb-5.5.61/win32-packages/mariadb-5.5.61-win32.zip",
|
||||
"pkg_url": "https://downloads.mariadb.com/MariaDB/mariadb-10.3.22/win32-packages/mariadb-10.3.22-win32.zip",
|
||||
"host": "localhost",
|
||||
"port": 3307,
|
||||
"user": "root",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"pkg_url": "http://nginx.org/download/nginx-1.15.2.zip",
|
||||
"pkg_url": "https://nginx.org/download/nginx-1.17.6.zip",
|
||||
"host": "127.0.0.1",
|
||||
"port": 8081
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ default_socket_timeout = 60
|
||||
;extension=php_bz2.dll
|
||||
extension=php_curl.dll
|
||||
extension=php_fileinfo.dll
|
||||
extension=php_gd2.dll
|
||||
extension=php_gd.dll
|
||||
extension=php_gettext.dll
|
||||
;extension=php_gmp.dll
|
||||
extension=php_intl.dll
|
||||
@@ -987,7 +987,7 @@ zend_extension=php_opcache.dll
|
||||
opcache.memory_consumption=PHP_SDK_PGO_PHP_OPCACHE_MEMORY_CONSUMPTION
|
||||
opcache.interned_strings_buffer=PHP_SDK_PGO_PHP_OPCACHE_INTERNED_STRINGS_BUFFER
|
||||
opcache.max_accelerated_files=PHP_SDK_PGO_PHP_OPCACHE_MAX_ACCELERATED_FILES
|
||||
opcache.jit_buffer_size=PHP_SDK_PGO_PHP_OPCACHE_JIT_BUFFER_SIZE
|
||||
;opcache.jit_buffer_size=PHP_SDK_PGO_PHP_OPCACHE_JIT_BUFFER_SIZE
|
||||
opcache.revalidate_freq=60
|
||||
opcache.fast_shutdown=1
|
||||
opcache.enable=1
|
||||
|
||||
@@ -948,7 +948,7 @@ default_socket_timeout = 60
|
||||
;extension=php_bz2.dll
|
||||
extension=php_curl.dll
|
||||
extension=php_fileinfo.dll
|
||||
extension=php_gd2.dll
|
||||
extension=php_gd.dll
|
||||
extension=php_gettext.dll
|
||||
;extension=php_gmp.dll
|
||||
extension=php_intl.dll
|
||||
|
||||
@@ -948,7 +948,7 @@ default_socket_timeout = 60
|
||||
;extension=php_bz2.dll
|
||||
extension=php_curl.dll
|
||||
extension=php_fileinfo.dll
|
||||
extension=php_gd2.dll
|
||||
extension=php_gd.dll
|
||||
extension=php_gettext.dll
|
||||
;extension=php_gmp.dll
|
||||
extension=php_intl.dll
|
||||
@@ -987,7 +987,7 @@ zend_extension=php_opcache.dll
|
||||
opcache.memory_consumption=PHP_SDK_PGO_PHP_OPCACHE_MEMORY_CONSUMPTION
|
||||
opcache.interned_strings_buffer=PHP_SDK_PGO_PHP_OPCACHE_INTERNED_STRINGS_BUFFER
|
||||
opcache.max_accelerated_files=PHP_SDK_PGO_PHP_OPCACHE_MAX_ACCELERATED_FILES
|
||||
opcache.jit_buffer_size=PHP_SDK_PGO_PHP_OPCACHE_JIT_BUFFER_SIZE
|
||||
;opcache.jit_buffer_size=PHP_SDK_PGO_PHP_OPCACHE_JIT_BUFFER_SIZE
|
||||
opcache.revalidate_freq=60
|
||||
opcache.fast_shutdown=1
|
||||
opcache.enable=1
|
||||
|
||||
@@ -948,7 +948,7 @@ default_socket_timeout = 60
|
||||
;extension=php_bz2.dll
|
||||
extension=php_curl.dll
|
||||
extension=php_fileinfo.dll
|
||||
extension=php_gd2.dll
|
||||
extension=php_gd.dll
|
||||
extension=php_gettext.dll
|
||||
;extension=php_gmp.dll
|
||||
extension=php_intl.dll
|
||||
|
||||
1912
pgo/tpl/php/php-8.1-pgo-nts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.1-pgo-nts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.1-pgo-nts.ini
Normal file
1898
pgo/tpl/php/php-8.1-pgo-nts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.1-pgo-ts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.1-pgo-ts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.1-pgo-ts.ini
Normal file
1898
pgo/tpl/php/php-8.1-pgo-ts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.2-pgo-nts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.2-pgo-nts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.2-pgo-nts.ini
Normal file
1898
pgo/tpl/php/php-8.2-pgo-nts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.2-pgo-ts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.2-pgo-ts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.2-pgo-ts.ini
Normal file
1898
pgo/tpl/php/php-8.2-pgo-ts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.3-pgo-nts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.3-pgo-nts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.3-pgo-nts.ini
Normal file
1898
pgo/tpl/php/php-8.3-pgo-nts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.3-pgo-ts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.3-pgo-ts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.3-pgo-ts.ini
Normal file
1898
pgo/tpl/php/php-8.3-pgo-ts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.4-pgo-nts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.4-pgo-nts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.4-pgo-nts.ini
Normal file
1898
pgo/tpl/php/php-8.4-pgo-nts.ini
Normal file
File diff suppressed because it is too large
Load Diff
1912
pgo/tpl/php/php-8.4-pgo-ts-cache.ini
Normal file
1912
pgo/tpl/php/php-8.4-pgo-ts-cache.ini
Normal file
File diff suppressed because it is too large
Load Diff
1898
pgo/tpl/php/php-8.4-pgo-ts.ini
Normal file
1898
pgo/tpl/php/php-8.4-pgo-ts.ini
Normal file
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,12 @@
|
||||
{
|
||||
"cache": {
|
||||
"ini": {
|
||||
"arm64": {
|
||||
"opcache.memory_consumption": 256,
|
||||
"opcache.interned_strings_buffer": 16,
|
||||
"opcache.max_accelerated_files": 8000,
|
||||
"opcache.jit_buffer_size": "32M"
|
||||
},
|
||||
"x64": {
|
||||
"opcache.memory_consumption": 256,
|
||||
"opcache.interned_strings_buffer": 16,
|
||||
|
||||
@@ -14,6 +14,7 @@ set PHP_SDK_ROOT_PATH=%PHP_SDK_ROOT_PATH:~0,-1%
|
||||
if /i "%1" equ "-h" goto help
|
||||
if /i "%1" equ "-c" set CRT=%2 & shift
|
||||
if /i "%1" equ "-a" set ARCH=%2 & shift
|
||||
if /i "%1" equ "-s" set TOOLSET=%2 & shift
|
||||
if /i "%1" equ "-t" set TASK=%2 & shift
|
||||
if /i "%1" equ "--task-args" set TASK_ARGS=%2 & shift
|
||||
shift
|
||||
@@ -37,7 +38,7 @@ set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
title PHP SDK %CRT% %ARCH%
|
||||
|
||||
call %PHP_SDK_ROOT_PATH%\bin\phpsdk_setshell.bat %CRT% %ARCH%
|
||||
call %PHP_SDK_ROOT_PATH%\bin\phpsdk_setshell.bat %CRT% %ARCH% %TOOLSET%
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
set CRT=
|
||||
|
||||
6
phpsdk-vs17-x64.bat
Normal file
6
phpsdk-vs17-x64.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
|
||||
call %~dp0phpsdk-starter.bat -c vs17 -a x64 %*
|
||||
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
6
phpsdk-vs17-x86.bat
Normal file
6
phpsdk-vs17-x86.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
|
||||
call %~dp0phpsdk-starter.bat -c vs17 -a x86 %*
|
||||
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
Reference in New Issue
Block a user