Hey there guys,
I did a little research for setting components not as checkboxes but as Radiobuttons, and I've managed to achieve the goal
If someone want to integrate the code with ASIS please, be my guest 
The modifications were tested by me and work for example with Assassins Creed 1 MultiLang (With Czech,Polish,English,French,Italian,German and Spanish).
The Modifications I presented are as Follows:
Code for Components.iss
Code:
[Components]
#if RadioInsteadCheckbox == "1"
Name: "main"; Description: {cm:MainFiles}; Types: full compact custom; Flags: fixed
Name: "Lang"; Description: {cm:GameLang}; Types: full compact custom; Flags: fixed
Name: "Lang\czecharch"; Description: {cm:CompCzech}; Types: custom; Flags: exclusive;
Name: "Lang\englisharch"; Description: {cm:CompEnglish}; Types: custom; Flags: exclusive;
Name: "Lang\frencharch"; Description: {cm:CompFrench}; Types: custom; Flags: exclusive
Name: "Lang\germanarch"; Description: {cm:CompGerman}; Types: custom; Flags: exclusive
Name: "Lang\italianarch"; Description: {cm:CompItalian}; Types: custom; Flags: exclusive
Name: "Lang\polisharch"; Description: {cm:CompPolish}; Types: custom; Flags: exclusive
Name: "Lang\spanisharch"; Description: {cm:CompSpanish}; Types: custom; Flags: exclusive
#endif
#if RadioInsteadCheckbox == "0"
Name: "main"; Description: {cm:MainFiles}; Types: full compact custom; Flags: fixed
Name: "Lang"; Description: {cm:GameLang}; Types: full compact custom; Flags: fixed
Name: "Lang\czecharch"; Description: {cm:CompCzech}; Types: custom;
Name: "Lang\englisharch"; Description: {cm:CompEnglish}; Types: custom
Name: "Lang\frencharch"; Description: {cm:CompFrench}; Types: custom
Name: "Lang\germanarch"; Description: {cm:CompGerman}; Types: custom
Name: "Lang\italianarch"; Description: {cm:CompItalian}; Types: custom
Name: "Lang\polisharch"; Description: {cm:CompPolish}; Types: custom
Name: "Lang\spanisharch"; Description: {cm:CompSpanish}; Types: custom
#endif
Code for Settings.iss (Component Section):
Code:
// Component
#define UseComponents ReadIni(SourcePath + "\Settings.ini", "Component", "Enable", "")
#define RadioInsteadCheckbox ReadIni(SourcePath + "\Settings.ini", "Component", "EnableRadiobutton", "")
#define EnglishArch ReadIni(SourcePath + "\Settings.ini", "Component", "EnglishArch", "")
#define FrenchArch ReadIni(SourcePath + "\Settings.ini", "Component", "FrenchArch", "")
#define GermanArch ReadIni(SourcePath + "\Settings.ini", "Component", "GermanArch", "")
#define ItalianArch ReadIni(SourcePath + "\Settings.ini", "Component", "ItalianArch", "")
#define SpanishArch ReadIni(SourcePath + "\Settings.ini", "Component", "SpanishArch", "")
#define PolishArch ReadIni(SourcePath + "\Settings.ini", "Component", "PolishArch", "")
#define CzechArch ReadIni(SourcePath + "\Settings.ini", "Component", "CzechArch", "")
Code for Settings.ini (also Component section):
Code:
[Component]
Enable=1
EnableRadiobutton=1
EnglishArch=
FrenchArch=
GermanArch=
ItalianArch=
SpanishArch=
PolishArch=
CzechArch=
In Registry.iss You can add something like this, if a language registry key is required, for tests I've added something like this:
Code:
[Registry]
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "Polish"; Flags: uninsdeletekey; Components: Lang\polisharch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "Czech"; Flags: uninsdeletekey; Components: Lang\czecharch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "English"; Flags: uninsdeletekey; Components: Lang\englisharch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "French"; Flags: uninsdeletekey; Components: Lang\frencharch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "German"; Flags: uninsdeletekey; Components: Lang\germanarch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "Italian"; Flags: uninsdeletekey; Components: Lang\italianarch;
Root: HKLM; Subkey: SOFTWARE\WOW6432Node\Ubisoft\Assassin's Creed; ValueType: string; ValueName: "Language"; ValueData: "Spanish"; Flags: uninsdeletekey; Components: Lang\spanisharch;
In main script in code for extracting the language components I had to make some adjustments.
I've made them as following:
Code:
#if UseComponents == "1"
{Unpack selected components}
if IsComponentSelected('Lang\englisharch') then
if FileExists(GetIniString('Component', 'EnglishArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'EnglishArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\frencharch') then
if FileExists(GetIniString('Component', 'FrenchArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'FrenchArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\germanarch') then
if FileExists(GetIniString('Component', 'GermanArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'GermanArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\italianarch') then
if FileExists(GetIniString('Component', 'ItalianArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'ItalianArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\spanisharch') then
if FileExists(GetIniString('Component', 'SpanishArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'SpanishArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\polisharch') then
if FileExists(GetIniString('Component', 'PolishArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'PolishArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
if IsComponentSelected('Lang\czecharch') then
if FileExists(GetIniString('Component', 'CzechArch', '', ExpandConstant('{tmp}\Settings.ini'))) then
if ISDoneError = False then
ISArcExtract(0, 0, ExpandConstant('{src}\' + GetIniString('Component', 'CzechArch', '', ExpandConstant('{tmp}\Settings.ini'))), ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false);
#endif
@KaktoR if You see and accept these changes I will be honored if You add them to the next beta
Last edited by Schabik; 22-02-2019 at 04:41.
|