diff options
author | kasper93 <kasper93@gmail.com> | 2012-12-08 17:27:34 +0400 |
---|---|---|
committer | kasper93 <kasper93@gmail.com> | 2012-12-10 03:42:37 +0400 |
commit | 223785f3123095f932a787f540d333326dd0f86b (patch) | |
tree | 1d097ee262631c2ca596211ef8a8edf7747d8cc4 /build.bat | |
parent | 4463ff2fe7fd7fc9b3bfbdff0fa37973ef7df63d (diff) |
Add switch /translations to build only translations (mpcresources.sln solution) in build.bat.
Diffstat (limited to 'build.bat')
-rw-r--r-- | build.bat | 89 |
1 files changed, 52 insertions, 37 deletions
@@ -55,33 +55,35 @@ SET VALID=0 IF /I "%ARG%" == "?" GOTO ShowHelp
FOR %%G IN (%ARG%) DO (
- IF /I "%%G" == "help" GOTO ShowHelp
- IF /I "%%G" == "GetVersion" ENDLOCAL & CALL :SubGetVersion & EXIT /B
- IF /I "%%G" == "Build" SET "BUILDTYPE=Build" & SET /A ARGB+=1
- IF /I "%%G" == "Clean" SET "BUILDTYPE=Clean" & SET /A ARGB+=1 & SET /A ARGCL+=1 & SET /A ARGFF+=1
- IF /I "%%G" == "Rebuild" SET "BUILDTYPE=Rebuild" & SET /A ARGB+=1 & SET /A ARGRE+=1
- IF /I "%%G" == "Both" SET "PPLATFORM=Both" & SET /A ARGPL+=1
- IF /I "%%G" == "Win32" SET "PPLATFORM=Win32" & SET /A ARGPL+=1
- IF /I "%%G" == "x86" SET "PPLATFORM=Win32" & SET /A ARGPL+=1
- IF /I "%%G" == "x64" SET "PPLATFORM=x64" & SET /A ARGPL+=1
- IF /I "%%G" == "All" SET "CONFIG=All" & SET /A ARGC+=1
- IF /I "%%G" == "Main" SET "CONFIG=Main" & SET /A ARGC+=1 & SET /A ARGM+=1
- IF /I "%%G" == "Filters" SET "CONFIG=Filters" & SET /A ARGC+=1 & SET /A ARGF+=1 & SET /A ARGL+=1
- IF /I "%%G" == "Filter" SET "CONFIG=Filters" & SET /A ARGC+=1 & SET /A ARGF+=1 & SET /A ARGL+=1
- IF /I "%%G" == "MPCHC" SET "CONFIG=MPCHC" & SET /A ARGC+=1
- IF /I "%%G" == "MPC-HC" SET "CONFIG=MPCHC" & SET /A ARGC+=1
- IF /I "%%G" == "Resource" SET "CONFIG=Resources" & SET /A ARGC+=1 & SET /A ARGD+=1
- IF /I "%%G" == "Resources" SET "CONFIG=Resources" & SET /A ARGC+=1 & SET /A ARGD+=1
- IF /I "%%G" == "MPCIconLib" SET "CONFIG=IconLib" & SET /A ARGC+=1 & SET /A ARGD+=1
- IF /I "%%G" == "IconLib" SET "CONFIG=IconLib" & SET /A ARGC+=1 & SET /A ARGD+=1
- IF /I "%%G" == "Debug" SET "BUILDCFG=Debug" & SET /A ARGBC+=1 & SET /A ARGD+=1
- IF /I "%%G" == "Release" SET "BUILDCFG=Release" & SET /A ARGBC+=1
- IF /I "%%G" == "Packages" SET "PACKAGES=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGD+=1 & SET /A ARGF+=1 & SET /A ARGM+=1
- IF /I "%%G" == "Installer" SET "INSTALLER=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGD+=1 & SET /A ARGF+=1 & SET /A ARGM+=1
- IF /I "%%G" == "Zip" SET "ZIP=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGM+=1
- IF /I "%%G" == "7z" SET "ZIP=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGM+=1
- IF /I "%%G" == "Lite" SET "MPCHC_LITE=True" & SET /A VALID+=1 & SET /A ARGL+=1
- IF /I "%%G" == "FFmpeg" SET "Rebuild=FFmpeg" & SET /A VALID+=1 & SET /A ARGFF+=1 & SET /A ARGRE+=1
+ IF /I "%%G" == "help" GOTO ShowHelp
+ IF /I "%%G" == "GetVersion" ENDLOCAL & CALL :SubGetVersion & EXIT /B
+ IF /I "%%G" == "Build" SET "BUILDTYPE=Build" & SET /A ARGB+=1
+ IF /I "%%G" == "Clean" SET "BUILDTYPE=Clean" & SET /A ARGB+=1 & SET /A ARGCL+=1 & SET /A ARGFF+=1
+ IF /I "%%G" == "Rebuild" SET "BUILDTYPE=Rebuild" & SET /A ARGB+=1 & SET /A ARGRE+=1
+ IF /I "%%G" == "Both" SET "PPLATFORM=Both" & SET /A ARGPL+=1
+ IF /I "%%G" == "Win32" SET "PPLATFORM=Win32" & SET /A ARGPL+=1
+ IF /I "%%G" == "x86" SET "PPLATFORM=Win32" & SET /A ARGPL+=1
+ IF /I "%%G" == "x64" SET "PPLATFORM=x64" & SET /A ARGPL+=1
+ IF /I "%%G" == "All" SET "CONFIG=All" & SET /A ARGC+=1
+ IF /I "%%G" == "Main" SET "CONFIG=Main" & SET /A ARGC+=1 & SET /A ARGM+=1
+ IF /I "%%G" == "Filters" SET "CONFIG=Filters" & SET /A ARGC+=1 & SET /A ARGF+=1 & SET /A ARGL+=1
+ IF /I "%%G" == "Filter" SET "CONFIG=Filters" & SET /A ARGC+=1 & SET /A ARGF+=1 & SET /A ARGL+=1
+ IF /I "%%G" == "MPCHC" SET "CONFIG=MPCHC" & SET /A ARGC+=1
+ IF /I "%%G" == "MPC-HC" SET "CONFIG=MPCHC" & SET /A ARGC+=1
+ IF /I "%%G" == "Resource" SET "CONFIG=Resources" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "Resources" SET "CONFIG=Resources" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "MPCIconLib" SET "CONFIG=IconLib" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "IconLib" SET "CONFIG=IconLib" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "Translation" SET "CONFIG=Translation" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "Translations" SET "CONFIG=Translation" & SET /A ARGC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "Debug" SET "BUILDCFG=Debug" & SET /A ARGBC+=1 & SET /A ARGD+=1
+ IF /I "%%G" == "Release" SET "BUILDCFG=Release" & SET /A ARGBC+=1
+ IF /I "%%G" == "Packages" SET "PACKAGES=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGD+=1 & SET /A ARGF+=1 & SET /A ARGM+=1
+ IF /I "%%G" == "Installer" SET "INSTALLER=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGD+=1 & SET /A ARGF+=1 & SET /A ARGM+=1
+ IF /I "%%G" == "Zip" SET "ZIP=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGM+=1
+ IF /I "%%G" == "7z" SET "ZIP=True" & SET /A VALID+=1 & SET /A ARGCL+=1 & SET /A ARGM+=1
+ IF /I "%%G" == "Lite" SET "MPCHC_LITE=True" & SET /A VALID+=1 & SET /A ARGL+=1
+ IF /I "%%G" == "FFmpeg" SET "Rebuild=FFmpeg" & SET /A VALID+=1 & SET /A ARGFF+=1 & SET /A ARGRE+=1
)
FOR %%G IN (%*) DO SET /A INPUT+=1
@@ -147,6 +149,11 @@ IF /I "%CONFIG%" == "IconLib" ( EXIT /B
)
+IF /I "%CONFIG%" == "Translation" (
+ CALL :SubMPCRresources %PPLATFORM%
+ EXIT /B
+)
+
IF /I "%CONFIG%" NEQ "Resources" CALL :SubMPCHC %PPLATFORM%
IF /I "%CONFIG%" NEQ "Main" CALL :SubResources %PPLATFORM%
@@ -223,16 +230,7 @@ IF DEFINED MPCHC_LITE ( EXIT /B
)
-FOR %%G IN ("Armenian" "Basque" "Belarusian" "Catalan" "Chinese Simplified"
- "Chinese Traditional" "Czech" "Dutch" "French" "German" "Greek" "Hebrew"
- "Hungarian" "Italian" "Japanese" "Korean" "Polish" "Portuguese" "Russian"
- "Slovak" "Spanish" "Swedish" "Turkish" "Ukrainian"
-) DO (
- TITLE Compiling mpcresources - %%~G^|%1...
- "%MSBUILD%" mpcresources.sln %MSBUILD_SWITCHES%^
- /target:%BUILDTYPE% /property:Configuration="Release %%~G";PPLATFORM=%1
- IF %ERRORLEVEL% NEQ 0 CALL :SubMsg "ERROR" "Compilation failed!" & EXIT /B
-)
+CALL :SubMPCRresources %1
EXIT /B
:SubMPCIconLib
@@ -249,6 +247,23 @@ IF %ERRORLEVEL% NEQ 0 ( )
EXIT /B
+
+:SubMPCRresources
+IF %ERRORLEVEL% NEQ 0 EXIT /B
+
+FOR %%G IN ("Armenian" "Basque" "Belarusian" "Catalan" "Chinese Simplified"
+ "Chinese Traditional" "Czech" "Dutch" "French" "German" "Greek" "Hebrew"
+ "Hungarian" "Italian" "Japanese" "Korean" "Polish" "Portuguese" "Russian"
+ "Slovak" "Spanish" "Swedish" "Turkish" "Ukrainian"
+) DO (
+ TITLE Compiling mpcresources - %%~G^|%1...
+ "%MSBUILD%" mpcresources.sln %MSBUILD_SWITCHES%^
+ /target:%BUILDTYPE% /property:Configuration="Release %%~G";PPLATFORM=%1
+ IF %ERRORLEVEL% NEQ 0 CALL :SubMsg "ERROR" "Compilation failed!" & EXIT /B
+)
+EXIT /B
+
+
:SubCopyDXDll
PUSHD "bin"
EXPAND "%DXSDK_DIR%\Redist\Jun2010_D3DCompiler_43_%~1.cab" -F:D3DCompiler_43.dll mpc-hc_%~1 >NUL
|