-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAll.cmd
52 lines (43 loc) · 1.24 KB
/
buildAll.cmd
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
ECHO OFF
setlocal ENABLEDELAYEDEXPANSION
CLS
ECHO.
ECHO ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO º º
ECHO º Processing all examples (this may takes 1-2 minutes) º
ECHO º º
ECHO ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
ECHO.
php -v 1>NUL 2>NUL
IF %ERRORLEVEL% == 0 GOTO getVersion
GOTO noPHP
:getVersion
FOR /F "tokens=1,2 delims= " %%G IN ('php -v') DO (
IF %%G==PHP SET PHPVersion=%%H
)
:render
ECHO The PHP binaries (%PHPVersion%) have been located
ECHO.
ECHO Processing examples : >temp\errors.log
REM SET /P Var=" Progress : "<NUL
FOR %%f IN (examples\example*.*) DO (
set t=%%f
if !t:~-3! == php (
SET /P Var=þ<NUL
ECHO %%f >>temp\errors.log
php -q "%%f" 2>&1>>temp\errors.log
)
)
ECHO.
ECHO.
ECHO All the example have been rendered in the following folder :
ECHO.
ECHO temp\
GOTO end
:noPHP
ECHO The PHP binaries can't be found. We strongly advise you to put it in
ECHO the system path variable.
ECHO.
ECHO Examples rendering has been aborded.
:end
PAUSE >NUL