Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 22nd September 2003, 13:38   #1
burn_mame
Junior Member
 
Join Date: Sep 2003
Location: Michigan
Posts: 14
Send a message via Yahoo to burn_mame
Unhappy 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
burn_mame is offline   Reply With Quote
Old 22nd September 2003, 13:46   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Can you give more details and attach a script?
Joost Verburg is offline   Reply With Quote
Old 22nd September 2003, 13:54   #3
burn_mame
Junior Member
 
Join Date: Sep 2003
Location: Michigan
Posts: 14
Send a message via Yahoo to burn_mame
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
burn_mame is offline   Reply With Quote
Old 22nd September 2003, 13:57   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Rename doesn't work if the destination file/directory exists. Delete it first.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd September 2003, 14:53   #5
burn_mame
Junior Member
 
Join Date: Sep 2003
Location: Michigan
Posts: 14
Send a message via Yahoo to burn_mame
thanks, but problem is that copyfile fails.
Ryland
burn_mame is offline   Reply With Quote
Old 22nd September 2003, 14:58   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd September 2003, 15:44   #7
burn_mame
Junior Member
 
Join Date: Sep 2003
Location: Michigan
Posts: 14
Send a message via Yahoo to burn_mame
Thanks...All working now....
added $ENEDIR in front of CHDs\area51mx

Ryland
burn_mame is offline   Reply With Quote
Old 22nd September 2003, 16:23   #8
burn_mame
Junior Member
 
Join Date: Sep 2003
Location: Michigan
Posts: 14
Send a message via Yahoo to burn_mame
opps spelling sucks.... added $EXEDIR
Ryland
burn_mame is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump