|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Strange happenings between 2 installers
I have made a simple installer to get the file size (FileSizeNew) of say blah.bsp on my hard drive, then write the value to an ini file which I can store on the web.
A typical value is 5036424. Now, my main installer downloads the ini file from the web, then gets the file size of that same file (blah.bsp) on the users' hard drive (in this case, the exact same blah.bsp on my hard drive). However, the value is always 5036425 and not 5036424. It seems to add 1 on even though it is exactly the same file that my installer is getting the file size from. Right now I am taking 1 from the file size to get it to work, but this shouldn't be happening at all. This is not just happening to the one bsp file, but for all the files. Could it be because of different installer styles (the installer to first get the file sizes is only a basic one with just an instfiles page) -Stu
|
|
|
|
|
|
#2 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Isn't it a webserver related issue (UNIX/DOS newlines etc.)?
|
|
|
|
|
|
#3 |
|
Major Dude
Join Date: May 2003
Posts: 681
|
not a solution - but i understood it this way:
prog gets size from file > ini ini uploaded to web prog gets ini from web > size = size+1 So ini has changed? Greets, Brummelchen |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
No, the value written to my ini file on my hard drive is always 1 less even before upload.
-Stu |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: May 2003
Posts: 681
|
So
>> prog gets size from file > ini (1st step) writes the wrong size? routines are same? 2 different progs? Greets, Brummelchen |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That is correct.
Same path, two different progs. Either the 1st prog is getting it wrong, or the main prog is. -Stu |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: May 2003
Posts: 681
|
is it possible to get your code or codesnippets?
Greets, Brummelchen |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
To write the file sizes to my ini (txt) file:
code: Then in my main installer, I read the values again from the downloaded du_objects.txt and compare: code: du_objects.txt is here: http://myweb.tiscali.co.uk/imker/dda...du_objects.txt newmaps.lst is attached as newmaps.txt -Stu |
|
|
|
|
|
#9 |
|
Major Dude
Join Date: May 2003
Posts: 681
|
code: Somewhere between these lines... "TrimNewLines" ? i often control vars with a messagebox eg. MessageBox MB_ICONINFORMATION|MB_OK "'$R0', '$0'" So i can see quickly whats going wrong and where - i had such a situation here. hmm - a bug in "FileRead $R0 $0" ? Greets, Brummelchen |
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Try calling FileSizeNew without any other things on the script with those two computers you were testing on. Though I can't see a reason it might fail, you should try and make sure that's not the reason.
Also make sure the files are really the same size on both computers... Who knows, you might have some program/virus that tacks another byte on the end. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 | |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Quote:
The computers are the same - I am testing on one. -Stu |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|