GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

Installer script... again

Started by Boyd, October 06, 2011, 02:08:36 PM

Previous topic - Next topic

jbensman

Since I need to keep my img version, is there any need to actually install the .gmap version on my computer?  Or could I just create the installer without actually installing it on my computer?

Does anyone know if anyone is working on something that would compile a mp to the .gmap  format?  That would make things much easier.

Boyd

I don't see any need to install the .gmap version on your own machine, but it's probably a good idea to test it somehow before uploading. The installer script is just like the old ones - tweak as needed in a text editor and compile it with NSIS.

It would be nice to go directly from .mp to gmap, but I don't think it's possible. I don't follow developments in the OSM project... is this something they are looking at maybe?

Boyd

#47
I think I'm going to need Oz's NSIS expertise to figure this out.... In the current script, the following line puts the .gmapi files into the output path

File /r "${DIRECTORY}${MAP_SHORT_NAME}.gmapi\${MAP_SHORT_NAME}.gmap\*.*"

I think this needs to be replaced with the CopyFiles command (see http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3) But there doesn't seem to be a recursive option ( /r ) for CopyFiles. I still don't have a very good grasp of NSIS scripts unfortunately.

It will be necessary to keep the .exe file separate from the .gmapi file (actually a folder on windows) in order to make the universal installer.

Seldom

Why should I have to remove the IMG files from my PC rather than simply have them in a separate folder from the MAC files? 

What I do now is use MapsetToolkit to do installs of works in progress.  (That keeps my address search working better.)  I then make up an installer, run it to test it, uninstall it, and re-install my working copy. 

Would that have to change?

Boyd

#49
When you run Mapconverter, it makes a .gmap version of the original .img based map which retains the same FID. This will be invisible to Mapsource and Basecamp unless the .gmap folder is moved to C:\ProgramData\GARMIN\Maps. With the .gmap format, that is all you need to do to "install" a map and that's what the NSIS installer does.

So unless you run the installer on your machine, or move the files to that location, there would be no conflict.

Seldom

Doesn't sound like a problem then, since my map projects all live someplace else.

rws

Quote from: BobT on October 08, 2011, 07:48:30 AM
Just curious but is NSIS better than Inno Setup.  I use Inno Setup and to my knowledge no one has had installation issues. 

Bob

Here's a simple Inno Setup script I made to install gmap type maps into XP, Vista and Win 7.  Also creates an uninstall entry in Start>All Programs and in Control Panel>Programs & Features

Boyd

Cool - will have to look more closely at this. I had already downloaded inno and started playing with it because it seems a little easier to understand. The "external" file flag looks like just what we need to make a universal installer, such that Mac users just double-click the .gmapi file while Windows users run the .exe file

Quoteexternal
This flag instructs Inno Setup not to statically compile the file specified by the Source parameter into the installation files, but instead copy from an existing file on the distribution media or the user's system.

From what I can tell, it's not so straightforward to do this with NSIS. But Oz needs to create a separate category for "universal version (Mac+ Windows) before we can take advantage of such an installer.

-Oz-

Quote from: Boyd on November 22, 2011, 03:23:19 PM
I think I'm going to need Oz's NSIS expertise to figure this out.... In the current script, the following line puts the .gmapi files into the output path

File /r "${DIRECTORY}${MAP_SHORT_NAME}.gmapi\${MAP_SHORT_NAME}.gmap\*.*"

I think this needs to be replaced with the CopyFiles command (see http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3) But there doesn't seem to be a recursive option ( /r ) for CopyFiles. I still don't have a very good grasp of NSIS scripts unfortunately.

It will be necessary to keep the .exe file separate from the .gmapi file (actually a folder on windows) in order to make the universal installer.
Why do we need to copy files? I don't think I get it.  Macs can't even open .exe so that is what I can't understand.  How would a mac know to just do whatever it does with a .gmapi whereas the Windows computer just run the .exe which contains a .gmap folder.

I can easily create a universal installer table entry.

Sorry I lost track of this thread.

I actually looked at InnoSetup when I was working on the new NSIS script.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

Quote from: Boyd on December 02, 2011, 12:10:28 PM
Cool - will have to look more closely at this. I had already downloaded inno and started playing with it because it seems a little easier to understand. The "external" file flag looks like just what we need to make a universal installer, such that Mac users just double-click the .gmapi file while Windows users run the .exe file

Here is what I can't wrap my head around.  This means that there is still a .gmapi file and .exe file.  How is that different than current?
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

Boyd

#55
On Windows, the .gmapi appears as a folder.

On the Mac, the .gmapi appears as a file and not a folder. If you double-click the .gmapi on the Mac, it launches Garmin Mapmanager and asks if you want to install the map. So on the Mac, the "installer" is already resident on the system and is associated with .gmapi files.

So, my thought is to have a .zip archive containing two things:

1. The .gmapi
2. The NSIS .exe file

To install on Windows, double-click the NSIS .exe file, which reads its data from the .gmapi
To install on the Mac, double-click the .gmapi file, which is self-installing

Only one copy of the map data is needed to install on both operating system.

Boyd

Quote from: -Oz- on December 03, 2011, 02:53:07 PM
Here is what I can't wrap my head around.  This means that there is still a .gmapi file and .exe file.  How is that different than current?

It is confusing, sorry! The difference is that the current installer encapsulates the .gmapi *inside* the .exe file. It needs to be a separate file so it can be installed on the Mac.

-Oz-

I think I understand now.  That would be awesome because it would really cut down the amount of space the server needs by half (and make it so we don't have to upload two copies).  So has anyone figured out how to do it?  Now that I get it I may start playing around with NSIS but it is really a pain-in-the-butt "language"
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

Boyd

I downloaded the Inno Setup script that rws posted above (thanks!) and am going through it now just to be sure I understand it. Should be an easy modification  - add Flags: external to the source command so it will read the .gmapi from a separate file.

Inno seems a little easier for me to understand than NSIS, and the script the rws wrote chooses the correct install location for XP and Win7 by using the %APPDATA environment variable.

See http://www.jrsoftware.org/isinfo.php

-Oz-

#59
I just updated the tutorial (finally) with the "old method" installer script that at least handles the 64 bit errors.  I won't post the new .gmap version until we figure out if we can do this universal installer method.

And wow that innoscript is much much shorter than NSIS.

Side note: I got a PM from a member asking how to move the maps out of ProgramData since his C: drive is small.  I think that problem could be a lot more common, especially with the advent of SSDs.  my only suggestion was to symlink the directory.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!