-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathphp-fb-sdk-build.bat
57 lines (49 loc) · 1.56 KB
/
php-fb-sdk-build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
@REM
@REM Must be called under phpsdk-<php_vers>-<arch>.bat
@REM
@REM Calling script should set variables:
@REM <FB32_DIR> <FB64_DIR> <PFB_SOURCE_DIR> <pfb_php_vers> [pfb_nts] [pfb_x86]
@REM
@REM set pfb_php_vers=7.4
@REM set pfb_nts=1 if nts expected, 0 if ts
@REM set pfb_x86=1 if linking to x86 fbclient, o if x64
@REM
@REM <FB32_DIR> <FB64_DIR> <PFB_SOURCE_DIR> all set in php-fb-config.bat
@REM
goto :MAIN
@REM log =========================================================================================
@REM log <msg>
@REM example> call :log "<msg>"
:log
set msg=%~1
echo ---------------------------------------------------------------------
echo %msg%
echo ---------------------------------------------------------------------
exit /B
:MAIN
if [%pfb_php_vers%] == [] (
echo pfb_php_vers varible not set
exit 1
)
set build_msg=Building PHP-%pfb_php_vers%
if "%pfb_nts%" gtr "0" (
set build_msg=%build_msg% non-TS
set extra_args=--disable-zts
) else (
set build_msg=%build_msg% TS
set extra_args=
)
if "%pfb_x86%" gtr "0" (
set with_interbase="shared,%FB32_DIR%"
set build_msg=%build_msg% x86
) else (
set with_interbase="shared,%FB64_DIR%"
set build_msg=%build_msg% x86_64
)
call :log "%build_msg%"
call phpsdk_buildtree php%pfb_php_vers%
cd /D php-src
call buildconf.bat --force --add-modules-dir=%PFB_SOURCE_DIR%
call configure.bat --disable-all --enable-cli %extra_args% --with-interbase=%with_interbase%
nmake