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

-Oz-

Question: Will these installers uninstall the other versions of the same map? Including the old .reg and any new versions that may need to be uninstalled to install a new one?

If not I can't see how it is ready for public consumption.
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-

I've gotten so far as the backend for the universal installer.  It is currently limited to: Indrid Cold, Boyd, jbensen, seldom, and rws.  Once it is tested out I can open it up (and the tutorial is written).  The frontend that actually lets people click the link is in progress.
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!

Indrid Cold

Quote from: -Oz- on December 09, 2011, 05:15:10 PM
If not I can't see how it is ready for public consumption.
A downside I see is what are windows users going to do with the .gmapi file once it's displayed as a folder as opposed to embedded within an .exe? Read the readme.txt file, who does that?

Boyd

I was going to make a custom Mac icon for the gmapi that says "Mac Install". But I'm not sure if the same icon would be visible on a PC. Will be ready to test all this soon, just fixing up a few last minute things on my map. I think the .exe file should be named "Windows Installer". Hopefully that would give people the idea to double-click it. But you're right, some people will just charge off in whatever direction they feel like...

The Inno script doesn't check for previous versions but Oz's script does. However it isn't "universal" because Mac users cannot access the .gmapi inside the .exe file.

-Oz-

Quote from: Indrid Cold on December 09, 2011, 05:59:10 PM
Quote from: -Oz- on December 09, 2011, 05:15:10 PM
If not I can't see how it is ready for public consumption.
A downside I see is what are windows users going to do with the .gmapi file once it's displayed as a folder as opposed to embedded within an .exe? Read the readme.txt file, who does that?
my worry too; as this forum and my email shows most people don't read the tutorials even though the correct ones now come up when you download a map.

I will look at the innoscript and see if there is a way I can make it check the registry for installed programs and add/remove as required.  I wonder if we "hid" the .gmapi file/folder inside the .zip would mac users see it and the majority of windows users not?

Can't wait for one to be ready Boyd for testing.
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!

Indrid Cold

Quote from: -Oz- on December 09, 2011, 09:42:27 PM
my worry too; as this forum and my email shows most people don't read the tutorials even though the correct ones now come up when you download a map.
That and this

:)

Boyd

LOL. Over at GPSReview, it never ceases to amaze me how many people accidentally reformat their Nuvi's and wipe everything out (and of course they don't have backups). You get a warning message about that too.

I think Garmin may be addressing that in their 2012 automotive models because they are treated as "MTP" devices by Windows now and not as USB disks. You have to jump through a bunch of hoops and access the hidden developer menu to change this behavior and reveal the map and system files.

Seldom

Quote from: Boyd on December 10, 2011, 05:54:09 AM
I think Garmin may be addressing that in their 2012 automotive models because they are treated as "MTP" devices by Windows now and not as USB disks. You have to jump through a bunch of hoops and access the hidden developer menu to change this behavior and reveal the map and system files.

Sounds like that could be a problem for mapmakers.

Boyd

Why would it be a problem? Garmin hides their own map (gmapprom.img) and system files. Third party maps are installed in the \Map folder which is not hidden (that is where Mapsource and Basecamp will put them). I haven't used any of the new models, but Garmin has been hiding these files for the past two years or more in an invisible folder. Now they have changed the default behavior to a Media Transfer Protocol (MTP) device. I really don't understand the fine points of that, but I think Windows treats it like a digital camera or mp3 player instead of a disk.

FWIW, here's how to make it behave like a USB disk: http://forums.gpsreview.net/viewtopic.php?p=165763#165763

Seldom

Quote from: Boyd on December 10, 2011, 05:54:09 AM
You have to jump through a bunch of hoops and access the hidden developer menu to change this behavior and reveal the map and system files.
I read you as saying that we'd need to access the hidden developer menu to upload maps we create.

Boyd

Sorry if I wasn't clear. You need to change the settings in that menu to make the Nuvi behave as a disk instead of MTP device. Probably the only reason for doing that would be to backup everything on the device (which is a good idea).

Mapsource and Basecamp should still work the same as always for sending maps and other data.

Boyd

#86
Quote from: Indrid Cold on December 09, 2011, 05:59:10 PMA downside I see is what are windows users going to do with the .gmapi file once it's displayed as a folder as opposed to embedded within an .exe?

Am slowly putting this all together. I have my mac setup to access my Windows machine over the LAN. The Mac does not show the same icons as the Windows machine, but it looks like I can customize them for each machine such that each operating system can have its own look (or use the same ones if desired, but they are stored separately).

To address your concern however, if I select the .gmapi folder on Windows and go to the properties window, I can turn it into a hidden folder. This does not affect its display under MacOSX (from what I see over my LAN). So this is perfect - we can hide the .gmapi from Windows users. And on the Mac side, I can make the .exe file (Windows Installer) invisible with a unix shell command.

So I think this is the best of both worlds - Windows users will see the Windows Installer with a custom icon, but not the .gmapi folder. Mac Users will see the .gmapi file with a custom icon, but not the Windows installer. Of course, if somebody sets their Windows folder options to show hidden files, they would see the .gmapi folder, but not much I can do about that. Also, I suspect you would actually need a Mac to customize the folder/file appearance of the Mac version. Maybe there's some Windows utility that can do that however?

When I get this all sorted out, I can write up some instructions. Shooting to upload my map before the end of the weekend.

Oz - will I be able to post an update of an existing map as a "universal version" and then remove the old Windows and Mac versions that previously existed?

Boyd

#87
Well I've spent a lot of time on this now, and the main lesson has been "it's not a multi-platform world quite yet."  ;) It's possible to create a multi-platform installer, but customizing it to my taste on both platforms has a lot of pitfalls.

On Windows, I was able to hide the .gmapi folder without issue and also to customize the installer script icon (.exe file). The latter is done through the inno script itself using the SetupIconFile directive in the Setup section of the script. Hiding the .gmapi folder just involves clicking the "hidden" box in the folder properties dialog. So this is what the unzipped file folder looks like under Windows - pretty much achieved my goal here.




Now it gets more complicated on the Mac. I can customize the .gmapi icon there, but this creates some hidden files that are used by MacOSX. These turned out to be a problem for making a universal zip file. If I zip the file using the Mac OSX archive utility (right-click > compress), I can open the archive on Windows but there is now a different folder structure that includes the Mac resources. This seemed ugly and confusing.

If I use the standard Windows right-click > Send To > Compressed Folder command, I get an error message saying it cannot be compressed because of illegal characters in file names. I was able to use 7-zip to compress the folder under Windows, however when I tried unzipping that folder on the Mac, I got an error about unsupported file types (or something) halfway through unzipping.

So after spending a lot of time messing around, I decided not to customize the look of the Mac icons. After stripping these all out, I used the regular Windows right-click > Send To > Compressed Folder command. When unzipped on the Mac, this is what it looks like. Note that double-clicking the .zip file on the Mac causes it to automatically unzip to a folder in the same directory using the Archive Utility which is standard on all Macs.



Note that I have Windows XP installed on my Mac using "Parallels" and I believe that's why you see the windows icon for the Windows installer. Parallels would automatically boot windows and open that file. A "plain vanilla" Mac should just show a generic document icon and give an error message if you double-clicked the Windows Installer.

There are two ways that I could have made the Windows Installer invisible on the Mac, but neither was acceptable. The first method is adding a period to the beginning of the filename (eg: .Windows Installer.exe). That method also makes the file invisible to Windows unless you enable the option to show protected operating system files. Not good.

The other way to hide the file on MacOSX is to use the unix shell command chflags hidden [filename]. Unfortunately, this has the same effect as checking the "hidden" box in the Windows properties. No good there either - it makes the installer invisible on Windows. There are various shareware programs on the Mac to hide files, but I'm pretty sure they use the same techniques.

Finally, for those of you without Macs, when you double-click the .gmapi file on the Mac it launches Garmin MapManager (which is included in the Mac Basecamp package) and this is what you see.



MapManager also allows you to uninstall the map.

So this is what I've learned so far. It's been interesting, although often frustrating. I think we have a usable system now for the universal download format, but maybe I can eventually find a way to customize the Mac version a bit more with additional research and testing.

I still need to test this on Windows 7 and Windows XP, which I'll do shortly and then upload the map this evening.

Boyd

#88
Quote from: Boyd on December 11, 2011, 12:00:27 PM
Note that I have Windows XP installed on my Mac using "Parallels" and I believe that's why you see the windows icon for the Windows installer. Parallels would automatically boot windows and open that file. A "plain vanilla" Mac should just show a generic document icon and give an error message if you double-clicked the Windows Installer.

FWIW, I tried this on my old, old PowerBook G4 which is a Mac with the IBM/PowerPC CPU (before Apple switched to Intel). The Windows installer does just appear as a blank document icon. Double-clicking it attempts to open the file in the text editor (TextEdit) and displays a page full of garbage binary characters.

I was not able to use the map on this old system because it has MacOSX 10.3 and even the Legacy version of Mac Basecamp requires MacOSX 10.4. I tried, and was unable to install that version. Of course, if I really wanted to, I could upgrade that old machine to 10.4, maybe even 10.5, but it wouldn't be worth it.

Anyway, the following screenshot is more representative of what somebody would see when opening the universal install folder on a Mac that doesn't have Windows installed


Boyd

I have now tested the map package on Windows 7 and Windows XP and everything works properly. Here's what the unzipped download folder looks like on XP





And this is a screenshot from Windows 7




Now I will try to upload the file and update the map info page.