summaryrefslogtreecommitdiff
path: root/tools/installer_ng/MirandaNG.iss
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-23 18:34:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-23 18:34:30 +0300
commit8b20bfff3eb87b5a270ea59ef6711014bc5691e7 (patch)
tree68831afe145fccc8e7f4bdcd54b844a0cf54258a /tools/installer_ng/MirandaNG.iss
parent02666998d65500950dba72f674ba18f0df3271a5 (diff)
fix for magic numbers in the installer
Diffstat (limited to 'tools/installer_ng/MirandaNG.iss')
-rw-r--r--tools/installer_ng/MirandaNG.iss13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/installer_ng/MirandaNG.iss b/tools/installer_ng/MirandaNG.iss
index 74c9d7b034..6a4884133c 100644
--- a/tools/installer_ng/MirandaNG.iss
+++ b/tools/installer_ng/MirandaNG.iss
@@ -607,6 +607,9 @@ const
DRIVE_CDROM = 5; // The drive is a CD-ROM drive.
DRIVE_RAMDISK = 6; // The drive is a RAM disk.
+ // don't forget to increment it after adding new components!
+ COMPONENTS_COUNT = 20; // Index of the first language
+
// Default installation check
function IsDefault: Boolean;
begin
@@ -876,15 +879,15 @@ begin
if CurPageID = wpSelectComponents then
begin
if ActiveLanguage = 'en' then
- WizardForm.ComponentsList.Checked[25]:= True
+ WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+4]:= True
else if ActiveLanguage = 'ru' then
- WizardForm.ComponentsList.Checked[21]:= True
+ WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+0]:= True
else if ActiveLanguage = 'cz' then
- WizardForm.ComponentsList.Checked[22]:= True
+ WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+1]:= True
else if ActiveLanguage = 'pl' then
- WizardForm.ComponentsList.Checked[23]:= True
+ WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+2]:= True
else if ActiveLanguage = 'de' then
- WizardForm.ComponentsList.Checked[24]:= True;
+ WizardForm.ComponentsList.Checked[COMPONENTS_COUNT+3]:= True;
end;
end;