Subj : Re: JS Interpreter on MacOS X? To : classic695 From : Louis Paul Santillan Date : Mon May 12 2003 04:08 pm If the following is way too much, I've posted a prebuilt binary js at . To build SpiderMonkey on MacOSX first you need to run "uname -a" and notice what version uname returns. On my iBook running 10.2.6, this returns Darwin myIBook 6.6 Darwin Kernel Version 6.6: Thu May 1 21:48:54 PDT 2003; root:xnu/xnu-344.34.obj~1/RELEASE_PPC Power Macintosh powerpc 10.0.x corresponds to Version 4.x 10.1.x " " " 5.x 10.2.x " " " 6.x Make sense? Ok. Now under, js/src/config in Terminal do "cp Darwin5.3.mk Darwin6.6.mk" (in my case). This copies the config file to where Makefile.ref expects it to be. Now, for whatever reason, make on MacOSX is little buggy screws up one of the last compilation lines in the build process so I wrote a little script that rebuilds the engine correctly. I pasted it below. Note that the last line (the "cc ..." line) should all be on a single line within the script. Copy the script as mkjs below and then do "chmod 700 mkjs" in Terminal in js/src. Finally, in Terminal do "./mkjs" inside of js/src and then the binary js file can be found as "js/src/Darwin_OPT/js". #!/bin/sh rm Darwin_OPT.OBJ/libjs.a Darwin_OPT.OBJ/js.o Darwin_OPT.OBJ/js make -f Makefile.ref BUILD_OPT=1 cc -o Darwin_OPT.OBJ/js -Wall -Wno-format -O3 -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -UDEBUG -DNDEBUG -UDEBUG_truaddic -DEDITLINE -IDarwin6.6_OPT.OBJ Darwin6.6_OPT.OBJ/js.o Darwin6.6_OPT.OBJ/libjs.a -Lfdlibm/Darwin6.6_OPT.OBJ -lfdm editline/Darwin6.6_OPT.OBJ/editline.o editline/Darwin6.6_OPT.OBJ/sysunix.o Louis On Mon, 5 May 2003, Brendan Eich wrote: > classic695 wrote: > > >Is there a way I can get Rhino or SpiderMonkey to function as a > >JavaScript interpreter under MacOS X? I've tried using make to build > >SpiderMonkey and the java command to run Rhino, but neither works for > >me (I am not much of a full Java/C programmer). Can anyone give me > >some help with this? Thanks. > > > > > > Maybe you should try Konfabulator > (http://www.konfabulator.com/downloads/) -- I believe it uses > SpiderMonkey, but I don't know whether it exposes the engine as an > interpreter you can use directly. > > /be > > .