Сделал там один товарищ, зовут Jeff Biggs.
Вложение:
FgOsgEarth_Really.png [ 673.91 Кб | Просмотров: 25979 ]
Тема на английском форуме:
http://forum.flightgear.org/viewtopic.php?f=6&t=21351К большой досаде, у меня один фипс стабильно с этим. Если у Вас суперкомпьютер, можете попробовать. Вот инструкция к сборке под Ubuntu, будет полезна - я пять дней разбирался чего оно хочет и как.
Код:
How to compile FG with OsgEarth integration at Ubuntu
Without compiling gdal from source
Compiling with plib, osg, ddal compiling from source
1) Check that flightgear, simgear, openscenegraph, and plib is not os installed, remove it if so
Install all needed packages
sudo apt-get install freeglut3 freeglut3-dbg freeglut3-dev giflib-dbg libfltk1.1-dev libfltk1.1 cvs subversion cmake make build-essential automake autoconf zlib1g-dev zlib1g libwxgtk2.8-0 libwxgtk2.8-dev fluid gawk gettext libxi-dev libxi6 libxmu-dev libxmu6 libboost-dev libpng12-dev libfreetype6-dev libjpeg-dev libtiff5-dev libboost-dev libxrandr-dev libxrandr2 curl libcurl4-gnutls-dev librsvg2-dev libtool git-core libalut0 libalut-dev libopenal1 libopenal-dev libjpeg8-dev libjpeg-turbo8-dev libboost-thread-dev libclthreads-dev libclthreads2 libopenthreads14 libopenthreads-dev libgdbm3 libgdbm-dev qt4-qmake libqt4-dev libqtcore4 libplib1 librsplib-dev libudev-dev libudev1 libdbus-1-3 libdbus-1-dev libbz2-1.0 libbz2-dev
2) Create directory ~/Src/FgOsgEarth/
cd ~/Src/FgOsgEarth/
3) Download latest stable osg from http://www.openscenegraph.org/index.php/download-section/stable-releases
upack it there and cd into it
combine next to one string prior copypaste
cmake -D CMAKE_BUILD_TYPE="Release"
-D CMAKE_CXX_FLAGS="-O2 -march=native -mtune=native"
-D CMAKE_C_FLAGS="-O2 -march=native -mtune=native"
-D CMAKE_INSTALL_PREFIX:PATH='/opt/FgOsgEarth/OpenSceneGraph' .
make
or, better
make -j2
for two cores processor, 2 is cores number
sudo make install
4) install gdal
sudo apt-get install libgdal1h gdal-bin libgdal1-1.10.1-grass libgdal1-dev
5) git clone -v -b OsgEarthNext https://github.com/poweroftwo/osgearth.git osgearth
cd osgearth
combine next to one string prior copypaste
cmake CMAKE_BUILD_TYPE="Release"
-D CMAKE_CXX_FLAGS="-O2 -march=native -mtune=native -I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64"
-D CMAKE_C_FLAGS="-O2 -march=native -mtune=native -I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64"
-D CMAKE_INSTALL_PREFIX:STRING="/opt/FgOsgEarth/OsgEarth"
-D CMAKE_PREFIX_PATH="/opt/FgOsgEarth/OpenSceneGraph"
-D CMAKE_INCLUDE_PATH="/opt/FgOsgEarth/OpenSceneGraph/include"
-D CMAKE_LIBRARY_PATH="/opt/FgOsgEarth/OpenSceneGraph/lib64"
.
make -j2
sudo make install
6) cd ..
git clone -v -b OsgEarthNext git://gitorious.org/fg/simgear-osgearth.git simgear
cd simgear
cmake CMAKE_BUILD_TYPE="Release"
-D CMAKE_CXX_FLAGS="-O2 -march=native -mtune=native -I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64 -I /opt/FgOsgEarth/osgEarth/include -L /opt/FgOsgEarth/OsgEarth/lib64"
-D CMAKE_C_FLAGS="-O2 -march=native -mtune=native -I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64 -I /opt/FgOsgEarth/osgEarth/include -L /opt/FgOsgEarth/OsgEarth/lib64"
-D CMAKE_INSTALL_PREFIX:STRING="/opt/FgOsgEarth/simgear"
-D CMAKE_PREFIX_PATH="/opt/FgOsgEarth/OpenSceneGraph;/opt/FgOsgEarth/OsgEarth"
-D CMAKE_INCLUDE_PATH="/opt/FgOsgEarth/OpenSceneGraph/include;/opt/FgOsgEarth/OsgEarth/include"
-D CMAKE_LIBRARY_PATH="/opt/FgOsgEarth/OpenSceneGraph/lib64;/opt/FgOsgEarth/OsgEarth/lib64"
--with-jpeg-factory
.
make -j2
sudo make install
7) cd ..
svn co https://plib.svn.sourceforge.net/svnroot/plib/trunk plib
cd plib
sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h
./autogen.sh
./configure --prefix='/opt/FgOsgEarth/plib' --exec-prefix='/opt/FgOsgEarth/plib' CFLAGS="-O2 -march=native -mtune=native" CXXLAGS="-O2 -march=native -mtune=native"
make -j2
sudo make install
8) cd ..
git clone -v -b OsgEarthNext git://gitorious.org/fg/flightgear-osgearth.git flightgear
cd flightgear
cmake CMAKE_BUILD_TYPE="Release"
-D CMAKE_CXX_FLAGS="-O2 -march=native -mtune=native
-I /usr/include/gdal/
-I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64
-I /opt/FgOsgEarth/OsgEarth/include -L /opt/FgOsgEarth/OsgEarth/lib64
-I /opt/FgOsgEarth/simgear/include -L /opt/FgOsgEarth/simgear/lib
-I /opt/FgOsgEarth/plib/include -L /opt/FgOsgEarth/plib/lib"
-D CMAKE_C_FLAGS="-O2 -march=native -mtune=native
-I /usr/include/gdal/
-I /opt/FgOsgEarth/OpenSceneGraph/include -L /opt/FgOsgEarth/OpenSceneGraph/lib64
-I /opt/FgOsgEarth/OsgEarth/include -L /opt/FgOsgEarth/OsgEarth/lib64
-I /opt/FgOsgEarth/simgear/include -L /opt/FgOsgEarth/simgear/lib
-I /opt/FgOsgEarth/plib/include -L /opt/FgOsgEarth/plib/lib"
-D CMAKE_INSTALL_PREFIX:STRING="/opt/FgOsgEarth/flightgear"
-D CMAKE_PREFIX_PATH="/opt/FgOsgEarth/OpenSceneGraph;/opt/FgOsgEarth/OsgEarth;/opt/FgOsgEarth/simgear;/opt/FgOsgEarth/plib"
-D CMAKE_INCLUDE_PATH="/opt/FgOsgEarth/OpenSceneGraph/include;/opt/FgOsgEarth/OsgEarth/include;/opt/FgOsgEarth/simgear/include;/opt/FgOsgEarth/plib/include"
-D CMAKE_LIBRARY_PATH="/opt/FgOsgEarth/OpenSceneGraph/lib64;/opt/FgOsgEarth/OsgEarth/lib64;/opt/FgOsgEarth/simgear/lib;/opt/FgOsgEarth/plib/lib"
-D CMAKE_EXE_LINKER_FLAGS="-losgEarthAnnotation -losgEarthUtil -losgEarth -lgdal"
--enable-osgviewer
.
then add /usr/lib/libgdal.so prior any libosgEarth at
~/Src/FgOsgEarth/flightgear/src/Main/CMakeFiles/fgfs.dir/link.txt and
~/Src/FgOsgEarth/flightgear/src/Main/CMakeFiles/fgfs.dir/relink.txt
and add
-I /usr/include/gdal -L/opt/FgOsgEarth/OpenSceneGraph/lib64 -L/opt/FgOsgEarth/OsgEarth/lib64 -L/opt/FgOsgEarth/simgear/lib -L/opt/FgOsgEarth/plib/lib -L/usr/lib -L/lib64 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu/
in both variables at
~/Src/FgOsgEarth/flightgear/src/Main/CMakeFiles/fgfs.dir/flags.make
make -j2
sudo make install
add
-I /usr/include/gdal -L/opt/FgOsgEarth/OpenSceneGraph/lib64 -L/opt/FgOsgEarth/OsgEarth/lib64 -L/opt/FgOsgEarth/simgear/lib -L/opt/FgOsgEarth/plib/lib -L/usr/lib -L/lib64 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu/
and
-Wl,-rpath,/opt/FgOsgEarth/OpenSceneGraph/lib64:/opt/FgOsgEarth/OsgEarth/lib64
in link.txt or relink.txt files on demands, and then
sudo make install
again
make -j2
sudo make install
9) cd ..
git clone -v -b OsgEarthNext git://gitorious.org/fg/fgdata-osgearth.git fgdata
10) sudo gedit /opt/FgOsgEarth/flightgear/bin/fgfs.sh
export LD_LIBRARY_PATH=/opt/FgOsgEarth/OpenSceneGraph/lib64:/opt/FgOsgEarth/OsgEarth/lib64:/opt/FgOsgEarth/OsgEarth/osgPlugins-3.2.1:$LD_LIBRARY_PATH
/opt/FgOsgEarth/flightgear/bin/fgfs $*
give to it right to run and run it, point -fg-data to right path