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