forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathbuild.sh
More file actions
59 lines (46 loc) · 1.87 KB
/
build.sh
File metadata and controls
59 lines (46 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /bin/bash
RPC_VERSION_FOLDER="rpclib-2.3.0"
folder_name="Release"
build_dir=build
mkdir -p build
cd build
CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++ -I/usr/lib/llvm-17/include/c++/v1~'
make -j$(nproc)
cd ..
mkdir -p AirLib/lib/x64/$folder_name
mkdir -p AirLib/deps/rpclib/lib
mkdir -p AirLib/deps/MavLinkCom/lib
cp $build_dir/output/lib/libAirLib.a AirLib/lib
cp $build_dir/output/lib/libMavLinkCom.a AirLib/deps/MavLinkCom/lib
cp $build_dir/output/lib/librpc.a AirLib/deps/rpclib/lib/librpc.a
# Update AirLib/lib, AirLib/deps, Plugins folders with new binaries
rsync -a --delete build/output/lib/ AirLib/lib/x64/$folder_name
rsync -a --delete external/rpclib/$RPC_VERSION_FOLDER/include AirLib/deps/rpclib
rsync -a --delete MavLinkCom/include AirLib/deps/MavLinkCom
rsync -a --delete AirLib Unreal/Plugins/AirSim/Source
rm -rf Unreal/Plugins/AirSim/Source/AirLib/src
# Update all environment projects
for d in ~/Documents/Unreal\ Projects/*; do
# Skip if not a directory
[ -d "$d" ] || continue
# Skip if symbolic link
[ -L "${d%/}" ] && continue
# Execute clean.sh if it exists and is executable
if [ -x "$d/clean.sh" ]; then
"$d/clean.sh"
fi
# Ensure Plugins directory exists
mkdir -p "$d/Plugins"
# Sync AirSim plugin into Plugins directory
rsync -a --delete Unreal/Plugins/AirSim/ "$d/Plugins/AirSim/"
done
echo ""
echo ""
echo "=================================================================="
echo " Colosseum plugin is built! Here's how to build Unreal project."
echo "=================================================================="
echo "All environments under Unreal/Environments have been updated."
echo ""
echo "For further info see the docs:"
echo "https://codexlabsllc.github.io/Colosseum/build_linux/"
echo "=================================================================="