Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Setup]
  2. AppName=FarcOnly
  3. AppVerName=FarcOnly
  4. DefaultDirName={pf}\русская @ папка
  5. OutputDir=C:\test
  6.  
  7. [Files]
  8. Source: Unarc.dll; DestDir: {app}; Flags: dontcopy
  9.  
  10. [Code]
  11. function MessageBox(hWnd: Integer; lpText, lpCaption: PChar; uType: Cardinal): Integer;
  12. external 'MessageBoxA@user32.dll stdcall';
  13.  
  14. const
  15. MB_ICONQUESTION = $20;
  16.  
  17. var
  18. PBar: TNewProgressBar;
  19.  
  20. #include "Utils.iss"
  21.  
  22.  
  23. procedure CancelButtonClick(CurPage: Integer; var Cancel, Confirm: Boolean);
  24. begin
  25. if CurPage = wpInstalling then begin
  26. Cancel := false;
  27. Confirm := false;
  28. if MessageBox(StrToInt(ExpandConstant('{wizardhwnd}')), SetupMessage(msgExitSetupMessage), SetupMessage(msgExitSetupTitle), MB_YESNO or MB_DEFBUTTON2 or MB_ICONQUESTION) = idYes
  29. then begin
  30. FreeArcAbort;
  31. Cancel := true;
  32. end;
  33. end;
  34. end;
  35.  
  36.  
  37. procedure InitializeWizard;
  38. begin
  39. PBar := TNewProgressBar.Create(WizardForm);
  40. with PBar do
  41. begin
  42.   Parent := WizardForm.InstallingPage;
  43.   Left := WizardForm.ProgressGauge.Left;
  44.   Top := WizardForm.ProgressGauge.Top;
  45.   Width :=WizardForm.ProgressGauge.Width;
  46.   Height := WizardForm.ProgressGauge.Height;
  47.   Min := 0;
  48. end;
  49. WizardForm.ProgressGauge.Hide;
  50. end;
  51.  
  52.  
  53. procedure CurStepChanged(CurStep: TSetupStep);
  54. begin
  55. if CurStep = ssInstall then
  56. begin
  57. PBar.Max := 100;
  58.  
  59. ArcExtract('{src}\data1.arc', '{app}', false, 20);
  60. ArcExtract('{src}\data2.arc', '{app}', false, 80);
  61.  
  62. end;
  63. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement