How to compile Mupdf-qtcompile on Linuxinstall tools and thirdparty libraries
You should install some tools and thirdparty libraries. For Ubuntu users, you can use the following command (similar for other Linux users):
sudo apt-get install build-essential pkg-config cmake qtbase5-dev qt5-default libfreetype6-dev
Clone Source Code
git clone https://github.com/xiangxw/mupdf-qt.git //克隆该版本到本地cd mupdf-qt //进入该目录git submodule update --init --recursive //把mupdf和一些第三方库都给克隆下来 方便编译
Compile mupdf Source
cd mupdf //首先进入该目录make //进行make
Compile MUPDF-QT
cd ..mkdir buildcd buildcmake .. //该步骤在mac下面可能会出现错误记得要设置cmake的CMAKE_PREFIX_PATH环境变量//例如export CMAKE_PREFIX_PATH=/Users/username/Qt-SDK-ALL/Qt5.5/5.5/clang_64/make
Compile on Window with Visual Studioclone source code
git clone https://github.com/xiangxw/mupdf-qt.gitcd mupdf-qtgit submodule update --init --recursive
Compile mupdf Source
Go to Platforms/win32, open Mupdf.sln and build.
Qt5
Install Qt5 and add path of Qmake.exe to Path
Compile MUPDF-QT
Launch CMake (GUI version), set source code directory and build directory. Configure and generate Mupdf-qt.sln. Open Mupdf-qt.sln and build it.
Compile on Window with MSYS Mingwclone source code
git clone https://github.com/xiangxw/mupdf-qt.gitcd mupdf-qtgit submodule update --init --recursive
Installing MSYS/MINGW
Install MSYS and MinGW (http://www.mingw.org/wiki/Getting_Started). Using the graphical User Interface Installer, Mingw-get-setup.exe, is recommended. During installation, "checking/ticking" the following in "Basic Setup" is recommended:
- Mingw32-base
- mingw32-gcc-g++
- Msys-base
- Mingw-developer-toolkit
Add to C:\MinGW\bin;
your PATH system variables (at the beginning).
Compile Mupdf Source
cd mupdf-qtmake build=debug NOX11=yes
For release, the Just Change "debug" to "release". NOX11 is necessary since X11 headers was not available in Windows. Note that this won't build the "app" packaged with the mupdf source.
Compile MUPDF-QT
Install CMake.
Open CMakeLists.txt with Qt Creator (Qt5 built with MinGW), run CMake and build MUPDF-QT
You need to pay special attention to compiling the MinGW version in Windows
- You must follow the steps in the documentation for the GIT clone and update sub-project
- Need to guarantee MinGW version
- Compile with Msys and MinGW to download Msys and MinGW
- Setting environment variables for MinGW
- Start the command line using the xx.bat below the Msys directory under the MinGW installation package
- Compile mupdf source Code First
- Installing the CMake tool
- Use Qtcreator to open the Cmakelists file under the MUPDF-QT directory
- Executive CMake
- Execute build under Qtcreator
If you use MUPDF-QT error, you can refer to the following
Includepath+= /home/Bertero/Mupdf-Qt/Include/LIBS+= -L/Home/Bertero/Mupdf-Qt/Build/Lib-Lmupdf-Qtlibs+= -l/home/bertero/mupdf-qt/ mupdf/build/debug< Span class= "pun" >/ -lmupdf - ljpeg -lfreetype -lz Span class= "pun" >-ljbig2dec -lcrypto -< Span class= "PLN" >ldl -lmujs -lopenjpeg
Http://www.heilqt.com/topic/56f25db1e498871267b374d4
Mac platform compiles MUPDF-QT's open source project