Mail Archives: cygwin/2005/01/25/09:03:50
--------------000608020001090602080805
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I did not know to much about mount and regtool in Cygwin.
As regtool is a Cygwin program and uses the Cygwin environment (am I
wrong?) fiddling around in the registry seems to me like changing the
car on the race track at full speed instead of going for a pitstop.
I seemed more save to me changing the registry entries when no Cygwin is
running and therefore used DOS/Windows batches.
I wrote a collection of DOS/windows batch scripts, which do at least a
convenient job of changing between installed Cygwin versions.
I seems to work with the two versions I have from my 3PP's (V1.2 and
V1.5.10) but I have not been working with it extensively. So there might
still be short comings.
I would like to place it some where everyone interested can download,
modify and extend it. I do not want to create something like a project,
simply provide it to people who might find it useful (added the
description file).
Maybe there exists some download page for Cygwin additionals ?
Greets
Roman
Dick Repasky wrote:
> On Fri, 21 Jan 2005, Christopher Faylor wrote:
>
>> On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
>>
>>> Roman here is what I do.
>>>
>>> 1) Install first instance of cygwin.
>>> 2) Export the registry key HKEY_LOCAL_MACINE/.../Cygnus Solutions to a
>>> file. Use a filename that represents the install.
>>> 3) Delete the registry key.
>>
>>
>> As usual, everyone is impressed with the fact that they know that cygwin
>> uses registry keys and no one is thinking that they could use cygwin
>> tools
>> to manipulate them.
>
>
> Incorrect! As usual, everyone follows the path of least resistance to
> solve problems. They take what they know and what they find out by
> reading and piece them together to form a solution. From reading the
> available documentation on mount, amateurs like myself are very
> unlikely to conclude that mount can be used to switch between
> installed instances of cygwin. Chances are that they do know
> something about the registry and they can easily figure out how cygwin
> makes use of them. So, that's what they do.
>
> If you want people to use mount, revise the documentation. Either make
> the statement explicitly and provide an example, or explain the
> workings of cygwin mounts and how cygwin "starts" clearly enough that
> readers can deduce for themselves that mount can be used.
>
> Enjoy life,
>
> Dick Repasky
>
> -----------------
>
> Dick Repasky
> Bioinformatics Support
> UITS Cubicle 101.08
> Indiana University
> USA
>
> rrepasky AT indiana DOT edu
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--------------000608020001090602080805
Content-Type: text/plain;
name="readme.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="readme.txt"
A collection of batch scripts which change Cygwin between
different versions.
Copyright (C) 2005 Roman Kellner, Cabtronix AG
www.cabtronix.ch
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
What is SetCyg.bat?
SetCyg.bat is a collection of DOS/Windows batch scripts which change
Cygwin installation between different versions.
Why SetCyg.bat?
---------------
Serveral toolchain provider start to use GCC with Cygwin on Windows machines.
Most provider test their toolchain with one specific Cygwin version and do not
support later versions of Cygwin with their toolchain (libraries etc.).
Since it is not possible to run more than one Cygwin environment at a time, at
least multiple installations and a convenient mechanism to switch between the
installed version is the goal of SetCyg.bat.
Files and directory structure:
------------------------------
CygVersion
¦-- Switch
¦
¦-- V1-2 (example only)
¦
¦-- V1-5-10 (example only)
¦
¦-- Vn-n-n
Files in CygVersion:
- General batch scripts: DelCygReg.reg, DelCygReg.bat, ReadCygReg.bat, SetCyg.bat,
SetCygPath.bat, SetCygReg.bat, SetCygVers.bat, gpl.txt,
readme.txt
Files in CygVersion\Switch:
- specific batch scripts to switch between versions
Files in CygVersion\V1-2:
- .reg files of version V1-2
- specific batch script which reads the .reg files.
Files in CygVersion\V1-5-10:
- .reg files of version V1-5-10
- specific batch script which reads the .reg files.
Files in CygVersion\Vn-n-n:
- .reg files of version Vn-n-n
- specific batch script which reads the .reg files.
INPORTANT:
The version directories MUST have the same corresponding name as the version in the
CygVers.txt file which is too the the same as the version extension of the installation
path (Format: Vn-n-n).
How does it work?
-----------------
1. It renames the Cygwin installation paths.
The active is named D:\MyPathToTheCygwinFiles\Cygwin
The non active are named C:\MyPathToTheCygwinFiles\Cygwin-Vn-n-n,
where Vn-n-n is the version number.
2. The registry entries in the "CURRENT_USER\Software\Cygnus Solutions" and
"LOCAL_MACHINE\Software\Cygnus Solutions" will be swapped by deleting
the old and writing the new ones.
How to install a n-th version of Cygwin so it works together with SetCyg.bat?
-----------------------------------------------------------------------------
Assuptions: The standard path of your Cygwin installation is C:\programs\Cygwin
1. Manually rename the current active Cygwin in C:\programs\Cygwin
to C:\programs\Cygwin-Vn-n-n, where Vn-n-n is the version number.
2. Delete the registry entries "CURRENT_USER\Software\Cygnus Solutions" and the
"LOCAL_MACHINE\Software\Cygnus Solutions" with DelCygReg.bat (Verify that you
have stored the registry entries of the actual Cygwin version in the .reg file
before).
3. Now install the new Cygwin version to C:\programs\Cygwin again (normal installation).
4. Read and store the new registry entries with the ReadCygReg.bat in the .reg files.
5. Create a new version directory (Vn-n-n) under CygVersion and palce the .reg files there.
6. Create a CygVers.txt file with the appropriate version in it ( V-n-n-n without CR/LF)
and place it to C:\programs\Cygwin.
Requisitions:
-------------
- Each Cygwin installation MUST have a file named CygVers.txt directly in the
C:\MyPathToTheCygwinFiles\Cygwin directory.
e.g.: C:\programs\Cygwin\CygVers.txt
C:\programs\Cygwin-V1-2\CygVers.txt
C:\programs\Cygwin-V1-5-10\CygVers.txt
This file is used to recogise the version of the active Cygwin.
- The CygVers.txt file holds the version number and will be read by the batch
script. The content should be one line WITHOUT CR/LF:
e.g.: V1-2
V1-5-10
- The "CURRENT_USER\Software\Cygnus Solutions" and the
"LOCAL_MACHINE\Software\Cygnus Solutions" have been read from the registry for each
installation and stored to a .reg file (use ReadCygReg.bat).
Remarks:
--------
- The batch scripts were written on a W2k machine and only test with the two
Cygwin versions 1.2 (3PP: Microcross) and 1.5.10 (3PP: Wavecom).
- Test done were really basic. There is still a good chance that not everything work.
- Whether or not it works on other Windows platforms was not tested
- Since I do not know the internals of Cygwin the approach of simple swaping the two
registry entries
"CURRENT_USER\Software\Cygnus Solutions" and
"LOCAL_MACHINE\Software\Cygnus Solutions"
may be insufficient.
- Anyone who thinks some more must be done to make the batches really work may
email to: maillists AT gmx DOT ch
--------------000608020001090602080805
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--------------000608020001090602080805--
- Raw text -