<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'">I don't think we did agree that config files reside other than in the cm3 hierarchy.</font></span></div></span></span></span></span></span></span></span></span></div></span></div></span> </div><br><div><div>On 3 Aug 2009, at 06:30, Olaf Wagner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>It was a specific request from the people building platform specific<br>installation packages that config files reside and are found in the<br>`usual' locations on their system and not somewhere beneath cm3.<br><br>Place don't change that unless there is no objection from anyone<br>on m3devel.<br><br>Olaf<br><br>Quoting Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>>:<br><br><blockquote type="cite">Sorry about #1 Randy, my mistake.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sitting in the bin directory...seems a little wierd, eh?<br></blockquote><blockquote type="cite">What source are you going to build sitting there?<br></blockquote><blockquote type="cite">I guess um some custom quake code??<br></blockquote><blockquote type="cite">Good enough if empty is instead just "."?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This falls out of the fact that cm3 actually probes all over the  place for the cm3.cfg file and the first place it looks in is the  current directory.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Another good option I think would be just to remove that probe.<br></blockquote><blockquote type="cite">It looks in way too many places.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Here is the current code. I think it is gross.<br></blockquote><blockquote type="cite">Too much probing make things quite ambiguous.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">PROCEDURE FindConfig () =<br></blockquote><blockquote type="cite">  (* LL = mu *)<br></blockquote><blockquote type="cite">  VAR txt: TEXT;<br></blockquote><blockquote type="cite">  BEGIN<br></blockquote><blockquote type="cite">    IF (found) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the current directory *)<br></blockquote><blockquote type="cite">    IF TryConfig (Filename) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the immediate source directory *)<br></blockquote><blockquote type="cite">    IF TryConfig ("src", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the sibling source directory *)<br></blockquote><blockquote type="cite">    IF TryConfig ("..", "src", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the M3CONFIG environment variable *)<br></blockquote><blockquote type="cite">    txt := QMachine.GetEnv (NIL, "M3CONFIG");<br></blockquote><blockquote type="cite">    IF (txt # NIL) THEN<br></blockquote><blockquote type="cite">      IF TryConfig (txt) THEN RETURN END;<br></blockquote><blockquote type="cite">      IF TryConfig (txt, Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the directory containing the current executable *)<br></blockquote><blockquote type="cite">    txt := Pathname.Prefix (Params.Get (0));<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    IF Text.Length (txt)> 0 THEN<br></blockquote><blockquote type="cite">      IF TryConfig (txt, Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the directories named by the PATH environment variable. *)<br></blockquote><blockquote type="cite">    txt := Env.Get ("PATH");<br></blockquote><blockquote type="cite">    FindConfigInPath (txt);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    IF found THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the etc directories *)<br></blockquote><blockquote type="cite">    IF TryConfig("/usr/local/cm3/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/usr/cm3/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/cm3/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/usr/contrib/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/usr/local/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/usr/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/opt/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/sw/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    IF TryConfig("/etc", Filename) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* oh well, make sure we don't try this silly exercise again... *)<br></blockquote><blockquote type="cite">    config := NIL;<br></blockquote><blockquote type="cite">    found := TRUE;<br></blockquote><blockquote type="cite">  END FindConfig;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I propose..roughly roughly, we make it like this instead:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">PROCEDURE FindConfig () =<br></blockquote><blockquote type="cite">  (* LL = mu *)<br></blockquote><blockquote type="cite">  VAR txt: TEXT;<br></blockquote><blockquote type="cite">  BEGIN<br></blockquote><blockquote type="cite">    IF (found) THEN RETURN END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the M3CONFIG environment variable *)<br></blockquote><blockquote type="cite">    txt := QMachine.GetEnv (NIL, "M3CONFIG");<br></blockquote><blockquote type="cite">    IF (txt # NIL) THEN<br></blockquote><blockquote type="cite">      IF TryConfig (txt) THEN RETURN END;<br></blockquote><blockquote type="cite">      IF TryConfig (txt, Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the directory containing the current executable *)<br></blockquote><blockquote type="cite">    txt := Pathname.Prefix (Params.Get (0));<br></blockquote><blockquote type="cite">    IF Text.Length (txt)> 0 THEN<br></blockquote><blockquote type="cite">      IF TryConfig (txt, Filename) THEN RETURN END;<br></blockquote><blockquote type="cite">    END;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* oh well, make sure we don't try this silly exercise again... *)<br></blockquote><blockquote type="cite">    config := NIL;<br></blockquote><blockquote type="cite">    found := TRUE;<br></blockquote><blockquote type="cite">  END FindConfig;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">or, if people really like it looking all over the place, fixing the  case of it being in the current working directory is probably like  this:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">    (* try the current directory *)<br></blockquote><blockquote type="cite"><    IF TryConfig (Filename) THEN RETURN END;<br></blockquote><blockquote type="cite"><blockquote type="cite">   IF TryConfig (".", Filename) THEN RETURN END;<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> - Jay<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">----------------------------------------<br></blockquote><blockquote type="cite"><blockquote type="cite">From: <a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To: <a href="mailto:rcoleburn@scires.com">rcoleburn@scires.com</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Date: Sun, 2 Aug 2009 23:42:17 -0700<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">CC: <a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Subject: Re: [M3devel] problems with cm3.cfg and MxConfig<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Host, hm, I think probably my mistake. It is defined by cm3 but not<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">all m3quake users. Path() should be the directory containing the file<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">with the call.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- Jay (phone)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Aug 2, 2009, at 9:52 PM, "Randy Coleburn"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have been working on the problem of cm3ide not getting the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">BUILD_DIR from cm3.cfg. I've run across some perplexing test results.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">MxConfig.Get("BUILD_DIR") is returning NIL on Windows XP & Vista.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I've tracked it down a bit further. There seem to be two issues<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">that must be fixed to solve this problem:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">1. HOST does not seem to be defined. In particular my "C:\cm3\bin<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">\cm3.cfg" file appears as follows (this is the file Jay recommended):<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">INSTALL_ROOT = path() & "/.."<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">include (path() & "/config/" & HOST)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Is HOST a variable? Or, was I supposed to replace it by "NT386"?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">If the latter, my bad on this one--I took Jay's message literally.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">2. path() does not appear to always yield the path to the bin<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">folder. In particular, it seems to work fine unless you invoke the<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">program when the current directory is actually set to the bin<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">folder, in which case path() seems to return the empty string.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">So, if Í%=C:\, and I run cm3ide, path() returns "C:\cm3\bin" as it s<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">hould.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">But, if Í%=C:\cm3\bin, and I run cm3ide, path() returns "".<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">So in the latter case, the include statement winds up trying to pull<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">a file from the wrong place, e.g. "/config/NT386" rather than "C:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">\cm3\bin/config/NT386"<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Regards,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Randy Coleburn<br></blockquote></blockquote></blockquote><br><br><br>-- <br>Olaf Wagner -- elego Software Solutions GmbH<br>               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br>phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95<br>   <a href="http://www.elegosoft.com">http://www.elegosoft.com</a> | Geschäftsführer: Olaf Wagner | Sitz: Berlin<br>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br><br></div></blockquote></div><br></body></html>