Closed hohwille closed 7 years ago
You are right, basically, I would propose to do it within the console-cygwin.bat
as you will not need the CYGWIN_HOME
parameter. Otherwise, we should refactor git-bash.bat as well.
But neverthless, I am fine with both alternatives.
@echo off
pushd %~dp0
rem sets the required environment variables like JAVA_HOME, M2_REPO...
call scripts\environment-project.bat
popd
if "%CYGWIN_HOME%" == "" (
if exist "C:\cygwin\bin\mintty.exe" (
set CYGWIN_HOME="C:\cygwin"
)
if exist "C:\cygwin64\bin\mintty.exe" (
set CYGWIN_HOME="C:\cygwin64"
)
if exist "C:\Program Files (x86)\bin\mintty.exe" (
set CYGWIN_HOME="C:\Program Files (x86)"
)
if exist "C:\Program Files\bin\mintty.exe" (
set CYGWIN_HOME="C:\Program Files"
)
if "%CYGWIN_HOME%" == "" (
echo "**********************************************"
echo "************* CYGWIN WAS NOT FOUND ***********"
echo "* Please install Cygwin to standard location *"
echo "* or set CYGWIN_HOME to your custom location *"
echo "**********************************************"
pause
exit -1
)
)
start %CYGWIN_HOME%\bin\mintty.exe -i /Cygwin-Terminal.ico /bin/env CHERE_INVOKING=1 TERMINAL_TITLE=[PNR] /bin/bash -l
fixed by #119
The script
console-cygwin.bat
contains a hardcoded path to the cygwin installation (C:\cygwin64
). However, different systems will have cygwin installed in other locations.IMHO
console-cygwin.bat
should use the variable%CYGWIN_HOME%
instead of the hardcoded path. Further,environment-project.bat
should be responsible for determining the cygwin installation and setCYGWIN_HOME
(if not already present - e.g. manually set invariables-customized.bat
or via system environment variable). Therefore, IMHO the following locations should be considered: