Welcome, Guest. Please login or register.

Login with username, password and session length
Forums Search:  


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

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #60 on: December 04, 2011, 06:00:37 PM »
Ah, you are correct.
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

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Installer script... again
« Reply #61 on: December 04, 2011, 07:22:44 PM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #62 on: December 04, 2011, 07:43:58 PM »
Actually I just modified your old script and made some changes. It was using the
Code: [Select]
{app} parameter and
Code: [Select]
{%APPDATA}. This resulted in the maps going into
Code: [Select]
C:\Users\ostroff\AppData\Roaming\GARMIN\Maps on my Vista system. I think the correct location is:
Code: [Select]
{commonappdata}\GARMIN\Maps, which expands to
Code: [Select]
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. :)

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

rws

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Installer script... again
« Reply #63 on: December 04, 2011, 09:48:00 PM »
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.

Code: [Select]
Source: "C:\Users\ostroff\Desktop\inno\TestMap.gmapi\*"
On other matters:

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

I tried
Code: [Select]
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.

Code: [Select]
; 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}"
« Last Edit: December 15, 2011, 02:04:53 PM by Indrid Cold »

Boyd

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #64 on: December 05, 2011, 05:28:53 AM »
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

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Installer script... again
« Reply #65 on: December 05, 2011, 10:39:23 AM »
commonappdata places the gmap folder as follows:

Vista and Win 7
Code: [Select]
C:\ProgramData\Mapsworks with the latest versions of Mapsource and Basecamp
was not able to test with older versions

XP
Code: [Select]
C:\Documents and Settings\All Users\Application Data\Garmin\Mapsworks 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.

« Last Edit: December 15, 2011, 02:05:33 PM by Indrid Cold »

Boyd

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #66 on: December 05, 2011, 10:48:49 AM »
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

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Installer script... again
« Reply #67 on: December 05, 2011, 02:17:34 PM »
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

  • Mapper
  • ***
  • Posts: 98
  • Karma: 3
    • View Profile
Re: Installer script... again
« Reply #68 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.

rws

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

  • Expert Advisor
  • *****
  • Posts: 422
  • Karma: 7
    • View Profile
Re: Installer script... again
« Reply #70 on: December 07, 2011, 09:51:10 AM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #71 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 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.
« Last Edit: December 07, 2011, 01:49:37 PM by Boyd »

Seldom

  • Expert Advisor
  • *****
  • Posts: 1852
  • Karma: 19
    • View Profile
Re: Installer script... again
« Reply #72 on: December 07, 2011, 02:18:19 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.)
« Last Edit: December 07, 2011, 02:20:26 PM by Seldom »

-Oz-

  • Map Maker!
  • Administrator
  • Expert Advisor
  • *****
  • Posts: 1579
  • Karma: 27
    • View Profile
    • GPSFileDepot
Re: Installer script... again
« Reply #73 on: December 08, 2011, 06:21:00 AM »
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

  • Expert Advisor
  • *****
  • Posts: 3849
  • Karma: 43
    • View Profile
Re: Installer script... again
« Reply #74 on: December 08, 2011, 09:38:40 AM »
Excellent - thanks Oz! I should have a map ready to upload in the next day or two.  :)