GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

Registry problems with NEW nsis .nsi template ?

Started by glendeni, January 02, 2015, 12:58:15 PM

Previous topic - Next topic

glendeni

I'm looking for guidance on how to proceed after failing to resolve a problem encountered by a user of my maps.  Hopefully I'll get some wisdom from those better versed than I in the installation of a map into a PC for BaseCamp use.

The story so far:

() User with a new PC with Windows 7 64-bit first installed BaseCamp, then tried to install one of my maps.  He successfully followed the nsis installer procedure, with no apparent error, but the map did _not_ appear in BaseCamp.  It _did_ appear in the ControlPanel "Programs and Features" display.

() He was able to fix this by following the procedure described in thread http://forums.gpsfiledepot.com/index.php?topic=3794.0 - namely, downloading and installing the "MyTrails" map, then installing my map, then uninstalling the "MyTrails" map.

() That might seem to point to a problem created by use of a "older" installation script, as mentioned in that forum post. "Older" seems to mean prior to Dec 2011, namely the changes I found discussed in the Feb-Mar 2010 forum thread  http://forums.gpsfiledepot.com/index.php?topic=1022.0

() However, all my development work was done between Sept-Dec 2012.  As such, I used the then current NSIS version (2.46, currently still the latest v2) and the "new" installation script template available at that time.

() Comparing my current .nsi script to the current template .nsi file I can see no notable differences, only differences relevant to my specific maps.  (And there is NOT any reference to a Registry.nsh file anywhere, which was apparently one source of difficulty in the 2010 thread).  Looking at the "Write the MapSource configuration into the registry" section, the only difference is that in my version the following lines are used, not "commented-out" as in the template

WriteRegStr   HKLM "SOFTWARE\$OS_EXTRAGarmin\MapSource\Families\${MAP_SHORT_NAME}"   "IDX"   "$INSTDIR\${MAP_SHORT_NAME}.mdx"
WriteRegStr   HKLM "SOFTWARE\$OS_EXTRAGarmin\MapSource\Families\${MAP_SHORT_NAME}"   "TYP"   "$INSTDIR\${MAP_TYPE}.typ"     ; only if using custom type


These lines were uncommented since I  do use TYP and MDX files.

() At the risk of introducing a red herring, I should mention that I'm creating the installation executable (and the .IMG files to be loaded into the GPS) and so running the NSIS creation script on a Linux box, not a Windows PC.  But prior to this there has been no reported problem.  (I myself also use a Windows 7 64-bit PC and have been able to install, uninstall, and re-install my map on my PC without difficulty - but have not tried a clean install of BaseCamp, since I have multiple installed maps which I would not want to recreate).  I run on a Linux box because I have a batch script which is run automatically each week to update the map with any current changes to the trail system - and has been doing so since Jan 2013.

() So next, I should ... ???

Jack

My current installation executable:
http://bigsurtrailmap.net/TRAILMAP/GARMIN/ROUTABLE/MEDIUM/BigSurTrailmapWithTopo_install.exe

I've added an attachment with my .nsi file

Boyd

Have you seen this thread?

http://forums.gpsfiledepot.com/index.php?topic=2383.0

It is very long and rambling but contains a lot of info. Towards the end there are examples of scripts that utilize Garmin's new(er) .gmap format. I like .gmap because it doesn't use the registry at all, it uses heirarchical folders. And even better, it is cross platform compatible with MacOSX so you only need one version of the map. Not sure how all of this would work out on your linux box though...  ;)

However note these posts from the first page of the thread that discuss NSIS installer issue. They might provide a better clue to the timeline of the Windows 7 64 bit issue...

Quote from: Boyd on October 06, 2011, 02:08:36 PMDo we think that the current template file in mapmaking tutorial number 8 has resolved the various Windows 7 issues? http://www.gpsfiledepot.com/tools/map_install.zip

Quote from: maps4gps on October 06, 2011, 04:34:07 PM
If you mean the one in part 9 dated 7 Mar 2010, that is the one I download in March/May, 2011 and it has the issue.  I have not seen anything from OZ that the issue was corrected.

Quote from: -Oz- on October 09, 2011, 06:05:06 PMThe latest script checks and modifies the registry entries according to 64-bit or 32-bit but recently something has been happening that stops the 64bit computers from seeing the maps in BaseCamp.  I would say that that is the only issue but I haven't been able to replicate it on my win7-64 thus far.

popej

Quote from: glendeni on January 02, 2015, 12:58:15 PM
I've added an attachment with my .nsi file
I have never used nsis, but I think that this condition is suspicious:
; Check for 64bit or 32bit - currently force 32 bit since mapsource is 32bit
IfFileExists $WINDIR\SysWOW64\*.* +1 +3

This would work only if installer would include "requestedExecutionLevel" in manifest for Windows. Since your installer doesn't include it, Windows applies "registry virtualization" and you shouldn't use "Wow6432Node" as a part of registry keys.

I suggest, that you add "RequestExecutionLevel admin" command to your script, this should force creation of proper manifest.

glendeni

#3
Boyd

No, I'd not seen that thread (it comes up as number 11 on a search on "nsis" and I'd not looked into it).  Thanks - as you say, that gives a lot of information (and answers some questions I'd had in my initial post).

I _have_ been able to create "gmapi" files on my Linux box and now plan to provide them to my users in addition to, not replacing, the current Windows registry installation executable.  My idea is that they will be an "alternate" source for Mac users or others who are unable or don't want to use the Windows registry installation.  My expectation is that they will know basic computer procedures (file move/copy and possibly "unzip") and be able to follow some basic instructions I provide, so an installation script will not be needed. I've described the above in a new post so as not to distract from this thread, which I expect will be discussion of the current Windows registry installation script and whether it is causing problems.

Jack

mattropolis

I have had the same issues as glendeni with distributing my map. I am using NSIS to compile my map. It works fine for me, but the user doesn't see the map in BaseCamp.

The user has a PC with Windows 7 64-bit.

I don't want to have the user download and install the "My Trails" map and then uninstall it. There must be a better way.

I'm downloaded the sample nsi script from the tutorial 9 last week (2015-03-20) so I should be using the latest version.

This may be a solution, i just tried it: Comment out this stuff

Section "Install"
; Check for 64bit or 32bit - currently force 32 bit since mapsource is 32bit
/* IfFileExists $WINDIR\SysWOW64\*.* +1 +3
   StrCpy $OS_EXTRA "Wow6432Node\"
   Goto fin   ; move to Label fin:
   StrCpy $OS_EXTRA ""
   fin: */

and this..

Section "Uninstall"
; Check for 64bit or 32bit - currently force 32 bit since mapsource is 32bit
/* IfFileExists $WINDIR\SysWOW64\*.* +1 +3
   StrCpy $OS_EXTRA "Wow6432Node\"
   Goto fin   ; move to Label fin:
   StrCpy $OS_EXTRA ""
   fin: */

Can somebody confirm if this works?