|
From: Joe K. <jko...@co...> - 2006-11-18 18:40:45
|
on 11/17/06 5:07 PM, Timoth=E9e Lecomte at tim...@en... wrote: > Timoth=E9e Lecomte wrote: >> Ethan Merritt wrote: >> =20 >>> On Friday 17 November 2006 01:33 pm, Joe Koski wrote: >>> =20 >>> =20 >>>> on 11/17/06 1:48 PM, Per Persson at per...@ma... wrote: >>>> =20 >>>> =20 >>>>> I still maintain my opinions that >>>>> 1) building an X11 based wxt terminal should be straightforward >>>>> 2) a "native" wxt terminal is going to take a lot of work. >>>>> =20 >>>>> =20 >>>> I think Per's assessment is correct. The problem is not with wxt, but >>>> with the necessity for "bundling" wxWidget applications for native >>>> use on the Mac. >>>> =20 >>>> =20 >>> You call it a necessity, where Per implies that it is simply a >>> matter of choice between X11 and "native". Which is it? >>> =20 >>> =20 >> A native one is for sure better since X11 is not installed by default on >> MacOS. The *only* problem we seem to get is this "no-input" issue, which >> is supposed to be related to bundling, as Joe mentioned. >> =20 >=20 > I went back to #wxwidgets on IRC, and got confirmed again that bundling > should be enough. Let's try to get it right this time. >=20 > To sum up: > *get 4.2rc1 from gnuplot.sf.net > *apply wxmac.diff to src/wxterminal > *run ./prepare, then ./configure with your favorite options, 'make', > 'make install' > You get a working gnuplot with the wxt terminal (assuming you have > cairo, pango and wxMac installed), but the plot windows don't get the foc= us >=20 > Then the bundling stuff: > *download the attached Icon.plist and wxmac.icns files > *run the following commands to create the bundle tree: > mkdir -p ./gnuplot.app/Contents/MacOS/ > mkdir -p ./gnuplot.app/Contents/Resources/ > mkdir -p ./gnuplot.app/Contents/Frameworks/ > cp ../src/gnuplot ./gnuplot.app/Contents/MacOS/gnuplot > echo -n 'APPL????' > ./gnuplot.app/Contents/PkgInfo > * retrieve the attached Icon.plist and wxmac.icns files, put them in the > current directory, and put them at their respective locations in the > bundle with the following commands: > cp ./Info.plist ./gnuplot.app/Contents/ > cp ./wxmac.icns ./gnuplot.app/Contents/Resources/ >=20 > Then, you're supposed to be all set. To launch gnuplot, do: > open gnuplot.app > or > ./gnuplot.app/Contents/MacOS/gnuplot >=20 > ... and it should be fine now, according to what I've been told on IRC. >=20 > Joe, could you try again with these instructions ? Thank you very much. >=20 > Best regards, >=20 > Timoth=E9e Lecomte Timoth=E9e, We're close to a solution, but no cigar yet. I followed your bundle instructions, and I think I have the correct bundle structure created and filled. I was a bit confused about which directory I should use to enter th= e command cp ../src/gnuplot ./gnuplot.app/Contents/MacOS/gnuplot The ../src indicates that I am in a subdirectory within the 4.2.rc1 build directory where the directory ./gnuplot.app exists. So I created a director= y called Mac_app in the 4.2.rc1 build directory. Correct? At least all your bundling commands then worked without complaint. When I try ./gnuplot.app/Contents/MacOS/gnuplot within Mac_app, gnuplot doe= s start, and I can plot, but I have the same lack of focus as before. One more problem. A while back you sent me a second patch to try: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff -Naur old/wxt_gui.cpp new/wxt_gui.cpp --- old/wxt_gui.cpp 2006-10-20 23:36:56.000000000 +0200 +++ new/wxt_gui.cpp 2006-10-20 23:39:36.000000000 +0200 @@ -1330,6 +1330,14 @@ wxApp::m_nCmdShow =3D SW_SHOW; #endif =20 +#ifdef __WXMAC__ + /* allow to get focus even if the app is not bundled */ + ProcessSerialNumber psn; + GetCurrentProcess( &psn ); + CPSEnableForegroundOperation( &psn ); + SetFrontProcess( &psn ); +#endif + if (!wxInitialize()) { fprintf(stderr,"Failed to initialize wxWidgets.\n"); wxt_abort_init =3D true; diff -Naur old/wxt_gui.h new/wxt_gui.h --- old/wxt_gui.h 2006-10-20 23:36:58.000000000 +0200 +++ new/wxt_gui.h 2006-10-20 23:39:32.000000000 +0200 @@ -159,6 +159,12 @@ # include "win/winmain.h" # endif =20 +#ifdef __WXMAC__ +/* focus hack */ +# include <Carbon/Carbon.h> +void CPSEnableForegroundOperation(ProcessSerialNumber* psn); +#endif + /* for cairo_t */ # include <cairo.h> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Do I need to rebuild my gnuplot without the second "focus hack" patch? Is that my problem? Joe |