burn_mame
22nd September 2003 14:38 UTC
copy fails on 2nd section
Hello all,
Ok I have a cool installer at this point but it does not
work correctly...yet.
I have acouple of sections
each section copies files from 1 source to another
I use copyfile, I also use setoutpath.
Each section does work when tested by themselfs.
When I try to install more then 1 section at a time the
1st section run works fine, but when the next section
attempts to copyfiles it fails.
Starting to drive me crazy.
Ryland
Joost Verburg
22nd September 2003 14:46 UTC
Can you give more details and attach a script?
burn_mame
22nd September 2003 14:54 UTC
Each section works when I run the installer and only select
1 section at a time. When I select 2 sections to install the 1st section works and the section section the copyfile seems to always fail.
Section "Area51"
CreateDirectory "$INSTDIR\roms\area51"
CreateDirectory "$INSTDIR\TEMP"
CopyFiles "needed\*.*" "$INSTDIR\TEMP" 0
CopyFiles "CHDs\area51\*.*" "$INSTDIR\TEMP" 534000
SetOutPath $INSTDIR\TEMP
ExecWait '"$INSTDIR\TEMP\RAR32.exe" e area51.rar'
Rename $INSTDIR\TEMP\area51.chd $INSTDIR\roms\area51\area51.chd
RMDir /r $INSTDIR\TEMP
SectionEnd
Section "Area51mx"
CreateDirectory "$INSTDIR\roms\area51mx"
CreateDirectory "$INSTDIR\TEMP"
CopyFiles "needed\*.*" "$INSTDIR\TEMP" 0
CopyFiles "CHDs\area51mx\*.*" "$INSTDIR\TEMP" 1660000
SetOutPath $INSTDIR\TEMP
ExecWait '"$INSTDIR\TEMP\RAR32.exe" e area51mx.rar'
Rename $INSTDIR\TEMP\area51mx.chd $INSTDIR\roms\area51mx\area51mx.chd
RMDir /r $INSTDIR\TEMP
SectionEnd
Thanks
Ryland
kichik
22nd September 2003 14:57 UTC
Rename doesn't work if the destination file/directory exists. Delete it first.
burn_mame
22nd September 2003 15:53 UTC
thanks, but problem is that copyfile fails.
Ryland
kichik
22nd September 2003 15:58 UTC
Is CHDs\area51mx in $INSTDIR\Temp? If it isn't then that's your problem. You should specify a full path. Once you call SetOutPath the working directory and if that directory is not in the working directory then Windows can't find it and copy it.
burn_mame
22nd September 2003 16:44 UTC
Thanks...All working now....
added $ENEDIR in front of CHDs\area51mx
Ryland
burn_mame
22nd September 2003 17:23 UTC
opps spelling sucks.... added $EXEDIR
Ryland