This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Proposal for new cygwin.bat which is independent from install directory
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Christian Franke <Christian dot Franke at t-online dot de>, cygwin at cygwin dot com
- Date: Fri, 26 Aug 2016 19:39:31 +0300
- Subject: Re: Proposal for new cygwin.bat which is independent from install directory
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru
- References: <57C06CFA.4060405@t-online.de>
- Reply-to: cygwin at cygwin dot com
Greetings, Christian Franke!
> Traditionally setup.exe creates the /cygwin.bat file as follows if
> C:\cygwin is the install directory:
> -----
> @echo off
> C:
> chdir C:\cygwin\bin
> bash --login -i
> -----
> The following should work since WinXP regardless of install directory:
> -----
> @echo off
> cd /d %~dp0
> if errorlevel 1 exit /b 1
> cd bin
> if errorlevel 1 exit /b 1
> bash --login -i
> -----
Why so complicated?
@START "" /B "%~dp0bin\mintty.exe" -
Done.
> I would suggest to add something like the above as
> "/etc/defaults/cygwin.bat" to base-files package. The postinstall script
> should copy it to "/cygwin.bat" if new. The creation of this file could
> later be removed from setup.exe.
> This more generic cygwin.bat is in particular useful for 'portable'
> installations of Cygwin on an USB device. I occasionally use such a
> installation to make rescue tools (dd, ddrescue, fdisk, hexedit,
> sleuthkit, ...) available to the minimal system provided by a Windows
> system repair CD.
Your variant is overengineered.
--
With best regards,
Andrey Repin
Friday, August 26, 2016 19:37:08
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple