public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 32 and 64 bit cygwin on same machine?
@ 2014-05-16 17:02 Dominic Herity
  2014-05-16 17:05 ` LMH
  2014-05-16 18:15 ` Mark Geisert
  0 siblings, 2 replies; 3+ messages in thread
From: Dominic Herity @ 2014-05-16 17:02 UTC (permalink / raw)
  To: cygwin

I'm using Python and Cygwin to test a 32 bit Windows dll.
Now I need to test a 64 bit build of the same dll.
Can I install 32 bit and 64 bit Cygwin on the same machine and choose
to run either 32 bit or 64 bit python to test the corresponding dll?
Or do I need to keep them on separate machines?

Thanks
Dominic

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 32 and 64 bit cygwin on same machine?
  2014-05-16 17:02 32 and 64 bit cygwin on same machine? Dominic Herity
@ 2014-05-16 17:05 ` LMH
  2014-05-16 18:15 ` Mark Geisert
  1 sibling, 0 replies; 3+ messages in thread
From: LMH @ 2014-05-16 17:05 UTC (permalink / raw)
  To: cygwin

I have run multiple versions of cygwin on the same machine. In my case,
both versions were 32-bit, but I don't see how that would make a
difference. You need to make sure that the environment variable for the
path to cygwin.dll is correct so the 64-bit dll gets loaded when you
open a 64-bit terminal.  I did that my using a windows .bat file that
starts the cygwin shell and creates a properly configured local environment.

This is the .bat file I use,

:: This bat removes the C:\cygwin\bin PATH environment variable for the
cygwin1 install that is
:: loaded into the cmd shell environment block from the registry. The
C:\cygwin2\bin PATH environment
:: variable for the cygwin2 install is then added to the PATH for the
environment block. A mintty
:: terminal is started from within the cygwin2 installation. The mintty
process inherits the
:: modified environment block. When the bat file closes, a mintty
terminal (running bash) is left
:: and has the proper PATH environment to run from the cygwin2 installation.


@echo off

:: remove "C:\cygwin\bin" from PATH
set "PATH=;%PATH%;"
set "PATH=%PATH:;;=;%"
set "PATH=;%PATH:;C:\cygwin\bin;=;%;"
set "PATH=%PATH:;;=%"

set "PATH=C:\cygwin2\bin;%PATH%"
start "" /b C:\cygwin2\bin\mintty.exe -i /Cygwin-Terminal.ico -

I think you could use something similar, just make sure to name your
cygwin installation and local package directories differently for the
two installs.

Of course, you could just move your 32-bit cygwin off the machine,
deleted the cygwin path variable, and install the 64-bit version. It's
not hard to move the original version back later.

Hope this helps,

LMH


Dominic Herity wrote:
> I'm using Python and Cygwin to test a 32 bit Windows dll.
> Now I need to test a 64 bit build of the same dll.
> Can I install 32 bit and 64 bit Cygwin on the same machine and choose
> to run either 32 bit or 64 bit python to test the corresponding dll?
> Or do I need to keep them on separate machines?
> 
> Thanks
> Dominic
> 
> --
> 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
> 
> 

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 32 and 64 bit cygwin on same machine?
  2014-05-16 17:02 32 and 64 bit cygwin on same machine? Dominic Herity
  2014-05-16 17:05 ` LMH
@ 2014-05-16 18:15 ` Mark Geisert
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Geisert @ 2014-05-16 18:15 UTC (permalink / raw)
  To: cygwin

Dominic Herity writes:
> Can I install 32 bit and 64 bit Cygwin on the same machine and choose
> to run either 32 bit or 64 bit python to test the corresponding dll?
> Or do I need to keep them on separate machines?

You can install both 32- and 64-bit Cygwin on the same machine.  Use
setup-x86.exe and setup-x86_64.exe respectively.  Specify separate root
directories for the two installations.  Works like a charm.

In my experience the only mild gotcha was making sure to run Cygwin services
(such as sshd) from just one environment or the other.  BTW, the two
environments won't see each others' processes.  That's as designed.

..mark


--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-16 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-16 17:02 32 and 64 bit cygwin on same machine? Dominic Herity
2014-05-16 17:05 ` LMH
2014-05-16 18:15 ` Mark Geisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).