Mozart application bundle for MacOs X

Gustavo Gutierrez ggutierrez at cic.puj.edu.co
Wed Sep 19 16:52:28 CEST 2007


>
> However, there is some other Mozart installation on my machine, and it appears it found that instead of the one in Mozart.app. The compiler's greeting was "Mozart Compiler 1.3.99 (20070703) playing Oz 3" -- instead of 1.3.2. Feeding {Property.get 'oz.home'} returned "/usr/local/oz/".  On my machine, OZHOME is set to "/usr/local/oz/".

I have pasted the script that launch Aquamacs with a running mozart at
the end of this email.  There are two lines that should do the job you
are talking about:

OZHOME=$1/Contents/Resources/
export OZHOME

The first one sets OZHOME to the mozart distribution inside the
bundle. Remember that a bundle is not more than a hidden directory,
you can use the finder option "Show package contents" to get inside.

>
> Does OZHOME overwrite the path into Mozart.app? I feel that shouldn't be the case. But then, should Mozart.app perhaps overwrite OZHOME? Hm...

Indeed that is what i done. (see the script at the end)

Cheers,
-- 
Gustavo Gutierrez


--------- the script to launch emacs with mozart ---
#!/bin/sh

# uncomment and adapt the following line if you want
# to draw links from say /usr/local/bin to OZHOME/bin
# see chapter "installation" in the users manual for more information

CD="CocoaDialog.app/Contents/MacOS/CocoaDialog"

OZHOME=$1/Contents/Resources/

######################################################################
# you should not edit below this line

# where Oz resides:


export OZHOME

GEC_LIBS="$OZHOME/Framworks"
EXT_LIBS="$OZHOME/Framworks"
: ${OZPLATFORM=`"$OZHOME/bin/ozplatform"`}
: ${OZEMULATOR="$OZHOME/platform/$OZPLATFORM/emulator.exe"}
: ${OZVERSION="1.3.2"}
: ${OZ_DOTOZ="$HOME/.oz/$OZVERSION"}
: ${OZ_LD_LIBRARY_PATH="$OZ_DOTOZ/platform/$OZPLATFORM/lib:$OZHOME/platform/$OZPLATFORM/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"}
: ${OZ_DYLD_LIBRARY_PATH="$OZ_DOTOZ/platform/$OZPLATFORM/lib:$OZHOME/platform/$OZPLATFORM/lib${DYLD_LIBRARY_PATH:+:}${DYLD_LIBRARY_PATH}:$GEC_LIBS:EXT_LIBS"}


LD_LIBRARY_PATH="$OZ_LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
DYLD_LIBRARY_PATH="$OZ_DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

# set OZPATH & PATH
if test -z "${OZ_PI}"
then
  # where Oz searches for files:
  if test -z "${OZPATH}"
  then
     OZPATH=.
  fi
  OZPATH="${OZPATH}:${OZHOME}/share"
  export OZPATH
  # increment path
  PATH="${OZHOME}/bin:${PATH}"
  export PATH
  OZ_PI=1
  export OZ_PI
fi


##
# TODO: Test for aquamacs or carbon emacs.
#if test -e ! "/Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs"
#then
#    rv=`$1/Contents/Resources/$CD yesno-msgbox --string-output`
#    $1/Contents/Resources/$CD ok-msgbox --no-cancel --text "You pressed $rv"
#fi

exec /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs
--eval '(setq load-path (cons "'$OZHOME'/share/elisp" load-path))' -l
oz.elc -f run-oz


More information about the mozart-hackers mailing list