<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">As long as we're all contributing our personal hacks to do this, mine is:<div><br></div><div><div>(defun osx-version ()</div><div>  (let* ((info-str (with-output-to-string (str)</div><div>                     (run-program "sw_vers" nil :output str)))</div><div>         (search-str "ProductVersion:")</div><div>         (str-len (length search-str))</div><div>         (version-pos (search search-str info-str :test #'char=))</div><div>         (eol-pos (and version-pos </div><div>                       (position #\linefeed info-str</div><div>                                 :test #'char=</div><div>                                 :start (+ version-pos str-len)))))</div><div>    (and version-pos (string-trim (list #\tab #\space)</div><div>                                  (subseq info-str (+ version-pos str-len) eol-pos)))))</div><div><br></div><div><div><br></div><div>? (osx-version)</div><div>"10.6.4"</div></div><div><br></div><div>but Gary's solution looks to be the most efficient to me. I wasn't previously aware of that version number correspondence.</div><div><br></div><div>Paul</div><div><br></div><div><div>On Aug 26, 2010, at 12:06 PM, Neil Baylis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">The Apple release notes for Snow Leopard suggest using NSAppKitVersionNumber.<div>On my Snow Leopard system, I see</div><div><br></div><div>CL-USER> (apropos "NSAppKit")</div><div>X86-DARWIN64::|NSAppKitVersionNumber|</div>
<div><br></div><div>But on my 32 bit ppc Leopard system, apropos doesn't know anything about it.</div><div><br></div><div>(Both systems using ccl 1.5)</div><div><br></div><div>Neil </div><div><br><div class="gmail_quote">
On Thu, Aug 26, 2010 at 9:39 AM, Raffael Cavallaro <span dir="ltr"><<a href="mailto:raffaelcavallaro@mac.com">raffaelcavallaro@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Aug 26, 2010, at 12:17 PM, Gary Palter wrote:<br>
<br>
> Yes, you can use (software-version).  On Mac OS X, the first number is the major release + 4, the second number is the minor release, and the third number is usually zero.<br>
><br>
> So, 9.8.0 is OS X 10.5.8 and 10.4.0  is OS X 10.6.4.<br>
<br>
</div>you can also cheat and get the product version directly (though this is not considered the correct method by apple):<br>
<br>
? (defun mac-os-x-version ()<br>
   (ccl::with-autorelease-pool<br>
       (let* ((plist<br>
               (#/dictionaryWithContentsOfFile: ns:ns-dictionary #@"/System/Library/CoreServices/SystemVersion.plist")))<br>
         (ccl::lisp-string-from-nsstring (#/valueForKey: plist #@"ProductVersion")))))<br>
<br>
? (mac-os-x-version)<br>
"10.6.4"<br>
<div class="im"><br>
warmest regards,<br>
<br>
Ralph<br>
<br>
<br>
Raffael Cavallaro<br>
</div><a href="mailto:raffaelcavallaro@me.com">raffaelcavallaro@me.com</a><br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>
<a href="http://clozure.com/mailman/listinfo/openmcl-devel" target="_blank">http://clozure.com/mailman/listinfo/openmcl-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.pixpopuli.com/">http://www.pixpopuli.com</a><br>
</div>
_______________________________________________<br>Openmcl-devel mailing list<br><a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>http://clozure.com/mailman/listinfo/openmcl-devel<br></blockquote></div><br></div></body></html>