Thread: **New Installer
View Single Post
  #83  
Old 21-11-2015, 11:00
JRD!'s Avatar
JRD! JRD! is offline
Registered User
 
Join Date: Sep 2015
Location: Matrix
Posts: 274
Thanks: 225
Thanked 600 Times in 168 Posts
JRD! is on a distinguished road
Quote:
Originally Posted by ShadowEagle View Post
JRD!:

Yes, but doesn`t work. Don`t know why. The messages



won`t be displayed.

I want this:

If isdonerror will happen, there should be shown "Error!" in the Memolist and no roleback shout be done.
1) Edit the text in the UltraArc module:

Code:
procedure CurStepChanged(CurStep: TSetupStep);
begin
   if (CurStep = ssInstall) and FileExists(ExpandConstant('{src}\records.ini')) then
     UltraARC_Process;

   if (CurStep=ssPostInstall) and ISDoneError then begin
      MemoIsdoneList.clear;
          MemoIsdoneList.Lines.Add('An error has occurred!');
         UnBtn.Enabled:=False;
//        Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
//      DelTree(ExpandConstant('{app}'), True, True, True);
   end;
end;
2) Change the code of the main file as shown below:

Code:
if (CurPageID = wpFinished) then
begin
IconDesktop.Enabled:=False;
StartMenu.Enabled:=False;
Soft.Enabled:=False;
DrivesComboBox.Enabled:=False;
//MemoExecute:=+ #13#10 +'Finished Installation...' + #13#10 +
//'Done!';
//MemoIsdoneList.Lines.Add(MemoExecute);
UnBtn.Show;
WizardForm.GroupEdit.Enabled:=False;
WizardForm.GroupBrowseButton.Enabled:=False;
WizardForm.DirEdit.Enabled:=False;
WizardForm.DirBrowseButton.Enabled:=false;
if ISDoneError = False then begin
WizardForm.ClientHeight:=604;
FInstallationLbl.Caption := 'Installation Successfully';
FInstallationLbl.Left:=105;
FInstallationLbl.Font.Color := $0032CD32;
end else begin
FInstallationLbl.Caption := 'Installation Failed';
FInstallationLbl.Font.Color := $000000FF;
WizardForm.ClientHeight:=604;
end;
end;
3) I would tend to this:

UltraArc module:

Code:
procedure CurStepChanged(CurStep: TSetupStep);
begin
   if (CurStep = ssInstall) and FileExists(ExpandConstant('{src}\records.ini')) then
     UltraARC_Process;

   if (CurStep=ssPostInstall) and ISDoneError then begin
//      MemoIsdoneList.clear;
//          MemoIsdoneList.Lines.Add('An error has occurred!');
         UnBtn.Enabled:=False;
//        Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
//      DelTree(ExpandConstant('{app}'), True, True, True);
   end;
end;
Main file:

Code:
if (CurPageID = wpFinished) then
begin
IconDesktop.Enabled:=False;
StartMenu.Enabled:=False;
Soft.Enabled:=False;
DrivesComboBox.Enabled:=False;

UnBtn.Show;
WizardForm.GroupEdit.Enabled:=False;
WizardForm.GroupBrowseButton.Enabled:=False;
WizardForm.DirEdit.Enabled:=False;
WizardForm.DirBrowseButton.Enabled:=false;
if ISDoneError = False then begin
WizardForm.ClientHeight:=604;

MemoIsdoneList.clear;
MemoIsdoneList.Lines.Add('Finished Installation...' + #13#10 + 'Done!');


FInstallationLbl.Caption := 'Installation Successfully';
FInstallationLbl.Left:=105;
FInstallationLbl.Font.Color := $0032CD32;
end else begin

MemoIsdoneList.clear;
MemoIsdoneList.Lines.Add('An error has occurred!');

FInstallationLbl.Caption := 'Installation Failed';
FInstallationLbl.Font.Color := $000000FF;
WizardForm.ClientHeight:=604;
end;
end;




That answer your question?
Reply With Quote