FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Source Code: Conversion Converter (https://fileforums.com/showthread.php?t=94435)

Razor12911 05-04-2013 23:44

Source Code: Conversion Converter
 
1 Attachment(s)
Greetings, Forum Users.
Presenting... The Conversion Converter
_________________________________

Description
  • This program known as the conversion converter helps users whole are not specialist in creating conversions using external compression and resampling videos.
  • The program make your conversions less clumsy and for other people to understand.

Tutorials/Instructions

Constants

OUTDIRPATH\ the selected output directory or the output for the converted files.
SELDIRPATH\ the selected application directory or the source of files to be converted.
Inno Setup Constants

The Conversion Converter Files
Converter.exe - The Converter Executable File
Converter.ini - The Converter Configuration File

How to Configure The Converter?

Open Converter.ini using Notepad.


[Conversion] - This section defines the information of the conversion you want create
Name= - Defines the Program/Game you want to create a conversion for.
Type= - Defines the Conversion type, for example: it can 2xDVD9 - 3xDVD5.
Size= - Defines the space needed by the conversion in megabytes
Check= - Defines a file which will be used for recognition by the converter. *NOTE*: Check2 can be introduced if you are doing a multi-conversion, the total number of checks you can use is 10.
Language= - Defines the language(s) supported by the program/game for the conversion. (See language list below).


[TaskSettings] - This section triggers the converter to do a task.
*Note*: This section has a tasking integer which starts from 1 up until infinity therefore for instruction, the x variable will be used to clarify where the integer should be used.
*Info*: the integer count will go accordingly which betters conversion capabilities and errors.

The available compressing sub-sections are:
FreearcFilex= - commands the converter to compress a file using freearc compression.
7zFilex= - commands the converter to compress a file using 7zip compression.
RarFilex= - commands the converter to compress a file using winrar compression.

The switches for compressing sub-sections are:
*Note*: Remember to put a semicolon after each switch and you may need these: Freearc Documentation, 7Zip Documentation and Winrar Documentation
After the "=" of the sub section is the output of the archive.
Source: - the input or the source of the file you want to compress.
Option: - the switches used for the sub-section program.
Method: - the method switch used for the sub-section program.
IncludeList: - the filelist for the files/folders to be included in archive, if any.
IncludeList: - the filelist for the files/folders to be excluded in archive, if any.
Language: - the language in which the sub-section command can be used, if any.


The available file-operation sub-sections are:
CreateFolderx= - commands the converter to create a new folder.
CopyFilex= - commands the converter to copy a file.
MoveFilex= - commands the converter to move a file.
DeleteFolderx= - commands the converter to delete folder.
DeleteFilex= - commands the converter to delete a file.
MoveFolderx= - commands the converter to move a folder.
CopyFolderx= - commands the converter to copy a folder.
RemoveFolderx= - commands the converter to remove a folder(similar to DeleteFolder).
RenameFilex= - commands the converter to rename a file.
RenameFolderx= - commands the converter to rename a folder.
CopyFilesx= - commands the converter to copy a file(similar to CopyFile).
MoveFilesx= - commands the converter to move a file(similar to MoveFile).
DeleteFilesx= - commands the converter to delete a file(similar to DeleteFile).

The switches for file-operation sub-sections are:
After the "=" of the sub section is the source of the file/folder.
Destination: - the output file/folder.
Language: - the language in which the sub-section command can be used, if any.



The available ISO Image Creation sub-sections are:
*Note*: ISO Disk image is in UDF Format.
CreateImagex= - commands the converter to create an iso disk image.


The switches for file-operation sub-sections are:
After the "=" of the sub section is the output of the ISO Image.
Source: - the source of the folder you want to put in an ISO Image.
Label: - the ISO Image diskname.
Language: - the language in which the sub-section command can be used, if any.



The available media resampling sub-sections are:
BinkVideox= - commands the converter to resample a bik video.

The switches for file-operation sub-sections are:
After the "=" of the sub section is the source of the bink video.
VideoQuality: - the video quality resample rate in a range from 0 to 100.(Low rate equals low video quality and high rate equals high video quality).
Color: - specifies whether video color must be maintained(Color) or removed(Black and White). (0 value specifies that color must be removed and 1 value means color must be maintained.
ResolutionX: - specifies the video horizontal resolution.
ResolutionY: - specifies the video vertical resolution.
Language: - the language in which the sub-section command can be used, if any.
SoundQuality: - the sound quality resample rate in a range from 0 to 100.(Low rate equals low sound quality and high rate equals high sound quality).
Language: - the language in which the sub-section command can be used, if any.


Converter.ini Examples
Example 1
Code:

[Conversion]
Name=Need For Speed Most Wanted
Type=1xDVD9 - 1xDVD5
Check=SELDIRPATH\NFS13.exe
Language=en

[TaskSettings]
CopyFolder1=SELDIRPATH\HAWAII;Destination:{src}\TMP1
CopyFolder2=SELDIRPATH\CHARACTERS;Destination:{src}\TMP2
CopyFolder3=SELDIRPATH\Core;Destination:{src}\TMP2
CopyFolder4=SELDIRPATH\EN_US;Destination:{src}\TMP2
CopyFolder5=SELDIRPATH\GAMELOGIC;Destination:{src}\TMP2
CopyFolder6=SELDIRPATH\PHYSICS;Destination:{src}\TMP2
CopyFolder7=SELDIRPATH\SOUND;Destination:{src}\TMP2
CopyFolder8=SELDIRPATH\Support;Destination:{src}\TMP2
CopyFolder9=SELDIRPATH\UI;Destination:{src}\TMP2
CopyFolder10=SELDIRPATH\VEHICLES;Destination:{src}\TMP2
FreeArcFile11=OUTDIRPATH\DVD\Data1.cab;Source:{src}\TMP1\*;Option:a -ep1 -r -ed;Method:-mprecomp+srep64+delta+lzma64:a1:mfbt4:d158m:fb273:mc1000:lc8
DeleteFolder12={src}\TMP1
FreeArcFile13=OUTDIRPATH\DVD\Data2.cab;Source:{src}\TMP2\*;Option:a -ep1 -r -ed;Method:-mprecomp+srep64+delta+lzma64:a1:mfbt4:d158m:fb273:mc1000:lc8
DeleteFolder14={src}\TMP2
FreeArcFile15=OUTDIRPATH\DVD\Data3.cab;Source:SELDIRPATH\*;Option:a -ep1 [email protected];Method:-mx;IncludeList:English.ini
CopyFile16={src}\Resources\autorun.exe;Destination:OUTDIRPATH\DVD\autorun.exe
CopyFile17={src}\Resources\setup.cab;Destination:OUTDIRPATH\DVD\setup.cab
CopyFile18={src}\Resources\setup.exe;Destination:OUTDIRPATH\DVD\setup.exe
CopyFile19={src}\Resources\setup.ini;Destination:OUTDIRPATH\DVD\setup.ini
CopyFile20={src}\Resources\autorun.inf;Destination:OUTDIRPATH\DVD\autorun.inf
CopyFile21={src}\Resources\icon.ico;Destination:OUTDIRPATH\DVD\icon.ico
CopyFolder22={src}\Support;Destination:OUTDIRPATH\DVD
CreateImage23=OUTDIRPATH\NFSMW.iso;Source:OUTDIRPATH\DVD;Label:NFS_MW


Freearc Method Clarification and Examples
External Compressors are:
precomp
srep
srep64
lzma64

Example:
-mprecomp+srep64+lzma64:a1:mfbt4:d158m:fb273:mc1000 :lc8


Language List
cz = Czech
de = German
en = English
es = Spanish
fr = French
it = Italian
pl = Polish
pr = Portuguese
ru = Russian
tr = Turkish
ua = Ukrainian

Credits
Inno Setup, Precomp, Srep, Freearc, Winrar, 7z, ImgBurn and RAD Video Tools Creators

Programs Used
  • Inno Setup Enhanced Edition Unicode 5.5.1 Version 2 and Stardard Edition Unicode 5.5.3
  • Freearc 0.67 Alpha
  • Precomp 0.38, 0.40, 0.41 and 0.42
  • Srep 3.0
  • 7zip 9.25 Alpha
  • Winrar 4.20
  • ImgBurn 2.5.7.0
  • RAD Video Tools 1.99w

Enjoy doing your conversions!

Cesar82 06-04-2013 09:40

Some questions:
What commands Method1:? and Method2:? supported?
Works with SREP?
How to add files specific to a particular CAB file (Say has 10 files in a folder, I need to add files 3,5,3,6,9 to Data2.cab)?

Razor12911 06-04-2013 10:27

method1 is the command and options e.g. a -ep1 -r -ed -xaudio
method2 is the compression method you want to use e.g. -mlzma:a1:mfbt4:d158m:fb273:mc1000:lc8

srep works but if you tweak your arc.ini, will fix this problem though.

here is the freearc documentation
you can add them by using this method if you want to take the whole folder a -ep -r -ed

Folder has 10 files no problem, here is an example

FreeArcFile1={src}\Output\Data.cab;Source:Folder\3.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile2={src}\Output\Data.cab;Source:Folder\5.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile3={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile4={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile5={src}\Output\Data.cab;Source:Folder\9.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8

maintain same archive

Razor12911 06-04-2013 15:26

Updated: Version 2
-Freearc Integrated in Converter (Thanks to LuisCésar82 for Idea) :D
-Srep and Precomp Compressors added
-Converter.ini Structure Changed, you might wanna check instruction again

danswano 06-04-2013 16:08

Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside
001, 002 and 003
how to add them in the ini?

BAMsE 06-04-2013 17:12

Quote:

Originally Posted by Razor12911 (Post 416754)
Folder has 10 files no problem, here is an example

FreeArcFile1={src}\Output\Data.cab;Source:Folder\3.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile2={src}\Output\Data.cab;Source:Folder\5.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile3={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile4={src}\Output\Data.cab;Source:Folder\6.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
FreeArcFile5={src}\Output\Data.cab;Source:Folder\9.File;Option:a -ep1;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8

maintain same archive

It makes no sense because in 2nd step freearc musts unpack data.cab to include new file. This new data.cab must be unpacked once again in 3rd step and so on. It will be better to use -n@ and -x@ option

BTW Conversion converter sounds like script scripter or game gamer :)

Razor12911 07-04-2013 01:51

Quote:

Originally Posted by BAMsE (Post 416770)
It makes no sense because in 2nd step freearc musts unpack data.cab to include new file. This new data.cab must be unpacked once again in 3rd step and so on. It will be better to use -n@ and -x@ option

BTW Conversion converter sounds like script scripter or game gamer :)

I know, the [email protected] and [email protected] but where to put it is the big question, I can't use -n@({src}/{tmp})\blah.lst, directory is kinda hard to tell.

http://img40.imageshack.us/img40/426...0407112646.jpg

ok, what are your program name suggestions?
Thee Converter? I'm not good at naming things.

Razor12911 07-04-2013 02:30

Great News:

you can use -n and -x in next version, problem solved.
winrar and 7zip compression added also internal

can anyone give me the fileforums logo in png.

danswano 07-04-2013 08:34

Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside and i want to create a cab for each folder.
001, 002 and 003
how to add them in the ini?

Razor12911 07-04-2013 08:41

the current converter doesn't support that feature, will publish v3 in 15 min.

[CompressingSettings]
NewFeature
7ZFile1={src}\Data.cab;Source:*;Option:a -r;Method:x=9
FreeArcFile1={src}\Output\Data.cab;Source:*;Option :a -ep1 -r -ed -p1234;Method:-msrep+lzma:a1:mfbt4:d158m:fb273:mc1000:lc8
RarFile1={src}\Output\Data.cab;Source:data2.bin;Op tion:a -ep1;Method:-m4

adding imgburn internally and adding function

Cesar82 07-04-2013 08:59

How do I copy the folder suport the game installation folder to the output folder of the conversion?

Razor12911 07-04-2013 11:28

Version 3 Released

What's New
  • 7Zip Compression and Winrar Compression Added
  • Freearc FileList Feature fixed
  • ImgBurn is added, Internally, create disk image feature added.
  • Updated Instructions

Razor12911 07-04-2013 11:44

Quote:

Originally Posted by danswano (Post 416801)
Thanks razor, let's say i have 3 folders and they contain lots of files/folders inside and i want to create a cab for each folder.
001, 002 and 003
how to add them in the ini?

using these -n or -x
make a list

pakrat2k2 07-04-2013 13:02

thanks for the update + detailed explanation but ....might want to

add the instructions in file ( including colors ) that users can d/l

Razor12911 07-04-2013 13:31

hmm, okay, planning on creating a chm file, any suggestions?


All times are GMT -7. The time now is 18:56.

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