Compressing tool syntax

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
fedor
Posts: 30
Joined: Sat Oct 12, 2013 11:32 am

Compressing tool syntax

Post by fedor »

Hi! I want compress datafiles in Full Throttle.
I used convert_dxa.bat as example and write my own. Like convert_dxa.bat it will compress all *.SAN. Instead that it erase files contents. I want to save converted in other folder but don't how. For this string

Code: Select all

"%MPATH%\scummvm-tools-cli.exe" --tool compress_scumm_san %AUDIO_san% %AUDIO_PARAMS_san% "%~nx1" -o /out
I got many errors :

Code: Select all

Too many inputs files ( '-o' '/out' )
If I cut "off -o /out" batch file set to zero all *.SAN

Here my script "

Code: Select all

set "MPATH=D:\Program Files\ScummVM\tools"

:san_preencode
set AUDIO_san=--mp3
set "AUDIO_PARAMS_san=--vbr -b 24 -B 160 -V 0 -q 0"
for /R . %%i in (*.san) do (call :san_encode "%%i")
echo.
echo Converting finished!
goto :eof

:san_encode
echo.
echo Processing %~nx1...
set OLDDIR=%CD%
cd /d %~dp1
"%MPATH%\scummvm-tools-cli.exe" --tool compress_scumm_san %AUDIO_san% %AUDIO_PARAMS_san% "%~nx1"
echo Processed %~nx1 file
chdir /d %OLDDIR%
goto :eof
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

I don't have my computer with me to check right now, but from what I remember the tool expects the input file to be the last argument on the command line. Have you tried moving the '-o /out' before the input file?

Futhermore, are you sure about the '/out' as output directory? I am not familiar with paths on Windows and I know they are using backslashes instead of slashes as separators, but this looks like an absolute path. If 'out' is in the current directory, shouldn't that be '-o out' (without the slash) as on Linux?
fedor
Posts: 30
Joined: Sat Oct 12, 2013 11:32 am

Post by fedor »

I try

Code: Select all

-o out
before the input file. I got error :

Code: Select all

Fatal Error : Could not open file out/_SomeFileName_.san
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Post by criezy »

That error happens when it fails to create the output files. There are several reasons this may happen, but the most probable is that the directory you pass to -o does not exist. So make sure that the 'out' directory exists before running this command.
Collector
Posts: 549
Joined: Sun Oct 30, 2005 6:58 pm
Contact:

Post by Collector »

If you are on Windows, use a backslash between directories, not a slash.
Post Reply