edgetx-companion/install.patch

48 lines
1.4 KiB
Diff
Raw Normal View History

2022-11-29 21:28:32 +01:00
--- build-companion-org.sh 2022-11-29 15:37:49.493916416 +0100
+++ build-companion.sh 2022-11-29 20:11:06.425385270 +0100
@@ -30,7 +30,7 @@
2021-11-05 17:51:09 +01:00
SRCDIR=$1
OUTDIR=$2
-COMMON_OPTIONS="-DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release"
+COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release"
if [ "$(uname)" = "Darwin" ]; then
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
2022-11-29 21:28:32 +01:00
elif [ "$(uname)" != "Linux" ]; then # Assume Windows and MSYS2
@@ -59,9 +59,9 @@
fi
2021-11-05 17:51:09 +01:00
fi
-rm -rf build
-mkdir build
-cd build
+rm -rf ${OUTDIR}
+mkdir ${OUTDIR}
+cd ${OUTDIR}
2022-11-29 21:28:32 +01:00
declare -a simulator_plugins=(x9lite x9lites
x7 x7-access
@@ -161,19 +161,10 @@
esac
2021-11-05 17:51:09 +01:00
2022-11-29 21:28:32 +01:00
rm -f CMakeCache.txt native/CMakeCache.txt
+
cmake ${BUILD_OPTIONS} "${SRCDIR}"
cmake --build . --target native-configure
cmake --build native -j"${JOBS}" --target libsimulator
-done
+done
-cmake --build . --target native-configure
2021-11-05 17:51:09 +01:00
-if [ "$(uname)" = "Darwin" ]; then
2022-11-29 21:28:32 +01:00
- cmake --build native -j"${JOBS}" --target package
- cp native/*.dmg "${OUTDIR}"
2021-11-05 17:51:09 +01:00
-elif [ "$(uname)" = "Linux" ]; then
2022-11-29 21:28:32 +01:00
- cmake --build native -j"${JOBS}" --target package
- cp native/*.AppImage "${OUTDIR}"
2021-11-05 17:51:09 +01:00
-else
2022-11-29 21:28:32 +01:00
- cmake --build native --target installer
- cp native/companion/*.exe "${OUTDIR}"
2021-11-05 17:51:09 +01:00
-fi
2022-11-29 21:28:32 +01:00
+cmake ${BUILD_OPTIONS} "${OUTDIR}/native"