diff --git a/gpxsee.pro b/gpxsee.pro
index 4d34dd1d..d197031f 100644
--- a/gpxsee.pro
+++ b/gpxsee.pro
@@ -278,7 +278,8 @@ macx {
icons/plt.icns \
icons/rte.icns \
icons/wpt.icns \
- icons/loc.icns
+ icons/loc.icns \
+ icons/slf.icns
QMAKE_BUNDLE_DATA += LOCALE MAPS ICONS CSV
}
win32 {
@@ -292,7 +293,8 @@ win32 {
icons/plt.ico \
icons/rte.ico \
icons/wpt.ico \
- icons/loc.ico
+ icons/loc.ico \
+ icons/slf.ico
DEFINES += _USE_MATH_DEFINES
}
diff --git a/pkg/Info.plist b/pkg/Info.plist
index 896cdb65..48d553bc 100644
--- a/pkg/Info.plist
+++ b/pkg/Info.plist
@@ -83,6 +83,22 @@
CFBundleTypeRole
Viewer
+
+ CFBundleTypeExtensions
+
+ slf
+
+ CFBundleTypeMIMETypes
+
+ application/slf+xml
+
+ CFBundleTypeIconFile
+ icons/slf.icns
+ CFBundleTypeName
+ Sigma Log Format
+ CFBundleTypeRole
+ Viewer
+
CFBundleTypeExtensions
@@ -267,6 +283,27 @@
application/loc+xml
+
+ UTTypeIdentifier
+ com.sigmasport.slf
+ UTTypeReferenceURL
+ https://www.sigmasport.com
+ UTTypeDescription
+ Sigma Log Format
+ UTTypeConformsTo
+
+ public.xml
+
+ UTTypeTagSpecification
+
+ public.filename-extension
+
+ slf
+
+ public.mime-type
+ application/slf+xml
+
+
UTTypeIdentifier
com.thisisant.fit
diff --git a/pkg/gpxsee.desktop b/pkg/gpxsee.desktop
index 7a5b574c..b9b38ec7 100644
--- a/pkg/gpxsee.desktop
+++ b/pkg/gpxsee.desktop
@@ -11,4 +11,4 @@ Icon=gpxsee
Terminal=false
Type=Application
Categories=Graphics;Viewer;Maps;Qt;
-MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/loc+xml;
+MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/loc+xml;application/slf+xml;
diff --git a/pkg/gpxsee.nsi b/pkg/gpxsee.nsi
index ebba72d0..6c58e355 100644
--- a/pkg/gpxsee.nsi
+++ b/pkg/gpxsee.nsi
@@ -2,6 +2,19 @@
!include "x64.nsh"
!include "WinVer.nsh"
+; Macros
+!macro FILE_ASSOCIATION_ADD EXT DESC ICON
+ WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
+ WriteRegStr HKCR "GPXSee.${EXT}" "" "${DESC}"
+ WriteRegStr HKCR "GPXSee.${EXT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,${ICON}"
+ WriteRegStr HKCR "GPXSee.${EXT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
+!macroend
+
+!macro FILE_ASSOCIATION_REMOVE EXT
+ DeleteRegKey HKCR "GPXSee.${EXT}"
+ DeleteRegKey HKCR ".${EXT}"
+!macroend
+
; The name of the installer
Name "GPXSee"
; Program version
@@ -32,17 +45,6 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
; Registry key for uninstaller
!define REGENTRY "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPXSee"
-; File types registry entries
-!define REGGPX "GPXSee.gpx"
-!define REGTCX "GPXSee.tcx"
-!define REGKML "GPXSee.kml"
-!define REGFIT "GPXSee.fit"
-!define REGIGC "GPXSee.igc"
-!define REGNMEA "GPXSee.nmea"
-!define REGPLT "GPXSee.plt"
-!define REGRTE "GPXSee.rte"
-!define REGWPT "GPXSee.wpt"
-!define REGLOC "GPXSee.loc"
; Start menu page configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
@@ -115,47 +117,17 @@ Section "GPXSee" SEC_APP
; Associate file formats
DetailPrint "Associating file types..."
- WriteRegStr HKCR ".gpx" "" "${REGGPX}"
- WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
- WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
- WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".tcx" "" "${REGTCX}"
- WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
- WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
- WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".kml" "" "${REGKML}"
- WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
- WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
- WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".fit" "" "${REGFIT}"
- WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
- WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
- WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".igc" "" "${REGIGC}"
- WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
- WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,7"
- WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
- WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
- WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,8"
- WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".plt" "" "${REGPLT}"
- WriteRegStr HKCR "${REGPLT}" "" "OziExplorer Track Point File"
- WriteRegStr HKCR "${REGPLT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,9"
- WriteRegStr HKCR "${REGPLT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".rte" "" "${REGRTE}"
- WriteRegStr HKCR "${REGRTE}" "" "OziExplorer Route File"
- WriteRegStr HKCR "${REGRTE}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,10"
- WriteRegStr HKCR "${REGRTE}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".wpt" "" "${REGWPT}"
- WriteRegStr HKCR "${REGWPT}" "" "OziExplorer Waypoint File"
- WriteRegStr HKCR "${REGWPT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
- WriteRegStr HKCR "${REGWPT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".loc" "" "${REGLOC}"
- WriteRegStr HKCR "${REGLOC}" "" "Geocaching.com Waypoint File"
- WriteRegStr HKCR "${REGLOC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
- WriteRegStr HKCR "${REGLOC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
-
+ !insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 4
+ !insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 5
+ !insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 6
+ !insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 7
+ !insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 8
+ !insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 9
+ !insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 10
+ !insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 11
+ !insertmacro FILE_ASSOCIATION_ADD "wpt" "OziExplorer Waypoint File" 1
+ !insertmacro FILE_ASSOCIATION_ADD "loc" "Geocaching.com Waypoint File" 2
+ !insertmacro FILE_ASSOCIATION_ADD "slf" "Sigma Log File" 3
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@@ -272,26 +244,17 @@ Section "Uninstall"
RMDir "$SMPROGRAMS\$StartMenuFolder"
; Remove GPX file association
- DeleteRegKey HKCR "${REGGPX}"
- DeleteRegKey HKCR ".gpx"
- DeleteRegKey HKCR "${REGTCX}"
- DeleteRegKey HKCR ".tcx"
- DeleteRegKey HKCR "${REGKML}"
- DeleteRegKey HKCR ".kml"
- DeleteRegKey HKCR "${REGFIT}"
- DeleteRegKey HKCR ".fit"
- DeleteRegKey HKCR "${REGIGC}"
- DeleteRegKey HKCR ".igc"
- DeleteRegKey HKCR "${REGNMEA}"
- DeleteRegKey HKCR ".nmea"
- DeleteRegKey HKCR "${REGPLT}"
- DeleteRegKey HKCR ".plt"
- DeleteRegKey HKCR "${REGRTE}"
- DeleteRegKey HKCR ".rte"
- DeleteRegKey HKCR "${REGWPT}"
- DeleteRegKey HKCR ".wpt"
- DeleteRegKey HKCR "${REGLOC}"
- DeleteRegKey HKCR ".loc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "gpx"
+ !insertmacro FILE_ASSOCIATION_REMOVE "tcx"
+ !insertmacro FILE_ASSOCIATION_REMOVE "kml"
+ !insertmacro FILE_ASSOCIATION_REMOVE "fit"
+ !insertmacro FILE_ASSOCIATION_REMOVE "igc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "nmea"
+ !insertmacro FILE_ASSOCIATION_REMOVE "plt"
+ !insertmacro FILE_ASSOCIATION_REMOVE "rte"
+ !insertmacro FILE_ASSOCIATION_REMOVE "wpt"
+ !insertmacro FILE_ASSOCIATION_REMOVE "loc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "slf"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@@ -322,4 +285,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
\ No newline at end of file
diff --git a/pkg/gpxsee.xml b/pkg/gpxsee.xml
index 38b52994..46780cb5 100644
--- a/pkg/gpxsee.xml
+++ b/pkg/gpxsee.xml
@@ -29,6 +29,13 @@
+
+ Sigma Log Format
+
+
+
+
+
Flexible and Interoperable Data Transfer
diff --git a/pkg/gpxsee64.nsi b/pkg/gpxsee64.nsi
index 233db564..372b63df 100644
--- a/pkg/gpxsee64.nsi
+++ b/pkg/gpxsee64.nsi
@@ -2,6 +2,19 @@
!include "x64.nsh"
!include "WinVer.nsh"
+; Macros
+!macro FILE_ASSOCIATION_ADD EXT DESC ICON
+ WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
+ WriteRegStr HKCR "GPXSee.${EXT}" "" "${DESC}"
+ WriteRegStr HKCR "GPXSee.${EXT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,${ICON}"
+ WriteRegStr HKCR "GPXSee.${EXT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
+!macroend
+
+!macro FILE_ASSOCIATION_REMOVE EXT
+ DeleteRegKey HKCR "GPXSee.${EXT}"
+ DeleteRegKey HKCR ".${EXT}"
+!macroend
+
; The name of the installer
Name "GPXSee"
; Program version
@@ -32,17 +45,6 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
; Registry key for uninstaller
!define REGENTRY "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPXSee"
-; File types registry entries
-!define REGGPX "GPXSee.gpx"
-!define REGTCX "GPXSee.tcx"
-!define REGKML "GPXSee.kml"
-!define REGFIT "GPXSee.fit"
-!define REGIGC "GPXSee.igc"
-!define REGNMEA "GPXSee.nmea"
-!define REGPLT "GPXSee.plt"
-!define REGRTE "GPXSee.rte"
-!define REGWPT "GPXSee.wpt"
-!define REGLOC "GPXSee.loc"
; Start menu page configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
@@ -122,47 +124,17 @@ Section "GPXSee" SEC_APP
; Associate file formats
DetailPrint "Associating file types..."
- WriteRegStr HKCR ".gpx" "" "${REGGPX}"
- WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
- WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
- WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".tcx" "" "${REGTCX}"
- WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
- WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
- WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".kml" "" "${REGKML}"
- WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
- WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
- WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".fit" "" "${REGFIT}"
- WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
- WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
- WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".igc" "" "${REGIGC}"
- WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
- WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,7"
- WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
- WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
- WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,8"
- WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".plt" "" "${REGPLT}"
- WriteRegStr HKCR "${REGPLT}" "" "OziExplorer Track Point File"
- WriteRegStr HKCR "${REGPLT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,9"
- WriteRegStr HKCR "${REGPLT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".rte" "" "${REGRTE}"
- WriteRegStr HKCR "${REGRTE}" "" "OziExplorer Route File"
- WriteRegStr HKCR "${REGRTE}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,10"
- WriteRegStr HKCR "${REGRTE}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".wpt" "" "${REGWPT}"
- WriteRegStr HKCR "${REGWPT}" "" "OziExplorer Waypoint File"
- WriteRegStr HKCR "${REGWPT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
- WriteRegStr HKCR "${REGWPT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
- WriteRegStr HKCR ".loc" "" "${REGLOC}"
- WriteRegStr HKCR "${REGLOC}" "" "Geocaching.com Waypoint File"
- WriteRegStr HKCR "${REGLOC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
- WriteRegStr HKCR "${REGLOC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
-
+ !insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 4
+ !insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 5
+ !insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 6
+ !insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 7
+ !insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 8
+ !insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 9
+ !insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 10
+ !insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 11
+ !insertmacro FILE_ASSOCIATION_ADD "wpt" "OziExplorer Waypoint File" 1
+ !insertmacro FILE_ASSOCIATION_ADD "loc" "Geocaching.com Waypoint File" 2
+ !insertmacro FILE_ASSOCIATION_ADD "slf" "Sigma Log File" 3
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@@ -275,26 +247,17 @@ Section "Uninstall"
RMDir "$SMPROGRAMS\$StartMenuFolder"
; Remove File associations
- DeleteRegKey HKCR "${REGGPX}"
- DeleteRegKey HKCR ".gpx"
- DeleteRegKey HKCR "${REGTCX}"
- DeleteRegKey HKCR ".tcx"
- DeleteRegKey HKCR "${REGKML}"
- DeleteRegKey HKCR ".kml"
- DeleteRegKey HKCR "${REGFIT}"
- DeleteRegKey HKCR ".fit"
- DeleteRegKey HKCR "${REGIGC}"
- DeleteRegKey HKCR ".igc"
- DeleteRegKey HKCR "${REGNMEA}"
- DeleteRegKey HKCR ".nmea"
- DeleteRegKey HKCR "${REGPLT}"
- DeleteRegKey HKCR ".plt"
- DeleteRegKey HKCR "${REGRTE}"
- DeleteRegKey HKCR ".rte"
- DeleteRegKey HKCR "${REGWPT}"
- DeleteRegKey HKCR ".wpt"
- DeleteRegKey HKCR "${REGLOC}"
- DeleteRegKey HKCR ".loc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "gpx"
+ !insertmacro FILE_ASSOCIATION_REMOVE "tcx"
+ !insertmacro FILE_ASSOCIATION_REMOVE "kml"
+ !insertmacro FILE_ASSOCIATION_REMOVE "fit"
+ !insertmacro FILE_ASSOCIATION_REMOVE "igc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "nmea"
+ !insertmacro FILE_ASSOCIATION_REMOVE "plt"
+ !insertmacro FILE_ASSOCIATION_REMOVE "rte"
+ !insertmacro FILE_ASSOCIATION_REMOVE "wpt"
+ !insertmacro FILE_ASSOCIATION_REMOVE "loc"
+ !insertmacro FILE_ASSOCIATION_REMOVE "slf"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd