|
1 |
| -@echo off |
2 |
| - |
3 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL |
4 |
| -if %errorlevel% neq 0 exit /b 3 |
5 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL |
6 |
| -if %errorlevel% neq 0 exit /b 3 |
7 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL |
8 |
| -if %errorlevel% neq 0 exit /b 3 |
9 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL |
10 |
| -if %errorlevel% neq 0 exit /b 3 |
11 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL |
12 |
| -if %errorlevel% neq 0 exit /b 3 |
13 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL |
14 |
| -if %errorlevel% neq 0 exit /b 3 |
15 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL |
16 |
| -if %errorlevel% neq 0 exit /b 3 |
17 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL |
18 |
| -if %errorlevel% neq 0 exit /b 3 |
19 |
| -if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL |
20 |
| -if %errorlevel% neq 0 exit /b 3 |
21 |
| -if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL |
22 |
| -if %errorlevel% neq 0 exit /b 3 |
23 |
| -if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL |
24 |
| -if %errorlevel% neq 0 exit /b 3 |
25 |
| - |
26 |
| -cd /D %APPVEYOR_BUILD_FOLDER% |
27 |
| -if %errorlevel% neq 0 exit /b 3 |
28 |
| - |
29 |
| -if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" ( |
30 |
| - set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3% |
31 |
| -) else ( |
32 |
| - set BRANCH=master |
33 |
| -) |
34 |
| -set STABILITY=staging |
35 |
| -set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH% |
36 |
| -rem SDK is cached, deps info is cached as well |
37 |
| -echo Updating dependencies in %DEPS_DIR% |
38 |
| -cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT% |
39 |
| -if %errorlevel% neq 0 exit /b 3 |
40 |
| - |
41 |
| -rem Something went wrong, most likely when concurrent builds were to fetch deps |
42 |
| -rem updates. It might be, that some locking mechanism is needed. |
43 |
| -if not exist "%DEPS_DIR%" ( |
44 |
| - cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% |
45 |
| -) |
46 |
| -if %errorlevel% neq 0 exit /b 3 |
47 |
| - |
48 |
| -cmd /c buildconf.bat --force |
49 |
| -if %errorlevel% neq 0 exit /b 3 |
50 |
| - |
51 |
| -if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts |
52 |
| -if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS% |
53 |
| - |
54 |
| -set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap,ftp |
55 |
| -if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache |
56 |
| - |
57 |
| -set CFLAGS=/W1 /WX |
58 |
| - |
59 |
| -cmd /c configure.bat ^ |
60 |
| - --enable-snapshot-build ^ |
61 |
| - --disable-debug-pack ^ |
62 |
| - --enable-com-dotnet=shared ^ |
63 |
| - --without-analyzer ^ |
64 |
| - --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ |
65 |
| - --with-php-build=%DEPS_DIR% ^ |
66 |
| - %ADD_CONF% ^ |
67 |
| - --with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST% |
68 |
| -if %errorlevel% neq 0 exit /b 3 |
69 |
| - |
70 |
| -nmake /NOLOGO |
71 |
| -if %errorlevel% neq 0 exit /b 3 |
72 |
| - |
73 |
| -exit /b 0 |
| 1 | +@echo off |
| 2 | + |
| 3 | +if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL |
| 4 | +if %errorlevel% neq 0 exit /b 3 |
| 5 | +if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL |
| 6 | +if %errorlevel% neq 0 exit /b 3 |
| 7 | +if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL |
| 8 | +if %errorlevel% neq 0 exit /b 3 |
| 9 | +if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL |
| 10 | +if %errorlevel% neq 0 exit /b 3 |
| 11 | +if "%APPVEYOR%" equ "True" rmdir /s /q C:\msys64 >NUL 2>NUL |
| 12 | +if %errorlevel% neq 0 exit /b 3 |
| 13 | +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win32 >NUL 2>NUL |
| 14 | +if %errorlevel% neq 0 exit /b 3 |
| 15 | +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-Win64 >NUL 2>NUL |
| 16 | +if %errorlevel% neq 0 exit /b 3 |
| 17 | +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win32 >NUL 2>NUL |
| 18 | +if %errorlevel% neq 0 exit /b 3 |
| 19 | +if "%APPVEYOR%" equ "True" rmdir /s /q c:\OpenSSL-v11-Win64 >NUL 2>NUL |
| 20 | +if %errorlevel% neq 0 exit /b 3 |
| 21 | +if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libcrypto-1_1-x64.dll >NUL 2>NUL |
| 22 | +if %errorlevel% neq 0 exit /b 3 |
| 23 | +if "%APPVEYOR%" equ "True" del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL |
| 24 | +if %errorlevel% neq 0 exit /b 3 |
| 25 | + |
| 26 | +cd /D %APPVEYOR_BUILD_FOLDER% |
| 27 | +if %errorlevel% neq 0 exit /b 3 |
| 28 | + |
| 29 | +if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" ( |
| 30 | + set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3% |
| 31 | +) else ( |
| 32 | + set BRANCH=master |
| 33 | +) |
| 34 | +set STABILITY=staging |
| 35 | +set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH% |
| 36 | +rem SDK is cached, deps info is cached as well |
| 37 | +echo Updating dependencies in %DEPS_DIR% |
| 38 | +cmd /c phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% --crt %PHP_BUILD_CRT% |
| 39 | +if %errorlevel% neq 0 exit /b 3 |
| 40 | + |
| 41 | +rem Something went wrong, most likely when concurrent builds were to fetch deps |
| 42 | +rem updates. It might be, that some locking mechanism is needed. |
| 43 | +if not exist "%DEPS_DIR%" ( |
| 44 | + cmd /c phpsdk_deps --update --force --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR% |
| 45 | +) |
| 46 | +if %errorlevel% neq 0 exit /b 3 |
| 47 | + |
| 48 | +cmd /c buildconf.bat --force |
| 49 | +if %errorlevel% neq 0 exit /b 3 |
| 50 | + |
| 51 | +if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts |
| 52 | +if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS% |
| 53 | + |
| 54 | +set EXT_EXCLUDE_FROM_TEST=snmp,oci8_12c,pdo_oci,pdo_firebird,ldap,imap,ftp |
| 55 | +if "%OPCACHE%" equ "0" set EXT_EXCLUDE_FROM_TEST=%EXT_EXCLUDE_FROM_TEST%,opcache |
| 56 | + |
| 57 | +set CFLAGS=/W1 /WX |
| 58 | + |
| 59 | +cmd /c configure.bat ^ |
| 60 | + --enable-snapshot-build ^ |
| 61 | + --disable-debug-pack ^ |
| 62 | + --enable-com-dotnet=shared ^ |
| 63 | + --without-analyzer ^ |
| 64 | + --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ |
| 65 | + --with-php-build=%DEPS_DIR% ^ |
| 66 | + %ADD_CONF% ^ |
| 67 | + --with-test-ini-ext-exclude=%EXT_EXCLUDE_FROM_TEST% |
| 68 | +if %errorlevel% neq 0 exit /b 3 |
| 69 | + |
| 70 | +nmake /NOLOGO |
| 71 | +if %errorlevel% neq 0 exit /b 3 |
| 72 | + |
| 73 | +exit /b 0 |
0 commit comments