inno setup - FileCopy and Xdelta doesn't work? -


i've been staring @ innosetup code few hours , can't wrap head around following:

-in "procedure curstepchanged" common.dat , common.fat won't copied {app} directory. why?

-i copied common.dat , common.fat {app} directory manually testing, xdelta3.exe won't execute in "procedure curstepchanged". parameters xdelta3.exe "-d -s old_file patch_file new_file". xdelta3.exe, common_patch.xdelta , commonfat_patch.xdelta copied right place ({app}). why?

what overlooking?

[setup] appcopyright=lostprophet appname=far cry 3 magyarítás appvername=far cry 3 magyarítás 1.0 restartifneededbyrun=false privilegesrequired=admin setupiconfile=f:\copy\copy\magyaritasok\progress\far cry 3\installer\fc3_ikon.ico wizardimagefile="f:\copy\copy\magyaritasok\progress\far cry 3\installer\installer.bmp" wizardsmallimagefile="f:\copy\copy\magyaritasok\progress\far cry 3\installer\fc3_ikon.bmp" defaultdirname={reg:hklm\software\wow6432node\ubisoft\far cry 3,installdir|{pf}\far cry 3} appenddefaultdirname=false outputdir=c:\users\lostprophet\desktop outputbasefilename=farcry3hun_1.0 compression=lzma/ultra64 internalcompresslevel=ultra64 languagedetectionmethod=none usepreviousgroup=false appenddefaultgroupname=false uninstalldisplayname=far cry 3 magyarítás appversion=1.0 uninstallfilesdir=interface apppublisherurl=http://lostprophet.ekapocs.com versioninfoversion=1.0 versioninfocompany=lostprophet versioninfocopyright=lostprophet versioninfoproductname=far cry 3 magyarítás licensefile=f:\copy\copy\magyaritasok\progress\far cry 3\installer\information.rtf infobeforefile=f:\copy\copy\magyaritasok\progress\far cry 3\installer\information2.rtf showlanguagedialog=auto  [languages] name: "hu"; messagesfile: "compiler:languages\hungarian.isl"   [files] source: "common_patch.xdelta"; destdir: {app}; source: "commonfat_patch.xdelta"; destdir: {app}; source: "xdelta3.exe"; destdir: {app}; source: "splash.png"; destdir: {tmp}; flags: ignoreversion dontcopy nocompression source: "isgsg.dll"; destdir: {tmp}; flags: ignoreversion dontcopy nocompression  [code] procedure showsplashscreen(p1:hwnd;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:cardinal;p10:integer); external 'showsplashscreen@files:isgsg.dll stdcall delayload';  procedure initializewizard(); begin   extracttemporaryfile('splash.png');   showsplashscreen(wizardform.handle,expandconstant('{tmp}\splash.png'),1000,3000,1000,0,255,true,$ffffff,10); end;  const   mysecretdir = '{app}';  procedure ondireditchange(sender: tobject); begin   if fileexists(addbackslash(wizarddirvalue) + 'data_win32/patch.dat')     wizardform.nextbutton.enabled := true   else     wizardform.nextbutton.enabled := false; end;  procedure curpagechanged(curpageid: integer); begin   if curpageid = wpselectdir   begin     msgbox('válaszd ki far cry 3 telepítési könyvtárát, ha telepítő önmagától nem találná meg!', mbinformation, mb_ok);     wizardform.diredit.onchange := @ondireditchange;     ondireditchange(nil);   end; end;  procedure curstepchanged(curstep: tsetupstep); var   resultcode: integer;   errorcode: integer; begin   if curstep = ssinstall   begin     filecopy(expandconstant('{app}\data_win32\common.dat'),expandconstant('{app}'),true);     filecopy(expandconstant('{app}\data_win32\common.fat'),expandconstant('{app}'),true);     exec(expandconstant('{app}\xdelta3.exe'), '-d -s common.dat common_patch.xdelta common2.dat', '',sw_shownormal, ewwaituntilterminated, resultcode);     exec(expandconstant('{app}\xdelta3.exe'), '-d -s common.fat commonfat_patch.xdelta common2.fat', '',sw_shownormal, ewwaituntilterminated, resultcode); end; end;  procedure curuninstallstepchanged(curuninstallstep: tuninstallstep); var   oldfile3: string;   oldfile4: string; begin   if curuninstallstep = uspostuninstall   begin     oldfile3 := expandconstant('{app}\data_win32\common_orig.dat');     oldfile4 := expandconstant('{app}\data_win32\common_orig.fat');     if fileexists(oldfile3) , fileexists(oldfile4)       begin       renamefile(oldfile3, expandconstant('{app}\data_win32\common.dat'));       renamefile(oldfile4, expandconstant('{app}\data_win32\common.fat'));   end; end; end; 


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -