1 | ;
|
---|
2 | ; josm.nsi
|
---|
3 | ;
|
---|
4 |
|
---|
5 | ; Set the compression mechanism first.
|
---|
6 | ; If you get an error here, please update to at least NSIS 2.07!
|
---|
7 | SetCompressor /SOLID lzma
|
---|
8 |
|
---|
9 | ; Used to refresh the display of file association
|
---|
10 | !define SHCNE_ASSOCCHANGED 0x08000000
|
---|
11 | !define SHCNF_IDLIST 0
|
---|
12 |
|
---|
13 | ; Used to add associations between file extensions and JOSM
|
---|
14 | !define OSM_ASSOC "josm-file"
|
---|
15 |
|
---|
16 | ; ============================================================================
|
---|
17 | ; Header configuration
|
---|
18 | ; ============================================================================
|
---|
19 | ; The name of the installer
|
---|
20 | !define PROGRAM_NAME "JOSM"
|
---|
21 |
|
---|
22 | Name "${PROGRAM_NAME} ${VERSION}"
|
---|
23 |
|
---|
24 | ; The file to write
|
---|
25 | OutFile "${DEST}-setup-${VERSION}.exe"
|
---|
26 |
|
---|
27 | XPStyle on
|
---|
28 |
|
---|
29 | Var /GLOBAL plugins
|
---|
30 |
|
---|
31 | ; ============================================================================
|
---|
32 | ; Modern UI
|
---|
33 | ; ============================================================================
|
---|
34 |
|
---|
35 | !include "MUI.nsh"
|
---|
36 |
|
---|
37 | ; Icon of installer and uninstaller
|
---|
38 | !define MUI_ICON "logo.ico"
|
---|
39 | !define MUI_UNICON "logo.ico"
|
---|
40 |
|
---|
41 | !define MUI_COMPONENTSPAGE_SMALLDESC
|
---|
42 | !define MUI_FINISHPAGE_NOAUTOCLOSE
|
---|
43 | !define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
---|
44 | !define MUI_WELCOMEFINISHPAGE_BITMAP "josm-nsis-brand.bmp"
|
---|
45 | !define MUI_WELCOMEPAGE_TEXT $(JOSM_WELCOME_TEXT)
|
---|
46 |
|
---|
47 | !define MUI_FINISHPAGE_RUN "$INSTDIR\${DEST}.exe"
|
---|
48 |
|
---|
49 |
|
---|
50 | ; ============================================================================
|
---|
51 | ; MUI Pages
|
---|
52 | ; ============================================================================
|
---|
53 |
|
---|
54 | !insertmacro MUI_PAGE_WELCOME
|
---|
55 | !insertmacro MUI_PAGE_LICENSE "..\core\LICENSE"
|
---|
56 | !insertmacro MUI_PAGE_COMPONENTS
|
---|
57 | ;Page custom DisplayAdditionalTasksPage
|
---|
58 | !insertmacro MUI_PAGE_DIRECTORY
|
---|
59 | !insertmacro MUI_PAGE_INSTFILES
|
---|
60 | !insertmacro MUI_PAGE_FINISH
|
---|
61 |
|
---|
62 | !insertmacro MUI_UNPAGE_WELCOME
|
---|
63 | !insertmacro MUI_UNPAGE_CONFIRM
|
---|
64 | !insertmacro MUI_UNPAGE_COMPONENTS
|
---|
65 | !insertmacro MUI_UNPAGE_INSTFILES
|
---|
66 | !insertmacro MUI_UNPAGE_FINISH
|
---|
67 |
|
---|
68 | ; ============================================================================
|
---|
69 | ; MUI Languages
|
---|
70 | ; ============================================================================
|
---|
71 |
|
---|
72 | ;Remember the installer language
|
---|
73 | !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
|
---|
74 | !define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM"
|
---|
75 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
---|
76 |
|
---|
77 | ;; English goes first because its the default. The rest are
|
---|
78 | ;; in alphabetical order (at least the strings actually displayed
|
---|
79 | ;; will be).
|
---|
80 |
|
---|
81 | !insertmacro MUI_LANGUAGE "English"
|
---|
82 | !insertmacro MUI_LANGUAGE "French"
|
---|
83 | !insertmacro MUI_LANGUAGE "German"
|
---|
84 |
|
---|
85 | ;--------------------------------
|
---|
86 | ;Translations
|
---|
87 |
|
---|
88 | !define JOSM_DEFAULT_LANGFILE "locale\english.nsh"
|
---|
89 |
|
---|
90 | !include "langmacros.nsh"
|
---|
91 |
|
---|
92 | !insertmacro JOSM_MACRO_INCLUDE_LANGFILE "ENGLISH" "locale\english.nsh"
|
---|
93 | !insertmacro JOSM_MACRO_INCLUDE_LANGFILE "FRENCH" "locale\french.nsh"
|
---|
94 | !insertmacro JOSM_MACRO_INCLUDE_LANGFILE "GERMAN" "locale\german.nsh"
|
---|
95 |
|
---|
96 | ; Uninstall stuff
|
---|
97 | !define MUI_UNCONFIRMPAGE_TEXT_TOP ${un.JOSM_UNCONFIRMPAGE_TEXT_TOP}
|
---|
98 |
|
---|
99 | ; ============================================================================
|
---|
100 | ; Installation types
|
---|
101 | ; ============================================================================
|
---|
102 |
|
---|
103 | InstType "$(JOSM_FULL_INSTALL)"
|
---|
104 |
|
---|
105 | InstType "un.$(un.JOSM_DEFAULT_UNINSTALL)"
|
---|
106 | InstType "un.$(un.JOSM_FULL_UNINSTALL)"
|
---|
107 |
|
---|
108 | ; ============================================================================
|
---|
109 | ; Reserve Files
|
---|
110 | ; ============================================================================
|
---|
111 |
|
---|
112 | ;Things that need to be extracted on first (keep these lines before any File command!)
|
---|
113 | ;Only useful for BZIP2 compression
|
---|
114 |
|
---|
115 | !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
---|
116 |
|
---|
117 | ; ============================================================================
|
---|
118 | ; Section macros
|
---|
119 | ; ============================================================================
|
---|
120 | !include "Sections.nsh"
|
---|
121 |
|
---|
122 | ; ========= Macro to unselect and disable a section =========
|
---|
123 |
|
---|
124 | !macro DisableSection SECTION
|
---|
125 |
|
---|
126 | Push $0
|
---|
127 | SectionGetFlags "${SECTION}" $0
|
---|
128 | IntOp $0 $0 & ${SECTION_OFF}
|
---|
129 | IntOp $0 $0 | ${SF_RO}
|
---|
130 | SectionSetFlags "${SECTION}" $0
|
---|
131 | Pop $0
|
---|
132 |
|
---|
133 | !macroend
|
---|
134 |
|
---|
135 | ; ========= Macro to enable (unreadonly) a section =========
|
---|
136 | !define SECTION_ENABLE 0xFFFFFFEF
|
---|
137 | !macro EnableSection SECTION
|
---|
138 |
|
---|
139 | Push $0
|
---|
140 | SectionGetFlags "${SECTION}" $0
|
---|
141 | IntOp $0 $0 & ${SECTION_ENABLE}
|
---|
142 | SectionSetFlags "${SECTION}" $0
|
---|
143 | Pop $0
|
---|
144 |
|
---|
145 | !macroend
|
---|
146 |
|
---|
147 | ; ============================================================================
|
---|
148 | ; Command Line
|
---|
149 | ; ============================================================================
|
---|
150 | !include "FileFunc.nsh"
|
---|
151 |
|
---|
152 | ; ============================================================================
|
---|
153 | ; Directory selection page configuration
|
---|
154 | ; ============================================================================
|
---|
155 | ; The text to prompt the user to enter a directory
|
---|
156 | DirText $(JOSM_DIR_TEXT)
|
---|
157 |
|
---|
158 | ; The default installation directory
|
---|
159 | InstallDir $PROGRAMFILES\JOSM\
|
---|
160 |
|
---|
161 | ; See if this is an upgrade; if so, use the old InstallDir as default
|
---|
162 | InstallDirRegKey HKEY_LOCAL_MACHINE SOFTWARE\JOSM "InstallDir"
|
---|
163 |
|
---|
164 |
|
---|
165 | ; ============================================================================
|
---|
166 | ; Install page configuration
|
---|
167 | ; ============================================================================
|
---|
168 | ShowInstDetails show
|
---|
169 | ShowUninstDetails show
|
---|
170 |
|
---|
171 | ; ============================================================================
|
---|
172 | ; Functions and macros
|
---|
173 | ; ============================================================================
|
---|
174 |
|
---|
175 | ; update file extension icons
|
---|
176 | !macro UpdateIcons
|
---|
177 | Push $R0
|
---|
178 | Push $R1
|
---|
179 | Push $R2
|
---|
180 |
|
---|
181 | !define UPDATEICONS_UNIQUE ${__LINE__}
|
---|
182 |
|
---|
183 | IfFileExists "$SYSDIR\shell32.dll" UpdateIcons.next1_${UPDATEICONS_UNIQUE} UpdateIcons.error1_${UPDATEICONS_UNIQUE}
|
---|
184 | UpdateIcons.next1_${UPDATEICONS_UNIQUE}:
|
---|
185 | GetDllVersion "$SYSDIR\shell32.dll" $R0 $R1
|
---|
186 | IntOp $R2 $R0 / 0x00010000
|
---|
187 | IntCmp $R2 4 UpdateIcons.next2_${UPDATEICONS_UNIQUE} UpdateIcons.error2_${UPDATEICONS_UNIQUE}
|
---|
188 | UpdateIcons.next2_${UPDATEICONS_UNIQUE}:
|
---|
189 | System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
|
---|
190 | Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
|
---|
191 |
|
---|
192 | UpdateIcons.error1_${UPDATEICONS_UNIQUE}:
|
---|
193 | MessageBox MB_OK|MB_ICONSTOP $(JOSM_UPDATEICONS_ERROR1)
|
---|
194 | Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
|
---|
195 | UpdateIcons.error2_${UPDATEICONS_UNIQUE}:
|
---|
196 | MessageBox MB_OK|MB_ICONINFORMATION $(JOSM_UPDATEICONS_ERROR2)
|
---|
197 | Goto UpdateIcons.quit_${UPDATEICONS_UNIQUE}
|
---|
198 | UpdateIcons.quit_${UPDATEICONS_UNIQUE}:
|
---|
199 | !undef UPDATEICONS_UNIQUE
|
---|
200 | Pop $R2
|
---|
201 | Pop $R1
|
---|
202 | Pop $R0
|
---|
203 |
|
---|
204 | !macroend
|
---|
205 |
|
---|
206 | ; associate a file extension to an icon
|
---|
207 | Function Associate
|
---|
208 | ; $R0 should contain the prefix to associate to JOSM
|
---|
209 | Push $R1
|
---|
210 |
|
---|
211 | ReadRegStr $R1 HKCR $R0 ""
|
---|
212 | StrCmp $R1 "" Associate.doRegister
|
---|
213 | Goto Associate.end
|
---|
214 | Associate.doRegister:
|
---|
215 | ;The extension is not associated to any program, we can do the link
|
---|
216 | WriteRegStr HKCR $R0 "" ${OSM_ASSOC}
|
---|
217 | Associate.end:
|
---|
218 | pop $R1
|
---|
219 | FunctionEnd
|
---|
220 |
|
---|
221 | ; disassociate a file extension from an icon
|
---|
222 | Function un.unlink
|
---|
223 | ; $R0 should contain the prefix to unlink
|
---|
224 | Push $R1
|
---|
225 |
|
---|
226 | ReadRegStr $R1 HKCR $R0 ""
|
---|
227 | StrCmp $R1 ${OSM_ASSOC} un.unlink.doUnlink
|
---|
228 | Goto un.unlink.end
|
---|
229 | un.unlink.doUnlink:
|
---|
230 | ; The extension is associated with JOSM so, we must destroy this!
|
---|
231 | DeleteRegKey HKCR $R0
|
---|
232 | un.unlink.end:
|
---|
233 | pop $R1
|
---|
234 | FunctionEnd
|
---|
235 |
|
---|
236 | Function .onInit
|
---|
237 | ;Extract InstallOptions INI files
|
---|
238 | ; !insertmacro MUI_INSTALLOPTIONS_EXTRACT "AdditionalTasksPage.ini"
|
---|
239 | !insertmacro MUI_LANGDLL_DISPLAY
|
---|
240 | FunctionEnd
|
---|
241 |
|
---|
242 | Function un.onInit
|
---|
243 |
|
---|
244 | !insertmacro MUI_UNGETLANGUAGE
|
---|
245 |
|
---|
246 | FunctionEnd
|
---|
247 |
|
---|
248 | ; ============================================================================
|
---|
249 | ; Installation execution commands
|
---|
250 | ; ============================================================================
|
---|
251 |
|
---|
252 | Section "-Required"
|
---|
253 | ;-------------------------------------------
|
---|
254 |
|
---|
255 | ;
|
---|
256 | ; Install for every user
|
---|
257 | ;
|
---|
258 | SectionIn 1 2 RO
|
---|
259 | SetShellVarContext current
|
---|
260 |
|
---|
261 | SetOutPath $INSTDIR
|
---|
262 |
|
---|
263 | ; Write the uninstall keys for Windows
|
---|
264 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "DisplayVersion" "${VERSION}"
|
---|
265 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "DisplayName" "JOSM ${VERSION}"
|
---|
266 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
---|
267 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "Publisher" "The OpenStreetMap JOSM developers team, https://josm.openstreetmap.de"
|
---|
268 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "HelpLink" "mailto:josm-dev@openstreetmap.org."
|
---|
269 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLInfoAbout" "https://josm.openstreetmap.de"
|
---|
270 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLUpdateInfo" "https://josm.openstreetmap.de"
|
---|
271 | WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoModify" 1
|
---|
272 | WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoRepair" 1
|
---|
273 | WriteUninstaller "uninstall.exe"
|
---|
274 |
|
---|
275 | ; Write an entry for ShellExecute
|
---|
276 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "" '$INSTDIR\${DEST}.exe'
|
---|
277 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "Path" '$INSTDIR'
|
---|
278 |
|
---|
279 | SectionEnd ; "Required"
|
---|
280 |
|
---|
281 |
|
---|
282 | Section $(JOSM_SEC_JOSM) SecJosm
|
---|
283 | ;-------------------------------------------
|
---|
284 | SectionIn 1
|
---|
285 | SetOutPath $INSTDIR
|
---|
286 | File "${DEST}.exe"
|
---|
287 | File "josm-tested.jar"
|
---|
288 |
|
---|
289 | ; XXX - should be provided/done by josm.jar itself and not here!
|
---|
290 | SetShellVarContext current
|
---|
291 | SetOutPath "$APPDATA\JOSM"
|
---|
292 |
|
---|
293 | SectionEnd
|
---|
294 |
|
---|
295 | SectionGroup $(JOSM_SEC_PLUGINS_GROUP) SecPluginsGroup
|
---|
296 |
|
---|
297 | Section $(JOSM_SEC_TURNRESTRICTIONS_PLUGIN) SecTurnrestrictionsPlugin
|
---|
298 | ;-------------------------------------------
|
---|
299 | SectionIn 1 2
|
---|
300 | SetShellVarContext current
|
---|
301 | SetOutPath $APPDATA\JOSM\plugins
|
---|
302 | File "..\dist\turnrestrictions.jar"
|
---|
303 | StrCpy $plugins "$plugins<entry value='turnrestrictions'/>"
|
---|
304 | SectionEnd
|
---|
305 |
|
---|
306 | Section $(JOSM_SEC_WMS) SecWMS
|
---|
307 | ;-------------------------------------------
|
---|
308 | SectionIn 1 2
|
---|
309 | SetShellVarContext current
|
---|
310 | SetOutPath $INSTDIR\imageformats
|
---|
311 | File "webkit-image\imageformats\qjpeg4.dll"
|
---|
312 | SetOutPath $INSTDIR
|
---|
313 | File "webkit-image\mingwm10.dll"
|
---|
314 | File "webkit-image\QtCore4.dll"
|
---|
315 | File "webkit-image\QtGui4.dll"
|
---|
316 | File "webkit-image\QtNetwork4.dll"
|
---|
317 | File "webkit-image\QtWebKit4.dll"
|
---|
318 | File "webkit-image\webkit-image.exe"
|
---|
319 | SectionEnd
|
---|
320 |
|
---|
321 | SectionGroupEnd ; "Plugins"
|
---|
322 |
|
---|
323 | Section $(JOSM_SEC_STARTMENU) SecStartMenu
|
---|
324 | ;-------------------------------------------
|
---|
325 | SectionIn 1 2
|
---|
326 | ; To quote "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp":
|
---|
327 | ; "Do not include Readme, Help, or Uninstall entries on the Programs menu."
|
---|
328 | CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
|
---|
329 | SectionEnd
|
---|
330 |
|
---|
331 | Section $(JOSM_SEC_DESKTOP_ICON) SecDesktopIcon
|
---|
332 | ;-------------------------------------------
|
---|
333 | ; Create desktop icon
|
---|
334 | ; Desktop icon for a program should not be installed as default!
|
---|
335 | CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
|
---|
336 | SectionEnd
|
---|
337 |
|
---|
338 | Section $(JOSM_SEC_QUICKLAUNCH_ICON) SecQuickLaunchIcon
|
---|
339 | ;-------------------------------------------
|
---|
340 | ; Create quick launch icon. Does not really exist as of Windows 7/8 but still advanced users use it.
|
---|
341 | ; Only disable it by default, see #10241
|
---|
342 | CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
|
---|
343 | SectionEnd
|
---|
344 |
|
---|
345 | Section $(JOSM_SEC_FILE_EXTENSIONS) SecFileExtensions
|
---|
346 | ;-------------------------------------------
|
---|
347 | SectionIn 1 2
|
---|
348 | ; Create File Extensions
|
---|
349 | WriteRegStr HKCR ${OSM_ASSOC} "" "OpenStreetMap data"
|
---|
350 | WriteRegStr HKCR "${OSM_ASSOC}\Shell\open\command" "" '"$INSTDIR\${DEST}.exe" "%1"'
|
---|
351 | WriteRegStr HKCR "${OSM_ASSOC}\DefaultIcon" "" '"$INSTDIR\${DEST}.exe",0'
|
---|
352 | push $R0
|
---|
353 | StrCpy $R0 ".osm"
|
---|
354 | Call Associate
|
---|
355 | StrCpy $R0 ".gpx"
|
---|
356 | Call Associate
|
---|
357 | ; if somethings added here, add it also to the uninstall section
|
---|
358 | pop $R0
|
---|
359 | !insertmacro UpdateIcons
|
---|
360 | SectionEnd
|
---|
361 |
|
---|
362 |
|
---|
363 | Section "-PluginSetting"
|
---|
364 | ;-------------------------------------------
|
---|
365 | SectionIn 1 2
|
---|
366 | ;MessageBox MB_OK "PluginSetting!" IDOK 0
|
---|
367 | ; XXX - should better be handled inside JOSM (recent plugin manager is going in the right direction)
|
---|
368 | SetShellVarContext current
|
---|
369 | !include LogicLib.nsh
|
---|
370 | IfFileExists "$APPDATA\JOSM\preferences" settings_exists
|
---|
371 | IfFileExists "$APPDATA\JOSM\preferences.xml" settings_exists
|
---|
372 | FileOpen $R0 "$APPDATA\JOSM\preferences.xml" w
|
---|
373 | FileWrite $R0 "<?xml version='1.0' encoding='UTF-8'?><preferences xmlns='http://josm.openstreetmap.de/preferences-1.0' version='4660'><list key='plugins'>$plugins</list></preferences>"
|
---|
374 | FileClose $R0
|
---|
375 | settings_exists:
|
---|
376 |
|
---|
377 | SectionEnd
|
---|
378 |
|
---|
379 |
|
---|
380 | Section "un.$(un.JOSM_SEC_UNINSTALL)" un.SecUinstall
|
---|
381 | ;-------------------------------------------
|
---|
382 |
|
---|
383 | ;
|
---|
384 | ; UnInstall for every user
|
---|
385 | ;
|
---|
386 | SectionIn 1 2
|
---|
387 | SetShellVarContext current
|
---|
388 |
|
---|
389 | Delete "$INSTDIR\josm-tested.jar"
|
---|
390 | IfErrors 0 NoJOSMErrorMsg
|
---|
391 | MessageBox MB_OK $(un.JOSM_IN_USE_ERROR) IDOK 0 ;skipped if josm.jar removed
|
---|
392 | Abort $(un.JOSM_IN_USE_ERROR)
|
---|
393 | NoJOSMErrorMsg:
|
---|
394 | Delete "$INSTDIR\${DEST}.exe"
|
---|
395 | Delete "$INSTDIR\imageformats\qjpeg4.dll"
|
---|
396 | RMDir "$INSTDIR\imageformats"
|
---|
397 | Delete "$INSTDIR\mingwm10.dll"
|
---|
398 | Delete "$INSTDIR\QtCore4.dll"
|
---|
399 | Delete "$INSTDIR\QtGui4.dll"
|
---|
400 | Delete "$INSTDIR\QtNetwork4.dll"
|
---|
401 | Delete "$INSTDIR\QtWebKit4.dll"
|
---|
402 | Delete "$INSTDIR\webkit-image.exe"
|
---|
403 | Delete "$INSTDIR\uninstall.exe"
|
---|
404 |
|
---|
405 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM"
|
---|
406 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\${DEST}.exe"
|
---|
407 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe"
|
---|
408 |
|
---|
409 | ; Remove Language preference info
|
---|
410 | DeleteRegKey HKCU "Software/JOSM" ;${MUI_LANGDLL_REGISTRY_ROOT} ${MUI_LANGDLL_REGISTRY_KEY}
|
---|
411 |
|
---|
412 | push $R0
|
---|
413 | StrCpy $R0 ".osm"
|
---|
414 | Call un.unlink
|
---|
415 | StrCpy $R0 ".gpx"
|
---|
416 | Call un.unlink
|
---|
417 | pop $R0
|
---|
418 |
|
---|
419 | DeleteRegKey HKCR ${OSM_ASSOC}
|
---|
420 | DeleteRegKey HKCR "${OSM_ASSOC}\Shell\open\command"
|
---|
421 | DeleteRegKey HKCR "${OSM_ASSOC}\DefaultIcon"
|
---|
422 | !insertmacro UpdateIcons
|
---|
423 |
|
---|
424 | Delete "$SMPROGRAMS\josm.lnk"
|
---|
425 | Delete "$DESKTOP\josm.lnk"
|
---|
426 | Delete "$QUICKLAUNCH\josm.lnk"
|
---|
427 |
|
---|
428 | RMDir "$INSTDIR"
|
---|
429 |
|
---|
430 | SectionEnd ; "Uninstall"
|
---|
431 |
|
---|
432 | Section /o "un.$(un.JOSM_SEC_PERSONAL_SETTINGS)" un.SecPersonalSettings
|
---|
433 | ;-------------------------------------------
|
---|
434 | SectionIn 2
|
---|
435 | SetShellVarContext current
|
---|
436 | Delete "$APPDATA\JOSM\plugins\turnrestrictions\*.*"
|
---|
437 | RMDir "$APPDATA\JOSM\plugins\turnrestrictions"
|
---|
438 | Delete "$APPDATA\JOSM\plugins\openstreetbugs\*.*"
|
---|
439 | RMDir "$APPDATA\JOSM\plugins\openstreetbugs"
|
---|
440 | Delete "$APPDATA\JOSM\plugins\*.*"
|
---|
441 | RMDir "$APPDATA\JOSM\plugins"
|
---|
442 |
|
---|
443 | Delete "$APPDATA\JOSM\motd.html"
|
---|
444 | Delete "$APPDATA\JOSM\preferences.xml"
|
---|
445 | RMDir "$APPDATA\JOSM"
|
---|
446 | SectionEnd
|
---|
447 |
|
---|
448 |
|
---|
449 | Section "-Un.Finally"
|
---|
450 | ;-------------------------------------------
|
---|
451 | SectionIn 1 2
|
---|
452 | ; this test must be done after all other things uninstalled (e.g. Global Settings)
|
---|
453 | IfFileExists "$INSTDIR" 0 NoFinalErrorMsg
|
---|
454 | MessageBox MB_OK $(un.JOSM_INSTDIR_ERROR) IDOK 0 ; skipped if dir doesn't exist
|
---|
455 | NoFinalErrorMsg:
|
---|
456 | SectionEnd
|
---|
457 |
|
---|
458 |
|
---|
459 | ; ============================================================================
|
---|
460 | ; PLEASE MAKE SURE, THAT THE DESCRIPTIVE TEXT FITS INTO THE DESCRIPTION FIELD!
|
---|
461 | ; ============================================================================
|
---|
462 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
---|
463 | !insertmacro MUI_DESCRIPTION_TEXT ${SecJosm} $(JOSM_SECDESC_JOSM)
|
---|
464 | !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsGroup} $(JOSM_SECDESC_PLUGINS_GROUP)
|
---|
465 | !insertmacro MUI_DESCRIPTION_TEXT ${SecTurnrestrictionsPlugin} $(JOSM_SECDESC_TURNRESTRICTIONS_PLUGIN)
|
---|
466 | !insertmacro MUI_DESCRIPTION_TEXT ${SecWMS} $(JOSM_SECDESC_WMS)
|
---|
467 | !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(JOSM_SECDESC_STARTMENU)
|
---|
468 | !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(JOSM_SECDESC_DESKTOP_ICON)
|
---|
469 | !insertmacro MUI_DESCRIPTION_TEXT ${SecQuickLaunchIcon} $(JOSM_SECDESC_QUICKLAUNCH_ICON)
|
---|
470 | !insertmacro MUI_DESCRIPTION_TEXT ${SecFileExtensions} $(JOSM_SECDESC_FILE_EXTENSIONS)
|
---|
471 |
|
---|
472 |
|
---|
473 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
---|
474 |
|
---|
475 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
---|
476 | !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUinstall} $(un.JOSM_SECDESC_UNINSTALL)
|
---|
477 | !insertmacro MUI_DESCRIPTION_TEXT ${un.SecPersonalSettings} $(un.JOSM_SECDESC_PERSONAL_SETTINGS)
|
---|
478 | !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
---|
479 |
|
---|
480 | ; ============================================================================
|
---|
481 | ; Callback functions
|
---|
482 | ; ============================================================================
|
---|
483 |
|
---|