• R/O
  • SSH

gpxviewer: Commit

GPX Viewer repository


Commit MetaInfo

Revision387533d4bb631bd3feaa1e65d7162689e3cce3f6 (tree)
Time2020-07-12 22:23:51
AuthorSergey Salnikov
CommiterSergey Salnikov

Log Message

Updated NSIS template to install proper file assosiations.

Change Summary

Incremental Difference

diff -r 1178f55492bd -r 387533d4bb63 template.nsi
--- a/template.nsi Thu Jul 09 12:57:00 2020 +0700
+++ b/template.nsi Sun Jul 12 20:23:51 2020 +0700
@@ -9,11 +9,12 @@
99
1010 ; Marker file to tell the uninstaller that it's a user installation
1111 !define USER_INSTALL_MARKER _user_install_marker
12-
12+
13+Unicode True
1314 SetCompressor lzma
1415
1516 !define MULTIUSER_EXECUTIONLEVEL Highest
16-!define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
17+; !define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
1718 !define MULTIUSER_MUI
1819 !define MULTIUSER_INSTALLMODE_COMMANDLINE
1920 !define MULTIUSER_INSTALLMODE_INSTDIR "[[ib.appname]]"
@@ -144,6 +145,18 @@
144145 WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
145146 "NoRepair" 1
146147
148+ ; Add file assosiations
149+ WriteRegStr HKCR ".gpxv" "" "GPXViewer.gpxvfile"
150+ WriteRegStr HKCR ".gpxz" "" "GPXViewer.gpxzfile"
151+ WriteRegStr HKCR "GPXViewer.gpxvfile" "" "GPX Viewer project"
152+ WriteRegStr HKCR "GPXViewer.gpxvfile\DefaultIcon" "" "$INSTDIR\gpxviewer.ico,0"
153+ WriteRegStr HKCR "GPXViewer.gpxvfile\shell\open\command" "" \
154+ '"$INSTDIR\Python\pythonw.exe" "$INSTDIR\GPX_Viewer.launch.pyw" "%1"'
155+ WriteRegStr HKCR "GPXViewer.gpxzfile" "" "GPX Viewer archive"
156+ WriteRegStr HKCR "GPXViewer.gpxzfile\DefaultIcon" "" "$INSTDIR\gpxviewer.ico,0"
157+ WriteRegStr HKCR "GPXViewer.gpxzfile\shell\open\command" "" \
158+ '"$INSTDIR\Python\pythonw.exe" "$INSTDIR\GPX_Viewer.launch.pyw" "%1"'
159+
147160 ; Check if we need to reboot
148161 IfRebootFlag 0 noreboot
149162 MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" \
@@ -193,6 +206,12 @@
193206 [% endblock uninstall_shortcuts %]
194207 RMDir $INSTDIR
195208 DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
209+
210+ ; Remove file assosiations
211+ DeleteRegKey HKCR ".gpxv"
212+ DeleteRegKey HKCR ".gpxz"
213+ DeleteRegKey HKCR "GPXViewer.gpxvfile"
214+ DeleteRegKey HKCR "GPXViewer.gpxzfile"
196215 SectionEnd
197216
198217 [% endblock sections %]
Show on old repository browser