2011-02-23 02:43:06 +01:00
|
|
|
@echo off
|
2014-12-22 22:40:20 +01:00
|
|
|
setlocal ENABLEDELAYEDEXPANSION
|
|
|
|
|
2014-12-23 00:23:41 +01:00
|
|
|
"%~dp0\..\Utilities\CEcho.exe" cyan "\n==========================================================================="
|
|
|
|
"%~dp0\..\Utilities\CEcho.exe" cyan "Updating translation files..."
|
|
|
|
"%~dp0\..\Utilities\CEcho.exe" cyan "===========================================================================\n"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: SETUP PATHS
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
call "%~dp0\_paths.bat"
|
2013-10-18 20:44:55 +02:00
|
|
|
call "%PATH_MSCDIR%\VC\bin\vcvars32.bat" x86
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
if exist "%PATH_QTMSVC%\bin\qtenv2.bat" (
|
|
|
|
call "%PATH_QTMSVC%\bin\qtenv2.bat"
|
|
|
|
)
|
|
|
|
|
|
|
|
if exist "%PATH_QTMSVC%\bin\qtvars.bat" (
|
|
|
|
call "%PATH_QTMSVC%\bin\qtvars.bat"
|
|
|
|
)
|
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: GENERATE THE FILE LIST
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-22 22:10:55 +02:00
|
|
|
set "LST_FILE=%TEMP%\~list.%RANDOM%%RANDOM%.tmp"
|
2011-02-23 02:43:06 +01:00
|
|
|
echo %LST_FILE%
|
|
|
|
del "%LST_FILE%" 2> NUL
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
for %%f in ("%~dp0\..\..\gui\*.ui") do (
|
2011-02-23 02:43:06 +01:00
|
|
|
echo %%f >> "%LST_FILE%"
|
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
for %%e in (cpp,h) do (
|
|
|
|
for %%f in ("%~dp0\..\..\src\*.%%e") do (
|
|
|
|
echo %%f >> "%LST_FILE%"
|
|
|
|
)
|
2011-02-23 02:43:06 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: UPDATE TS FILES
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
for %%f in ("%~dp0\..\Translation\*.ts") do (
|
2011-02-23 02:43:06 +01:00
|
|
|
del %%f.bak 2> NUL
|
|
|
|
copy %%f %%f.bak
|
2015-04-22 20:58:39 +02:00
|
|
|
lupdate.exe "@%LST_FILE%" -no-obsolete -locations absolute -ts %%f
|
2014-12-22 22:40:20 +01:00
|
|
|
if not "!ERRORLEVEL!"=="0" (
|
2014-12-23 00:23:41 +01:00
|
|
|
"%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n"
|
|
|
|
pause && exit
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2011-02-23 02:43:06 +01:00
|
|
|
)
|
2014-12-22 22:40:20 +01:00
|
|
|
|
2015-04-22 20:58:39 +02:00
|
|
|
lupdate.exe "@%LST_FILE%" -no-obsolete -locations absolute -pluralonly -ts "%~dp0\..\Translation\LameXP_EN.ts"
|
2011-02-23 02:43:06 +01:00
|
|
|
del "%LST_FILE%"
|
2014-12-22 22:40:20 +01:00
|
|
|
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
:: GENERATE QM FILES
|
|
|
|
:: ---------------------------------------------------------------------------
|
|
|
|
|
2011-04-19 16:21:19 +02:00
|
|
|
for %%f in ("%~dp0\..\Translation\LameXP_??.ts") do (
|
|
|
|
lrelease.exe %%f -qm "%~dp0\..\..\res\localization\%%~nf.qm"
|
2014-12-22 22:40:20 +01:00
|
|
|
if not "!ERRORLEVEL!"=="0" (
|
2014-12-23 00:23:41 +01:00
|
|
|
"%~dp0\..\Utilities\CEcho.exe" red "\nSomething went wrong^^!\n"
|
|
|
|
pause && exit
|
2014-12-22 22:40:20 +01:00
|
|
|
)
|
2011-02-23 02:43:06 +01:00
|
|
|
)
|