summaryrefslogtreecommitdiff
path: root/telegps/telegps-windows.nsi.in
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-19 14:33:27 -0700
committerKeith Packard <keithp@keithp.com>2014-06-19 22:31:13 -0700
commit1b0f56ddb2b85b68232c22a7a8b8744cb9ad76f9 (patch)
treebf7e14155175590986cb3d19b0c0ac0227ca7538 /telegps/telegps-windows.nsi.in
parent37856672c57f2fd91184c2391a201bbbdc48545e (diff)
Rename icon files to fit XDG specifications. Add file icons. Add mime types
Our SVG icons now follow XDG standards by including a vendor prefix. The new file type icons include application-vnd.altusmetrum as a prefix so that they match the mime types declared. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'telegps/telegps-windows.nsi.in')
-rw-r--r--telegps/telegps-windows.nsi.in83
1 files changed, 51 insertions, 32 deletions
diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in
index 3f9648f9..603d4971 100644
--- a/telegps/telegps-windows.nsi.in
+++ b/telegps/telegps-windows.nsi.in
@@ -4,12 +4,14 @@
!include java.nsh
!include refresh-sh.nsh
-!define REG_NAME "TeleGPS"
-!define PROG_ID "org.altusmetrum.telegps.1"
-!define PROG_ALTOSUI "org.altusmetrum.altosui.1"
-!define FAT_NAME "telegps-fat.jar"
-!define ICO_ICO "telegps.ico"
-!define ICO_EXE "telegps.exe"
+!define REG_NAME "TeleGPS"
+!define PROG_ID_TELEM "altusmetrum.telegps.telem.1"
+!define PROG_ID_EEPROM "altusmetrum.telegps.eeprom.1"
+!define FAT_NAME "telegps-fat.jar"
+!define WIN_APP_ICON "altusmetrum-telegps.ico"
+!define WIN_APP_EXE "altusmetrum-telegps.exe"
+!define WIN_TELEM_EXE "application-vnd.altusmetrum.telemetry.exe"
+!define WIN_EEPROM_EXE "application-vnd.altusmetrum.eeprom.exe"
Name "${REG_NAME} Installer"
@@ -104,13 +106,13 @@ Section "${REG_NAME} Application"
File "*.dll"
- File "../icon/${ICO_ICO}"
+ File "../icon/${WIN_APP_ICON}"
- CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}"
+ CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}"
SectionEnd
Section "${REG_NAME} Desktop Shortcut"
- CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}"
+ CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}"
SectionEnd
Section "TeleGPS, TeleDongle and TeleBT Firmware"
@@ -134,35 +136,51 @@ SectionEnd
Section "File Associations"
+ ${DisableX64FSRedirection}
+
SetOutPath $INSTDIR
- File "../icon/${ICO_EXE}"
+ File "../icon/${WIN_APP_EXE}"
+ File "../icon/${WIN_TELEM_EXE}"
+ File "../icon/${WIN_EEPROM_EXE}"
- ; application elements
-
- WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File"
- WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File"
- WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}"
- WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101'
- WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"'
+ DeleteRegKey HKCR "${PROG_ID_TELEM}"
+ DeleteRegKey HKCR "${PROG_ID_EEPROM}"
+
+ DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}"
+ DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}"
+ DeleteRegKey HKCR ".telem\${PROG_ID_EEPROM}"
+ DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_EEPROM}"
; .eeprom elements
- WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}"
+ WriteRegStr HKCR "${PROG_ID_EEPROM}" "" "Altus Metrum Log File"
+ WriteRegStr HKCR "${PROG_ID_EEPROM}" "FriendlyTypeName" "Altus Metrum Log File"
+ WriteRegStr HKCR "${PROG_ID_EEPROM}\CurVer" "" "${PROG_ID_EEPROM}"
+ WriteRegStr HKCR "${PROG_ID_EEPROM}\DefaultIcon" "" '"$INSTDIR\${WIN_EEPROM_EXE}",-101'
+ WriteRegExpandStr HKCR "${PROG_ID_EEPROM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"'
+
+ WriteRegStr HKCR ".eeprom" "" "${PROG_ID_EEPROM}"
WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File"
- WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui"
+ WriteRegStr HKCR ".eeprom" "Content Type" "application/vnd.altusmetrum.eeprom"
- WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" ""
- WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}"
+ WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" ""
+ WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}"
; .telem elements
- WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}"
+ WriteRegStr HKCR "${PROG_ID_TELEM}" "" "Altus Metrum Telemetry File"
+ WriteRegStr HKCR "${PROG_ID_TELEM}" "FriendlyTypeName" "Altus Metrum Telemetry File"
+ WriteRegStr HKCR "${PROG_ID_TELEM}\CurVer" "" "${PROG_ID_TELEM}"
+ WriteRegStr HKCR "${PROG_ID_TELEM}\DefaultIcon" "" '"$INSTDIR\${WIN_TELEM_EXE}",-101'
+ WriteRegExpandStr HKCR "${PROG_ID_TELEM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"'
+
+ WriteRegStr HKCR ".telem" "" "${PROG_ID_TELEM}"
WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File"
- WriteRegStr HKCR ".telem" "Content Type" "application/altosui"
+ WriteRegStr HKCR ".telem" "Content Type" "application/vnd.altusmetrum.telemetry"
- WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" ""
- WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}"
+ WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" ""
+ WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${REG_NAME}"
Call RefreshShellIcons
SectionEnd
@@ -195,21 +213,22 @@ Section "Uninstall"
DetailPrint "Delete uninstall reg entries"
- DeleteRegKey HKCR "${PROG_ID}"
+ DeleteRegKey HKCR "${PROG_ID_EEPROM}"
+ DeleteRegKey HKCR "${PROG_ID_TELEM}"
- DeleteRegKey HKCR ".eeprom\${PROG_ID}"
- DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}"
+ DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}"
+ DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}"
- DeleteRegKey HKCR ".telem\${PROG_ID}"
- DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}"
+ DeleteRegKey HKCR ".telem\${PROG_ID_TELEM}"
+ DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}"
DetailPrint "Delete file association reg entries"
Delete "$INSTDIR\${FAT_NAME}"
Delete "$INSTDIR\uninstall-${REG_NAME}.exe"
- Delete "$INSTDIR\${ICO_ICO}"
- Delete "$INSTDIR\${ICO_EXE}"
+ Delete "$INSTDIR\${WIN_APP_ICON}"
+ Delete "$INSTDIR\${WIN_APP_EXE}"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\${REG_NAME}.lnk"