Mozart application bundle for MacOs X
Torsten Anders
torsten.anders at plymouth.ac.uk
Wed Sep 19 19:06:18 CEST 2007
Dear Gustavo,
I found your script at Mozart.app/Contents/Resources/script, and it is of course as you reported in your email.
I am not quite sure I understood you correctly. Your script suggests uncommenting these lines, but they are uncommented. Nevertheless, it appears they have no effect. When I start your Mozart.app, OZHOME is still set to the old value. It starts the mozart found at "/usr/local/oz/" and running {OS.getEnv 'OZHOME'} within the OPI started by your Mozart.app returns also "/usr/local/oz/".
What am I missing?
Best
Torsten
--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
http://strasheela.sourceforge.net
http://www.torsten-anders.de
________________________________________
From: hackers-bounces at mozart-oz.org [hackers-bounces at mozart-oz.org] On Behalf Of Gustavo Gutierrez [ggutierrez at cic.puj.edu.co]
Sent: 19 September 2007 15:52
To: Mozart hackers
Subject: Re: Mozart application bundle for MacOs X
>
> 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
_________________________________________________________________________________
mozart-hackers mailing list mozart-hackers at mozart-oz.org
http://www.mozart-oz.org/mailman/listinfo/mozart-hackers
More information about the mozart-hackers
mailing list