Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 29-07-2016, 10:39
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
Well then you're gonna have to do all that without Freearc, first encode the audio then include the final output in archive along with other non encoded files in any.

If the files you encoded need decoding for them to work with whatever application is using them then you simply unpack the archive like you unpack other archives.

This is what you should do. (Using ogg example)
Encode all files, keep file list of encoded audio then everything with Freearc.

Then in inno setup. Add this.

if FileExists(ExpandConstant('{app}\ogg.ini')) and (ISDoneError = False) then
begin
Wizardform.ProgressGauge.Max:=0;
i:=1;
repeat
if FileExists(AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini'))) then
Wizardform.ProgressGauge.Max:= Wizardform.ProgressGauge.Max + 1;
i:= i + 1;
until GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini')) = '';
WizardForm.ProgressGauge.Position:=0;
i:=1;
repeat
OggFile:=AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini'));
ProgressLabels(GetMessage(3,'',''),OggFile);
Exec(ExpandConstant('{tmp}\oggdec.exe'), '"' + OggFile + '"' + ' ' + '-w"' + OggFile + '_"', '',SW_HIDE, ewWaitUntilTerminated, MsgResult);
RenameFile(OggFile + '_',OggFile);
if FileExists(AddBackSlash(ExpandConstant('{app}')) + GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini'))) then
WizardForm.ProgressGauge.Position:= WizardForm.ProgressGauge.Position + 1;
i:= i + 1;
until (GetIniString('OggDecode','Ogg' + IntToStr(i),'',ExpandConstant('{app}\ogg.ini')) = '') or ISDoneError = True;
DeleteFile(ExpandConstant('{app}\ogg.ini'));
end;

Take note, this is just an example, you obviously have to do a bit of modification for it to work for your script.
Ogg.ini is the file in this case chosen to have list of files, unfortunately for this to work very well for you, it's either you write this ini configuration format or maybe learn a bit of delphi to be able to use TStringList to be able to use the non configuration approach. Done.

The configuation looks like this.

[OggDecode]
Ogg1=myogg1.ogg
Ogg2=game\encoded.ogg
....
Reply With Quote
The Following 2 Users Say Thank You to Razor12911 For This Useful Post:
averanted (29-07-2016), RamiroCruzo (29-07-2016)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -7. The time now is 23:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com