From b0a5fffc09984613652fe8c1b3a32605e7c00809 Mon Sep 17 00:00:00 2001 From: Hillwood Yang Date: Wed, 28 May 2025 22:22:26 +0800 Subject: [PATCH 1/2] chore: translate_generation.sh: detect lrelease path dynamically Improve compatibility by detecting available lrelease executable dynamically instead of hardcoding the Qt6 path. The script now checks for lrelease6, /usr/lib/qt6/bin/lrelease, and /usr/lib64/qt6/bin/lrelease. If none are found, it prints an error message and exits with code 1. This allows the script to work across distributions where Qt6 may be installed in different locations. Log: Fixes potential failure in translation generation on systems without a fixed lrelease path. --- assets/translate_generation.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/assets/translate_generation.sh b/assets/translate_generation.sh index 65a599e6..42650639 100755 --- a/assets/translate_generation.sh +++ b/assets/translate_generation.sh @@ -23,8 +23,19 @@ fi ts_list=(`ls ${translations_dir}/*.ts`) +if [ -f "/usr/bin/lrelease6" ]; then + LRELEASE=lrelease6 +elif [ -f "/usr/lib/qt6/bin/lrelease" ]; then + LRELEASE=/usr/lib/qt6/bin/lrelease +elif [ -f "/usr/lib64/qt6/bin/lrelease" ]; then + RELEASE=/usr/lib64/qt6/bin/lrelease +else + echo "lrelease: command not found." + exit 1 +fi + for ts in "${ts_list[@]}" do printf "\nprocess ${ts}\n" - /usr/lib/qt6/bin/lrelease "${ts}" + ${LRELEASE} "${ts}" done From cbe7e4c292d90ddee48a97b969a6ddd2a74a55c3 Mon Sep 17 00:00:00 2001 From: Hillwood Yang Date: Wed, 28 May 2025 22:23:51 +0800 Subject: [PATCH 2/2] fix: vnotea2tmanager: add missing include for QJsonDocument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds `#include ` to ensure the class is fully defined, allowing proper use of `QJsonDocument::fromJson(...)` in asrJsonParser(). This resolves a build failure with some compilers or environments where the implicit inclusion of QJsonDocument does not occur. Log: Fix build error caused by missing QJsonDocument definition: "error: variable ‘QJsonDocument doc’ has initializer but incomplete type" --- src/common/vnotea2tmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/vnotea2tmanager.cpp b/src/common/vnotea2tmanager.cpp index 8cd9171f..2cbd40f8 100644 --- a/src/common/vnotea2tmanager.cpp +++ b/src/common/vnotea2tmanager.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include