on 10/25/06 11:28 AM, Timoth=E9e Lecomte at timothee.lecomte@... wrote:
> Joe Koski wrote:
>> <snip>
>> Timoth=E9e, Per,
>>=20
>> We're now back to the focus issue in with the wxt terminal, but more on =
that
>> later.
>>=20
>> To summarize my progress so far:
>>=20
>> I now have installed on my Mac: cairo, pango, gettext, wxMac, and pkg-co=
nfig
>> above and beyond the usual Xcode-2.4 tools. Are any of these unnecessary=
for
>> building wxt on the Mac?
>> =20
> I am not sure about gettext, but I guess it's a dependency of glib,
> right ? If it's the case, you're all set.
>> To build cairo, I did
>>=20
>> ./configure --enable-atsui --enable-quartz --enable-freetype=3Dno
>> --enable-xlib=3Dno
>>=20
>> After two minor corrections to the pango build (thanks to Behdad on the
>> gtk-i18n Mail List), I built pango with
>>=20
>> ./configure --with-x=3Dno
>> =20
> Ok. Good to know.
>=20
>> Then I went back and rebuilt gnuplot-4.2.rc1, including wxt, with the ne=
w
>> pango and cairo. The wxt plot window again appears with gnuplot, but I s=
till
>> can't get focus inside the plot window. I do see Mac fonts, however. The
>> cursor behavior has changed. When the plot appears, my arrow cursor chan=
ges
>> to crosshairs similar to X11, which is a step forward. When I place the
>> crosshairs over the plot window, the cursor changes to a spinning color
>> pinwheel. If I click back to the finder, I get my arrow cursor back.
>>=20
>> I'm with Per. I'm surprised that the wxWidget folks don't have a way of
>> getting focus without bundling. Should I post the question there?
>> =20
>=20
> It doesn't seem to be a rare question, since the wxWidgets wiki is quite
> lengthy about it. We should have looked at it earlier. Below are a
> couple of interesting links:
>=20
> http://www.wxwidgets.org/wiki/index.php/App_Not_Getting_Input_When_Run
>=20
> "You _must_ create a bundle for Carbon and Cocoa apps on OS X.
>=20
> If your binary is named "foo" then this works for testing purposes
> (don't ship like this): mkdir -p foo.app/Contents/MacOS mv foo
> foo.app/Contents/MacOS
>=20
> When you get things working you can eventually tweak your build system
> to make the bundle before the final link step and pass -o
> foo.app/Contents/MacOS/foo to the linker rather than plain -o foo."
>=20
> Some more details:
> http://www.wxwidgets.org/wiki/index.php/Distributing_WxWidgets_Applicatio=
ns-Di
> stributing_WxMac_Programs
> http://www.wxwidgets.org/wiki/index.php/Installing_WxMac#Executables_.28.=
27Bun
> dles.27.29
> http://www.wxwidgets.org/wiki/index.php/WxMac_Issues#Building_a_MacOSX_ap=
plica
> tion_bundle
>=20
> Could you try the mkdir suggestion above ? (Don't use my second patch,
> it should be useless.) It seems quite straightforward.
>=20
>=20
> I also asked on irc again, and was redirected to the following page:
> http://wxforum.shadonet.com/viewtopic.php?t=3D9146
>=20
> The alternative to "bundling" is the "resource fork", that can be done wi=
th:
>=20
> /Developer/Tools/Rez -d __DARWIN__ -t APPL -d __WXMAC__ -i
> <insert_app_name> -d WXUSINGDLL -o <insert_app_name> Carbon.r
>=20
> where <insert_app_name> is the name of the executable (gnuplot here). On
> http://wxforum.shadonet.com/viewtopic.php?t=3D6045&highlight=3Dmacos, it is
> said that this is only for test purposes.
>=20
>=20
> I hope you'll finally get it working !
>=20
> Best regards,
>=20
> Timoth=E9e
>=20
Timoth=E9e, Per,
I tried both approaches to resolve the focus problem with my gnuplot binary=
,
but the problem persists. Thanks to Timoth=E9e for finding the links that
clearly state the problem, and also state the solutions.
First I tried making a simple gnuplot.app structure like the one in the web
page
http://www.wxwidgets.org/wiki/index.php/App_Not_Getting_Input_When_Run
but, if you try to execute gnuplot, it probably needs to launch a terminal
application like iTerm.app, then gnuplot via a script so you can communicat=
e
with the gnuplot. (I think that's what Per was hinting to me a year or more
back when he suggested iTerm.app, while we were trying to figure out how to
bundle octave). When I double-clicked gnuplot.app, the hard disk made a
noise, but nothing happened.
Then I tried the Rez incantation
jakoski$ /Developer/Tools/Rez -d __DARWIN__ -t APPL -d __WXMAC__ -i gnuplot
-d WXUSINGDLL -o gnuplot Carbon.r
and, indeed, something happened to gnuplot, as there was a delay of a secon=
d
or two at the command line while the hard disk made noise, and no errors
were reported. When I tried the resulting Rez modified binary, it worked,
but the focus problem remained. Do we need a separate wxt.app, or is that
called AquaTerm?
Unless we can get the Rez modification to work, there are some important
implications for gnuplot here, and I think Per can give us some insight
based on his experience with gnuplot and AquaTerm.
If I am interpreting this correctly, the only sensible way to distribute
gnuplot-4.2 for Macs, with the wxt terminal included, is via a bundled
application. This is great for the end user (easy installation), but
requires significantly more work on the Mac development end to pull things
together.=20
A Mac .dmg installer is probably indicated to also install header files,
etc. so that octave and other open source applications can find gnuplot
during builds. Fortunately, gnuplot doesn't change every five minutes like
octave does, so this is probably doable without too much burden on the
developers in the long run, once the approach is perfected.
We could sure use a knowledgeable Mac developer about now. I do not claim t=
o
be one, so any and all advice will be given careful consideration.
Meanwhile, I'll be reading the other links that Timoth=E9e found.
Joe
|