File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 179179 <Command >
180180if not exist "$(TargetDir)translations" mkdir "$(TargetDir)translations"
181181
182- set "QT_BIN=C:\Qt\6.10.2\msvc2022_64\bin"
182+ set "QT_BIN=$(QtToolsPath)"
183+ if not exist "%QT_BIN%\qmake.exe" if defined QTDIR set "QT_BIN=%QTDIR%\bin"
184+
185+ if not exist "%QT_BIN%\lrelease.exe" (
186+ echo Qt lrelease not found at "%QT_BIN%". Skipping translation generation.
187+ goto :after_lrelease
188+ )
183189
184190"%QT_BIN%\lrelease.exe" "$(ProjectDir)ui\Translations\myMCpp_af-ZA.ts" -qm "$(TargetDir)translations\myMCpp_af-ZA.qm"
185191"%QT_BIN%\lrelease.exe" "$(ProjectDir)ui\Translations\myMCpp_ar-SA.ts" -qm "$(TargetDir)translations\myMCpp_ar-SA.qm"
@@ -214,7 +220,14 @@ set "QT_BIN=C:\Qt\6.10.2\msvc2022_64\bin"
214220"%QT_BIN%\lrelease.exe" "$(ProjectDir)ui\Translations\myMCpp_zh-CN.ts" -qm "$(TargetDir)translations\myMCpp_zh-CN.qm"
215221"%QT_BIN%\lrelease.exe" "$(ProjectDir)ui\Translations\myMCpp_zh-TW.ts" -qm "$(TargetDir)translations\myMCpp_zh-TW.qm"
216222
223+ :after_lrelease
217224xcopy /Y /E /I "$(ProjectDir)..\resources" "$(TargetDir)resources"
225+
226+ if exist "%QT_BIN%\windeployqt.exe" (
227+ "%QT_BIN%\windeployqt.exe" --no-compiler-runtime "$(TargetPath)"
228+ ) else (
229+ echo Qt windeployqt not found at "%QT_BIN%". Qt DLLs/plugins will not be deployed.
230+ )
218231 </Command >
219232 <Message >Generating translations and copying resources to output...</Message >
220233 </PostBuildEvent >
You can’t perform that action at this time.
0 commit comments