plib-mac-dist/README.md

103 lines
1.9 KiB
Markdown
Raw Normal View History

2022-10-15 14:32:27 +08:00
2022-11-11 20:29:22 +08:00
## BASE
xcode-select install
macport
Install Boost from MacPorts (or directly from source)
2022-11-12 11:58:15 +08:00
sudo port install boost
brew install libevent
2022-11-11 20:21:16 +08:00
## libstdc++
https://github.com/WuMu123Love/xcode10_libsc
适配xcode10iOS12删除libstdc++的临时解决方案 详见项目中libsc++.zip文件里面有库文件和对应存储的路劲。 Xcode正式版 将压缩文件中的真机解压,放到目录
unzip
sudo cp * /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/
2022-11-11 14:57:17 +08:00
2022-11-11 20:21:16 +08:00
2022-10-15 14:32:27 +08:00
## 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
2022-11-06 22:52:49 +08:00
mv plib-dist dist
2022-10-15 14:32:27 +08:00
```
配置 SimGear 和 FlightGear 时,只需将此 dist 目录用作 CMAKE_INSTALL_PREFIX 即可,无需其他步骤即可找到所有依赖项。
2022-11-09 12:24:38 +08:00
2022-10-15 14:32:27 +08:00
## 编译
```
2022-11-06 22:52:49 +08:00
mkdir FGFS-4.1
2022-10-15 15:39:15 +08:00
2022-11-06 22:52:49 +08:00
cd FGFS-4.1
2022-10-15 15:39:15 +08:00
2022-11-06 22:52:49 +08:00
git clone https://git-x.kongjian.xin/FGFS-4.1/fgdata.git
2022-10-15 14:32:27 +08:00
2022-11-06 22:52:49 +08:00
git clone https://git-x.kongjian.xin/FGFS-4.1/plib-mac-dist.git
2022-10-15 15:39:15 +08:00
mv plib-mac-dist install
2022-10-15 14:32:27 +08:00
2022-11-07 20:07:55 +08:00
git clone https://git-x.kongjian.xin/FGFS-4.1/OpenSceneGraph.git
2022-10-15 14:32:27 +08:00
cd OpenSceneGraph
git checkout OpenSceneGraph-3.6.0
2022-11-11 14:32:31 +08:00
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../../dist ..
2022-10-15 14:32:27 +08:00
make -j8
make install
cd ..
2022-11-06 22:52:49 +08:00
git clone https://git-x.kongjian.xin/FGFS-4.1/simgear.git
2022-11-11 14:32:31 +08:00
cd simgear
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../../dist ..
2022-11-06 22:52:49 +08:00
make -j8
2022-10-15 14:32:27 +08:00
make install
cd ..
2022-11-06 20:56:41 +08:00
git clone https://git-x.kongjian.xin/FGFS-4.1/flightgear.git
2022-11-11 14:32:31 +08:00
cd flightgear
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DFG_DATA_DIR=$PWD/../../fgdata -DCMAKE_INSTALL_PREFIX=$PWD/../../dist ..
2022-11-06 22:52:49 +08:00
make -j8
2022-10-15 14:32:27 +08:00
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"
```