1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| scripting demo. This demo will show you some possibilities of the scripting support.' #13#13 'The scripting engine used is RemObjects Pascal Script by Carlo Kok. See http://www.remobjects.com/ps for more information.', mbInformation, MB_OK);
wpFinished:
MsgBox('CurPageChanged:' #13#13 'Welcome to final page of this demo. Click Finish to exit.', mbInformation, MB_OK);
end;
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
Log('PrepareToInstall() called');
if MsgBox('PrepareToInstall:' #13#13 'Setup is preparing to install. Using the script you can install any prerequisites, abort Setup on errors, and request restarts. Do you want to return an error now?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = idYes then
Result := '<your error text here>.'
else
Result := '';
end;
function MyProgCheck(): Boolean;
begin
Log('MyProgCheck() called');
if not MyProgChecked then begin
MyProgCheckResult := MsgBox('MyProgCheck:' #13#13 'Using the script you can decide at runtime to include or exclude files from the installation. Do you want to install MyProg.exe and MyProg.chm to ' + ExtractFilePath(CurrentFileName) + '?', mbConfirmation, MB_YESNO) = idYes;
MyProgChecked := True;
end;
Result := MyProgCheckResult;
end;
procedure BeforeMyProgInstall(S: String);
begin
Log('BeforeMyProgInstall(''' + S + ''') called');
MsgBox('BeforeMyProgInstall:' #13#13 'Setup is now going to install ' + S + ' as ' + CurrentFileName + '.', mbInformation, MB_OK);
end;
procedure AfterMyProgInstall(S: String);
begin
Log('AfterMyProgInstall(''' + S + ''') called');
MsgBox('AfterMyProgInstall:' #13#13 'Setup just installed ' + S + ' as ' + CurrentFileName + '.', mbInformation, MB_OK);
end;
function MyConst(Param: String): String;
begin
Log('MyConst(''' + Param + ''') called');
Result := ExpandConstant('{pf}');
end; |
Partager