Index: resources/installer/installer_template.nsi =================================================================== --- resources/installer/installer_template.nsi (revision 1890) +++ resources/installer/installer_template.nsi (working copy) @@ -59,8 +59,13 @@ ; Create MapSource registry keys ; INSERT_REGBIN_HERE +!ifdef INDEX 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" +!endif +!ifdef TYPNAME + WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "TYP" "$INSTDIR\${TYPNAME}" +!endif 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" @@ -83,8 +88,13 @@ ; Registry cleanup DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "ID" +!ifdef INDEX DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "IDX" DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "MDR" +!endif +!ifdef TYPNAME + DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "TYP" +!endif 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" Index: src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java =================================================================== --- src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java (revision 1890) +++ src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java (working copy) @@ -124,6 +124,10 @@ pw.format(Locale.ROOT, "!define MAPNAME \"%s\"\n", baseFilename); pw.format(Locale.ROOT, "!define PRODUCT_ID \"%s\"\n", productId); pw.format(Locale.ROOT, "!define REG_KEY \"%s\"\n", familyName); + if (hasIndex) + pw.format(Locale.ROOT, "!define INDEX\n"); + if (hasTyp) + pw.format(Locale.ROOT, "!define TYPNAME \"%s\"\n", typName); } private void writeRegBin(PrintWriter pw) {