Subscribe

How to run on Macintosh

  1. 2009-10-22 17:18:12 PDT
    If you download the Linux release and replace the contents of server/cyc/run/bin/run-cyc.sh with the below, it runs on at least Snow Leopard: #!/bin/bash # # $Id: run-cyc.sh 126951 2009-01-28 18:55:50Z tbrussea $ # Assumes that java 1.5 or higher (1.6 or higher preferably) is in your path if [ ${PWD:(-4)} == "/bin" ]; then # we are inside the bin directory ... moving one level up quietly cd .. else if [ -d ${PWD}/lib ]; then # this is the correct location, we are good : else echo "I do not think that CYC is installed here." exit -1 fi fi if [ `uname -s` = "Darwin" ]; then CLASSPATH="lib/cyc.jar:lib/subl.jar:lib/junit.jar:resource:lib/ext:plugins" else CLASSPATH= PATH_ELEMENTS="lib/cyc.jar lib/subl.jar lib/junit.jar resource lib/ext plugins" for pathElement in ${PATH_ELEMENTS}; do canonicalElement=`readlink ${pathElement}` if test -z "${CLASSPATH}"; then CLASSPATH=${canonicalElement} else CLASSPATH=${CLASSPATH}:${canonicalElement} fi done fi echo CLASSPATH $CLASSPATH _JAVA_OPTIONS= # Add the following line to the JVM options to allow remote debugging # -agentlib:jdwp=transport=dt_socket,server=y,address=8888,suspend=n BIT_FLAG= if [ `uname -s` = "SunOS" ]; then java -d64 -Xmx5000m -version > /dev/null 2>&1; if [ $? -eq 0 ]; then echo "Running Solaris with 64 bit Java ...." BIT_FLAG=-d64 MIN_HEAP=5000m MAX_HEAP=8000m PERM_SIZE=256m else # end 64-bit solaris echo "Running Solaris with 32 bit Java ..." MIN_HEAP=1400m MAX_HEAP=1400m PERM_SIZE=128m fi else java -Xmx5000m -version > /dev/null 2>&1; if [ 0 -eq $? ]; then echo "Running 64 bit Java ...." MIN_HEAP=5000m MAX_HEAP=8000m PERM_SIZE=256m else echo "Running 32 bit Java ..." MIN_HEAP=1400m MAX_HEAP=1400m PERM_SIZE=128m fi fi java $BIT_FLAG -server -Xms$MIN_HEAP -Xmx$MAX_HEAP -XX:MaxPermSize=$PERM_SIZE \ -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseFastAccessorMethods \ -XX:-UseSpinning -XX:PreBlockSpin=10 -XX:+UseParallelGC \ -cp $CLASSPATH com.cyc.tool.subl.jrtl.nativeCode.subLisp.SubLMain \ -f "(progn (load \"init/jrtl-release-init.lisp\")))" "$@"
  2. 2009-10-22 17:23:14 PDT
    That got munged. Need to at least replace " with double quotes. Can't see anywhere to post a file here, but I've contacted johndcyc about updating the release.
  3. 2009-10-22 17:29:52 PDT
    The new part is: if [ `uname -s` = "Darwin" ]; then CLASSPATH="lib/cyc.jar:lib/subl.jar:lib/junit.jar:resource:lib/ext:plugins" else
  4. 2010-06-05 11:13:30 PDT
    so, is this for real? we can finally run on macintosh? has anyone confirmed this? does it work? will somebody make an installer for this?
  5. 2010-06-05 11:19:36 PDT
    It's a Java app; all that's needed is the right launch script.
  6. 2010-06-07 12:35:23 PDT
    okay, so, like, "for n00bs", what are the step by step instructions?
  7. 2010-06-13 17:22:03 PDT
    i got Open Cyc running on osx snow leopard . change the shell script to remove '/' to mark a continued line and put all that on the same line . run it in the 'server/cyc/run' directory .
  8. 2010-07-26 02:00:22 PDT
    I'm on snow leopard (10.6.4). The unique modification I've had to do is on opencyc-2.0/server/cyc/run/run-cyc.sh, where I've had to change: canonicalElement=`readlink -f ${pathElement}` into: canonicalElement=`stat -f "%N" ${pathElement}` ... and that's all. (It seems there a problem with command readlink)
  9. 2011-04-14 14:35:22 PDT
    You can also install coreutils with brew which will give you the GNU version of readlink (greadlink). Then you change the following in server/cyc/run/bin/run-cyc.sh if [ `uname -s` = "Darwin" ]; then READLINK="greadlink" else READLINK="readlink" fi CLASSPATH= PATH_ELEMENTS="lib/cyc.jar lib/subl.jar lib/junit.jar resource lib/ext plugins" for pathElement in ${PATH_ELEMENTS}; do canonicalElement=`${READLINK} -f ${pathElement}`
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.