Old 9th April 2008, 04:59   #1
averagedev
Junior Member
 
Join Date: Apr 2008
Posts: 1
Question NSIS outputs 0 byte file

Hey, I have an NSIS project that is giving me a heap of trouble and I wondered if anyone here can point me in the right direction.

The .nsi file outputs about 20 files to the install directory. One of them is a .config file "executablename.exe.config" (used in .NET projects).

For some reason, NSIS outputs this file - but there's nothing in it.

Command line:
"C:\Program Files\NSIS\makensis.exe" /NOTIFYHWND 1705462 "C:\abcExecutable\abcExecutable\abcExecutableSetup.nsi"

Here is the code from the section in question:
Section "MainSection" SEC03
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "bin\abcexecutable.exe"
File "Blank.config"

And here is the output:
Section: "MainSection" ->(SEC03)
SetOutPath: "$INSTDIR"
SetOverwrite: ifnewer
File: "abcExecutable.exe" [compress] 500732/1257472 bytes
File: "Blank.config" [compress] 1250/6670 bytes

But when I break right after that line (by using a message box), the install directory contains a file named "Blank.config" which is empty and has a size of 0 bytes.

Any ideas? I can post the rest of the script if needed, but I don't think it will be very helpful. This problem started up about a month ago for no apparent reason. I solved it once by changing the extension of the Blank.config file to Blank.xml (go figure...); but after that it had the same problem.
averagedev is offline   Reply With Quote
Old 10th April 2008, 03:15   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
There is probably already a newer file there which isn't overwritten due to your SetOverwrite call.

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 1st June 2008, 13:12   #3
youngbucks
Junior Member
 
Join Date: May 2008
Posts: 20
So is there any way to fix this permanently? Im having a problem like this.
youngbucks is offline   Reply With Quote
Old 7th June 2008, 10:04   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, use SetOverwrite on.

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 3rd September 2009, 07:55   #5
healy76
Junior Member
 
Join Date: Jun 2008
Posts: 23
Hi

is there a other solution for this problem by now?

We use our setup to install new and to repair a already existing program. The setup contains many files (more than 60000 small html files). When i overwrite allways every file, the setup takes always a long time.
healy76 is offline   Reply With Quote
Old 5th September 2009, 00:24   #6
Pidgeot
Senior Member
 
Pidgeot's Avatar
 
Join Date: Jan 2002
Location: Denmark
Posts: 136
You might be able to use SetOverwrite isdiff (which was actually added before 2.0 was out of beta). This will overwrite files if their dates are not identical to the dates of the files in the installer, regardless of whether they are older or newer.
Pidgeot is offline   Reply With Quote
Old 7th September 2009, 07:16   #7
healy76
Junior Member
 
Join Date: Jun 2008
Posts: 23
Thank you very much.
healy76 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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