Re: VW under Aqua (OS X)
- From: Reinout Heeck <reinout@xxxxxxxx>
- Date: Fri, 23 Nov 2007 15:32:03 +0100
Ir have read that under the latest version of OS X you will no longer need a startup script, X11 will supposedly start up automatically whenever an application requires it.
Note that this is hearsay, I haven't tried it myself yet.
R
-
Steven Kelly wrote:
"Jeff M." <massung@xxxxxxxxx> wrote in message news:d90a3c8a-4bfe-41f3-9d77-adb630863488@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.2. Is it possible to use the X11 implementation w/o using X11 for
everything else on the OS (I'm assuming not, but figured I'd ask)?
Only the VW windows run as X11 windows, and they have the same window decorations as native windows. You don't get a new X desktop, nor do other applications change from being native to being X windows.
You can also make a shell script so that VW is able to start X when it starts up, making it seamless from the end-user's point of view. Below are our in-house notes on how to do this for our MetaEdit+ app: I've tried to edit them to make them more generic. They are based on VW 7.4.1, and so choose either the x86 or PPC VM depending on the platform (I think later VW versions are moving towards a universal binary). Most of our info was from here:
http://smcginty.wordpress.com/2007/03/10/visualwork-ing-again/
Starting X11 and the VisualWorks application like MetaEdit+
simultaneously is a bit tricky. In order to make this easier we use
a small application created by Lukas Renggli & co. The original
dictributed version of this application can be found as
http://www.iam.unibe.ch/~scg/Research/Moose/download/vw/visual-mac-intel-741d.app.zip
Copy and unzip this package to a suitable working directory.
Rename "visual-mac-intel741d.app" as "MyApp.app" (the
renaming can be done from the Finder, but for the rest of the
operations here it is probably better to use proper terminal session
as Finder cannot operate inside .app package unless ".app" extension
is removed from the name). Change then to ./MyApp/Contents/
Resources. The original version of Lukas' app expects Intel Mac and
incorporates VM for that platform. Currently, we are still on PPC
so we need to change the relevant parts of the package. First,
remove the "visual.app" folder that contains the supplied VM. Then,
you need to have "visual.app" for PPC X11. From this VM package,
copy file "./visual.app/Contents/MacOS/vwmacxx11gui" to our distro
package "./MyApp/Contents/Resources/". The contents of
this directory should now look like this:
AppSettings.plist
appIcon.icns
en.lproj
getdisplay
script
vwmacxx11gui
The next thing to do is to replace the file "script" with a modified
version of our own (below). This file will do most of the the
'dirty work', and makes the app start up in the user's directory.
Now copy the previously prepared image to this directory
as 'resource.im' (it is referred to with this name within the script).
------------------
#!/bin/bash
#
# Author: Aaron Voisine <aaron@xxxxxxxxxxx>
# Inkscape Modifications: Michael Wybrow <mjwybrow@xxxxxxxxxxxxxxxxxxxxx>
# VisualWorks Modifications: Lukas Renggli <renggli@xxxxxxxxxxxx>
# MetaEdit+ Modifications: Risto Pohjonen <rise@xxxxxxxxxxxx>
export APPHOME=`dirname "$0"`
USERDIR=~/Documents/MyApp
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 "$APPHOME/getdisplay" /tmp/
rm -f /tmp/display.$UID
open-x11 /tmp/getdisplay || \
open -a XDarwin /tmp/getdisplay || \
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
BASE="`echo "$0" | sed -e 's/\/script//'`"
shift
xset fp rehash
export PATH="$PATH":"$APPHOME"
#Guess which VM to use
if [ "`uname -p`" == "i386" ] ; then
VMNAME="vwmacx86x11gui"
else
VMNAME="vwmacxx11gui"
fi
# start the vm
cd "$USERDIR"
"$APPHOME/$VMNAME" "$APPHOME/resource.im" -noherald >&/dev/null
exit 0
- References:
- VW under Aqua (OS X)
- From: Jeff M.
- Re: VW under Aqua (OS X)
- From: Steven Kelly
- VW under Aqua (OS X)
- Prev by Date: Re: VW under Aqua (OS X)
- Next by Date: Re: VW7.5 How to hide the caret in a text editing view
- Previous by thread: Re: VW under Aqua (OS X)
- Next by thread: VW7.5 How to hide the caret in a text editing view
- Index(es):
Relevant Pages
|