본문 바로가기
삽질/Delphi

[Delphi] InnoSetup : 설치 전, 설치 후 함수 호출하기

by 푸딩s 2013. 8. 7.
728x90
반응형



[BeforeInstall]


[Files]

Source: "MYPROG.EXE"; DestDir: "{app}"; BeforeInstall: MyBeforeInstall

Source: "A\MYFILE.TXT"; DestDir: "{app}"; BeforeInstall: MyBeforeInstall2('{app}\A\MYFILE.TXT')


[AfterInstall]


[Files]

Source: "MYPROG.EXE"; DestDir: "{app}"; AfterInstall: MyAfterInstall

Source: "A\MYFILE.TXT"; DestDir: "{app}"; AfterInstall: MyAfterInstall2('{app}\A\MYFILE.TXT')



[Code]

procedure MyBeforeInstall();

begin

  MsgBox('About to install MyProg.exe as ' + CurrentFileName + '.', mbInformation, MB_OK);

end;


procedure MyBeforeInstall2(FileName: String);

begin

  MsgBox('About to install ' + FileName + ' as ' + CurrentFileName + '.', mbInformation, MB_OK);

end;


procedure MyAfterInstall();

begin

  MsgBox('Just installed MyProg.exe as ' + CurrentFileName + '.', mbInformation, MB_OK);

end;


procedure MyAfterInstall2(FileName: String);

begin

  MsgBox('Just installed ' + FileName + ' as ' + CurrentFileName + '.', mbInformation, MB_OK);

end;




728x90
반응형

댓글