This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Global 32/64 bit collision issues


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]