Updated PEAR and PEAR packages.
[timetracker.git] / WEB-INF / lib / pear / scripts / peardev.bat
1 @ECHO OFF\r
2 \r
3 REM ----------------------------------------------------------------------\r
4 REM PHP version 5\r
5 REM ----------------------------------------------------------------------\r
6 REM Copyright (c) 1997-2004 The PHP Group\r
7 REM ----------------------------------------------------------------------\r
8 REM  This source file is subject to version 3.0 of the PHP license,\r
9 REM  that is bundled with this package in the file LICENSE, and is\r
10 REM  available at through the world-wide-web at\r
11 REM  http://www.php.net/license/3_0.txt.\r
12 REM  If you did not receive a copy of the PHP license and are unable to\r
13 REM  obtain it through the world-wide-web, please send a note to\r
14 REM  license@php.net so we can mail you a copy immediately.\r
15 REM ----------------------------------------------------------------------\r
16 REM  Authors:     Alexander Merz (alexmerz@php.net)\r
17 REM ----------------------------------------------------------------------\r
18 REM\r
19 REM  $Id: peardev.bat,v 1.6 2007-09-03 03:00:17 cellog Exp $\r
20 \r
21 REM change this lines to match the paths of your system\r
22 REM -------------------\r
23 \r
24 \r
25 REM Test to see if this is a raw pear.bat (uninstalled version)\r
26 SET TMPTMPTMPTMPT=@includ\r
27 SET PMTPMTPMT=%TMPTMPTMPTMPT%e_path@\r
28 FOR %%x IN ("@include_path@") DO (if %%x=="%PMTPMTPMT%" GOTO :NOTINSTALLED)\r
29 \r
30 REM Check PEAR global ENV, set them if they do not exist\r
31 IF "%PHP_PEAR_INSTALL_DIR%"=="" SET "PHP_PEAR_INSTALL_DIR=@include_path@"\r
32 IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=@bin_dir@"\r
33 IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=@php_bin@"\r
34 GOTO :INSTALLED\r
35 \r
36 :NOTINSTALLED\r
37 ECHO WARNING: This is a raw, uninstalled pear.bat\r
38 \r
39 REM Check to see if we can grab the directory of this file (Windows NT+)\r
40 IF %~n0 == pear (\r
41 FOR %%x IN (cli\php.exe php.exe) DO (if "%%~$PATH:x" NEQ "" (\r
42 SET "PHP_PEAR_PHP_BIN=%%~$PATH:x"\r
43 echo Using PHP Executable "%PHP_PEAR_PHP_BIN%"\r
44 "%PHP_PEAR_PHP_BIN%" -v\r
45 GOTO :NEXTTEST\r
46 ))\r
47 GOTO :FAILAUTODETECT\r
48 :NEXTTEST\r
49 IF "%PHP_PEAR_PHP_BIN%" NEQ "" (\r
50 \r
51 REM We can use this PHP to run a temporary php file to get the dirname of pear\r
52 \r
53 echo ^<?php $s=getcwd^(^);chdir^($a=dirname^(__FILE__^).'\\'^);if^(stristr^($a,'\\scripts'^)^)$a=dirname^(dirname^($a^)^).'\\';$f=fopen^($s.'\\~a.a','wb'^);echo$s.'\\~a.a';fwrite^($f,$a^);fclose^($f^);chdir^($s^);?^> > ~~getloc.php\r
54 "%PHP_PEAR_PHP_BIN%" ~~getloc.php\r
55 set /p PHP_PEAR_BIN_DIR=fakeprompt < ~a.a\r
56 DEL ~a.a\r
57 DEL ~~getloc.php\r
58 set "PHP_PEAR_INSTALL_DIR=%PHP_PEAR_BIN_DIR%pear"\r
59 \r
60 REM Make sure there is a pearcmd.php at our disposal\r
61 \r
62 IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php (\r
63 IF EXIST %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php COPY %PHP_PEAR_INSTALL_DIR%\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php\r
64 IF EXIST pearcmd.php COPY pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php\r
65 IF EXIST %~dp0\scripts\pearcmd.php COPY %~dp0\scripts\pearcmd.php %PHP_PEAR_INSTALL_DIR%\pearcmd.php\r
66 )\r
67 )\r
68 GOTO :INSTALLED\r
69 ) ELSE (\r
70 REM Windows Me/98 cannot succeed, so allow the batch to fail\r
71 )\r
72 :FAILAUTODETECT\r
73 echo WARNING: failed to auto-detect pear information\r
74 :INSTALLED\r
75 \r
76 REM Check Folders and files\r
77 IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR\r
78 IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2\r
79 IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR\r
80 IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR\r
81 REM launch pearcmd\r
82 GOTO RUN\r
83 :PEAR_INSTALL_ERROR\r
84 ECHO PHP_PEAR_INSTALL_DIR is not set correctly.\r
85 ECHO Please fix it using your environment variable or modify\r
86 ECHO the default value in pear.bat\r
87 ECHO The current value is:\r
88 ECHO %PHP_PEAR_INSTALL_DIR%\r
89 GOTO END\r
90 :PEAR_INSTALL_ERROR2\r
91 ECHO PHP_PEAR_INSTALL_DIR is not set correctly.\r
92 ECHO pearcmd.php could not be found there.\r
93 ECHO Please fix it using your environment variable or modify\r
94 ECHO the default value in pear.bat\r
95 ECHO The current value is:\r
96 ECHO %PHP_PEAR_INSTALL_DIR%\r
97 GOTO END\r
98 :PEAR_BIN_ERROR\r
99 ECHO PHP_PEAR_BIN_DIR is not set correctly.\r
100 ECHO Please fix it using your environment variable or modify\r
101 ECHO the default value in pear.bat\r
102 ECHO The current value is:\r
103 ECHO %PHP_PEAR_BIN_DIR%\r
104 GOTO END\r
105 :PEAR_PHPBIN_ERROR\r
106 ECHO PHP_PEAR_PHP_BIN is not set correctly.\r
107 ECHO Please fix it using your environment variable or modify\r
108 ECHO the default value in pear.bat\r
109 ECHO The current value is:\r
110 ECHO %PHP_PEAR_PHP_BIN%\r
111 GOTO END\r
112 :RUN\r
113 "%PHP_PEAR_PHP_BIN%" -C -d date.timezone=UTC -d memory_limit="-1" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" -d variables_order=EGPCS -d open_basedir="" -d output_buffering=1 -d "include_path='%PHP_PEAR_INSTALL_DIR%'" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9\r
114 :END\r
115 @ECHO ON