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