Originally Posted by vint56
example on isdone0.6final
#define precompmt
[setup]
[files]
#ifdef precompmt
source: Include\precompmt\cls-precompmt.dll; destdir: {tmp}; flags: Dontcopy
source: Include\precompmt\precomp.exe; destdir: {tmp}; flags: Dontcopy
source: Include\precompmt\precomp64.exe; destdir: {tmp}; flags: Dontcopy
#endif
[code]
var
il:integer;
procedure cancelbuttononclick(sender: Tobject);
begin
suspendproc;
if msgbox(setupmessage(msgexitsetupmessage), mbconfirmation, mb_yesno) = idyes then isdonecancel:=1;
#ifdef precompmt
if not iswin64 then begin
exec(expandconstant('{sys}\taskkill.exe'), ' /f /im precomp.exe', '', sw_hide, ewwaituntilterminated, i);
end else begin
exec(expandconstant('{sys}\taskkill.exe'), ' /f /im precomp64.exe', '', sw_hide, ewwaituntilterminated, i);
deltree(expandconstant('{app}\'), true, true, true);
end;
#endif
resumeproc;
end;
#ifdef precompmt
savestringtofile(expandconstant('{tmp}\cls-precompmt.ini'), '[cls]'+#13#10+'threads=75%'+#13#10+'brute=0'+#13#10+'te mp='+expandconstant('{app}'), true);
extracttemporaryfile('cls-precompmt.dll');
extracttemporaryfile('precomp.exe');
extracttemporaryfile('precomp64.exe');
#endif
if not isarcextract ( 0, 0, expandconstant('{src}\data-1.arc'), expandconstant('{app}\'), '', false, 'pass', expandconstant('{tmp}\arc.ini'), expandconstant('{app}'), notpcfonfly{pcfonfly}) then break;
|