MarcelP1977
9th April 2010 12:23 UTC
Troubles with CopyFiles
Hi,
i want to copy a picture.
This is what i have:
$3 = logo.bmp
Then i want to rename the file to logo.png:
StrCpy $4 $3 -3
; now is $4 = "logo."
StrCpy $5 "$4png"
; $5 = "logo.png"
CopyFiles $5 $INSTDIR\logo\background.png
But now, logo.png is not copied to this folder. :(
What i am doing wrong?
Sorry, but this is all new stuff for me. :)
Thanks for any help.
Afrow UK
9th April 2010 13:44 UTC
Are you specifying a full path to copy from? Does the source file exist?
Stu
MarcelP1977
9th April 2010 14:14 UTC
Thanks for your help.
yes, the source file exists. if i use this:
CopyFiles $3 $INSTDIR\logo\background.png
Then it works (but with the file logo.bmp). But i want to copy the file logo.png (from same location).
MarcelP1977
9th April 2010 14:27 UTC
ok, i have tried to use the full path to source file and now it works! Thanks for this tip! :)
pengyou
9th April 2010 14:50 UTC
It is not really a tip - the CopyFiles description in the User Manual says "Fully-qualified path names should always be used with this instruction. Using relative paths will have unpredictable results."
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.2
MarcelP1977
9th April 2010 20:20 UTC
Hmm.. maybe i have not all correct.
On my Desktop PC it works and all files copied ok, but on other computer it is not working.
The file "background.png" is not copied on other pc.
What have i wrong here?
http://pastebin.com/78nHDtkZ
MarcelP1977
9th April 2010 20:28 UTC
ok, have found my mistake:
Copies files from the source to the destination on the installing system.
How can i implement all these file (logos) in installer? I do not want to install all logos on destination pc.
Is this possible?
Animaether
9th April 2010 22:34 UTC
Originally posted by MarcelP1977
How can i implement all these file (logos) in installer? I do not want to install all logos on destination pc.
Is this possible?
They have to come from somewhere - just extract them to $PluginsDir first - that folder and the files therein will be deleted once the installer exits.
MarcelP1977
9th April 2010 23:19 UTC
How can i extract them to $PluginsDir?
I think the files are not in the installer?!
First i have to put the files in installer, but how?
MSG
10th April 2010 08:16 UTC
That's what the Basic Instructions chapter of the manual will tell you. Please study it.
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1