INNO SETUP Using checkboxes

380 Views Asked by At

I'm not familiar with Pascal. I would like to show 10 checkbox before installing. The user can check several checkboxes according to the group of catalogs he wants to install (10 checkboxes = 10 groups of catalogs). These checkboxes have to be tested in FILES section and in CODE section. In FILES section only catalogs of a checked group will be installed. In CODE section, the pictures will be downloaded and unzipped according to the group of catalogs checked.

I made 100 hundred tries but an error occurs because the local variables can not be used in other sections.

Thanks for your Help

Icho

[Languages]
Name: fr; MessagesFile: compiler:Languages\French.isl; LicenseFile: C:\Dev\Phi8\licensefr.TXT
Name: en; MessagesFile: compiler:Default.isl; LicenseFile: C:\Dev\Phi8\licenseen.TXT



[Setup]


#include "C:\Dev\Inno Download Plugin\idp.iss"
#include "C:\Dev\Inno Download Plugin\french.iss"



[Tasks]
Name: "chkbInstallFR"; Description: "France"; MinVersion: 0.0,5.0
Name: "chkbInstallMO"; Description: "Monaco, Andorre, TAAF, SPM"; MinVersion: 0.0,5.0
Name: "chkbInstallBELUX"; Description: "Belgique, Luxembourg"; MinVersion: 0.0,5.0
Name: "chkbInstallSUI"; Description: "Suisse, Liechtenstein"; MinVersion: 0.0,5.0
Name: "chkbInstallITA"; Description: "Italie"; MinVersion: 0.0,5.0
Name: "chkbInstallALL"; Description: "Allemagne"; MinVersion: 0.0,5.0
Name: "chkbInstallEURONU"; Description: "Europa, Nations Unies, sepac"; MinVersion: 0.0,5.0
Name: "chkbInstallILE"; Description: "Ile des Antilles, Pacifique, Océan indien"; MinVersion: 0.0,5.0
Name: "chkbInstallAFR"; Description: "Anciennes colonies françaises"; MinVersion: 0.0,5.0
Name: "chkbInstallBUR"; Description: "Bureaux français en Europe, Asie, Moyen-Orient"; MinVersion: 0.0,5.0
  


[Dirs]
Name: {app}\Datas
Name: {app}\Pic
Name: {app}\Pic\AN
Name: {app}\Pic\ANE
Name: {app}\Pic\UNY


[Files]

Source: C:\Sources\Phi\Exe\Datas\UNY_BIN20P.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallFR;
Source: C:\Sources\Phi\Exe\Datas\UNY_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallFR;


Source: C:\Sources\Phi\Exe\Datas\AN_BIN20P.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\AN_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;

Source: C:\Sources\Phi\Exe\Datas\ANE_BIN20P.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\ANE_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;


Source: C:\Dev\Philatelix8\Install\7za.exe; DestDir: "{app}"; Flags: deleteafterinstall;


[Icons]


[Run]
Filename: {app}\7za.exe; Parameters: "x ""{tmp}UNY.zip"" -o""{app}\Pic\UNY"" * -aoa"; Flags: runascurrentuser;

Filename: {app}\7za.exe; Parameters: "x ""{tmp}AN.zip"" -o""{app}\Pic\AN"" * -aoa"; Flags: runascurrentuser; 
Filename: {app}\7za.exe; Parameters: "x ""{tmp}ANE.zip"" -o""{app}\Pic\ANE"" * -aoa"; Flags: runascurrentuser; 

[INI]


[Code] 
{ RedesignWizardFormBegin } // Don't remove this line!
// Don't modify this section. It is generated automatically.
var
  chkbInstallFR: TNewCheckBox;
  chkbInstallMO: TNewCheckBox;
  chkbInstallBELUX: TNewCheckBox;
  chkbInstallSUI: TNewCheckBox;
  chkbInstallITA: TNewCheckBox;
  chkbInstallALL: TNewCheckBox;
  chkbInstallEURONU: TNewCheckBox;
  chkbInstallILE: TNewCheckBox;
  chkbInstallAFR: TNewCheckBox;
  chkbInstallBUR: TNewCheckBox;

procedure RedesignWizardForm;
begin
  with WizardForm.SelectTasksLabel do
  begin
    Visible := False;
    Left := ScaleX(392);
  end;

  { chkbInstallFR }
  chkbInstallFR := TNewCheckBox.Create(WizardForm);
  with chkbInstallFR do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(16);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'France';
  end;

  { chkbInstallMO }
  chkbInstallMO := TNewCheckBox.Create(WizardForm);
  with chkbInstallMO do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(40);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Monaco, Andorre, TAAF, SPM';
  end;

  { chkbInstallBELUX }
  chkbInstallBELUX := TNewCheckBox.Create(WizardForm);
  with chkbInstallBELUX do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Belgique et Luxembourg';
  end;

  { chkbInstallSUI }
  chkbInstallSUI := TNewCheckBox.Create(WizardForm);
  with chkbInstallSUI do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Suisse et Liechtenstein';
  end;

  { chkbInstallITA }
  chkbInstallITA := TNewCheckBox.Create(WizardForm);
  with chkbInstallITA do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Italie';
  end;

  { chkbInstallALL }
  chkbInstallALL := TNewCheckBox.Create(WizardForm);
  with chkbInstallALL do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Allemagne';
  end;

  { chkbInstallEURONU }
  chkbInstallEURONU := TNewCheckBox.Create(WizardForm);
  with chkbInstallEURONU do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := False;
    Caption := 'Europa, Nations Unies, sepac';
  end;

  { chkbInstallILE }
  chkbInstallILE := TNewCheckBox.Create(WizardForm);
  with chkbInstallILE do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Iles des antilles, Pacifique et Océan indien';
  end;

  { chkbInstallAFR }
  chkbInstallAFR := TNewCheckBox.Create(WizardForm);
  with chkbInstallAFR do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Colonies françaises en Afrique';
  end;

  { chkbInstallBUR }
  chkbInstallBUR := TNewCheckBox.Create(WizardForm);
  with chkbInstallBUR do
  begin
    Parent := WizardForm.WelcomePage;
    Left := ScaleX(8);
    Top := ScaleY(64);
    Width := ScaleX(97);
    Height := ScaleY(17);
    Checked := True;
    Caption := 'Bureaux français en Europe, Asie, Moyen-Orient';
  end;

  chkbInstallFR.TabOrder := 0;
  chkbInstallMO.TabOrder := 1;
  chkbInstallBELUX.TabOrder := 2;
  chkbInstallSUI.TabOrder := 3;
  chkbInstallITA.TabOrder := 4;
  chkbInstallALL.TabOrder := 5;
  chkbInstallEURONU.TabOrder := 6;
  chkbInstallILE.TabOrder := 7;
  chkbInstallAFR.TabOrder := 8;
  chkbInstallBUR.TabOrder := 9;

{ ReservationBegin }
  // This part is for you. Add your specialized code here.
 
   if chkbInstallFR.checked then 
   begin
      idpAddFile('http://www.philatelix.fr/Divers/PHI/UNY.zip', ExpandConstant('{tmp}UNY.zip'));
   end;

   if chkbInstallMO.checked then 
   begin
      idpAddFile('http://www.philatelix.fr/Divers/PHI/AN.zip', ExpandConstant('{tmp}AN.zip'));
      idpAddFile('http://www.philatelix.fr/Divers/PHI/ANE.zip', ExpandConstant('{tmp}ANE.zip'));
   end;

{ ReservationEnd }
end;
// Don't modify this section. It is generated automatically.
{ RedesignWizardFormEnd } // Don't remove this line!







procedure InitializeWizard;
 begin


{ Download after "Ready" wizard page }
idpDownloadAfter(wpReady);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
    if CurStep = ssPostInstall then 
    begin
      if chkbInstallFR.checked then 
      begin
        FileCopy(ExpandConstant('{tmp}\UNY.zip'), ExpandConstant('{app}\UNY.zip'), false);
      end;
      if chkbInstallMO.checked then 
      begin
        FileCopy(ExpandConstant('{tmp}\AN.zip'), ExpandConstant('{app}\AN.zip'), false);
        FileCopy(ExpandConstant('{tmp}\ANE.zip'), ExpandConstant('{app}\ANE.zip'), false);
      end;

    end;
end;


function InstallFR: Boolean;
begin
     if chkbInstallFR.checked then 
        begin
          Result := TRUE
        end;
      else
        begin
          Result := FALSE
        end;
      else
end;

function InstallMO: Boolean;
begin
     if chkbInstallMO.checked then 
        begin
          Result := TRUE
        end;
      else
        begin
          Result := FALSE
        end;
end;
2

There are 2 best solutions below

0
On

with the following code, the checkboxes are displaid exactly where i want but :

  • The source files are not installed
  • The installer downloads all ZIP files

I don't know how to arrange the code for the source files are copied and the ZIP are downloaded according to the checkboxes.

[Setup]
OutputBaseFilename=Install_Phi_21
...
DisableWelcomePage=no
WizardImageFile=logoPHI.bmp
;
#include "C:\Dev\Inno Download Plugin\idp.iss"
#include "C:\Dev\Inno Download Plugin\french.iss"

[Tasks]

Name: desktopicon; Description: Créer une &icône sur le bureau; GroupDescription: Additional icons:

[Dirs]
Name: {app}\Pic
Name: {app}\Pic\FR
Name: {app}\Pic\MO

[Files]


...

Source: C:\Sources\Phi\Exe\Datas\UNY_BIN20P2D.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallFR;
Source: C:\Sources\Phi\Exe\Datas\UNY_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallFR;


Source: C:\Sources\Phi\Exe\Datas\AN_BIN20P2D.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\AN_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;

Source: C:\Sources\Phi\Exe\Datas\ANE_BIN20P2D.s2db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\ANE_BIN20D.s2db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;


Source: C:\Dev\Phi\Install\7za.exe; DestDir: "{app}"; Flags: deleteafterinstall;



[Run]
Filename: {app}\7za.exe; Parameters: "x ""{tmp}UNY.zip"" -o""{app}\Pic\UNY"" * -aoa"; Flags: runascurrentuser;

Filename: {app}\7za.exe; Parameters: "x ""{tmp}AN.zip"" -o""{app}\Pic\AN"" * -aoa"; Flags: runascurrentuser; 
Filename: {app}\7za.exe; Parameters: "x ""{tmp}ANE.zip"" -o""{app}\Pic\ANE"" * -aoa"; Flags: runascurrentuser; 




[INI]
Filename: {app}\phi.url; Section: InternetShortcut; Key: URL; String: http://www.phi.com


[Code] 
var
  Page : TWizardPage;
  
  chkbInstallFR: TCheckBox;
  chkbInstallMO: TCheckBox;
  chkbInstallBELUX: TCheckBox;
  chkbInstallSUI: TCheckBox;
  chkbInstallITA: TCheckBox;
  chkbInstallALL: TCheckBox;
  chkbInstallEURONU: TCheckBox;
  chkbInstallILE: TCheckBox;
  chkbInstallAFR: TCheckBox;
  chkbInstallBUR: TCheckBox;

  procedure RPage;
  begin
  Page := CreateCustomPage(wpWelcome, 'Sélection des pays','');
 
  chkbInstallFR := TCheckBox.Create(Page);
  chkbInstallFR.Top := ScaleY(8);
  chkbInstallFR.Left := ScaleX(0);
  chkbInstallFR.Width := Page.SurfaceWidth;
  chkbInstallFR.Height := ScaleY(17);
  chkbInstallFR.Caption := 'France';
  chkbInstallFR.Checked := True;
  chkbInstallFR.Parent := Page.Surface;
 
  chkbInstallMO := TCheckBox.Create(Page);
  chkbInstallMO.Top := ScaleY(35);
  chkbInstallMO.Left := ScaleX(0);
  chkbInstallMO.Width := Page.SurfaceWidth;
  chkbInstallMO.Height := ScaleY(17);
  chkbInstallMO.Caption := 'Monaco, Andorre, TAAF, SPM';
  chkbInstallMO.Checked := True;
  chkbInstallMO.Parent := Page.Surface;
 
  
end;



procedure InitializeWizard;
 begin
   RPage;
  if chkbInstallFR .State= cbchecked then
   begin
      idpAddFile('http://www.phi.com/Divers/PHI/UNY.zip', ExpandConstant('{tmp}UNY.zip'));
   end;

  if chkbInstallMO .State= cbchecked then
   begin
      idpAddFile('http://www.phi.com/Divers/PHI/AN.zip', ExpandConstant('{tmp}AN.zip'));
      idpAddFile('http://www.phi.com/Divers/PHI/ANE.zip', ExpandConstant('{tmp}ANE.zip'));
   end;


{ Download after "Ready" wizard page }
idpDownloadAfter(wpReady);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
    if CurStep = ssPostInstall then 
    begin
if chkbInstallFR .State= cbchecked then
      begin
        FileCopy(ExpandConstant('{tmp}\UNY.zip'), ExpandConstant('{app}\UNY.zip'), false);
      end;
if chkbInstallMO .State= cbchecked then
      begin
        FileCopy(ExpandConstant('{tmp}\AN.zip'), ExpandConstant('{app}\AN.zip'), false);
        FileCopy(ExpandConstant('{tmp}\ANE.zip'), ExpandConstant('{app}\ANE.zip'), false);
      end;

    end;
end;


function InstallFR: Boolean;
begin
 
  Result := chkbInstallFR .State;
end;

function InstallMO: Boolean;
begin
 
  Result := chkbInstallMO .State;
end;
0
On

This is the end of my monologue. I finally did exactly what i want :

  • Installing some files depending on which checboxes are checked
  • Downloading and installing ZIP files depending on which checboxes are checked

Advantage of this method, you don't need to download a big install file. The installer will download on your server the needed files.

[Setup]


#include "C:\Dev\Inno Download Plugin\idp.iss"
#include "C:\Dev\Inno Download Plugin\french.iss"



[Dirs]
Name: {app}\Pic
Name: {app}\Pic\FR
Name: {app}\Pic\MO

[Files]

Source: C:\Sources\Phi\Exe\Datas\FR_BIN20P2D.s3db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallFR;
Source: C:\Sources\Phi\Exe\Datas\FR_BIN20D.s3db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallFR;

Source: C:\Sources\Phi\Exe\Datas\MO_BIN20P2D.s3db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\MO_BIN20D.s3db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;

Source: C:\Sources\Phi\Exe\Datas\AN_BIN20P2D.s3db; DestDir: {app}\Datas; Flags: ignoreversion; Check: InstallMO;
Source: C:\Sources\Phi\Exe\Datas\AN_BIN20D.s3db; DestDir: {app}\datas; Flags: onlyifdoesntexist; Check: InstallMO;

Source: C:\Dev\Phi\Install\7za.exe; DestDir: "{app}"; Flags: deleteafterinstall;



[Run]

Filename: {app}\7za.exe; Parameters: "x ""{tmp}CAV.zip"" -o""{app}\Pic\CAV"" * -aoa"; Flags: runascurrentuser; Check: InstallFR;
Filename: {app}\7za.exe; Parameters: "x ""{tmp}SIC.zip"" -o""{app}\Pic\SIC"" * -aoa"; Flags: runascurrentuser; Check: InstallMO;



[Code] 
{ RedesignWizardFormBegin } // Don't remove this line!
// Don't modify this section. It is generated automatically.
var
  Page : TWizardPage;
  
  chkbInstallFR: TCheckBox;
  chkbInstallMO: TCheckBox;
  chkbInstallBELUX: TCheckBox;
  chkbInstallSUI: TCheckBox;
  chkbInstallITA: TCheckBox;
  chkbInstallALL: TCheckBox;
  chkbInstallEURONU: TCheckBox;
  chkbInstallILE: TCheckBox;
  chkbInstallAFR: TCheckBox;
  chkbInstallBUR: TCheckBox;


  procedure RPage;
  begin
  Page := CreateCustomPage(wpSelectComponents, 'Sélection des pays','');
  
  chkbInstallFR := TCheckBox.Create(Page);
  chkbInstallFR.Top := ScaleY(8);
  chkbInstallFR.Left := ScaleX(0);
  chkbInstallFR.Width := Page.SurfaceWidth;
  chkbInstallFR.Height := ScaleY(17);
  chkbInstallFR.Caption := 'France';
  chkbInstallFR.Checked := True;
  chkbInstallFR.Parent := Page.Surface;
 
  chkbInstallMO := TCheckBox.Create(Page);
  chkbInstallMO.Top := ScaleY(35);
  chkbInstallMO.Left := ScaleX(0);
  chkbInstallMO.Width := Page.SurfaceWidth;
  chkbInstallMO.Height := ScaleY(17);
  chkbInstallMO.Caption := 'Monaco, Andorre, TAAF, SPM';
  chkbInstallMO.Checked := True;
  chkbInstallMO.Parent := Page.Surface;
 
  chkbInstallBELUX := TCheckBox.Create(Page);
  chkbInstallBELUX.Top := ScaleY(62);
  chkbInstallBELUX.Left := ScaleX(0);
  chkbInstallBELUX.Width := Page.SurfaceWidth;
  chkbInstallBELUX.Height := ScaleY(17);
  chkbInstallBELUX.Caption := 'Belgique, Luxembourg';
  chkbInstallBELUX.Checked := True;
  chkbInstallBELUX.Parent := Page.Surface;

  chkbInstallSUI := TCheckBox.Create(Page);
  chkbInstallSUI.Top := ScaleY(89);
  chkbInstallSUI.Left := ScaleX(0);
  chkbInstallSUI.Width := Page.SurfaceWidth;
  chkbInstallSUI.Height := ScaleY(17);
  chkbInstallSUI.Caption := 'Suisse, Liechtenstein';
  chkbInstallSUI.Checked := True;
  chkbInstallSUI.Parent := Page.Surface;

  chkbInstallITA := TCheckBox.Create(Page);
  chkbInstallITA.Top := ScaleY(116);
  chkbInstallITA.Left := ScaleX(0);
  chkbInstallITA.Width := Page.SurfaceWidth;
  chkbInstallITA.Height := ScaleY(17);
  chkbInstallITA.Caption := 'Italie';
  chkbInstallITA.Checked := True;
  chkbInstallITA.Parent := Page.Surface;
  
  chkbInstallALL := TCheckBox.Create(Page);
  chkbInstallALL.Top := ScaleY(143);
  chkbInstallALL.Left := ScaleX(0);
  chkbInstallALL.Width := Page.SurfaceWidth;
  chkbInstallALL.Height := ScaleY(17);
  chkbInstallALL.Caption := 'Allemagne';
  chkbInstallALL.Checked := True;
  chkbInstallALL.Parent := Page.Surface;
 
  chkbInstallEURONU := TCheckBox.Create(Page);
  chkbInstallEURONU.Top := ScaleY(170);
  chkbInstallEURONU.Left := ScaleX(0);
  chkbInstallEURONU.Width := Page.SurfaceWidth;
  chkbInstallEURONU.Height := ScaleY(17);
  chkbInstallEURONU.Caption := 'Europa, Nations Unies, sepac';
  chkbInstallEURONU.Checked := True;
  chkbInstallEURONU.Parent := Page.Surface;
 
  chkbInstallILE := TCheckBox.Create(Page);
  chkbInstallILE.Top := ScaleY(197);
  chkbInstallILE.Left := ScaleX(0);
  chkbInstallILE.Width := Page.SurfaceWidth;
  chkbInstallILE.Height := ScaleY(17);
  chkbInstallILE.Caption := 'Iles des antilles, Pacifique et Océan indien';
  chkbInstallILE.Checked := True;
  chkbInstallILE.Parent := Page.Surface;



  chkbInstallAFR := TCheckBox.Create(Page);
  chkbInstallAFR.Top := ScaleY(8);
  chkbInstallAFR.Left := ScaleX(210);
  chkbInstallAFR.Width := Page.SurfaceWidth;
  chkbInstallAFR.Height := ScaleY(17);
  chkbInstallAFR.Caption := 'Anciennes colonies françaises en Afrique';
  chkbInstallAFR.Checked := True;
  chkbInstallAFR.Parent := Page.Surface;

  chkbInstallBUR := TCheckBox.Create(Page);
  chkbInstallBUR.Top := ScaleY(35);
  chkbInstallBUR.Left := ScaleX(210);
  chkbInstallBUR.Width := Page.SurfaceWidth;
  chkbInstallBUR.Height := ScaleY(17);
  chkbInstallBUR.Caption := 'Bureaux français à l''étranger';
  chkbInstallBUR.Checked := True;
  chkbInstallBUR.Parent := Page.Surface;
 
end;



procedure InitializeWizard;

begin
   RPage; 
end;



procedure CurStepChanged(CurStep: TSetupStep);
begin
    if CurStep = ssInstall then   //essayer ssInstall au lieu de ssPostInstall
    begin
    if chkbInstallFR .State= cbchecked then
      begin
        FileCopy(ExpandConstant('{tmp}\CAV.zip'), ExpandConstant('{app}\CAV.zip'), false);
      end;
    if chkbInstallMO .State= cbchecked then
      begin
        FileCopy(ExpandConstant('{tmp}\SIC.zip'), ExpandConstant('{app}\SIC.zip'), false);
      end;

    end;
end;

function NextButtonClick(CurPageID: Integer): Boolean;

begin
  result := True;
  case CurPageID of
    100:
      begin
          if chkbInstallFR .State= cbchecked then
           begin
              idpAddFile('http://www.phi.com/PHI/CAV.zip', ExpandConstant('{tmp}CAV.zip'));
           end
           else
           begin
               msgbox('Not France!',mbError, MB_OK)
           end;

          if chkbInstallMO .State= cbchecked then
           begin
              idpAddFile('http://www.phi.com/PHI/SIC.zip', ExpandConstant('{tmp}SIC.zip'));
           end
           else
           begin
               msgbox('Not Monaco!',mbError, MB_OK)
           end;
      end;
    wpSelectTasks:
      begin
      end;
    wpReady:
      begin
      end;
    end;
  { Download after "Ready" wizard page }
  idpDownloadAfter(wpReady);

end;


function InstallFR: Boolean;
begin
 
if chkbInstallFR .State = cbchecked then
  begin
  Result := TRUE;
  end
else
  begin
  Result := FALSE;
  end;
end;

function InstallMO: Boolean;
begin
 
if chkbInstallMO .State = cbchecked then
  begin
  Result := TRUE;
  end
else
  begin
  Result := FALSE;
  end;
end;