NSIS Problems with 2G limit

Hello, while I'm trying to build an mapsource installer with the --nsis option and makensis for the garmin all in one for europe I get the following error after a while with makensis: Internal compiler error #12345: error mmapping file (2141990789, 4569600) is out of range. Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x). ------------------- I will attach the whole ouput from makensis, but I think the problem is, that europe is too big now. The imgs together have a size of 2,1G. Is 2G a fix limit of this nsis stuff or is it a bug somewhere? (Yeah, I know - the bug is windows...) :) Thanks Christoph

On Wed, Apr 07, 2010 at 09:29:49PM +0200, Christoph Wagner wrote:
Internal compiler error #12345: error mmapping file (2141990789, 4569600) is out of range.
I don't know Windows that well, but here are my 2 cents anyway. The "memory map" operation makes a file appear in the address space of a process. It is called mmap on POSIX (Unix-like) systems but something else on Windows. On a 32-bit system, a process typically has 2 GB (or more with tricks) address space available for data. It is not possible to mmap large files at once. Instead, the file should be mmap'ed a portion at a time, or conventional file access (explicit calls to copy blocks between memory and file) should be used. If you have a 64-bit system and kernel, have you tried a 64-bit executable? Marko

Hi Christoph, you'll find the answer here: http://nsis.sourceforge.net/I_get_an_error_when_compiling_large_installers There seems to be a limit in the archive format of the installer so that the compressed data may not be larger than 2 GB. The recommendation is to use a multi-volume install instead - that is to split the data into several files. Using plug-ins the installer can read those additional files and install them together with its regular payload. As this is quite often discussed there seems to be no other workaround. Regards Thilo

Ok, but I have no idea how to change the osmmap.nsi created by the --nsis option of mkgmap, so that it did not include the .img's in the installer exe directly. Wouldn't it be usefull to have a small .exe installer in the same directory of the img files that just installs them for windows users? I am not a windows hacker and have no knowledge about the nsis system. Maybe we could add some params to the --nsis option of mkgmap like: --nsis=nodata or something to avoid including the files in the exe directly. After a mkgmap run with --nsis=nodata option a directory could contain for example the following: 63240001.img 63240002.img 63240003.img ... basemap.TYP osmmap.img osmmap_license.txt osmmap_mdr.img osmmap.mdx osmmap.nsi osmmap.tdb After makensis osmmap.nsi there should be a small .exe file not including the imgs, but install them from this directory by double clicking. What do you think?

Am 08.04.2010 um 12:48 schrieb Christoph Wagner:
I am not a windows hacker and have no knowledge about the nsis system. Maybe we could add some params to the --nsis option of mkgmap like:
--nsis=nodata
or something to avoid including the files in the exe directly.
In principle you could do that. But you don't need that option, because if the installation data is not included in the installer you could build it once and change only the data. The user has to download several files though and you will need some error checking to see that all needed files are present and that they are from the same map (especially for updates). IMHO the nice thing about NSIS is that the users needs only one file for download. Another approach would be to split your map of Europe into several parts, say northern Europe and southern Europe. If you run the splitter on the whole of Europe and select the tiles that go into each part for mkgmap, the parts should fit perfectly and routing should work as well. This will also reduce the download volume for users that are interested only in some part of Europe. Regards Thilo

On 08.04.2010 12:48, Christoph Wagner wrote:
Ok, but I have no idea how to change the osmmap.nsi created by the --nsis option of mkgmap, so that it did not include the .img's in the installer exe directly.
Wouldn't it be usefull to have a small .exe installer in the same directory of the img files that just installs them for windows users?
That's exactly what my version of the installer does: It takes the gmapsupp.img in the same directory as itself, unpacks all the *.img files and installs the map. The NSIS config can be found here: http://www.kleineisel.de/blogs/media/blogs/osmmap/1003/OSM_SRTM_Germany.nsi
participants (4)
-
Christoph Wagner
-
Marko Mäkelä
-
Ralf Kleineisel
-
Thilo Hannemann