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-

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!

rws

Inno Setup script that uses external gmapi folder to install Windows maps.

Place the gmapi folder and the resulting setup exe from this script together and you have the Mac and Windows installers in one package.

Boyd

#62
Actually I just modified your old script and made some changes. It was using the {app} parameter and {%APPDATA}. This resulted in the maps going into C:\Users\ostroff\AppData\Roaming\GARMIN\Maps on my Vista system. I think the correct location is: {commonappdata}\GARMIN\Maps, which expands to C:\ProgramData\GARMIN\Maps (this is where Garmin says they belong).

Since it's such a short script, here's my version. Have to say, I like inno *much* more than NSIS. :)


#define MyAppName "TestMap.gmap"

#define MyAppVersion "1.0"

#define MyAppPublisher "Universal Installer Test"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{20D3F074-9197-4F00-9EAC-82231547B9EC}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
; writes maps files to proper directories in XP, Vista and Win 7 so Mapsource and Basecamp can find them.
DefaultDirName={commonappdata}\GARMIN\Maps
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
; optional custom image you want displayed on your installer
WizardImageFile=TestMap.bmp
; your license agreement that requires acceptance before installer will continue with installation.
LicenseFile=license.txt
; folder you want the installer written to.
OutputDir=C:\Users\ostroff\Desktop\inno
; installer name
OutputBaseFilename=Windows Installer
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
; location of your maps .gmap folder
Source: "C:\Users\ostroff\Desktop\inno\TestMap.gmapi\*"; DestDir: "{commonappdata}\GARMIN\Maps"; Flags: external ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"


It is working properly on Vista and also on my Mac. Haven't yet tried XP. I have attached a zipped folder, which is what I would upload at GPSFileDepot for a universal installer. I would probably add a README file for Mac users and create a custom Mac icon in an actual upload.

It will put a small map named "TestMap" on your computer that covers the New York City area. The uninstaller (programs and features control panel) works as expected. On the Mac, double-clicking TestMap.gmapi starts MapManager and asks if you want to install. MapManager also has the option to uninstall maps on the Mac.

I haven't attempted any of your fancy checking for old versions and registry entries Oz, just wanted to get the basics working for now.  :D

rws

#63
Boyd

Your installer did not work...came up with an error during install with an invalid directory.  This directory would not be on anyone's machine.

Source: "C:\Users\ostroff\Desktop\inno\TestMap.gmapi\*"

On other matters:

%APPDATA works for installing in XP, Vista and Win 7 but requires the latest version of Mapsource.

I tried commonappdata and it works in Vista and Win 7, didn't try XP yet...so if it works in XP and with older versions of Mapsource that is a change to make.

Here's a script I used on your map to get it to work from any install location.  I also attached a zip file using the Install created with this script and your test map files.

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "TestMap.gmap"
#define MyAppVersion "1"
#define MyAppPublisher "Universal Installer Test"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E0C3F85D-FF39-4355-A3BD-59A5A278C775}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={commonappdata}\GARMIN\Maps\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
; WizardImageFile=c:\junk\RWS Custom Maps\RWSCustomMaps.bmp
; LicenseFile=C:\Junk\RWS Custom Maps\MNlicense.txt
OutputDir=C:\Junk\RWS Custom Maps
OutputBaseFilename=TestMap INSTALL
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "{src}\TestMap.gmapi\TestMap.gmap\*"; DestDir: "{app}"; Flags: external ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"

Boyd

Yes, you are right, and I realized that it was only working on my own machine because of the file location last night, but it was too late to fix. Thanks a lot for catching this!

According to Garmin, the location you were using is where map unlock codes go, but not the maps. I will test it on XP shortly and report back.

rws

#65
commonappdata places the gmap folder as follows:

Vista and Win 7
C:\ProgramData\Maps
works with the latest versions of Mapsource and Basecamp
was not able to test with older versions

XP
C:\Documents and Settings\All Users\Application Data\Garmin\Maps
works with the latest versions of Mapsource and Basecamp
did not work with Mapsource v 6.12.4...I'm wondering if older versions were capable of opening gmap files? (once updated to the latest version 6.16.3 it worked)

I always recommend in my map documentation for users to obtain the latest versions of Mapsource and their unit software.


Boyd

Great - thanks for testing. See: http://forums.gpsfiledepot.com/index.php/topic,2383.msg13979.html#msg13979

I guessed that .gmap compatibility might have started with Mapsource 6.14.1. Of course, Mapsource is no longer being developed, so 6.16.3 is "as good as it gets". Personally, I've been suggesting that new users skip Mapsource completely and go directly to Basecamp. Unless you're already familiar with it, not much point in starting now and it doesn't work properly with the new devices either.

If somebody does want to use the older versions, or if they want to use gmap files with nRoute (which isn't compatible), there's a program called "MapReverseConverter" that will put these new files in the correct format.

rws

Some further testing confirms gmap format map files starting working in Windows Basecamp v2.08 and Mapsource version 6.14.1

Using the install exe created with this Inno Setup script bundled with a gmapi map folder will produce a basic dual installation package for Mac and Windows (XP, Vista, Win 7 ) users adhering to the above Mapsource and Basecamp minimum versions.  The script produces an installer that can be run from any drive or folder.

Edit the attached script as noted.



BobT

rws, I also use Inno Setup and think it is very easy.  I am trying to download your attached script to look at it but it saves as a .php file.  What do I do with it or what am I doing wrong.

rws

Quote from: BobT on December 06, 2011, 08:13:46 PM
rws, I also use Inno Setup and think it is very easy.  I am trying to download your attached script to look at it but it saves as a .php file.  What do I do with it or what am I doing wrong.

rename the .php extension to .zip

jbensman

When I am asking someone for thier trail data to add to My Trails, I like to tell them how many people have downloaded the map.  I think seeing a counter with thousands of downloads makes them more likely to share thier data.  In my lawsuit with the National Park Service, my attorney used the numbers from the counter.  When you are trying to get a fee wavier for a FOIA request, numbers of downloads can help you meet the standard.  So my concern is if we go to a single installer, will the page be able to still show total downloads or would the download total start at zero?  My request would be for the download counter for the single installer to include all the previous Windows and MAC downloads. 

Boyd

#71
Throughout this discussion I have assumed that the "universal" installer would just be another option for those of us who wanted to use it - not a requirement.

If Oz will just provide a new category for "universal installer" that allows the upload of a .zip file, I will give it a try soon with a map I'm finishing.

Seldom

#72
Quote from: Boyd on December 07, 2011, 01:31:09 PM
Throughout this discussion I have assumed that the "universal" installer would just be another option for those of us who wanted to use it - not a requirement.

If the universal installer is bulletproof, why shouldn't it be the only one?  The only reason that comes to mind is that the upload/download burden will be significantly larger.  (Assuming Oz can work out some way of updating download stats for those of you with significant numbers.  For me, it doesn't make a whole lot of difference until I can find a lawyer who'll work pro bono.)

-Oz-

Alright, I will add the universal downloader option today.  At this point I foresee keeping the other two download options since the maps have those already.  However, I will give an option to "convert to universal downloader" where after you upload the universal download it will delete the other two version and add their "count" to the universal count.
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

Excellent - thanks Oz! I should have a map ready to upload in the next day or two.  :)