GPX Viewer repository
Revision | 387533d4bb631bd3feaa1e65d7162689e3cce3f6 (tree) |
---|---|
Time | 2020-07-12 22:23:51 |
Author | Sergey Salnikov |
Commiter | Sergey Salnikov |
Updated NSIS template to install proper file assosiations.
@@ -9,11 +9,12 @@ | ||
9 | 9 | |
10 | 10 | ; Marker file to tell the uninstaller that it's a user installation |
11 | 11 | !define USER_INSTALL_MARKER _user_install_marker |
12 | - | |
12 | + | |
13 | +Unicode True | |
13 | 14 | SetCompressor lzma |
14 | 15 | |
15 | 16 | !define MULTIUSER_EXECUTIONLEVEL Highest |
16 | -!define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER | |
17 | +; !define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER | |
17 | 18 | !define MULTIUSER_MUI |
18 | 19 | !define MULTIUSER_INSTALLMODE_COMMANDLINE |
19 | 20 | !define MULTIUSER_INSTALLMODE_INSTDIR "[[ib.appname]]" |
@@ -144,6 +145,18 @@ | ||
144 | 145 | WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \ |
145 | 146 | "NoRepair" 1 |
146 | 147 | |
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 | + | |
147 | 160 | ; Check if we need to reboot |
148 | 161 | IfRebootFlag 0 noreboot |
149 | 162 | MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" \ |
@@ -193,6 +206,12 @@ | ||
193 | 206 | [% endblock uninstall_shortcuts %] |
194 | 207 | RMDir $INSTDIR |
195 | 208 | 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" | |
196 | 215 | SectionEnd |
197 | 216 | |
198 | 217 | [% endblock sections %] |