Downloading, Compiling, and Installing Ipe

Otfried Cheong edited this page Jun 11, 2017 · 14 revisions

Downloading Ipe

Binary Ipe packages are available for a number of platforms:

Windows

A Windows package for Ipe is available from the homepage.

Mac OS X

A Mac OS X app for Ipe is available from the homepage.

Linux

Ipe is included in several Linux distributions, including Debian, Ubuntu, Linux Mint, openSuse, etc. You can install Ipe through the distribution's package manager.

It takes a while for a new Ipe version to make into a distribution, especially the long-term stable distributions. If you want to use the new features of the cutting edge Ipe version, you can either compile Ipe yourself, or use the Ipe AppImage instead, available from bintray. The AppImage requires no installation, no compilation, and no prerequisites except for Latex.

Just download the AppImage file and make it executable (e.g. say chmod 0755 ipe-7.x.y-x86_64.AppImage on the command line).

You can then start Ipe by clicking the AppImage file.

Compiling and Installing Ipe

Linux

Debian, Ubuntu, Mint

Download and uncompress the file with the source code (I will assume it is in the folder ipe). Then, type the following commands. (Change 7.x.y to the current Ipe version, e.g. 7.2.6.)

Some systems do not have qtbase5-dev-tools, but have the moc tool anyway.

$ sudo apt-get install checkinstall zlib1g-dev qtbase5-dev qtbase5-dev-tools
$ sudo apt-get install libfreetype6-dev libcairo2-dev libjpeg8-dev
$ sudo apt-get install libpng12-dev liblua5.3-dev
$ cd ./src
$ export QT_SELECT=5
$ make IPEPREFIX=/usr/local
$ sudo checkinstall --pkgname=ipe --pkgversion=7.x.y --backup=no \
	 --fstrans=no --default make install IPEPREFIX=/usr/local
$ sudo ldconfig

Finally, you might add a menu item pointing to /usr/local/bin/ipe.

Debian, Ubuntu, Mint with Qt 4

You can still compile Ipe with Qt 4, and that may be better on an older system or if all your other apps use Qt 4.

Install the package libqt4-dev.

Change the settings for QT_CFLAGS and QT_LIBS in src/config.mak for Qt 4:

QT_CFLAGS     ?= $(shell pkg-config --cflags QtGui QtCore)
QT_LIBS       ?= $(shell pkg-config --libs QtGui QtCore)

You may also need to change the moc program to run the one for Qt4. (You can check with moc -v, it should display version 4.x.y.) If moc alone doesn't work, try setting the environment variable QT_SELECT to 4, e.g. like this in bash:

export QT_SELECT=4

(Check again with moc -v.) Your moc may also be called moc-qt4.

Fedora

Download and uncompress the file with the source code (I will assume it is in the folder ipe). Then, type the following commands. Commands started with # should be typed as root.

# yum -y install cairo-devel qt-devel lua-devel gcc gcc-c++ 
$ cd ipe/src
$ make IPEPREFIX=/usr/local
# make install IPEPREFIX=/usr/local
# echo /usr/local/lib/ >/etc/ld.so.conf.d/ipe7.conf
# ldconfig
$ ipe

Fedora 23

In addition to the above steps, there were a few other things I had to do before running make.

ln -s /usr/lib/pkgconfig/lua.pc /usr/lib/pkgconfig/lua5.2.pc
dnf install libjpeg-turbo-devel qt5-qtbase-devel                
PATH=$PATH:/usr/lib/qt5/bin                                     #`moc` missing from path

Archlinux

If you have yaourt installed:

yaourt -S ipe --noconfirm

Mac OSX

Since Ipe 7.2.1, the Ipe app available on the Ipe homepage is a small download and fully self-contained. Most Ipe users should use this rather than trying to compile Ipe themselves.

If you use Macports, you can just say

sudo port install ipe

(you may need to clean up files from a previous non-macports installation first).

Otherwise, see the instructions in the macos.txt file in the source distribution

Windows

The following step-by-step guide describes how to compile Ipe 7.1.8 under Windows.

  1. Download and install MSYS (a collection of GNU utilities such as bash, make, gawk): http://www.mingw.org/wiki/msys. Install at least the msys-base and msys-patch packages. This guide assumes you select C:\MinGW as installation directory, MSYS will be at C:\MinGW\msys\1.0.

  2. Download and install Win-builds (GCC compiler and many third party libraries): http://win-builds.org/doku.php/download_and_installation_from_windows. During installation select Cygwin or MSYS, i686, and C:\MinGW\msys\1.0 as installation directory. Be sure to deselect the Lua 5.1 package, because Ipe will need Lua 5.2.

  3. Download Lua 5.2.x Windows x86 DLL and Includes: http://luabinaries.sourceforge.net/download.html. Extract the file to C:\MinGW\msys\1.0\opt\lua52.

  4. Download the Ipe 7.1.8 source code and extract it to C:\MinGW\msys\1.0\home.

  5. Download the patch http://www.chzsoft.de/storage/ipe-7.1.8-compile-on-windows.diff and save it in C:\MinGW\msys\1.0\home. This fixes several issues with the compilation of Ipe 7.1.8 under Windows:

    • Add ipe.exe.manifest erroneously omitted from the source distribution.
    • Use libjpeg instead of TurboJPEG for the Windows version as well.
    • Fix code so that gestures can be used under Windows 7 and above but the resulting binary still runs under Windows XP and Vista.
    • Adapt paths in the Makefile to this tutorial.
  6. Start the MSYS shell by running C:\MinGW\msys\1.0\msys.bat.

  7. Enable the Win-builds toolchain by typing

     source /opt/windows_32/bin/win-builds-switch
    
  8. Change into the Ipe directory and apply the patch:

     cd /home/ipe-7.1.8
     patch -p0 < ipe-7.1.8-compile-on-windows.diff
    
  9. Compile Ipe:

     cd src
     make
    
  10. The resulting binaries are now in /home/ipe-7.1.8/mingw/bin. You will need lua52.dll from C:\MinGW\msys\1.0\opt\lua52 as well as libcairo-2.dll, libgcc_s_sjlj-1.dll, libwinpthread-1.dll, libfontconfig-1.dll, libexpat-1.dll, libfreetype-6.dll, libpng14-14.dll, libz-1.dll, libpixman-1-0.dll, libstdc++-6.dll, libjpeg-9.dll from C:\MinGW\msys\1.0\opt\windows_32\bin to run these binaries.