Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Anyway, this is just a suggestion. Most Mac BitPim users do seem to
have Python installed. In any case, I've attached a shell script that
could be used to replace the current BitPim python startup script. It
uses a small shell function to extract the parent directory name from a
filepath because the 'dirname' shell utility (like Python) is only
there in MacOS X if the user installs the optional BSD package.
Otherwise, it's just about line-for-line equivalent with the python
version.

Cheers,

Tom


--Apple-Mail-6-121156915
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0755;
name="BitPim"
Content-Disposition: attachment;
filename=BitPim

#!/bin/sh
# Set up the environment to run the BitPim using the bundled Python
# interpreter and modules, then execute bp.py to start it up.
#

parent () {
echo $1 | sed 's|/*[^/]*/*$||'
}

execdir=`parent $0`
executable="$execdir/Python"
maindir=`parent $execdir`
resdir="$maindir/Resources"
libdir="$maindir/Frameworks"
mainprogram="$resdir/bp.py"

PYTHONPATH=$resdir
PYTHONHOME=$resdir
export PYTHONPATH PYTHONHOME

PYTHONEXECUTABLE=$executable
DYLD_LIBRARY_PATH=$libdir
DYLD_FRAMEWORK_PATH=$libdir
export PYTHONEXECUTABLE DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH

exec $executable $mainprogram $*

--Apple-Mail-6-121156915--

Loading...