|
From: Werner S. <sm...@ia...> - 2010-03-01 07:58:36
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, so here are the promised instructions to make the wxtp terminal run on Mac OS X. Basically it's just downloading and installing the GTK Framework for Mac OS X, applying the attached patch to the latest gnuplot cvs and compile it. Below are much more detailed instructions and comments. ***************************************************************** * Installation instructions 0) Install XCode ;). Instructions were tested on Mac OS X 10.5.8, Intel. I keep everything in the directory I work, so no files are installed in the system. I) Install gnuplot 4.4 on Mac OS X with wxWidgets Terminal (using provided wxWidgets libraries, works but toolbar isn't working properly) 1) install GTK Framework a) Download the GTK_2.18.5-X11.pkg package from http://r.research.att.com/ and install it b) Add to your .profile file in the home directory: export PATH=/Library/Frameworks/GTK+.framework/Resources/bin:$PATH 2) get latest gnuplot 4.4 from cvs (branch-4-4-stable) and apply patch a) export CVSROOT=:pserver:ano...@gn...:/cvsroot/gnuplot b) cvs login (use an empty password) c) cvs -z3 checkout -r branch-4-4-stable gnuplot d) cd gnuplot e) patch -p1 < path-to/wxt-as-process-20100301.diff f) ./prepare g) cd .. 3) compile gnuplot, in the same directory as the checked out gnuplot directory do a) mkdir build b) cd build c) ../gnuplot/configure --prefix=$PWD/../local/ --with-readline=bsd d) check if you find at the end of the configure output wxt terminal: yes cairo-based pdf and png terminals: yes e) make f) make install BTW: make install fails if make install is not called with root privileges (which I don't want, since I install into my $HOME directory anyway) with the message: make[3]: Nothing to be done for `install-exec-am'. test -z "/etc/X11/app-defaults/" || ../../gnuplot/install-sh -c -d "/etc/X11/app-defaults/" mkdir: /etc/X11: Permission denied make[3]: *** [install-appdefaultDATA] Error 1 make[2]: *** [install-am] Error 2 make[1]: *** [install-recursive] Error 1 make: *** [install-recursive] Error 1 4) ../local/bin/gnuplot II) Install gnuplot 4.4 on Mac OS X with wxWidgets Terminal (using self compiled wxWidgets libraries, works much better) 1) as in I 2) compile a static wxWidgets library a) Download the wxWidgets 2.8.11-rc2 library from http://biolpc22.york.ac.uk/pub/2.8.11-rc2/wxMac-2.8.11-rc2.zip , unzip it b) export WXDIR=path-to/wxMac-2.8.11-rc2 c) cd $WXDIR d) mkdir osx e) cd osx f) ../configure --prefix=$WXDIR/osx/local --disable-shared g) make h) make install i) export PATH=$WXDIR/osx/local/bin:$PATH 3) as step 2 in I 4) as step 3 in I 5) ../local/bin/gnuplot ***************************************************************** * Comments about patch X) Create patch a) Download wxt-as-process-20090210.diff b) patch -p1 < path-to/wxt-as-process-20090210.diff Problem: patching file src/Makefile.am Hunk #1 FAILED at 29. Hunk #2 succeeded at 63 with fuzz 1 (offset -3 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/Makefile.am.rej Adding line 36: GNUPLOT_WXT = `echo gnuplot_wxt | sed '$(transform)'`$(EXEEXT) Changing line 38: AM_CPPFLAGS = -I../term -I$(top_srcdir)/term -DBINDIR=\"$(bindir)\" - -DX11_DRIVER_DIR=\"$(X11_DRIVER_DIR)\" - -DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\" - -DGNUPLOT_JS_DIR=\"$(GNUPLOT_JS_DIR)\" - -DGNUPLOT_LUA_DIR=\"$(GNUPLOT_LUA_DIR)\" -DCONTACT=\"$(EMAIL)\" - -DHELPFILE=\"$(HELPFILE)\" -DGNUPLOT_X11=\"$(GNUPLOT_X11)\" - -DXAPPLRESDIR=\"$(XAPPLRESDIR)\" -DGNUPLOT_WXT=\"$(GNUPLOT_WXT)\" c) Added "hack", so that non-app bundle GUIs get focus (see patch). At the top add: #ifdef __WXMAC__ #include <Carbon/Carbon.h> extern "C" { void CPSEnableForegroundOperation( ProcessSerialNumber* psn ); } #endif in wxt_init() add: /* this hack enables to have a GUI on Mac OSX even if the * program was called from the command line (and isn't a bundle) */ #ifdef __WXMAC__ FPRINTF((stderr,"Mac hack\n")); ProcessSerialNumber psn; GetCurrentProcess( &psn ); CPSEnableForegroundOperation( &psn ); SetFrontProcess( &psn ); #endif Regards, Werner - -- Dr. Werner Smekal Institut fuer Angewandte Physik Technische Universitaet Wien Wiedner Hauptstr 8-10/134 A-1040 Wien Austria DVR-Nr: 0005886 email: sm...@ia... (GPG: EDCAF4A79) web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJLi3OcAAoJEG1QQcXtyvSnNSQH/Rky2b1b5Y9+dfIt99+NERbi DEYm51qzOB9n8Mv3sviPNm/YkudMRoTD4D772bSUvI+RLwHnqeEEClZzxU3CmJGu qX6PSNn2GecXH0IoHSiPbQoo8ky+iiDW5FrfNcfPDSDdtCO7VSanYEE7mPVxJy8s oKEkEh0QlAD9lhYbH2u9t5mZyedqhBd/KFQ41TJ0PK/O4H0aCD1sro+bad5tg+EO EZAD4XNF+zPdAwgUCEwMw35p3L8TuPdk5RxZs2U9pqOaGZctKd4+E0NEs9gm0AgE qx4ZXx6vSynwVL0hAOfCwN5W5MjUfQLfNeUAq0CGEDDa0eNxnCpF9vFkGIZyLrA= =66hL -----END PGP SIGNATURE----- |