<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Arial"> > I know there exists vcvars32.bat, but its effect is not permanent.</font><br><BR> <BR>Sure it is. If you use it right. Permance is relative.<BR>There are two easy ways.<BR> <BR> <BR>1. start; run; run vcvars32.bat; stay in same cmd and use cm3<BR> <BR> <BR>2. somewhere on the start menu is a link that will do #1 -- opens up a cmd that runs vcvars32.bat and sticks around; the command line for the shortcut is roughly cmd /k c:\program files (x86)\visual studio\vcvars32.bat -- that /k means "run and don't exit" as opposed to the Unix-shell-like /c which means "run and exit". (see cmd /? for plenty more decent documentation -- cmd isn't great, but it is better than people realize, and the command line editor and text output performance are a lot better than anything else I've used; the scripting language aspect of it is not good though -- use Python instead...).<BR> <BR><font face="Arial"></font> <BR><font face="Arial"> > It should be invoked somewhere by cm3/bin/config/NT386.common etc.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">Not really. But maybe/kind of/store of. If we could find vcvars32.bat, then we can likely know all that it does and just do it ourselves. Granted, past versions did try to do something like that, but they didn't work well. They hunted around in a few places for C compiler and linker, asked user to confirm, and tried to form up short paths to them. Short paths aren't predictable, aren't necessarily stable across backup/restore (APIs added only as recently as Windows XP to set them), and aren't available on all file systems -- either tools should tolerate spaces, or depend on %PATH%, %LIB%, and %INCLUDE%.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">Perhaps an option to configure where vcvars32.bat is and run it, and then run other stuff, should be considered. Because "it isn't permanant", what one can do is generate a little temporary .cmd file that runs vcvars32.bat, then does whatever you "really" wanted to do, then exists.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">Another thing we can consider is symlinks or hardlinks.</font><BR><font face="Arial">We could create \cm3\bin\cl.exe, \cm3\bin\link.exe that..er..nevermind that..matter of setting %INCLUDE% and %LIB% not dealt with.., but this:</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">We could create \cm3\bin\cl.cmd and \cm3\bin\link.cmd that run vcvars32.bat and then cl.exe/link.exe -- they'd be considered user editable to find vcvars.bat.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">On the other hand..I have a LOT of history with wrapper programs and such..might be better to create cl.exe/link.exe or cl.com/link.com that read some input and then run the real cl.exe/link.exe.</font><BR><font face="Arial">I've been through a similar exercise with nmake and I'm happier to have nmake.com than nmake.cmd. ".com" comes before ".exe" in %PATHEXT% so if you run "foo" and there is "foo.com" and "foo.exe", "foo.com" will be run. Whereas ".cmd" is after ".exe" so if you have foo.cmd and foo.exe and run "foo", "foo.exe" will be run.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">The lesson is "users should run foo" and "creative environments" should introduce "foo.com".</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">But still, cl.cmd/link.cmd are easier because they would look like this:</font><BR><font face="Arial">call c:\program files\...vcvars32.bat -- user editable line</font><BR><font face="Arial">%~0.exe %* -- foo.cmd => foo.exe, with repeated command line.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">whereas foo.com would have to either replicate vcvars32.bat somehow, or create a wrapper .cmd..</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR><font face="Arial">Thoughts?</font><BR><font face="Arial">Really asis is not bad -- run vcvars32.bat yourself, and then use cm3.</font><BR><font face="Arial"></font> <BR><font face="Arial"></font> <BR> - Jay<br> <BR><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: hosking@cs.purdue.edu<br>Date: Fri, 19 Oct 2012 09:56:11 -0400<br>To: m3devel@elegosoft.com<br>Subject: [M3devel] Windows issue<br><br><div>I have had a query from a user of CM3 regarding Windows installation.  I am completely at sea answering since I never use Windows.</div><div><br></div><div>Here is his question:</div><div><br></div><div><div><font face="Arial">I have a problem with the M3 compiler since I have installed Visual Studio 10.</font></div><div><font face="Arial">cm3 does not find the Windows linker. I work with vim and have configured the</font></div><div><font face="Arial">make macro to call cm3/bin/cm3.exe and the error happens when quake tries to</font></div><div><font face="Arial">invoke the MS tools. I know there exists vcvars32.bat, but its effect is not permanent.</font></div><div><font face="Arial">It should be invoked somewhere by cm3/bin/config/NT386.common etc.</font></div><div><br></div></div><div><font face="Arial">Can anyone help?</font></div><br><div>
<span style="border-collapse: separate; border-spacing: 0px;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><div style="word-wrap: break-word;"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><div style="word-wrap: break-word;"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><span style="font: 12px/normal Helvetica; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; border-collapse: separate; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal;" class="ecxApple-style-span"><div><font class="ecxApple-style-span" color="#0000ff"><font class="ecxApple-style-span" face="Gill Sans"><span style='color: rgb(0, 0, 255); font-family: "Gill Sans";' class="ecxApple-style-span"><span style='color: rgb(0, 0, 255); font-family: "Gill Sans";' class="ecxApple-style-span">Antony Hosking</span></span></font></font><font class="ecxApple-style-span" face="Gill Sans"><span style='font-family: "Gill Sans";' class="ecxApple-style-span"><span style='font-family: "Gill Sans";' class="ecxApple-style-span"><span class="ecxApple-converted-space"> </span>|<span class="ecxApple-converted-space"> </span></span></span><span style='font-family: "Gill Sans";' class="ecxApple-style-span"><span style='font-family: "Gill Sans";' class="ecxApple-style-span">Associate Professor</span></span><span style='font-family: "Gill Sans";' class="ecxApple-style-span"><span style='font-family: "Gill Sans";' class="ecxApple-style-span"> | Computer Science | Purdue University</span></span></font></div><div><font class="ecxApple-style-span" face="GillSans-Light"><span style="font-family: GillSans-Light;" class="ecxApple-style-span">305 N. University Street | West Lafayette | IN 47907 | USA</span></font></div><div><font class="ecxApple-style-span" color="#0000ff" face="Gill Sans"><span style='color: rgb(0, 0, 255); font-family: "Gill Sans";' class="ecxApple-style-span"><span style='color: rgb(0, 0, 255); font-family: "Gill Sans";' class="ecxApple-style-span">Mobile</span></span></font><font class="ecxApple-style-span" face="GillSans-Light"><span style="font-family: GillSans-Light;" class="ecxApple-style-span"><span style="font-family: GillSans-Light;" class="ecxApple-style-span"><span class="ecxApple-converted-space"> </span>+1 765 427 5484</span></span></font></div><div><font class="ecxApple-style-span" face="GillSans-Light"><br class="ecxkhtml-block-placeholder"></font></div></span></span></span></span></span></span></span><br class="ecxApple-interchange-newline"></span></div></span></div></span><br class="ecxApple-interchange-newline"></span><br class="ecxApple-interchange-newline">
</div>
<br></div>                                    </div></body>
</html>