Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java
- ===================================================================
- --- src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java (revision 2039)
- +++ src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java (working copy)
- @@ -114,6 +114,8 @@
- writeDefines(pw);
- else if (strLine.contains("INSERT_REGBIN_HERE"))
- writeRegBin(pw);
- + else if (strLine.contains("INSERT_REGBIN_64_HERE"))
- + writeRegBin64(pw);
- else if (strLine.contains("INSERT_ADDED_FILES_HERE"))
- writeAddedFiles(pw);
- else if (strLine.contains("INSERT_REMOVED_FILES_HERE"))
- @@ -145,6 +147,10 @@
- // Ideally we should have a define for the family value but NSIS won't allow "hexadecimal" variables
- pw.format(Locale.ROOT, " WriteRegBin HKLM \"SOFTWARE\\Garmin\\MapSource\\Families\\${REG_KEY}\" \"ID\" %s\n", id);
- }
- + private void writeRegBin64(PrintWriter pw) {
- + // Ideally we should have a define for the family value but NSIS won't allow "hexadecimal" variables
- + pw.format(Locale.ROOT, " WriteRegBin HKLM \"SOFTWARE\\Wow6432Node\\Garmin\\MapSource\\Families\\${REG_KEY}\" \"ID\" %s\n", id);
- +}
- private void writeAddedFiles(PrintWriter pw) {
- pw.format(Locale.ROOT, " File \"${MAPNAME}.img\"\n");
- Index: resources/installer/installer_template.nsi
- ===================================================================
- --- resources/installer/installer_template.nsi (revision 2039)
- +++ resources/installer/installer_template.nsi (working copy)
- @@ -78,6 +78,24 @@
- ; INSERT_ADDED_FILES_HERE
- ; Create MapSource registry keys
- + ReadRegStr $R0 HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Products" "InstallDir"
- + IfErrors system_x86
- +; system_64
- +; INSERT_REGBIN_64_HERE
- +!ifdef INDEX
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "IDX" "$INSTDIR\${MAPNAME}.mdx"
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "MDR" "$INSTDIR\${MAPNAME}_mdr.img"
- +!endif
- +!ifdef TYPNAME
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "TYP" "$INSTDIR\${TYPNAME}"
- +!endif
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "BMAP" "$INSTDIR\${MAPNAME}.img"
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC" "$INSTDIR"
- + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "TDB" "$INSTDIR\${MAPNAME}.tdb"
- +
- + goto mainreg_done
- +
- + system_x86:
- ; INSERT_REGBIN_HERE
- !ifdef INDEX
- WriteRegStr HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "IDX" "$INSTDIR\${MAPNAME}.mdx"
- @@ -89,6 +107,8 @@
- 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"
- +
- + mainreg_done:
- ; Write uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- @@ -107,6 +127,25 @@
- RmDir "$INSTDIR"
- ; Registry cleanup
- + ReadRegStr $R0 HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Products" "InstallDir"
- + IfErrors clean_system_x86
- +
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "ID"
- +!ifdef INDEX
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "IDX"
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "MDR"
- +!endif
- +!ifdef TYPNAME
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}" "TYP"
- +!endif
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "BMAP"
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "LOC"
- + DeleteRegValue HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}" "TDB"
- + DeleteRegKey /IfEmpty HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}\${PRODUCT_ID}"
- + DeleteRegKey /IfEmpty HKLM "SOFTWARE\Wow6432Node\Garmin\MapSource\Families\${REG_KEY}"
- +
- + goto clean_done
- + clean_system_x86:
- DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "ID"
- !ifdef INDEX
- DeleteRegValue HKLM "SOFTWARE\Garmin\MapSource\Families\${REG_KEY}" "IDX"
- @@ -120,6 +159,7 @@
- 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}"
- + clean_done:
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REG_KEY}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement