2 setlocal ENABLEDELAYEDEXPANSION
4 "%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "\n==========================================================================="
5 "%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "Updating translation files..."
6 "%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" cyan "===========================================================================\n"
8 :: ---------------------------------------------------------------------------
10 :: ---------------------------------------------------------------------------
12 call "%~dp0\_paths.bat"
14 if exist "%PATH_QTMSVC%\bin\qtenv2.bat" (
15 call "%PATH_QTMSVC%\bin\qtenv2.bat"
18 if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
19 call "%PATH_QTMSVC%\bin\qtvars.bat"
22 :: ---------------------------------------------------------------------------
23 :: GENERATE THE FILE LIST
24 :: ---------------------------------------------------------------------------
26 set "LST_FILE=%TEMP%\~list.%RANDOM%%RANDOM%.tmp"
28 del "%LST_FILE%" 2> NUL
30 for %%f in ("%~dp0\..\..\gui\*.ui") do (
31 echo %%f >> "%LST_FILE%"
33 for %%e in (cpp,h) do (
34 for %%f in ("%~dp0\..\..\src\*.%%e") do (
35 echo %%f >> "%LST_FILE%"
39 :: ---------------------------------------------------------------------------
41 :: ---------------------------------------------------------------------------
43 for %%f in ("%~dp0\..\Translation\*.ts") do (
46 lupdate.exe "@%LST_FILE%" -no-obsolete -locations absolute -ts %%f
47 if not "!ERRORLEVEL!"=="0" (
48 "%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nSomething went wrong^^!\n"
53 lupdate.exe "@%LST_FILE%" -no-obsolete -locations absolute -pluralonly -ts "%~dp0\..\Translation\LameXP_EN.ts"
56 :: ---------------------------------------------------------------------------
58 :: ---------------------------------------------------------------------------
60 for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do (
61 lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm"
62 if not "!ERRORLEVEL!"=="0" (
63 "%~dp0\..\..\..\Prerequisites\CEcho\cecho.exe" red "\nSomething went wrong^^!\n"