Skip to content

Commit 2367dd2

Browse files
committed
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
1 parent a6f0a48 commit 2367dd2

File tree

2 files changed

+52
-53
lines changed

2 files changed

+52
-53
lines changed

convert_dxa.bat

+52-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,59 @@
1-
rem Script for converting Feeble Files video to ScummVM format
2-
rem
3-
rem modify the paths below
4-
rem
5-
rem (c) 2006 ScummVM Team
6-
rem (c) 2006 oduverne
7-
rem
8-
rem $URL$
9-
rem
10-
rem $Id$
1+
:: Script for converting SMK video to ScummVM DXA format
2+
::
3+
:: Put this batch file into the game directory you want to convert.
4+
:: This script will search for all SMK files in all subtree directories,
5+
:: and encode them as DXA files next to the original files.
6+
::
7+
:: (c) 2006-2011 ScummVM Team
8+
:: (c) 2006 oduverne
9+
:: (c) 2008 NoiZe
10+
::
1111

1212
@echo off
13-
rem Feeble Files smk->dxa batch convertor
13+
echo ScummVM SMK2DXA batch convertor
1414

15-
echo Setting environment variables...
16-
SET TOOLS_PATH=C:\Program files\ScummVM\tools
17-
SET BINK_PATH=C:\Program Files\RADVideo
18-
SET SMK_PATH=C:\games\feeble\smk
19-
SET DXA_PATH=C:\games\feeble\dxa
20-
SET DXA_CONVERT=CORRECT
15+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
16+
:: Edit audio parameter to mp3/vorbis/flac and additional params ::
17+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2118

22-
cd /d "%TOOLS_PATH%"
19+
set AUDIO=--vorbis
20+
set AUDIO_PARAMS=
2321

24-
for %%i in (%SMK_PATH%\*.smk) do call convert_dxa_one "%%i"
22+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
23+
:: Default directories for tools and RadVideo utils ::
24+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2525

26+
if "%SCUMMVM_TOOLS_PATH%"=="" (set "SCUMMVM_TOOLS_PATH=%ProgramFiles%\ScummVM\tools")
27+
if "%BINK_PATH%"=="" (set "BINK_PATH=%ProgramFiles(x86)%\RADVideo")
28+
29+
:check_tools
30+
if exist "%SCUMMVM_TOOLS_PATH%\scummvm-tools-cli.exe" goto :preencode
31+
echo.
32+
echo ScummVM command line tool cannot be found!
33+
goto :eof
34+
35+
:check_bink
36+
if exist "%BINK_PATH%\binkconv.exe" goto :preencode
37+
echo.
38+
echo Bink convertion tool cannot be found!
39+
goto :eof
40+
41+
:preencode
42+
for /R . %%i in (*.smk) do (call :encode "%%i")
43+
echo.
2644
echo Converting finished!
45+
goto :eof
46+
47+
:encode
48+
echo.
49+
echo Processing %~nx1...
50+
set OLDDIR=%CD%
51+
cd /d %~dp1
52+
"%BINK_PATH%\binkconv.exe" %1 "%~n1.smk.png" /n-1 /z1 /#
53+
"%BINK_PATH%\binkconv.exe" %1 "%~n1.wav" /v /#
54+
"%SCUMMVM_TOOLS_PATH%\scummvm-tools-cli.exe" --tool encode_dxa %AUDIO% %AUDIO_PARAMS% "%~nx1"
55+
echo Deleting temp files
56+
del "%~n1*.png"
57+
del "%~n1.wav"
58+
chdir /d %OLDDIR%
59+
goto :eof

convert_dxa_one.bat

-34
This file was deleted.

0 commit comments

Comments
 (0)