diff options
| author | JiHO <jiho-sf@users.sourceforge.net> | 2007-11-03 23:12:26 +0000 |
|---|---|---|
| committer | jiho-sf <jiho-sf@users.sourceforge.net> | 2007-11-03 23:12:26 +0000 |
| commit | b971d2e0ff9633b94b4ccef67b0b6da158b42979 (patch) | |
| tree | 569f290399f70de74e999d4f03e58f31cf0842e3 /packaging/macosx/Resources/script | |
| parent | osx-app.sh (diff) | |
| download | inkscape-b971d2e0ff9633b94b4ccef67b0b6da158b42979.tar.gz inkscape-b971d2e0ff9633b94b4ccef67b0b6da158b42979.zip | |
inkscape:
- added code to use the python modules that ship with the app bundle. With Leopard using a version of Python different from Panther and Tiger we should probably ship everything and add a runtime check here for the architecture and the version of Python, so what we redirect PYTHONPATH toward the right place
script:
- put X11 starting in a conditional test, true only on Tiger and Panther. This "should" allow Inkscape to start on Leopard. Needs to be tested though
(bzr r4022)
Diffstat (limited to 'packaging/macosx/Resources/script')
| -rwxr-xr-x | packaging/macosx/Resources/script | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script index 5608f7423..986cb530b 100755 --- a/packaging/macosx/Resources/script +++ b/packaging/macosx/Resources/script @@ -5,30 +5,36 @@ CWD="`dirname \"$0\"`" +# System version: 3 for Panther, 4 for Tiger, 5 for Leopard +VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'` + +# FIXME apparently this removes the xterm that starts with X from xinitrc but when is it really used? Should we modify the .xinitrc of the user without warning? ps -wx -ocommand | grep -e '[X]11' > /dev/null if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then echo "rm -f ~/.xinitrc" > ~/.xinitrc sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc fi -cp -f "$CWD/bin/getdisplay.sh" /tmp/ -rm -f /tmp/display.$UID -open-x11 /tmp/getdisplay.sh || \ -open -a XDarwin /tmp/getdisplay.sh || \ -echo ":0" > /tmp/display.$UID - -while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do - sleep 1 -done -export DISPLAY="`cat /tmp/display.$UID`" +# For Panther and Tiger, start X11 +if [[ $VERSION -le 4 ]]; then + # Start X11 and get DISPLAY + cp -f "$CWD/bin/getdisplay.sh" /tmp/ + rm -f /tmp/display.$UID + open-x11 /tmp/getdisplay.sh || \ + open -a XDarwin /tmp/getdisplay.sh || \ + echo ":0" > /tmp/display.$UID + + while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do + sleep 1 + done + export DISPLAY="`cat /tmp/display.$UID`" + + ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11 +fi -ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11 +# In Leopard, X11 should start on itself -# Old OS X version specific test: -# -#VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'` -#if [ "$VERSION" -eq "4" ]; then # Warn the user about time-consuming generation of fontconfig caches. test -f ~/.inkscape/.fccache-new || exit 12 @@ -37,3 +43,4 @@ test -f ~/.inkscape/.fccache-new || exit 12 BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`" cd "$BASE" exec "$CWD/bin/inkscape" "$@" +# TODO examine wether it would be wisest to move the code from inkscape shell script and getdisplay.sh to here and only keep the real binary in bin. This may make things easier on Leopard and may also help using Inkscape on the command line
\ No newline at end of file |
