On 08.01.2011 00:11, WanMil wrote:
> Am 07.01.2011 23:53, schrieb Felix Hartmann:
>>
>>
>> On 07.01.2011 23:45, WanMil wrote:
>>> Am 07.01.2011 23:25, schrieb Felix Hartmann:
>>>>
>>>>
>>>> On 07.01.2011 22:52, WanMil wrote:
>>>>> I tried to use the index branch but I don't know the little tricks to
>>>>> get address search working in MapSource (and of course not on my
>>>>> Garmin). Can someone please summarize (Steve, Felix) what I have
>>>>> to do
>>>>> use it at least in MapSource? How do you test the index branch?
>>>>>
>>>>> What I've tried:
>>>>> * Create a map from the index branch with compiling an nsis map
>>>>> installer
>>>>> * Run the mapinstaller exe
>>>>> * Start MapSource
>>>>> => The map is installed but Search => Search city is disabled.
>>>>>
>>>>> WanMil
>>>>> _______________________________________________
>>>>> mkgmap-dev mailing list
>>>>> [email protected]
>>>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>> Check the registry - you need to have the following entries
>>>> (wow6432node
>>>> is for x64 systems only):
>>>>
>>>> reg QUERY
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366 2>NUL
>>>> >NUL
>>>> if %errorlevel% EQU 0 reg DELETE
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366 /f
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366
>>>> /v ID /t REG_BINARY /d DE18 /f 2>NUL >NUL
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366
>>>> /v TYP /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\6366trad.TYP" /f
>>>> 2>NUL >NUL
>>>> *reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366
>>>> /v MDR /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\mapset6366_mdr.img" /f
>>>> 2>NUL >NUL
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366
>>>> /v IDX /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\mapset6366.mdx" /f
>>>> 2>NUL
>>>> >NUL *
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366\1
>>>> /v Loc
>>>> /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\\" /f 2>NUL >NUL
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366\1 /v
>>>> Bmap /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\mapset6366.img" /f
>>>> 2>NUL >NUL
>>>> reg ADD
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366\1
>>>> /v Tdb
>>>> /t REG_SZ /d "D:\Garmin\0mtb\mtbaustria1\mapset6366.tdb" /f 2>NUL >NUL
>>>> reg QUERY
>>>> HKLM\SOFTWARE\Wow6432Node\Garmin\MapSource\Families\FAMILY_6366\1
>>>> /v Tdb
>>>> 2>NUL >NUL
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Important bits are mdx and mdr_img
>>>> if they are missing, then find places is greyed out. I don't know
>>>> if the
>>>> nsi is including them by default, as I have a script to write the nsi
>>>> seperately (to include more options like refinding and older
>>>> installation path, or checking that Mapsource is closed when
>>>> installing
>>>> - else installation fails on the address search as the entries get
>>>> blocked while Mapsource/Basecamp is running).
>>>>
>>>> Crazy thing is, if for one single map the address search is wrongly
>>>> registered, other maps might fail to provide working address search in
>>>> Mapsource (at least for 6.13 branch, I think 6.16 got it fixed).
>>>>
>>>> On trunk currently mdx files are broken since the cleanup. Will check
>>>> out --index branch now.
>>>>
>>>>
>>>
>>> I've checked that and I think the registry should be ok.
>>> Maybe you can crosscheck that? I have attached two screenshots of the
>>> registry keys.
>>>
>>> WanMil
>>
>> Yours look correct, except for the ID -- I don't think that your family
>> is "0" - or if it is, then it might be the reason. Choose a value
>> between 1000 and 9999 for the family instead.
>> see my registry (dd 18 is 6365 reversed and then AA BB exchanged to
>> BB AA)
>>
>
> Aaarrrghhhhh.....
> You got it! I missed to set a family-id.
>
> We should add a check if the family-id is set in case the index option
> is used. Another option is to set a family-id 9000 as default. What do
> you think?
>
> Thanks!!
> WanMil
I don't know - does mkgmap not already have a default family-id??? I'm
sure it has. I would completely overwrite the nsi too make it better:
here is my relevant changes for the nsi:
Some things I would include by default (note that there are variables
inside for typfile or id, that need to be replaced, but the nsi
structure is far superior to standard mkgmap nsi):
Check for previous installation in registry to get back the install
directory:
Name "${INSTALLER_DESCRIPTION}"
OutFile "${INSTALLER_NAME}.exe"
InstallDir "${DEFAULT_DIR}"
InstallDirRegKey HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC"
Check for mapsource/basecamp running:
Function .onInit
;Extract InstallOptions INI files
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "${LEGENDTYPE_INI}"
FindProcDLL::FindProc "MapSource.exe"
IntCmp $R0 1 0 notRunningMapSource
MessageBox MB_OK|MB_ICONEXCLAMATION "Mapsource is running. Please
close it first" /SD IDOK
Abort
notRunningMapSource:
FindProcDLL::FindProc "BaseCamp.exe"
IntCmp $R0 1 0 notRunningBaseCamp
MessageBox MB_OK|MB_ICONEXCLAMATION "BaseCamp is running. Please
close it first" /SD IDOK
Abort
notRunningBaseCamp:
FunctionEnd
Section "MainSection" SectionMain
; First delete all old stuff, so that if mdx or mdr are missing on an
overwrite installation, it does not crash mapsource
SetOutPath "$INSTDIR"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "ID"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "IDX"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "MDR"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "TYP"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "BMAP"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "TDB"
DeleteRegKey /IfEmpty HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}"
DeleteRegKey /IfEmpty HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
; Initale Installation does not have the keys, therefore ignore errors.
ClearErrors
;empty Mapsource/Basecamp Tilecache
Delete "$LOCALAPPDATA\garmin\basecamp\tilecache\*.tile"
Delete "$APPDATA\garmin\mapsource\tilecache\*.tile"
;then copy over new files
SetOutPath "$INSTDIR"
File "${MAPNAME}.img"
File "*.txt"
File "*.bat"
File "*.TYP"
File "gmt.exe"
File "${MAPNAME}_mdr.img"
File "${MAPNAME}.mdx"
File "clas${TYPSUFFIX}.TYP"
File "${MAPNAME}.tdb"
File "${FID}*.img"
IfErrors 0 continue2
MessageBox MB_OK|MB_ICONEXCLAMATION "An error occured during
copying of map files. Possible error's are for example a full hard drive
or an unknown application accessing map files. Please reinstall map!"
/SD IDOK
Abort
continue2:
WriteRegBin HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "ID"
${REVERSEFID}
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"IDX" "$INSTDIR\${MAPNAME}.mdx"
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"MDR" "$INSTDIR\${MAPNAME}_mdr.img"
WriteRegStr HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "BMAP"
"$INSTDIR\${MAPNAME}.img"
WriteRegStr HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC"
"$INSTDIR"
WriteRegStr HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "TDB"
"$INSTDIR\${MAPNAME}.tdb"
StrCmp $legendtype "Classic" 0 +2
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"TYP" "$INSTDIR\clas${TYPSUFFIX}.TYP"
StrCmp $legendtype "Thin" 0 +2
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"TYP" "$INSTDIR\thin${TYPSUFFIX}.TYP"
StrCmp $legendtype "Wide" 0 +2
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"TYP" "$INSTDIR\wide${TYPSUFFIX}.TYP"
StrCmp $legendtype "Mapsource-Qlandkarte_GT" 0 +2
WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
"TYP" "$INSTDIR\trad${TYPSUFFIX}.TYP"
WriteUninstaller "$INSTDIR\${UNINSTALLER_NAME}.exe"
SectionEnd
Section "Uninstall"
Delete "$INSTDIR\${MAPNAME}.img"
Delete "$INSTDIR\*.txt"
Delete "$INSTDIR\*.bat"
Delete "$INSTDIR\*.TYP"
Delete "$INSTDIR\gmt.exe"
Delete "$INSTDIR\${MAPNAME}_mdr.img"
Delete "$INSTDIR\${MAPNAME}.mdx"
Delete "$INSTDIR\clas${TYPSUFFIX}.TYP"
Delete "$INSTDIR\${MAPNAME}.tdb"
Delete "$INSTDIR\${FID}*.img"
Delete "$INSTDIR\${UNINSTALLER_NAME}.exe"
RmDir "$INSTDIR"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "ID"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "IDX"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "MDR"
DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "TYP"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "BMAP"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC"
DeleteRegValue HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "TDB"
DeleteRegKey /IfEmpty HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}"
DeleteRegKey /IfEmpty HKLM
"SOFTWARE\Garmin\MapSource\Families\${REG_KEY}"
SectionEnd
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev