-
Notifications
You must be signed in to change notification settings - Fork 53
/
build-FlyWithLua_lin_WithDocker_win_mac_lin_WithCmake_OnLinux
executable file
·56 lines (38 loc) · 1.44 KB
/
build-FlyWithLua_lin_WithDocker_win_mac_lin_WithCmake_OnLinux
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
#!/bin/bash
#
# How to run
# cd $FlyWithLua_REPO
# ./build-FlyWithLua_lin_WithDocker_win_mac_lin_WithCmake_OnLinux
rm -r FlyWithLua/win_x64/*.xpl
rm -r FlyWithLua/lin_x64/*.xpl
rm -r FlyWithLua/mac_x64/*.xpl
rm -r src/build-lin/*
# Windows build
rm -r build/*
cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../src/Toolchain-mingw-w64-x86-64.cmake
cmake --build ./build -v
cp ./build/win.xpl ./FlyWithLua/win_x64/FlyWithLua.xpl
# Linux build
# building a version for Ubuntu 20.04
# It does not have the debugging info the other build has
(cd docker; make)
cp src/build-lin/lin.xpl FlyWithLua/lin_x64/FlyWithLua.xpl
# rm -r build/*
# cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo
# cmake --build ./build -v
# cp ./build/lin.xpl ./FlyWithLua/64/
# Mac build
rm -r build/*
cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../src/Toolchain-ubuntu-osxcross-x86_64-11.3.cmake
cmake --build ./build -v
cp ./build/mac.xpl ./mac_x86_64.xpl
rm -r build/*
cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../src/Toolchain-ubuntu-osxcross-arm64-11.3.cmake -DBUILD_ARM=ON
cmake --build ./build -v
cp ./build/mac.xpl ./mac_arm64.xpl
lipo -create ./mac_x86_64.xpl ./mac_arm64.xpl -o ./FlyWithLua/mac_x64/FlyWithLua.xpl
rm mac_x86_64.xpl
rm mac_arm64.xpl
cp docs/FlyWithLua_Manual_en.pdf FlyWithLua/Documentation/FlyWithLua_Manual_en.pdf
exec $SHELL
#