[Scummvm-cvs-logs] scummvm-tools master -> 2367dd2576bbdc5fcf1fd7a4c9fbae5612b664a3

Littleboy littleboy22 at gmail.com
Tue Jun 28 10:18:44 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .

Summary:
2367dd2576 TOOLS: Update convert_dxa batch file


Commit: 2367dd2576bbdc5fcf1fd7a4c9fbae5612b664a3
    https://github.com/scummvm/scummvm-tools/commit/2367dd2576bbdc5fcf1fd7a4c9fbae5612b664a3
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-28T01:14:41-07:00

Commit Message:
TOOLS: Update convert_dxa batch file

 - Merge the two existing batch files into a single file (#2043446)
 - Check for needed tools before proceeding
 - Use the new scummvm-tools-cli tool
 - Properly return to original folder on exit
 - Add audio parameter options
 - Add option to pass tools and Rad tools paths as environment variables, with fallback to default paths

Changed paths:
  R convert_dxa_one.bat
    convert_dxa.bat



diff --git a/convert_dxa.bat b/convert_dxa.bat
index ca47aca..3f8fa41 100755
--- a/convert_dxa.bat
+++ b/convert_dxa.bat
@@ -1,26 +1,59 @@
-rem Script for converting Feeble Files video to ScummVM format
-rem
-rem modify the paths below
-rem
-rem (c) 2006 ScummVM Team
-rem (c) 2006 oduverne
-rem
-rem $URL$
-rem
-rem $Id$
+:: Script for converting SMK video to ScummVM DXA format
+::
+:: Put this batch file into the game directory you want to convert.
+:: This script will search for all SMK files in all subtree directories,
+:: and encode them as DXA files next to the original files.
+::
+:: (c) 2006-2011 ScummVM Team
+:: (c) 2006 oduverne
+:: (c) 2008 NoiZe
+::
 
 @echo off
-rem Feeble Files smk->dxa batch convertor
+echo ScummVM SMK2DXA batch convertor
 
-echo Setting environment variables...
-SET TOOLS_PATH=C:\Program files\ScummVM\tools
-SET BINK_PATH=C:\Program Files\RADVideo
-SET SMK_PATH=C:\games\feeble\smk
-SET DXA_PATH=C:\games\feeble\dxa
-SET DXA_CONVERT=CORRECT
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: Edit audio parameter to mp3/vorbis/flac and additional params ::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
-cd /d "%TOOLS_PATH%"
+set AUDIO=--vorbis
+set AUDIO_PARAMS=
 
-for %%i in (%SMK_PATH%\*.smk) do call convert_dxa_one "%%i"
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: Default directories for tools and RadVideo utils              ::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
+if "%SCUMMVM_TOOLS_PATH%"=="" (set "SCUMMVM_TOOLS_PATH=%ProgramFiles%\ScummVM\tools")
+if "%BINK_PATH%"==""         (set "BINK_PATH=%ProgramFiles(x86)%\RADVideo")
+
+:check_tools
+if exist "%SCUMMVM_TOOLS_PATH%\scummvm-tools-cli.exe" goto :preencode
+echo.
+echo ScummVM command line tool cannot be found!
+goto :eof
+
+:check_bink
+if exist "%BINK_PATH%\binkconv.exe" goto :preencode
+echo.
+echo Bink convertion tool cannot be found!
+goto :eof
+
+:preencode
+for /R . %%i in (*.smk) do (call :encode "%%i")
+echo.
 echo Converting finished!
+goto :eof
+
+:encode
+echo.
+echo Processing %~nx1...
+set OLDDIR=%CD%
+cd /d %~dp1
+"%BINK_PATH%\binkconv.exe" %1 "%~n1.smk.png" /n-1 /z1 /#
+"%BINK_PATH%\binkconv.exe" %1 "%~n1.wav" /v /#
+"%SCUMMVM_TOOLS_PATH%\scummvm-tools-cli.exe" --tool encode_dxa %AUDIO% %AUDIO_PARAMS% "%~nx1"
+echo Deleting temp files
+del "%~n1*.png"
+del "%~n1.wav"
+chdir /d %OLDDIR%
+goto :eof
\ No newline at end of file
diff --git a/convert_dxa_one.bat b/convert_dxa_one.bat
deleted file mode 100755
index ea4e778..0000000
--- a/convert_dxa_one.bat
+++ /dev/null
@@ -1,34 +0,0 @@
-rem Auxiliary script for converting Feeble Files video to ScummVM format
-rem
-rem (c) 2006 ScummVM Team
-rem (c) 2006 oduverne
-rem
-rem $URL$
-rem
-rem $Id$
-
- at echo off
-
-if "%DXA_CONVERT%"=="CORRECT" goto proceed
-
-goto usage
-
-:proceed
-
-echo Processing %1...
-"%BINK_PATH%\BinkConv.exe" %1 "%SMK_PATH%\%~n1.png" /n-1 /z1 /#
-"%BINK_PATH%\BinkConv.exe" %1 "%SMK_PATH%\%~n1.wav" /v /#
-cd /d "%SMK_PATH%"
-"%TOOLS_PATH%\encode_dxa.exe" --vorbis "%~n1.smk"
-echo Deleting temp files
-del "%SMK_PATH%\%~n1*.png"
-del "%SMK_PATH%\%~n1.wav"
-move "%SMK_PATH%\%~n1.*" "%DXA_PATH%"
-cd /d "%TOOLS_PATH%"
-
-goto quit
-
-:usage
-echo Please, modify and run convert_dxa.bat
-
-:quit






More information about the Scummvm-git-logs mailing list