-
Notifications
You must be signed in to change notification settings - Fork 8
Compiling medInria
- Visual Studio Professional 2010 (2008 should work, 2012 is unsupported at the moment)
- DirectX SDK (http://www.microsoft.com/en-us/download/details.aspx?id=6812)
- CMake 2.8.10+ (during installation, click Yes to add to path)
- gitbash (same, add to path manually if necessary)
- Subversion (same, add to path manually if necessary)
- Qt 4 (Qt 5 is currently unsupported)
- Boost (http://www.boost.org/users/download/). Unpack, and run bootstrap.bat, then run b2.exe
If you want a 64bit compilation, you will need to compile Qt since there is no installer for Qt4-64bit. You will need 64bit version of OpenSSL as well. Just follow this instructons :
- Set up the 64 bit environment for Visual Studio by executing:
Path_to_visual_studio_2010\VC\bin\amd64\vcvars64.bat
- Get and install Win64 openSSL from here : http://slproweb.com/products/Win32OpenSSL.html
- Get qt-everywhere-opensource-src from here http://download.qt-project.org/official_releases/qt/4.8
- Go to the source directory of Qt using the Visual studio Win64 command prompt and configure it with the win64 version of openSSL :
configure -plugin-sql-sqlite -no-qt3support -nomake examples -nomake demos
-openssl -I path_to_OpenSSL-Win64\include -L path_to_OpenSSL-Win64
- Compile and install Qt (very long, it will take a couple of hours) :
nmake INSTALL
Download Xcode on the AppStore. In the meantime download CMake 3+.
Create a ssh key: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
And add it to your Github account.
Install Homebrew using this website: https://brew.sh
Then in the Terminal: brew install boost
Download the tar.gz package from here: https://download.qt.io/official_releases/qt/4.8/4.8.7/
Then follow this: http://doc.qt.io/qt-4.8/install-mac.html
- if you use macOS Sierra, run
./configure -no-phonon
: https://github.com/jcfr/qt-easy-build/issues/27 - Apply this patch for El Capitan and more recent macOS versions: https://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch
- if after
./configure
, you encounter
-bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
open configure with vi, then press Esc and type :set fileformat=unix
, save with :x!
.
- After creating .profile in your home directory, restart your computer
- Check that qt is well installed:
qmake --version
You'll need to install the appropriate packages that provide the following software :
- GCC and G++
- Git
- Subversion
- CMake 2.8.10+
- Qt4 developpement tools and headers
On Deb based distributions (Debian, Ubuntu, Mint...) :
aptitude install gcc g++ git subversion cmake qt4-dev-tools libxt-dev libzip-dev boost-dev
On RPM based distributions (Fedora, Red-Hat, OpenSUSE...) :
yum install gcc gcc-g++ gcc-c++ git subversion cmake qt-devel libXt-devel boost-devel qtwebkit-devel
These need to be run as the root user, or using sudo.
Make sure your version of cmake is 3.0 or higher :
cmake --version
If not, you will need to install the latest version from http://www.cmake.org/cmake/resources/software.html
-
Get the superproject's sources
git clone https://github.com/medInria/medinria-superproject.git
-
Go into medinria-superproject, and create a build directory
cd medinria-superproject && mkdir build
-
Enter the build directory :
cd build
-
Configure
cmake ..
You may want to run cmake-gui or ccmake instead if you need to fill in variables, such as the path to qmake on Windows.
-
Compile
cmake --build . --config RelWithDebInfo
It will take a while. When it's done, you can run it using :
Linux & Mac : ./medInria.sh
Windows : medInria.bat RelWithDebInfo
or to open in Visual Studio : medInria-dev.bat
NB: if you already have your own VTK5.10, be sure it's compiled:
- with
VTK_USE_QT
set toON
- (on Linux, with
CMAKE_CXX_FLAGS
andCMAKE_C_FLAGS
set to-fPIC
)