Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


Author Topic: Installer script... again  (Read 61423 times)

jbensman

  • Expert Advisor
  • *****
  • Posts: 422
  • Karma: 7
    • View Profile
Re: Installer script... again
« Reply #45 on: November 22, 2011, 11:24:03 AM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #46 on: November 22, 2011, 12:45:05 PM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #47 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

Code: [Select]
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.
« Last Edit: December 15, 2011, 02:07:47 PM by Indrid Cold »

Seldom

  • Expert Advisor
  • *****
  • Posts: 1852
  • Karma: 19
    • View Profile
Re: Installer script... again
« Reply #48 on: November 22, 2011, 04:40:17 PM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #49 on: November 22, 2011, 07:41:31 PM »
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
Code: [Select]
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.
« Last Edit: December 15, 2011, 02:08:15 PM by Indrid Cold »

Seldom

  • Expert Advisor
  • *****
  • Posts: 1852
  • Karma: 19
    • View Profile
Re: Installer script... again
« Reply #50 on: November 22, 2011, 11:22:30 PM »
Doesn't sound like a problem then, since my map projects all live someplace else.

rws

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Installer script... again
« Reply #51 on: December 02, 2011, 11:10:00 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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #52 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

Quote
external
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-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #53 on: December 03, 2011, 02:51:33 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-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #54 on: December 03, 2011, 02:53:07 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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #55 on: December 03, 2011, 03:52:12 PM »
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.
« Last Edit: December 03, 2011, 03:54:12 PM by Boyd »

Boyd

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #56 on: December 03, 2011, 03:55:41 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-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #57 on: December 04, 2011, 01:56:55 PM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #58 on: December 04, 2011, 03:17:47 PM »
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-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #59 on: December 04, 2011, 03:22:37 PM »
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.
« Last Edit: December 04, 2011, 03:28:39 PM by -Oz- »
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!