View Single Post
  #5  
Old 27-02-2017, 06:21
Simorq's Avatar
Simorq Simorq is offline
Registered User
 
Join Date: Mar 2014
Location: Iran
Posts: 642
Thanks: 3,602
Thanked 1,308 Times in 464 Posts
Simorq is on a distinguished road
Quote:
Originally Posted by vint56 View Post
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;
ciu
Reply With Quote