From 1fafcd1323d8eed6dd0f2caa6783fabccb821c83 Mon Sep 17 00:00:00 2001 From: alikarimii Date: Thu, 21 Dec 2023 20:00:11 +0330 Subject: [PATCH 1/2] fix: qt@4 PATH install by brew and cmake option --- builder.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/builder.sh b/builder.sh index 5ed3b3b..8dfca86 100644 --- a/builder.sh +++ b/builder.sh @@ -59,22 +59,23 @@ check_and_install() { } # Array to store dependencies -dependencies=("golang" "cmake" "ninja" "curl") +dependencies=("golang" "cmake" "ninja" "curl" "qt@5") # Check and install dependencies using the function for dep in "${dependencies[@]}"; do check_and_install "$dep" "$dep" done -# Set environment variables for Qt5 -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 QT_QPA_PLATFORM_PLUGIN_PATH="/usr/local/opt/qt@5/plugins" -# export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig" +# installation path of qt@5 install by brew +info=$(brew info qt@5) +installation_path=$(echo "$info" | grep "Cellar/$package_name" | awk -F ' ' '{print $1}') -# Install macdeployqt for macOS -check_and_install "macdeployqt" "qt@5" +# Set environment variables for Qt5 and macdeployqt path for macOS +export PATH="$installation_path/bin:$PATH" +export LDFLAGS="-L$installation_path/lib" +export CPPFLAGS="-I$installation_path/include" +export QT_QPA_PLATFORM_PLUGIN_PATH="$installation_path/plugins" +# export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig" nRoot=$(pwd) nPath=$(pwd)/nekoray @@ -98,7 +99,7 @@ bash libs/build_deps_all.sh # Build nekoray using CMake and Ninja cd "$nPath/build" -cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 .. +cmake -GNinja -DCMAKE_PREFIX_PATH=$installation_path -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 .. ninja cd "$nPath" From d44f4e5bfe3c46f939610260f30eff05c7495c6a Mon Sep 17 00:00:00 2001 From: alikarimii Date: Thu, 21 Dec 2023 20:06:23 +0330 Subject: [PATCH 2/2] fix: package name missing --- builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.sh b/builder.sh index 8dfca86..35bc9b0 100644 --- a/builder.sh +++ b/builder.sh @@ -68,7 +68,7 @@ done # installation path of qt@5 install by brew info=$(brew info qt@5) -installation_path=$(echo "$info" | grep "Cellar/$package_name" | awk -F ' ' '{print $1}') +installation_path=$(echo "$info" | grep "Cellar/qt@5" | awk -F ' ' '{print $1}') # Set environment variables for Qt5 and macdeployqt path for macOS export PATH="$installation_path/bin:$PATH"