IIID. Internal-External Setups, Registry Keys
a) Internal Installation
This is activated by removing semicolon ( ; ) from following line in script:
Code:
;#define ProgramFiles "F:\Program Files (x86)\Atari\TDU2"
By removing semicolon from this, you will 'authorize' INNO setup to create it's own .bin files according to diskspan(not spam) and compression ratio.
INNO Setup will compress files in given path (in this example; TDU2). It will compress them
regardless the content or anything else, so using internal setups in conversions is easy and effective solution.
b) External Installation
By keeping semicolon, you'll create only base files (setup.exe, .ico, trasferring of any changing to exe)
This type of installation will give converter more possibilites about compressions. Since you cant do precomp+srep+lzma at the same time in INNO, using external inst. is more logic. You can compress files better than INNO's compression, however beware; it'll take more time to create conversion and also install the game.
For example, converting MaxPayne 3 with all types of compressions took 12 hours and more than 1 hour to install.
c) Registry Keys:
Another important feature of INNO Setup. No matter how you install the game, you will need registry keys. Adding them may look complicated, however it's easy as other stuff in INNO.
First of all find your game in your Registry Editor. (In our example we'll work on Test Driver Unlimited 2):
Once you found your data, open INNO script and found registry section. Normally you will find default uninstall registry key in there. Copy it, paste it, and edit it along adding regkeys. However DO NOT delete it.
In your registry editor, you will find 3 columns; Name, Type, Data.
Root: HKLM;
SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName} ";
ValueName: UninstallString;
ValueData: {uninstallexe}; ValueType: string; Flags: UninsDeleteKey;
Subkey corresponds the path of registry key, so we will not touch it.
ValueName corresponds 'Name' in your registry editor. You will edit this according to your registry key in OS. 'Exepath, InstallDir' are our ValueNames in here.
ValueData corresponds 'Data' in Registry Editor. According to conversion, this can be numbers, game path, or simply a command. If you're working on multiple language supported game, it's better to add all possible languages to it.
If you need to add number or letter, you'll type it directly without these ' {} '
ValueType is generaly remains same, so i'll pass this, same goes for Flags.
So in the end, our Registrykeys about TDU2 will look like this (Attention to multiple language keys and how they're looking):
Code:
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: UninstallString; ValueData: {uninstallexe}; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: ExePath; ValueData: {app}\{code:GetMyAppExePath}\{code:GetMyAppExeName}; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: InstallDir; ValueData: {app}\{code:GetMyAppExePath}; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: LanguagePack; ValueData: EU; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: LauncherPath; ValueData: {app}\{code:GetMyAppExePath}\UpLauncher.exe; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: Language; ValueData: en; ValueType: string; Flags: UninsDeleteKey; Languages: eng;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: Language; ValueData: fr; ValueType: string; Flags: UninsDeleteKey; Languages: fre;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: Language; ValueData: de; ValueType: string; Flags: UninsDeleteKey; Languages: ger;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: Language; ValueData: it; ValueType: string; Flags: UninsDeleteKey; Languages: ita;
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: Language; ValueData: sp; ValueType: string; Flags: UninsDeleteKey; Languages: esp;