|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
CopyFiles - rights to copy to C:\Program Files\myprogram\?
Hi list,
in my nsis-script [1] there is some option to download some extra file from a server. this extra files is stored the user's windows temp folder [2], unzipped and untared. this works fine. then some of these unzipped and untared files should be copied [3] from [2] to a subfolder in the installation folder of my program [4]. but this copying fails; no error in the log windows of the installer, the installer finishes without any error. any idea/hints why these files aren't copied? the installer itself is installed with admin rights; maybe the subprocess of copying isn't allowed to copy to C:\Program Files\myprogram\subfolder? the installer can be tested by [5] best Helmut [1] http://trac.osgeo.org/grass/browser/...aller.nsi.tmpl [2] C:\Users\userxy\AppData\Local\Temp\install_msruntime [3] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L943 [4] C:\Program Files\myprogram\subfolder [5] http://wingrass.fsv.cvut*****grass71...1076-Setup.exe |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
I don't see anyplace that creates your 'extrabin' folder. The CopyFiles command won't create it, it must already exist.
Easiest way would be to put a CreateDirectory command right before the CopyFiles command, as the short example in the manual shows. code: |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
Quote:
in the project there are many files organized in different subfolders (e.g. bin, lib and extrabin) [1] and included in the installer [2]. so 'extrabin', 'bin', 'lib' etc subfolders are there when the many files are installed to c:\Program Files\myprogram. it could be that the 'extrabin' subfolder isn't ready/created when the extra files are copied by CopyFiles? will have a look regarding this. best Helmut [1] http://trac.osgeo.org/grass/browser/...r.bat.tmpl#L45 [2] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L527 |
|
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
Quote:
[a] folder c:\Program Files\myprogram\extrabin created as one of the first actions taken by the nsis-installer code: files are not copied to c:\Program Files\myprogram\extrabin [b] folder c:\Program Files\myprogram\extrabin created as one of the first actions taken by the nsis-installer code: and explicitly copying files to c:\Program Files\myprogram\extrabin by commands code: no files are copied. any ideas/hints? best Helmut |
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Have you checked your source path is correct?
Stu |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
yes, the source path is correct.
I think I've narrowed down the issue a little bit more: in the nsis-script [1] there's the section [2] with the optional download of these gzipped and tared files which, after unzpping and untaring, should be copied to C:\Program Files\myprogram\subfolder. this section calls [3] the function [4] which download [5] and unzip/untar [6] the archive and then copies some files [7]. now for more testing, I've added some copying commands as the first action of the nsis-installer: code: and all of these test files are copied. as summary, CopyFiles doesn't seem to work, if the command is nested in a function called in a section; but CopyFiles works, if it is in the main nsis script and not nested in function. intended behaviour? bug? ... should this be reported anywhere? best Helmut [1] http://trac.osgeo.org/grass/browser/...aller.nsi.tmpl [2] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L966 [3] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L979 [4] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L900 [5] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L929 [6] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L935 [7] http://trac.osgeo.org/grass/browser/....nsi.tmpl#L943 |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Can write a script to reproduce? Which NSIS version are you using? Have you tried to see what happens using Process Monitor? CopyFiles just calls a standard Windows API so it is unlikely this is an actual bug.
Stu |
|
|
|
|
|
#8 | |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
Quote:
I'll try to write a small script. |
|
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Mar 2010
Posts: 14
|
Quote:
I've written some simple nsis script (attached) where I copied the section and function from my originally script. downloading, extracting and copying to to C:\Program Files\myprogram\subfolder works here. at the moment no idea what happens in my original script ... maybe there is something with the path variable other something other thanks best Helmut |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|