From 1bf98cd0f7d66d36cb434f2ee70a7a0759ceca4f Mon Sep 17 00:00:00 2001 From: taynpg Date: Fri, 4 Jul 2025 22:14:51 +0800 Subject: [PATCH] script: add a build script. --- Script/qt5142.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 Script/qt5142.sh diff --git a/Script/qt5142.sh b/Script/qt5142.sh new file mode 100755 index 0000000..6caf266 --- /dev/null +++ b/Script/qt5142.sh @@ -0,0 +1,21 @@ +#!/bin/bash +current_user=$(whoami) +qt_path="/home/${current_user}/Qt5.14.2/5.14.2/gcc_64" + +if [ -d "$qt_path" ]; then + echo "Found Qt directory: $qt_path" + + cmake -B../build -S../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$qt_path" -DQT_DEFAULT_MAJOR_VERSION=5 -DCOMPILE_GUI=ON + cmake --build ../build --config Release + + if [ $? -eq 0 ]; then + echo "cmake command executed successfully" + else + echo "cmake command failed" + exit 1 + fi +else + echo "Error: Qt directory not found - $qt_path" + echo "Please ensure Qt5.14.2 is properly installed in the default location" + exit 1 +fi \ No newline at end of file