GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

packaging gmapi/gmap folder for Mac

Started by glendeni, January 03, 2015, 09:40:54 AM

Previous topic - Next topic

glendeni

I'm now creating "universal" Garmin "gmapi" map files which can be used to install maps on both Windows and Mac machines.  My current plan is to offer both a "registry" installation version of my maps for Windows users and the "gmapi" files for Mac users or others who might have a problem with the "registry" installation.   I'm going to assume that any gmapi users will have enough knowledge to do basic computer operations such as a "copy" (and possibly "unzip"), so will not need an installation script - but don't know what would be the most "convenient" form for them to use.

I've tested gmapi use on a Windows PC but am unsure how they should be used (and hence packaged) for a Mac.  Since I don't have one and can't test that, I'm looking for some guidance here.

"gmapi" creation produces a gmapi directory with a gmap subdirectory which contains the map files actually used.  On a Windows machine, the "gmap" subdirectory is utilized, not the "gmapi" one, being placed under an OS-dependent folder such as C:\ProgramData\Garmin\Maps.

Based on the thread http://forums.gpsfiledepot.com/index.php?topic=2383 I believe that for a Mac I should provide the "gmapi" directory (not its "gmap" subdirectory) as either a .zip or .tgz file.  Can someone who uses a Mac enlighten me on this?

Jack

Boyd

MacOSX is actually BSD unix "under the hood". A .zip file will automatically be extracted to a folder when double-clicked on the Mac. Not entirely sure about .tgz, the last time I tried double-clicking it opened with a program called "stuffit". But that was several versions ago on MacOSX and I don't think this program is part of the standard install. To play it safe, I would use a .zip file. Sorry, I don't have any .tgz files handy to test on my current mac.

The key to making a .gmapi work however is fore the user to install Garmin Basecamp first. The Mac uses something called "packages" for software installation. They are really just folders (directories) that are specially flagged so that the user interface displays them as files. Extensions are associated with the programs that can open them, just like on Windows. And if a folder has the .gmapi extension and the user has already installed Basecamp, then it will appear as a package that is handled by MapManager, a component of Basecamp. If Basecamp isn't installed, then a .gmapi will appear as a folder, just like it does on Windows.

So MapManager actually becomes the "installer" and prompts the user for what to do. Therefore no Windows style installer is really needed.

glendeni

So if I supply a gmapi folder as a .zip file, then would the following instructions work:

"click on the downloaded "Univeral Garmin File", a .zip format file, to extract the gmapi folder it contains, then click on that to run the MapManager (which should automatically appear if BaseCamp is installed)"

Jack

Boyd

That's basically it, but I would start by saying to install Basecamp before double-clicking on your .zip file. And don't call the .gmapi a "folder", because it will appear to be a "file" if Basecamp already exists on the user's Mac.

glendeni

Thanks.  I gather that in _both_ cases "click" should be "double-click".

Jack

glendeni

PS: does MapManager require any input or instructions - or are things completely automatic at that point?

glendeni

Just realized I'd forgotten one important thing I don't understand, which might be a difference between Windows and a Mac. 

On a Windows PC if I supply a zipped gmapi directory, then double clicking exposes the gmapi directory inside and I must further extract the gmap directory it contains.  IE on Windows one really needs the gmap directory, not the gmapi one.  So if I was supplying a file only for Windows, I'd want to zip the gmap directory not the gmapi one to make things easiest

But if I understand correctly, the Mac needs the gmapi one, so for it I must zip the gmapi one, not the gmap directory.

Jack

glendeni

#7
Yet again - I now get the feeling that for a Mac I should be zipping the "gmap" directory but then _naming_ it with a "gmapi"  as a tail on the filename ala "BigSurTrailmap.gmapi" where that is a zip file of the gmap directory.

I am getting myself confused!  (Partly because in the python-script I run to create the gmap files, those are created in a BigSurTrailmap.gmap directory which is below a BigSurTrailmap.gmapi directory - so using that last name as a zip file name would require some fancy footwork to avoid a name conflict.) 

I am used to a zip file always having a .zip tail in the filename but this would be a case where that is not so (but now that I think of it, a GoogleEarth kmz file is really just a zip file - so that would be another example.)

Jack

Boyd

Quote from: glendeni on January 03, 2015, 12:56:42 PMI am getting myself confused!

Me too! I use Macs for everything BUT mapping. And frankly, I just don't like Basecamp. So I'm a little rusty on this and don't even have the software installed on my Mac anymore. But I believe you want the .gmapi file for the Mac, because double-clicking that will launch MapManager. And once MapManager starts, it's pretty much self-explanatory. If the .gmap folder is named "myMap" then MapManager puts up a message to the effect "do you want to install myMap".

The .gmap directory will also work on the Mac, but you would have to manually copy it to the correct directory on the Mac. And I believe that has gotten more difficult on newer versions of MacOSX because they are hiding the user library.

You totally lost me with the part about .zip files. There is no reason to use it at all as far as MacOSX is concerned. It's just a way to package a download. And IIRC, the way Oz has set things up here, the only way to upload a Mac file at GPSFileDepot is in the form of a .tgz file or a .zip file for a "universal" version. If you read that long thread about universal installers, the .zip file was my idea because it allowed us to upload one file that contained BOTH a windows .exe installer AND a Mac .gmapi.

Honestly, this was all confusing stuff that I would need to wrap my brain around again in order to be any more helpful. And, sorry, that's just not something I'm willing to do here and now. I'm working on a couple new maps and will need to revisit the whole installer thing when they are finished, but that will probably be a couple months from now.

glendeni

OK, thanks for the info.  I was going to try installing Garmin MapConverter on my PC so I could look at the structure of the file it was creating - but that fails to install for me!  Think I will just have to make my best guess of what the structure of the gmapi file should be and let my users let me know if that works or not.

Jack

popej

#10
Mac (or actually MapManager) should support gmap folder directly, just like gmapi. See example on this video (about 0:50):
https://www.youtube.com/watch?v=4n-sACErYL4

Gmapi can contain gmap directory and unlock codes. I think it is designed to transfer maps from PC to Mac. For publishing gmap alone should be ok.

Edit: MapConverter should work under wine. Instead of installing, unpack installer and extract exe. MapConverter expects maps to be installed in registry, like for Mapsource.

glendeni

Thanks for that enlightenment.  One problem I think I have is that as a Linux person I think of the file "name" as including a "zip" tail ala  myfile.zip whereas sometimes Windows omits that  tail in reporting a filename - and I don't know how a Mac reports such filenames.

After looking at some "gmapi" files I found online, they appear to be zip files created from a gmapi directory which has a gmap subdirectory. - a file I would give a filename  like "MyMap.gmapi.zip"   So "unzipping" file "MyMap.gmapi.zip" produces a "MyMap.gmapi" directory with a "MyMap.gmap" subdirectory.

But from what you say, I should be able to create a "MyMap.gmap.zip" file which will unzip to create a "MyMap.gmap" directory with subfiles.  I will try that until my Mac users report that does not work for them.  I have no difficulty creating instructions which will work for such a file on a Windows machine but won't be able to test the instructions I supply for a Mac user.

Jack

Boyd

That is interesting popej. Wasn't aware that you could use .gmap with MapManager.

Quote from: glendeni on January 03, 2015, 02:36:08 PMOne problem I think I have is that as a Linux person I think of the file "name" as including a "zip" tail ala  myfile.zip whereas sometimes Windows omits that  tail in reporting a filename - and I don't know how a Mac reports such filenames.

I have always heard the term "extension" used for the component of a filename that follows the dot. I assume that's what you mean by "tail". :)

The Mac is pretty similar to Windows in this regard. There are user preferences that determine whether the extension is shown. On the Mac there is an item "show all filename extensions" in the Finder Preferences that must be checked. I always do this on my machines, but think the default is not to show extensions. On Windows, there is an option "hide extensions for known file types" in the Folder Options Control Panel. I believe it is checked by default.

glendeni

That triggers a memory, that I have set up my Windows display to show the "extension" - but since I do see the full filename I tend to forget that other Windows users will only see a partial name. 

glendeni

I found a link where a "gmap" file (folder) is input to Garmin MapManager on a Mac - so apparently that software knows how to utilize both gmapi and gmap folders.
  http://www.openfietsmap.nl/installation

For giggles, I decided to see what would happen if I placed a "gmapi" folder on the Garmin/Maps directory on my Windows PC.  It was not recognized by MapSource - so the "gmap" folder must be placed there.

Jack