mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
commit
0e37a4c2f9
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,8 +1,21 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## [Unreleased]
|
## 1.3.14-pre [Unreleased]
|
||||||
|
|
||||||
## [1.3.13](https://github.com/cmderdev/cmder/tree/v1.3.12) (2019-11-03)
|
### Fixes
|
||||||
|
|
||||||
|
* Pull Request: [#2222](https://github.com/cmderdev/cmder/pull/2222)
|
||||||
|
* Cmder v1.3.13 init script fails. [#2218](https://github.com/cmderdev/cmder/issues/2218)
|
||||||
|
* Git & env related error messages. [#2220](https://github.com/cmderdev/cmder/issues/2220)
|
||||||
|
* Latest addition of "--nolog" clink breaks cmd prompts. [#2166](https://github.com/cmderdev/cmder/issues/2166)
|
||||||
|
* `/nix_tools 0` should prevent adding `%GIT_INSTALL_ROOT%\mingw64\bin` to PATH. [#2214](https://github.com/cmderdev/cmder/issues/2214)
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
* Update Git for Windows to 2.24.1.windows.2
|
||||||
|
* Pull Request: [#2237](https://github.com/cmderdev/cmder/pull/2237)
|
||||||
|
|
||||||
|
## [1.3.13](https://github.com/cmderdev/cmder/tree/v1.3.13) (2019-11-03)
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
|
18
vendor/init.bat
vendored
18
vendor/init.bat
vendored
@ -141,14 +141,14 @@ if "%CMDER_CLINK%" == "1" (
|
|||||||
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_USER_CONFIG%\settings"
|
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_USER_CONFIG%\settings"
|
||||||
echo Additional *.lua files in "%CMDER_USER_CONFIG%" are loaded on startup.\
|
echo Additional *.lua files in "%CMDER_USER_CONFIG%" are loaded on startup.\
|
||||||
)
|
)
|
||||||
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_USER_CONFIG%" --scripts "%CMDER_ROOT%\vendor" --nolog
|
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_USER_CONFIG%" --scripts "%CMDER_ROOT%\vendor"
|
||||||
) else (
|
) else (
|
||||||
if not exist "%CMDER_ROOT%\config\settings" (
|
if not exist "%CMDER_ROOT%\config\settings" (
|
||||||
echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
|
echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
|
||||||
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_ROOT%\config\settings"
|
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_ROOT%\config\settings"
|
||||||
echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.
|
echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.
|
||||||
)
|
)
|
||||||
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor" --nolog
|
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
%lib_console% verbose_output "WARNING: Incompatible 'ComSpec/Shell' Detetected Skipping Clink Injection!"
|
%lib_console% verbose_output "WARNING: Incompatible 'ComSpec/Shell' Detetected Skipping Clink Injection!"
|
||||||
@ -192,13 +192,14 @@ for /F "delims=" %%F in ('where git.exe 2^>nul') do (
|
|||||||
:VENDORED_GIT
|
:VENDORED_GIT
|
||||||
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||||
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
|
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
|
||||||
|
%lib_console% debug_output "Using vendored Git '%GIT_VERSION_VENDORED%'..."
|
||||||
goto :CONFIGURE_GIT
|
goto :CONFIGURE_GIT
|
||||||
) else (
|
) else (
|
||||||
goto :NO_GIT
|
goto :NO_GIT
|
||||||
)
|
)
|
||||||
|
|
||||||
:SPECIFIED_GIT
|
:SPECIFIED_GIT
|
||||||
%lib_console% debug_output "Using /GIT_INSTALL_ROOT from '%GIT_INSTALL_ROOT%..."
|
%lib_console% debug_output "Using /GIT_INSTALL_ROOT..."
|
||||||
goto :CONFIGURE_GIT
|
goto :CONFIGURE_GIT
|
||||||
|
|
||||||
:FOUND_GIT
|
:FOUND_GIT
|
||||||
@ -206,6 +207,7 @@ goto :CONFIGURE_GIT
|
|||||||
goto :CONFIGURE_GIT
|
goto :CONFIGURE_GIT
|
||||||
|
|
||||||
:CONFIGURE_GIT
|
:CONFIGURE_GIT
|
||||||
|
%lib_console% debug_output "Using Git from '%GIT_INSTALL_ROOT%..."
|
||||||
:: Add git to the path
|
:: Add git to the path
|
||||||
rem add the unix commands at the end to not shadow windows commands like more
|
rem add the unix commands at the end to not shadow windows commands like more
|
||||||
if %nix_tools% equ 1 (
|
if %nix_tools% equ 1 (
|
||||||
@ -217,13 +219,13 @@ if %nix_tools% equ 1 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" %lib_path% enhance_path "%GIT_INSTALL_ROOT%\cmd" %path_position%
|
if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" %lib_path% enhance_path "%GIT_INSTALL_ROOT%\cmd" %path_position%
|
||||||
|
if %nix_tools% geq 1 (
|
||||||
if exist "%GIT_INSTALL_ROOT%\mingw32" (
|
if exist "%GIT_INSTALL_ROOT%\mingw32" (
|
||||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw32\bin" %path_position%
|
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw32\bin" %path_position%
|
||||||
) else if exist "%GIT_INSTALL_ROOT%\mingw64" (
|
) else if exist "%GIT_INSTALL_ROOT%\mingw64" (
|
||||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw64\bin" %path_position%
|
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw64\bin" %path_position%
|
||||||
)
|
)
|
||||||
|
|
||||||
if %nix_tools% geq 1 (
|
|
||||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\usr\bin" %path_position%
|
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\usr\bin" %path_position%
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -232,16 +234,18 @@ if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
|
|||||||
|
|
||||||
:: Find locale.exe: From the git install root, from the path, using the git installed env, or fallback using the env from the path.
|
:: Find locale.exe: From the git install root, from the path, using the git installed env, or fallback using the env from the path.
|
||||||
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\locale.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe"
|
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\locale.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe"
|
||||||
if not defined git_locale for /F "delims=" %%F in ('where locale.exe 2^>nul') do (if not defined git_locale set git_locale="%%F")
|
if not defined git_locale for /F "tokens=* delims=" %%F in ('where locale.exe 2^>nul') do ( if not defined git_locale set git_locale="%%F" )
|
||||||
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\env.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\env.exe" /usr/bin/locale
|
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\env.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\env.exe" /usr/bin/locale
|
||||||
if not defined git_locale set git_locale=env /usr/bin/locale
|
if not defined git_locale for /F "tokens=* delims=" %%F in ('where env.exe 2^>nul') do ( if not defined git_locale set git_locale="%%F" /usr/bin/locale )
|
||||||
|
|
||||||
|
if defined git_locale (
|
||||||
%lib_console% debug_output init.bat "Env Var - git_locale=%git_locale%"
|
%lib_console% debug_output init.bat "Env Var - git_locale=%git_locale%"
|
||||||
if not defined LANG (
|
if not defined LANG (
|
||||||
for /F "delims=" %%F in ('%git_locale% -uU 2') do (
|
for /F "delims=" %%F in ('%git_locale% -uU 2') do (
|
||||||
set "LANG=%%F"
|
set "LANG=%%F"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
%lib_console% debug_output init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"
|
%lib_console% debug_output init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"
|
||||||
%lib_console% debug_output init.bat "Found Git in: '%GIT_INSTALL_ROOT%'"
|
%lib_console% debug_output init.bat "Found Git in: '%GIT_INSTALL_ROOT%'"
|
||||||
@ -405,6 +409,7 @@ exit /b
|
|||||||
set test_dir=
|
set test_dir=
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
|
:: compare the user git version against the vendored version
|
||||||
:: if the user provided git executable is not found
|
:: if the user provided git executable is not found
|
||||||
if %errorlevel% equ -255 (
|
if %errorlevel% equ -255 (
|
||||||
call :verbose_output No git at "%git_executable%" found.
|
call :verbose_output No git at "%git_executable%" found.
|
||||||
@ -414,7 +419,6 @@ exit /b
|
|||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:get_user_git_version
|
:get_user_git_version
|
||||||
|
|
||||||
:: get the version information for the user provided git binary
|
:: get the version information for the user provided git binary
|
||||||
%lib_git% read_version USER "%test_dir%"
|
%lib_git% read_version USER "%test_dir%"
|
||||||
%lib_git% validate_version USER %GIT_VERSION_USER%
|
%lib_git% validate_version USER %GIT_VERSION_USER%
|
||||||
|
54
vendor/lib/lib_path.cmd
vendored
54
vendor/lib/lib_path.cmd
vendored
@ -57,39 +57,38 @@ exit /b
|
|||||||
) else (
|
) else (
|
||||||
set "PATH=%add_path%;%PATH%"
|
set "PATH=%add_path%;%PATH%"
|
||||||
)
|
)
|
||||||
|
goto :end_enhance_path
|
||||||
)
|
)
|
||||||
|
|
||||||
set "PATH=%PATH:;;=;%"
|
|
||||||
if "%fast_init%" == "1" (
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
rem setlocal enabledelayedexpansion
|
|
||||||
|
|
||||||
set found=0
|
set found=0
|
||||||
set "find_query=%add_path%"
|
set "find_query=%add_path%"
|
||||||
set "find_query=%find_query:\=\\%"
|
set "find_query=%find_query:\=\\%"
|
||||||
set "find_query=%find_query: =\ %"
|
set "find_query=%find_query: =\ %"
|
||||||
|
set OLD_PATH=%PATH%
|
||||||
|
|
||||||
if "%CMDER_CONFIGURED%" == "1" (
|
setlocal enabledelayedexpansion
|
||||||
%lib_console% debug_output :enhance_path "Env Var - find_query=%find_query%"
|
if "%found%" == "0" (
|
||||||
echo "%path%"|%WINDIR%\System32\findstr >nul /I /R ";%find_query%\"$"
|
echo "%path%"|%WINDIR%\System32\findstr >nul /I /R /C:";%find_query%;"
|
||||||
REM if "!ERRORLEVEL!" == "0" set found=1
|
|
||||||
call :set_found
|
call :set_found
|
||||||
)
|
)
|
||||||
%lib_console% debug_output :enhance_path "Env Var 1 - found=%found%"
|
%lib_console% debug_output :enhance_path "Env Var INSIDE PATH %find_query% - found=%found%"
|
||||||
|
|
||||||
if "%found%" == "0" (
|
if /i "%position%" == "append" (
|
||||||
if "%CMDER_CONFIGURED%" == "1" (
|
if "!found!" == "0" (
|
||||||
echo "%path%"|%WINDIR%\System32\findstr >nul /i /r ";%find_query%;"
|
echo "%path%"|%WINDIR%\System32\findstr >nul /I /R /C:";%find_query%\"$"
|
||||||
REM if "!ERRORLEVEL!" == "0" set found=1
|
|
||||||
call :set_found
|
call :set_found
|
||||||
)
|
)
|
||||||
%lib_console% debug_output :enhance_path "Env Var 2 - found=%found%"
|
%lib_console% debug_output :enhance_path "Env Var END PATH %find_query% - found=!found!"
|
||||||
|
) else (
|
||||||
|
if "!found!" == "0" (
|
||||||
|
echo "%path%"|%WINDIR%\System32\findstr >nul /I /R /C:"^\"%find_query%;"
|
||||||
|
call :set_found
|
||||||
)
|
)
|
||||||
|
%lib_console% debug_output :enhance_path "Env Var BEGIN PATH %find_query% - found=!found!"
|
||||||
|
)
|
||||||
|
endlocal & set found=%found%
|
||||||
|
|
||||||
if "%found%" == "0" (
|
if "%found%" == "0" (
|
||||||
%lib_console% debug_output :enhance_path "BEFORE Env Var - PATH=%path%"
|
|
||||||
if /i "%position%" == "append" (
|
if /i "%position%" == "append" (
|
||||||
%lib_console% debug_output :enhance_path "Appending '%add_path%'"
|
%lib_console% debug_output :enhance_path "Appending '%add_path%'"
|
||||||
set "PATH=%PATH%;%add_path%"
|
set "PATH=%PATH%;%add_path%"
|
||||||
@ -98,16 +97,23 @@ exit /b
|
|||||||
set "PATH=%add_path%;%PATH%"
|
set "PATH=%add_path%;%PATH%"
|
||||||
)
|
)
|
||||||
|
|
||||||
%lib_console% debug_output :enhance_path "AFTER Env Var - PATH=%path%"
|
set found=1
|
||||||
)
|
)
|
||||||
|
|
||||||
rem :end_enhance_path
|
:end_enhance_path
|
||||||
rem endlocal & set "PATH=%PATH:;;=;%"
|
|
||||||
set "PATH=%PATH:;;=;%"
|
set "PATH=%PATH:;;=;%"
|
||||||
|
if NOT "%OLD_PATH%" == "%PATH%" (
|
||||||
|
%lib_console% debug_output :enhance_path "END Env Var - PATH=%path%"
|
||||||
|
%lib_console% debug_output :enhance_path "Env Var %find_query% - found=%found%"
|
||||||
|
)
|
||||||
|
set "position="
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:set_found
|
:set_found
|
||||||
if "!ERRORLEVEL!" == "0" set found=1
|
if "%ERRORLEVEL%" == "0" (
|
||||||
|
set found=1
|
||||||
|
)
|
||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
:enhance_path_recursive
|
:enhance_path_recursive
|
||||||
@ -165,7 +171,6 @@ exit /b
|
|||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
rem setlocal enabledelayedexpansion
|
|
||||||
if "%depth%" == "" set depth=0
|
if "%depth%" == "" set depth=0
|
||||||
|
|
||||||
%lib_console% debug_output :enhance_path_recursive "Env Var - add_path=%add_path%"
|
%lib_console% debug_output :enhance_path_recursive "Env Var - add_path=%add_path%"
|
||||||
@ -175,13 +180,10 @@ exit /b
|
|||||||
if %max_depth% gtr %depth% (
|
if %max_depth% gtr %depth% (
|
||||||
%lib_console% debug_output :enhance_path_recursive "Adding parent directory - '%add_path%'"
|
%lib_console% debug_output :enhance_path_recursive "Adding parent directory - '%add_path%'"
|
||||||
call :enhance_path "%add_path%" %position%
|
call :enhance_path "%add_path%" %position%
|
||||||
REM set /a "depth=!depth!+1"
|
|
||||||
call :set_depth
|
call :set_depth
|
||||||
call :loop_depth
|
call :loop_depth
|
||||||
)
|
)
|
||||||
|
|
||||||
rem :end_enhance_path_recursive
|
|
||||||
rem endlocal & set "PATH=%PATH%"
|
|
||||||
set "PATH=%PATH%"
|
set "PATH=%PATH%"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user