
[Setup]
AppName=DAEnetIP2 Manager - Ver 1.0
AppVerName=DAEnetIP2 Manager - Ver 1.0
DefaultDirName=C:\Denkovi A. E. LTD\DAEnetIP2 Manager\Ver 1.0
DefaultGroupName=Denkovi A. E. LTD\DAEnetIP2 Manager


[Files]
Source: "jre-6u24-windows-i586-s.exe";   DestDir:  "{app}\Platforms\Java"
Source: "DAEnetIP2v1.0.jar";             DestDir:  "{app}"
Source: "monitor.ico";                      DestDir:  "{app}"
Source: "monitor.png";                      DestDir:  "{app}"

[Icons]
Name: "{commondesktop}\DAEnetIP2 Manager v1.0"; Filename: "{app}\DAEnetIP2v1.0.jar"; IconFilename: "{app}\monitor.ico";  WorkingDir: "{app}"
Name: "{group}\DAEnetIP2 Manager"; Filename: "{app}\DAEnetIP2v1.0.jar"; IconFilename: "{app}\monitor.ico";  WorkingDir: "{app}"

;Uninstall
Name: "{group}\Uninstall"; Filename: "{app}\unins000.exe";  WorkingDir: "{app}\"

[Run]
Filename: "{app}\Platforms\Java\jre-6u24-windows-i586-s.exe"; Check: JVM_Check

[Code]
var
  MyProgChecked1: Boolean;
  MyProgCheckResult1: Boolean;
  
  MyProgChecked2: Boolean;
  MyProgCheckResult2: Boolean;

function JVM_Check(): Boolean;
begin
  if not MyProgChecked1 then begin
    MyProgCheckResult1 := MsgBox('This software requires Java Virtual Machine (JVM), do you want to install it?', mbConfirmation, MB_YESNO) = idYes;
    MyProgChecked1 := True;
  end;
  Result := MyProgCheckResult1;
end;

