Skip to content

Commit

Permalink
auto setup PHP version in cmder from uwamp
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyou committed Nov 28, 2017
1 parent e3f74e1 commit 825b67e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/cmder/config/user-profile.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,21 @@ if not defined WAGON_ROOT (
for /f "delims=" %%i in ("%ConEmuDir%\..\..\..") do set "WAGON_ROOT=%%~fi"
)

:: Define environment variables
:: Define git variable and PATCH
set GIT_INSTALL_ROOT=%WAGON_ROOT%\git
set PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\share\vim\vim74;%PATH%

:: Parse PHP version
FOR /F "tokens=*" %%A IN ('type "%WAGON_ROOT%\uwamp\uwamp.ini" ^| tr -d " "') DO SET %%A

:: Define PHP Composer SQLite variables
set CMDER_START=%WAGON_ROOT%\uwamp\www
set COMPOSER_HOME=%WAGON_ROOT%\composer
set PHP_INSTSLL_ROOT=%WAGON_ROOT%\uwamp\bin\php\php-7.1.10
set PHP_INSTSLL_ROOT=%WAGON_ROOT%\uwamp\bin\php\%PHP_CURRENT_VERSION%
set SQLITE_ROOT=%CMDER_ROOT%\vendor\sqlite
set GIT_INSTALL_ROOT=%WAGON_ROOT%\git

:: Set PATH
:: Set PHP Composer SQLite PATH
set PATH=%PHP_INSTSLL_ROOT%;%COMPOSER_HOME%;%COMPOSER_HOME%\vendor\bin;%SQLITE_ROOT%;%CMDER_ROOT%\bin;%CMDER_ROOT%;%PATH%
set PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\share\vim\vim74;%PATH%

:: Change default working directory
if defined CMDER_START (
Expand Down

0 comments on commit 825b67e

Please sign in to comment.