Add macOS USB UART support
Ubuntu build / build-and-test (ubuntu-22.04) (push) Has been cancelled
Ubuntu build / build-and-test (ubuntu-24.04) (push) Has been cancelled

This commit is contained in:
2026-07-18 12:03:38 +03:00
parent 851642296a
commit 049f6301e8
8 changed files with 279 additions and 48 deletions
+24 -7
View File
@@ -5,29 +5,46 @@ cd "$(dirname "$0")"
print_qt_install_hint() {
echo
echo "Qt6 bulunamadi. Ubuntu'da gerekli paketleri kurmak icin:"
echo " sudo apt update"
echo " sudo apt install build-essential cmake qt6-base-dev"
if [[ "$(uname -s)" == "Darwin" ]]; then
echo "Qt6 bulunamadi. macOS'ta gerekli paketleri kurmak icin:"
echo " brew install cmake qt"
echo "veya doğrudan: ./setup-macos.sh"
else
echo "Qt6 bulunamadi. Ubuntu'da gerekli paketleri kurmak icin:"
echo " sudo apt update"
echo " sudo apt install build-essential cmake qt6-base-dev"
fi
}
project_dir="$(pwd -P)"
if [[ -f ./build/CMakeCache.txt ]]; then
cached_source="$(sed -n 's/^CMAKE_HOME_DIRECTORY:INTERNAL=//p' ./build/CMakeCache.txt)"
if [[ -n "$cached_source" && "$cached_source" != "$project_dir" ]]; then
echo "Build klasoru farkli bir proje yoluna ait, yeniden olusturuluyor:"
echo " $cached_source"
cached_system="$(sed -n 's/^CMAKE_SYSTEM_NAME:INTERNAL=//p' ./build/CMakeCache.txt)"
host_system="$(uname -s)"
if [[ ( -n "$cached_source" && "$cached_source" != "$project_dir" ) \
|| ( -n "$cached_system" && "$cached_system" != "$host_system" ) ]]; then
echo "Build klasoru farkli bir proje yolu veya sisteme ait, yeniden olusturuluyor."
rm -rf ./build
fi
fi
if ! cmake -S . -B build; then
cmake_args=(-S . -B build)
if [[ "$(uname -s)" == "Darwin" ]] && command -v brew >/dev/null 2>&1; then
cmake_args+=("-DCMAKE_PREFIX_PATH=$(brew --prefix qt)")
fi
if ! cmake "${cmake_args[@]}"; then
print_qt_install_hint
exit 1
fi
cmake --build build
if [[ "$(uname -s)" == "Darwin" ]]; then
exec ./build/location_plotter.app/Contents/MacOS/location_plotter "$@"
fi
missing_libs="$(ldd ./build/location_plotter 2>/dev/null | awk '/not found/ { print $1 }' || true)"
if [[ -n "$missing_libs" ]]; then
echo "Eksik paylasimli kutuphaneler:"