This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Global 32/64 bit collision issues
- From: Herbert Stocker <hersto at gmx dot de>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 28 May 2013 04:36:17 +0200
- Subject: Re: Global 32/64 bit collision issues
- References: <20130523084435 dot GB13513 at calimero dot vinschen dot de> <51A2C50A dot 5090405 at users dot sourceforge dot net> <20130527100409 dot GD2483 at calimero dot vinschen dot de> <BLU173-W111D5EE8B1171370E465CEB5960 at phx dot gbl> <20130527143315 dot GA28463 at calimero dot vinschen dot de>
Hi all,
64 bit systems and software will soon become the normal thing and 32 bit
systems and software will be "old stuff". Therefore i would prefer not
to append '64' to 64 bit Cygwin, but to append '32' to 32 bit Cygwin.
Corinnas algorithm and Karls environment vars handle this very well. But
see below.
On 27.05.2013 16:33, Corinna Vinschen wrote:
How about using an environment variable like CYGWIN32 and CYGWIN64 or CYGWIN32SUFFIX and CYGWIN64SUFFIX... and if they are defined they are used to adjust the corresponding default names by the scripts.
I'm not too keen on adding such environment vars. An installer script
who's concerned about parallel installs could check the registry along
these lines:
- /proc/registry64/Wow6432Node exists?
If not, just go ahead, we're on a 32 bit machine.
- uname -r is x86_64 AND /proc/registry64/Wow6432Node/Cygwin/setup/rootdir
exists AND the directory given in that key exists?
- We're in a 64 bit installation and there's a parallel 32 bit
installation, so attach the string "64" to service name and description.
- uname -r is not x86_64 AND /proc/registry64/Cygwin/setup/rootdir
exists AND the directory given in that key exists?
- We-re in a 32 bit installation and there's a parallel 64 bit
installation, so attach the string "32" to service name and description.
- Otherwise, just go ahead, we only have a single install.
In fact, csih could handle that transparently, I think.
The service names are still potentially nuisances, though.
i like the algorithm, because:
a) i like symetry: If both Cygwins are installed, both have a suffix.
b) It has no suffix for users who install only one Cygwin.
But there is also a flaw:
Imagine a user who has only a 32 bit installation.
This algorithm would install the services without a '32' suffix.
-> correct
Then the user installs the 64 bit Cygwin, and now the scripts in the
32 bit Cygwin would try to access their services with the '32' suffix
appended.
Therefore some config setting that tells what to append seams
necessary, be it an environment variable or a registry setting.
If the user should not be bothered with such a setting at installation
time, the 64 bit setup could rename all 32 bit services and short cuts
to have the '32' suffixes. But users may need to adopt their self-made
scripts. Therefore leaving this setting to the user, seams best for me.
Herbert