Skip to content

Compiling

Folke Will edited this page Oct 4, 2018 · 17 revisions

Prerequisites

For Windows, use MSYS2 with Mingw64 installed.

Dependencies

AviTab depends on several rather uncommon libraries. These are included as git submodules in the lib directory. Another dependency is libgeotiff which can usually be installed via package managers as libgeotiff-dev or so. Same for mbedtls.

Clone the AviTab repository to somewhere, I'll call the directory avitab in this guide. Clone recursively, i.e. passing --recursive to git.

mupdf

  • Note: The current version of AviTab is only compatible with mupdf 1.14
  • Clone the mupdf repository to an unrelated directory, I'll call it mupdf: git clone --recursive git://git.ghostscript.com/mupdf.git
  • Copy avitab/mupdf-config.h to mupdf/include/mupdf/fitz/config.h
  • Add the following lines to mupdf's Makethird file near the other libjpeg dependencies:
THIRD_SRC += thirdparty/libjpeg/jcapimin.c
THIRD_SRC += thirdparty/libjpeg/jcapistd.c
THIRD_SRC += thirdparty/libjpeg/jcmarker.c
THIRD_SRC += thirdparty/libjpeg/jcparam.c
THIRD_SRC += thirdparty/libjpeg/jctrans.c
THIRD_SRC += thirdparty/libjpeg/jcinit.c
THIRD_SRC += thirdparty/libjpeg/jcarith.c
THIRD_SRC += thirdparty/libjpeg/jccoefct.c
THIRD_SRC += thirdparty/libjpeg/jccolor.c
THIRD_SRC += thirdparty/libjpeg/jcdctmgr.c
THIRD_SRC += thirdparty/libjpeg/jchuff.c
THIRD_SRC += thirdparty/libjpeg/jcmainct.c
THIRD_SRC += thirdparty/libjpeg/jcmaster.c
THIRD_SRC += thirdparty/libjpeg/jcprepct.c
THIRD_SRC += thirdparty/libjpeg/jcsample.c
  • Enter the mupdf directory and compile with XCFLAGS=-fPIC make, it includes all of its dependencies and will build everything
  • Run sudo make install to install the libraries and headers to /usr/local

CURL

  • Both the plugin and the standalone version require libcurl to be installed. For Windows, you should configure the CURL compilation using the options described in lib/curl-config.

GLFW

  • The standalone version requires glfw to build and run. You don't need it if you only want the plugin.

Navigraph

  • The Navigraph integration is not supported if you compile AviTab yourself. The reason is that Navigraph has licensed the charts from Jeppesen and the license forbids using the charts outside of virtual environments. Since you could create your own client by using AviTab's code and thus violate Jeppesen's license, this is forbidden. Please do not try to reverse engineer it as this will get AviTab banned and then no one can use it anymore.

Compiling

  • Create a directory called build inside avitab
  • Enter that directory and run cmake ..
  • Now you should be able to compile by running make AviTab-standalone
  • Copy the icons and chart directories from avitab to abitab/build/src
  • On success, you should be able to run the executable, located in avitab/build/src
Clone this wiki locally