Win-GHC with GnuWin32 toolset--Mingw32 replacement

Neil Mitchell ndmitchell at gmail.com
Sun Jan 7 12:42:58 EST 2007


Hi

> On a related note, I am running into the same convenience problem
> with vsvars32.bat as Yhc Issue 49 (http://code.google.com/p/yhc/
> issues/detail?id=49&can=2&q=).  The quick fix is to have the build
> find and run vsvars32.bat if the environment variables aren't found
> the first time.  I'm not sure how to do that with Scons but it should
> be possible.

Should be relatively easy, there is an environment variable
%VS71COMNTOOLS% (with different numbers for different versions), which
points at the Visual Studio install path, and the vsvars32.bat is
always relative from that.

The biggest issue we've had is that a simple execution of a batch file
has a strong tendancy to revert environment variables after it has
finished executing, which means the effect of vsvars32.bat is lost.
>From the command prompt its fine, but from another batch file you have
to do "call vsvars32.bat" - not just a direct execution. When spawning
via system (or similar), we had very little success. Our alternative
would probably be to parse the batch file - just looking for SET
lines, and to add them to the environment manually.

Thanks

Neil



More information about the Cvs-ghc mailing list