Old 30th April 2018, 20:58   #1
Itms
Junior Member
 
Join Date: Apr 2018
Posts: 3
Hitting the 2GB file limit when creating an installer

Hello,
We have been using NSIS for packaging our software for Windows, but we are having trouble for packaging our latest version. We are hitting the "Internal compiler error #12345" because a file that we package has grown past the size of 2GB. This file is big because it is not compressed at all: we use the lzma compression in NSIS, so the final installer is around 600MB.

As a workaround, we tried compressing the file first, and then running NSIS, but the result is less good because two successive compressions is suboptimal (the final installer ends up around 900MB). So we'd really like to work around the limitation on single input files.

I successfully built NSIS and managed to pass the large-address-aware flag to the linker, but that doesn't solve the issue. I read that other thread, but the hack detailed by arwa is not supposed to work with large input files like we have.
As far as I can see,
code:
MMapFile::resize
is not called when the large file is about to be parsed, which explains why the mmap is not large enough, but I don't know why the resize doesn't happen exactly.

Would you have any input about how to fix the issue? I am competent in C++ even though I'm just discovering the NSIS codebase, so I should be able to hack together the ideas you might have.
Thank you very much for your help
Itms is offline   Reply With Quote
Old 30th April 2018, 21:18   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,913
There is https://sourceforge.net/projects/nsisbi/ and https://github.com/ywjheart/Nsis64 that might be helpful

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th April 2018, 21:26   #3
Itms
Junior Member
 
Join Date: Apr 2018
Posts: 3
Thank you for the quick reply, I saw that project but it states that "Single files are still limited to 2GB". I should maybe give it a try regardless.
Itms is offline   Reply With Quote
Old 30th April 2018, 22:08   #4
Itms
Junior Member
 
Join Date: Apr 2018
Posts: 3
Thumbs up

nsisbi worked!

Since it compressed files before adding them to the mmap, the 2GB limit was not reached. I would like to reach jasonfriday13 so that the README of nsisbi states more clearly what are the limits of that project. I wouldn't have bothered you here if the README wasn't so gloomy

Thanks again for the answer and for the great software!
Itms is offline   Reply With Quote
Old 30th April 2018, 22:55   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,913
jasonfriday13 can probably be contacted with a private message on this forum.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd May 2018, 11:09   #6
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 867
Yeah, I pop in every so often .

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 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