[Ipe-discuss] Compiling Ipe 6.0pre32 on Mac OS X 10.6 (Snow Leopard)
Murat Yildizoglu
murat.yildizoglu at univ-cezanne.fr
Sun Jun 6 00:11:14 CEST 2010
Thank you very much Sherif,
Thant gave me the courage to try to build ipe on my MacBookPro under
SL. Unfortunately, I am meeting problems while following your
instructions:
- qmake refuses the option -recursive in the line qmake -spec macx-g++
-recursive
and if I try to make by using qmake without this option (thinking that
it is by default, since the help of qmake proposes the opposite option
-norecursive), I get other problems:
cd image && make -f Makefile
c++ -c -pipe -m32 -Wall -W -Os -fPIC -DQT_NO_CAST_FROM_ASCII
-DQT_NO_DEBUG -DQT_PLUGIN -I/sw/lib/qt3/mkspecs/macx-g++ -I.
-I../../include -I/include -o ../../../build/obj/ipelets/image.o
image.cpp
image.cpp:33:23: error: QFileDialog: No such file or directory
and other similar messages about other components, until
image.cpp:286: error: ‘QFile’ was not declared in this scope
image.cpp:286: error: ‘file’ was not declared in this scope
image.cpp:287: error: expected ‘,’ or ‘;’ before ‘{’ token
make[2]: *** [../../../build/obj/ipelets/image.o] Error 1
make[1]: *** [sub-image] Error 2
make: *** [sub-ipelets] Error 2
These messages are strange because, I have installed the QT-SDK you indicate.
I am new to OSX, and hence, followed scrupulously your indications
until that point...
Any idea about these problems?
Murat
2010/6/5 Sherif Ghali <sherif.ghali at yahoo.com>:
>
>
> Here are some notes for installing ipe-6.0pre32 on Mac OS X 10.6 (Snow Leopard).
>
> ------------------------------------------------------------------------
> The directories used are:
> /usr/local is a reasonable location for installing Ipe.
> /opt/local MacPorts installs in this directory.
> First wipe out /opt/local if one is left-over from Leopard.
> MacPorts packages installed under Leopard will not run
> under Snow Leopard (nor will Ipe if installed under Leopard).
> ------------------------------------------------------------------------
> Pre-installation
> Xcode is not installed by default. It's on the OS X disk and is also at
> http://developer.apple.com/mac/
> MacPorts is a package manager, similar to Debian's apt-get and
> Fedora's rpm. Download/run it
> http://www.macports.org/install.php
> then run
> sudo port -v selfupdate
> Once MacPorts is installed, installing many linux packages is easy.
> For one, Ipe needs Freetype2:
> sudo port install freetype
> MacTeX is derived from Tex Live
> Install:
> http://www.tug.org/mactex/
> 1.3GB download
> >2GB installed
> pdflatex is now at:
> /usr/local/texlive/2009/bin/universal-darwin
> MacTeX puts this directory at the beginning of your
> path (and then you are ready to call pdflatex etc
> directly), but MacPorts also puts /opt/local/bin at
> the beginning of your path. If you already had MacTeX
> before you installed MacPorts, you will need to do
> something like:
> sudo rm /usr/bin/pdflatex
> sudo ln -s /usr/local/texlive/2009/bin/universal-darwin/pdflatex /usr/bin
> The first is needed only if you upgraded from Leopard to Snow Leopard,
> and TeX was already installed.
> Also make sure you do not have:
> export IPEPDFLATEX=/opt/local/bin/pdflatex
> in your .bash_profile.
> Qt SDK
> Install:
> http://qt.nokia.com/downloads/sdk-mac-os-cpp
> 545MB download
> 1.7GB installed
> ------------------------------------------------------------------------
> Ipe
> Unpack ipe in /usr/local:
> cd /usr/local
> [sudo] cp ipe-6.0pre32-src.tar .
> [sudo] tar -xf ipe-6.0pre32-src.tar
> sudo chown -R myusername /usr/local/ipe-6.0pre32
> cd ipe-6.0pre32/src/
> Edit /usr/local/ipe-6.0pre32/src/config.pri:
> Optional:
> if you are using emacs, for increased readability
> replace 'text' in the first line with 'sh-mode'.
> If you a regular emacs/Qt user, consider using the
> dedicated .pri/.pro mode.
> http://www.tolchz.net/wp-content/uploads/2008/01/qt-pro.el
> then remove the -*- text -*- line.
> Add the following block somewhere in config.pri.
> mac {
> QMAKE_CXXFLAGS += -m32
> QMAKE_LFLAGS += -m32
> # --------Freetype includes--------
> # We need the next line because ipefonts.cpp #includes "ft2build.h".
> FREETYPE_INCLUDE = /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include
> # We need also the following line because ft2build.h #includes "freetype/config/ftheader.h"
> FREETYPE_INCLUDE += /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/freetype2
> # ...and we *may* need the next one because other freetype2 are therein.
> # FREETYPE_INCLUDE += /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/freetype2/freetype
> # --------Freetype library--------
> # The following freetype2 lib is a 32-bit dylib.
> FREETYPE_LIBPATH = /Developer/SDKs/MacOSX10.6.sdk/usr/X11/lib
> # (The one in /opt/local/lib is a 64-bit dylib.)
> IPEPREFIX = /usr/local/ipe-6.0pre32
> }
> Insert the "mac { ... }" block somewhere after the line:
> FREETYPE_INCLUDE = /usr/include/freetype2
> and before the block where:
> error( "You need to specify IPEPREFIX!")
> appears.
> Other possible settings (if you use X11 and i-installer instead of MacPorts) are:
> X11:
> FREETYPE_INCLUDE = /usr/X11/include /usr/X11/include/freetype2
> i-installer:
> FREETYPE_INCLUDE = /usr/include /usr/include/freetype2
> Compile:
> cd /usr/local/ipe-6.0pre32/src
> qmake -spec macx-g++ -recursive
> make
> sudo make install
> Set path to the 14 standard Postscript fonts:
> mkdir -p /usr/local/ipe-6.0pre32/share/ipe/6.0pre32
> cp /usr/local/ipe-6.0pre32/tetex-fontmap.xml /usr/local/ipe-6.0pre32/share/ipe/6.0pre32/fontmap.xml
> In /usr/local/ipe-6.0pre32/fontmap.xml, replace each occurrence of
> /usr/share/texmf/fonts/type1/urw/
> with
> /usr/local/texlive/2009/texmf-dist/fonts/type1/urw/
> If you decide to install TeX through MacPorts rather than as a
> standalone package, the location would be:
> /opt/local/share/texmf-dist/fonts/type1/urw/
> Copy ipekeys.xml to where they are expected:
> cp /usr/local/ipe-6.0pre32/ipekeys.xml /usr/local/ipe-6.0pre32/share/ipe/6.0pre32
> --------------------------------
> Final setup
> To launch from the terminal:
> sudo rm /usr/lib/libipe*
> sudo ln -s /usr/local/ipe-6.0pre32/build/lib/*.1.dylib /usr/lib
>
> sudo rm /usr/bin/ipe
> sudo rm /usr/bin/ipetoipe
> sudo ln -s /usr/local/ipe-6.0pre32/build/bin/ipe.app/Contents/MacOS/ipe /usr/bin
> (doing 'sudo ln -s /usr/local/ipe-6.0pre32/build/bin/ipe.app /usr/bin'
> is not suitable because OSX does not expand *.app in /usr/bin)
> sudo ln -s /usr/local/ipe-6.0pre32/build/bin/ipetoipe.app/Contents/MacOS/ipetoipe /usr/bin
>
> pdftoipe is separate:
> sudo rm /usr/bin/pdftoipe
> sudo ln -s /usr/local/pdftoipe-20070509/pdftoipe.app/Contents/MacOS/pdftoipe /usr/bin
>
> To launch from the dock:
> If you also want to use ipe from the dock:
> sudo ln -s /usr/local/texlive/2009/bin/universal-darwin/pdflatex /usr/bin
> Another option---if TeX is installed via MacPorts:
> sudo ln -s /opt/local/bin/pdflatex /usr/bin
> In Finder
> drag /usr/local/ipe-6.0pre32/build/bin/ipe.app to the dock
> (or else drag /usr/bin/ipe.app to the dock).
> ------------------------------------------------------------------------
> Bugs:
>
> Almost everything works perfectly, but there are a few quirks if
> one launches ipe from the terminal or by dired-do-shell-command
> (key: "!") in emacs dired mode.
>
> -- The ipe window appears second from the top of the window stack,
> underneath the terminal (or emacs) window.
>
> -- The ipe icon appears at the tail end of the Meta-Tab sequence.
> Hint: Type Meta-Tab, Meta-`, Meta-` (or Meta-Tab then point with
> the mouse) to reach it.
>
> -- In the Meta-Tab sequence, ipe appears with the (ugly) generic
> program icon rather than ipe's icon.
>
> All is well if ipe is launched from the dock.
>
> ------------------------------------------------------------------------
> Keys:
>
> To access the object-properties menu use CTRL-AppleKey-MouseButton on
> a single-button mouse and AppleKey-RightButton on a two-button mouse.
>
> To end a path use CTRL-MouseButton on a single-button mouse and
> RightButton on a two-button mouse.
>
> Perhaps the nicest feature of running ipe on a Mac rather than on
> Windows is that two-finger swipes perform a zoom in/zoom out. It is
> very handy to zoom into a detail, modify something, then zoom out,
> recenter (x), and repeat. The same can be done with the scroll wheel
> of a mouse if one is attached.
> ------------------------------------------------------------------------
> Installing MacTeX: 2GB; Qt: 2GB; XCode: 2GB; MacPorts: 1GB.
> Finding that a free-software package is concise, well-written, and
> useful: priceless. There are some things money can't buy, for
> everything else there's a BiggerDrive.
> ------------------------------------------------------------------------
>
> Sherif
>
>
>
>
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/ipe-discuss
>
--
Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02
Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27
e-mail: murat.yildizoglu at univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
______________________________________________
More information about the Ipe-discuss
mailing list