Thanks to Edison 007
Code:
.Wem Compression
FOR /R "test" %%w IN (*.wem) DO (
ww2ogg.exe "%%w" -o "%%w.ogg" --pcb "packed_codebooks_aoTuV_603.bin"
OGGRE_enc_wwise.exe "%%w.ogg" "%%w.ogr"
OGGRE_dec_wwise.exe "%%w.ogr" "%%w.unp"
xdelta3.exe -ef -s "%%w.unp" "%%w" "%%w.xd3"
REM DEL "%%w.ogg" "%%w.unp"
REM DEL "%%w"
)
Code:
ISDONE
function extract_wwise(CurComp: Cardinal; InputPath: String): Boolean;
var
FindHandle, ColFiles, CurIndex: Integer;
ExecError: Boolean;
ogrFile, WavFile, OutFile, xd3file: String;
begin
FindHandle:=ISFindFiles(CurComp, InputPath+'\*.ogr', ColFiles);
ExecError:=false;
while not ExecError and ISPickFilename(FindHandle, InputPath+'\', CurIndex, True) do begin
ogrFile:=ISGetName( 0); // FileName.ext.ogr (defaul .ext = .wem)
WavFile:=ISGetName(1)+'.unp'; // FileName.ext.unp
OutFile:=ISGetName(1); // FileName.ext
xd3file:=ISGetName(1)+'.xd3'; // FileName.ext.xd3
ExecError:=not ISExec(CurComp, 0, 0, ExpandConstant('{tmp}\OGGRE_dec_wwise.exe'), '"'+ogrFile+'" "'+WavFile+'"' , ExpandConstant('{tmp}'), WavFile, False);
DeleteFile(ogrFile);
ISxDeltaExtract(CurComp, 0, 0,128, WavFile, xd3file, OutFile, True, True);
end;
ISFindFree(FindHandle);
Result:=not ExecError;
end;
...
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, 16, @ProgressCallback) then begin
repeat
...
if not extract_wwise(0, ExpandConstant('{app}')) then break;
...
...