From db7b468fdf3d41b4f4862592ecfc822755c2ab97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Sat, 15 Oct 2022 14:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'README.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..11c76af --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ + +## qt5 +brew install qt5 + +.zshrc +``` +export PATH="/usr/local/opt/qt@5/bin:$PATH" +export LDFLAGS="-L/usr/local/opt/qt@5/lib" +export CPPFLAGS="-I/usr/local/opt/qt@5/include" +``` + +## plib dist ... + +``` +unzip plib-dist.zip +mv plib-dist install +``` + +配置 SimGear 和 FlightGear 时,只需将此 dist 目录用作 CMAKE_INSTALL_PREFIX 即可,无需其他步骤即可找到所有依赖项。 + +## 编译 + +``` + +git clone https://git.kongjian.xin/FGFS-4.0/fgdata.git + + +git clone https://github.com/openscenegraph/OpenSceneGraph.git +cd OpenSceneGraph +git checkout OpenSceneGraph-3.6.0 +cd .. +mkdir osgbuild +cd osgbuild +cmake ../OpenSceneGraph/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install +make -j8 +make install + +cd .. +git clone https://git.kongjian.xin/FGFS-4.0/simgear.git +mkdir sgbuild +cd sgbuild +cmake ../simgear -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install +make +make install + +cd .. +git clone https://git.kongjian.xin/FGFS-4.0/flightgear.git + +mkdir fgbuild +cd fgbuild +cmake ../flightgear -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install -DFG_DATA_DIR=/Users/zhongjin/FGFS/fgdata +make +make install + +``` + +## 运行 + +open -a ApplicationName + + +.zshrc +``` +export PATH="/usr/local/opt/qt@5/bin:$PATH" + +export LDFLAGS="-L/usr/local/opt/qt@5/lib" +export CPPFLAGS="-I/usr/local/opt/qt@5/include" + +export DYLD_LIBRARY_PATH="~/FGFS/install/lib" +``` \ No newline at end of file