Annotation of Amaya/amaya-wx_release.nsi, revision 1.24
1.1 gully 1: ;--------------------------------
2: ;Include Modern UI
3:
4: !include "MUI.nsh"
5:
1.11 gully 6:
1.1 gully 7: ;--------------------------------
8: ;General
9:
10: ;Name and file
1.24 ! gully 11: !define VERSION "9.1.4"
1.1 gully 12: Name "Amaya WX ${VERSION}"
1.9 cvs 13: OutFile "amaya-WinXP-${VERSION}.exe"
1.1 gully 14:
15: ;Use lzma to compress (better than zip)
16: SetCompressor lzma
17:
18: ;Default installation folder
1.2 gully 19: InstallDir "$PROGRAMFILES\AmayaWX"
1.1 gully 20:
21: ;Get installation folder from registry if available
1.2 gully 22: InstallDirRegKey HKCU "Software\AmayaWX" ""
1.1 gully 23:
24: ;--------------------------------
25: ;Variables
26:
1.3 gully 27:
1.1 gully 28: Var STARTMENU_FOLDER
29: ;--------------------------------
30: ;Interface Settings
31:
32: !define MUI_ABORTWARNING
33:
34: ;--------------------------------
35: ;Language Selection Dialog Settings
36:
37: ;Remember the installer language
38: !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
1.2 gully 39: !define MUI_LANGDLL_REGISTRY_KEY "Software\AmayaWX"
1.1 gully 40: !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
41:
42: ;--------------------------------
43: ;Pages
44:
45: !insertmacro MUI_PAGE_LICENSE "amaya\COPYRIGHT"
46: !insertmacro MUI_PAGE_COMPONENTS
47: !insertmacro MUI_PAGE_DIRECTORY
48:
49: ;Start Menu Folder Page Configuration
50: !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
1.2 gully 51: !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\AmayaWX"
1.1 gully 52: !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
53: !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
54:
55: !insertmacro MUI_PAGE_INSTFILES
56:
1.10 gully 57: !define MUI_FINISHPAGE_LINK "Visit the Amaya site for the latest news, FAQs and support"
58: !define MUI_FINISHPAGE_LINK_LOCATION "http://www.w3.org/Amaya"
59:
60: !define MUI_FINISHPAGE_RUN "$INSTDIR\WindowsWX\bin\amaya.exe"
61: !define MUI_FINISHPAGE_NOREBOOTSUPPORT
62:
63: !insertmacro MUI_PAGE_FINISH
64:
1.1 gully 65: !insertmacro MUI_UNPAGE_CONFIRM
66: !insertmacro MUI_UNPAGE_INSTFILES
67:
68: ;--------------------------------
69: ;Languages
70:
71: !insertmacro MUI_LANGUAGE "English"
72: !insertmacro MUI_LANGUAGE "French"
73: !insertmacro MUI_LANGUAGE "German"
74: !insertmacro MUI_LANGUAGE "Spanish"
75: ; !insertmacro MUI_LANGUAGE "SimpChinese"
76: ; !insertmacro MUI_LANGUAGE "TradChinese"
77: ; !insertmacro MUI_LANGUAGE "Japanese"
78: ; !insertmacro MUI_LANGUAGE "Korean"
79: ; !insertmacro MUI_LANGUAGE "Italian"
80: ; !insertmacro MUI_LANGUAGE "Dutch"
81: ; !insertmacro MUI_LANGUAGE "Danish"
82: ; !insertmacro MUI_LANGUAGE "Swedish"
83: ; !insertmacro MUI_LANGUAGE "Norwegian"
84: ; !insertmacro MUI_LANGUAGE "Finnish"
85: ; !insertmacro MUI_LANGUAGE "Greek"
86: !insertmacro MUI_LANGUAGE "Russian"
87: !insertmacro MUI_LANGUAGE "Portuguese"
88: ; !insertmacro MUI_LANGUAGE "PortugueseBR"
89: ; !insertmacro MUI_LANGUAGE "Polish"
90: ; !insertmacro MUI_LANGUAGE "Ukrainian"
91: ; !insertmacro MUI_LANGUAGE "Czech"
92: ; !insertmacro MUI_LANGUAGE "Slovak"
93: ; !insertmacro MUI_LANGUAGE "Croatian"
94: ; !insertmacro MUI_LANGUAGE "Bulgarian"
95: ; !insertmacro MUI_LANGUAGE "Hungarian"
96: ; !insertmacro MUI_LANGUAGE "Thai"
97: ; !insertmacro MUI_LANGUAGE "Romanian"
98: ; !insertmacro MUI_LANGUAGE "Latvian"
99: ; !insertmacro MUI_LANGUAGE "Macedonian"
100: ; !insertmacro MUI_LANGUAGE "Estonian"
101: !insertmacro MUI_LANGUAGE "Turkish"
102: ; !insertmacro MUI_LANGUAGE "Lithuanian"
103: ; !insertmacro MUI_LANGUAGE "Catalan"
104: ; !insertmacro MUI_LANGUAGE "Slovenian"
105: ; !insertmacro MUI_LANGUAGE "Serbian"
106: ; !insertmacro MUI_LANGUAGE "SerbianLatin"
107: ; !insertmacro MUI_LANGUAGE "Arabic"
108: ; !insertmacro MUI_LANGUAGE "Farsi"
109: ; !insertmacro MUI_LANGUAGE "Hebrew"
110: ; !insertmacro MUI_LANGUAGE "Indonesian"
111: ; !insertmacro MUI_LANGUAGE "Mongolian"
112: ; !insertmacro MUI_LANGUAGE "Luxembourgish"
113: ; !insertmacro MUI_LANGUAGE "Albanian"
114:
115: ;--------------------------------
116: ;Reserve Files
117:
118: ;These files should be inserted before other files in the data block
119: ;Keep these lines before any File command
120: ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
121:
122: !insertmacro MUI_RESERVEFILE_LANGDLL
123:
124: ;--------------------------------
125: ;Installer Sections
126:
127: Section "Amaya" SecAmaya
128:
1.9 cvs 129:
1.10 gully 130: SetDetailsPrint textonly
131: DetailPrint "Testing supported OS..."
132: SetDetailsPrint listonly
133:
1.9 cvs 134: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
135: ;Test the platform
136: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
1.10 gully 137: ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
138: StrCmp $R0 "" lbl_notwinnt lbl_winnt
1.9 cvs 139:
140: ; we are not NT
1.10 gully 141: lbl_notwinnt:
142: ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
1.9 cvs 143:
144: StrCpy $R1 $R0 1
145: StrCmp $R1 '4' 0 lbl_error
146:
147: StrCpy $R1 $R0 3
148:
149: StrCmp $R1 '4.0' lbl_win32_95
150: StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
151:
152: lbl_win32_95:
1.10 gully 153: Abort "Win95 not supported"
1.9 cvs 154:
155: lbl_win32_98:
1.10 gully 156: Abort "Win98 not supported"
1.9 cvs 157:
158: lbl_win32_ME:
1.10 gully 159: Abort "WinME not supported"
1.9 cvs 160:
161: lbl_winnt:
162:
163: StrCpy $R1 $R0 1
164:
165: StrCmp $R1 '3' lbl_winnt_x
166: StrCmp $R1 '4' lbl_winnt_x
167:
168: StrCpy $R1 $R0 3
169:
170: StrCmp $R1 '5.0' lbl_winnt_2000
171: StrCmp $R1 '5.1' lbl_winnt_XP
1.10 gully 172: StrCmp $R1 '5.2' lbl_winnt_2003
173: Goto lbl_error
1.9 cvs 174:
175: lbl_winnt_x:
176: StrCpy $R0 "NT $R0" 6
177: Goto lbl_done
178:
179: lbl_winnt_2000:
180: Strcpy $R0 '2000'
181: Goto lbl_done
182:
183: lbl_winnt_XP:
184: Strcpy $R0 'XP'
185: Goto lbl_done
186:
187: lbl_winnt_2003:
188: Strcpy $R0 '2003'
189: Goto lbl_done
190:
191: lbl_error:
1.10 gully 192: Abort "Only WinXP/2k/NT are supported"
1.9 cvs 193: lbl_done:
194: ;XXXXXXXXXXXXXXXXXXXXXXXXXX
195:
1.1 gully 196: ;This section is required : readonly mode
197: SectionIn RO
198:
1.10 gully 199: SetDetailsPrint textonly
200: DetailPrint "Installing Amaya binaries and wxWidgets DLL"
201: SetDetailsPrint listonly
202:
1.1 gully 203: SetOutPath "$INSTDIR\WindowsWX\bin"
204: File WindowsWX\bin\amaya.exe
205: File WindowsWX\bin\wxmsw*u_xrc_vc_custom.dll
206: File WindowsWX\bin\wxmsw*u_html_vc_custom.dll
207: File WindowsWX\bin\wxmsw*u_core_vc_custom.dll
208: File WindowsWX\bin\wxmsw*u_adv_vc_custom.dll
209: File WindowsWX\bin\wxmsw*u_gl_vc_custom.dll
210: File WindowsWX\bin\wxbase*u_vc_custom.dll
211: File WindowsWX\bin\wxbase*u_xml_vc_custom.dll
1.21 cvs 212: File WindowsWX\bin\thotprinter.dll
1.1 gully 213:
1.10 gully 214: SetDetailsPrint textonly
215: DetailPrint "Installing Amaya resources : icons, dialogues"
216: SetDetailsPrint listonly
1.1 gully 217:
1.14 gully 218: SetOutPath "$INSTDIR\resources\icons\misc"
219: File resources\icons\misc\*.png
220: File resources\icons\misc\*.gif
221: File resources\icons\misc\*.ico
222: SetOutPath "$INSTDIR\resources\icons\16x16"
223: File resources\icons\16x16\*.png
224: File resources\icons\16x16\*.gif
225: File resources\icons\16x16\*.ico
226: SetOutPath "$INSTDIR\resources\icons\22x22"
227: File resources\icons\22x22\*.png
228: File resources\icons\22x22\*.gif
229: File resources\icons\22x22\*.ico
1.1 gully 230: SetOutPath "$INSTDIR\resources\xrc"
231: File resources\xrc\*.xrc
1.11 gully 232: SetOutPath "$INSTDIR\amaya\wxdialog"
233: File amaya\wxdialog\appicon.ico
1.12 gully 234: File amaya\wxdialog\amaya.rc
1.1 gully 235:
1.10 gully 236: SetDetailsPrint textonly
237: DetailPrint "Installing Amaya schemas"
238: SetDetailsPrint listonly
1.1 gully 239:
240: SetOutPath "$INSTDIR\amaya"
241: File amaya\COPYRIGHT
242: File amaya\*.png
243: File amaya\*.gif
244: File amaya\*.css
245: File amaya\*.html*
246: File amaya\*.PRS
247: File amaya\*.STR
248: File amaya\*.TRA
249: File amaya\*.conf
250: File amaya\*.en
251: File amaya\*.trans*
252: File amaya\*.ico
253: File amaya\*.svg
254:
1.10 gully 255: SetDetailsPrint textonly
256: DetailPrint "Installing annotlib schemas"
257: SetDetailsPrint listonly
258:
1.1 gully 259: SetOutPath "$INSTDIR\annotlib"
260: File annotlib\*.png
261: File annotlib\*.gif
262: File annotlib\*.PRS
263: File annotlib\*.STR
264: File annotlib\*.TRA
265: File annotlib\*.en
266:
1.10 gully 267: SetDetailsPrint textonly
268: DetailPrint "Installing Amaya config files"
269: SetDetailsPrint listonly
270:
1.1 gully 271: SetOutPath "$INSTDIR\config\libconfig"
272: File config\libconfig\*.png
273: File config\libconfig\*.svg
274: File config\libconfig\*.css
275: File config\libconfig\*.lhtml
276:
277: SetOutPath "$INSTDIR\config"
278: File config\*-amayadialogue
279: File config\*-libdialogue
280: File config\*-amayamsg
281: File config\*-libdialogue
282: File config\lib_files.dat
283: File config\fonts.*
284: File config\amaya.kb
285: File config\amaya.profiles
286: File config\*.rdf
287: File config\annot.schemas
288: File config\win-thot.rc
289:
1.10 gully 290: SetDetailsPrint textonly
291: DetailPrint "Installing Amaya dictionnaries"
292: SetDetailsPrint listonly
293:
1.1 gully 294: SetOutPath "$INSTDIR\dicopar"
295: File dicopar\alphabet
296: File dicopar\*.ptn
297: File dicopar\clavier
298: File dicopar\*.dic
299:
1.10 gully 300: SetDetailsPrint textonly
301: DetailPrint "Installing Amaya documentation"
302: SetDetailsPrint listonly
303:
1.17 gully 304: SetOutPath "$INSTDIR\doc\WX"
305: File doc\WX\*
306: SetOutPath "$INSTDIR\doc\WX\HTML-elements"
307: File doc\WX\HTML-elements\*
1.1 gully 308: SetOutPath "$INSTDIR\doc\html"
309: File doc\html\*
1.4 gully 310: SetOutPath "$INSTDIR\doc\html\accessibility_in_amaya"
1.1 gully 311: File doc\html\accessibility_in_amaya\*
1.4 gully 312: SetOutPath "$INSTDIR\doc\html\attaching_annotations"
1.1 gully 313: File doc\html\attaching_annotations\*
1.4 gully 314: SetOutPath "$INSTDIR\doc\html\browsing"
1.1 gully 315: File doc\html\browsing\*
1.4 gully 316: SetOutPath "$INSTDIR\doc\html\configuring_amaya"
1.1 gully 317: File doc\html\configuring_amaya\*
1.4 gully 318: SetOutPath "$INSTDIR\doc\html\editing_attributes"
1.1 gully 319: File doc\html\editing_attributes\*
1.4 gully 320: SetOutPath "$INSTDIR\doc\html\editing_documents"
1.1 gully 321: File doc\html\editing_documents\*
1.4 gully 322: SetOutPath "$INSTDIR\doc\html\editing_iso-latin-1_characters"
1.1 gully 323: File doc\html\editing_iso-latin-1_characters\*
1.4 gully 324: SetOutPath "$INSTDIR\doc\html\editing_mathematics"
1.1 gully 325: File doc\html\editing_mathematics\*
1.4 gully 326: SetOutPath "$INSTDIR\doc\html\editing_tables"
1.1 gully 327: File doc\html\editing_tables\*
1.4 gully 328: SetOutPath "$INSTDIR\doc\html\elements"
1.1 gully 329: File doc\html\elements\*
1.4 gully 330: SetOutPath "$INSTDIR\doc\html\HTML-elements"
1.1 gully 331: File doc\html\HTML-elements\*
1.4 gully 332: SetOutPath "$INSTDIR\doc\html\linking"
1.1 gully 333: File doc\html\linking\*
1.4 gully 334: SetOutPath "$INSTDIR\doc\html\printing"
1.1 gully 335: File doc\html\printing\*
1.4 gully 336: SetOutPath "$INSTDIR\doc\html\saving_and_publishing_documents"
1.1 gully 337: File doc\html\saving_and_publishing_documents\*
1.4 gully 338: SetOutPath "$INSTDIR\doc\html\searching_and_replacing_text"
1.1 gully 339: File doc\html\searching_and_replacing_text\*
1.4 gully 340: SetOutPath "$INSTDIR\doc\html\selecting"
1.1 gully 341: File doc\html\selecting\*
1.4 gully 342: SetOutPath "$INSTDIR\doc\html\spell_checking"
1.1 gully 343: File doc\html\spell_checking\*
1.4 gully 344: SetOutPath "$INSTDIR\doc\html\style_sheets"
1.1 gully 345: File doc\html\style_sheets\*
1.4 gully 346: SetOutPath "$INSTDIR\doc\html\using_graphics"
1.1 gully 347: File doc\html\using_graphics\*
1.4 gully 348: SetOutPath "$INSTDIR\doc\html\using_image_maps"
1.1 gully 349: File doc\html\using_image_maps\*
1.4 gully 350: SetOutPath "$INSTDIR\doc\html\using_the_makebook_function"
1.1 gully 351: File doc\html\using_the_makebook_function\*
1.4 gully 352: SetOutPath "$INSTDIR\doc\html\using_xml"
1.1 gully 353: File doc\html\using_xml\*
1.4 gully 354: SetOutPath "$INSTDIR\doc\html\viewing"
1.1 gully 355: File doc\html\viewing\*
356: SetOutPath "$INSTDIR\doc\images"
357: File doc\images\*
358:
1.10 gully 359: SetDetailsPrint textonly
360: DetailPrint "Installing Amaya ttf fonts"
361: SetDetailsPrint listonly
362:
1.1 gully 363: SetOutPath "$INSTDIR\fonts"
364: File fonts\*
365:
1.10 gully 366: SetDetailsPrint textonly
367: DetailPrint "Writting registry keys"
368: SetDetailsPrint listonly
369:
1.1 gully 370: ;Store installation folder
1.10 gully 371: WriteRegStr HKCU "Software\AmayaWX" "" $INSTDIR
372: WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "UninstallString" '"$INSTDIR\Uninstall.exe"'
373: WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "InstallLocation" "$INSTDIR"
374: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "DisplayName" "Amaya"
1.11 gully 375: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "DisplayIcon" "$INSTDIR\WindowsWX\bin\amaya.exe"
1.10 gully 376: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "DisplayVersion" "${VERSION}"
377: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX" "URLInfoAbout" "http://www.w3.org/Amaya"
1.11 gully 378:
379: ; Associate files to amaya
380: WriteRegStr HKCR "Amaya" "" "Amaya Files"
381: WriteRegStr HKCR "Amaya\DefaultIcon" "" "$INSTDIR\WindowsWX\bin\amaya.exe"
382: ReadRegStr $R0 HKCR "Amaya\shell\open\command" ""
383: StrCmp $R0 "" 0 no_amayaopen
384: WriteRegStr HKCR "Amaya\shell" "" "open"
385: WriteRegStr HKCR "Amaya\shell\open\command" "" '"$INSTDIR\WindowsWX\bin\amaya.exe" "%1"'
386: no_amayaopen:
1.1 gully 387:
388: ;Create uninstaller
389: WriteUninstaller "$INSTDIR\Uninstall.exe"
390:
391: ;Start Menu
392: !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
393: ;Create shortcuts
394: CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
395: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
396: CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
397: !insertmacro MUI_STARTMENU_WRITE_END
398:
1.3 gully 399: ;Create desktop link
400: CreateShortCut "$DESKTOP\AmayaWX.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
1.1 gully 401: SectionEnd
402:
1.11 gully 403:
404: SubSection "File association" SecFileAss
405:
1.22 gully 406: ; --> .html
1.20 cvs 407: Section /o ".html (HyperText Markup Language)" SecAssHTML
1.22 gully 408: ReadRegStr $R0 HKCR ".html" ""
409: StrCmp $R0 "Amaya" allready_amaya no_amaya
410: no_amaya:
411: WriteRegStr HKCR ".html" "AM_OLD_VALUE" $R0
1.11 gully 412: WriteRegStr HKCR ".html" "" "Amaya"
1.22 gully 413: allready_amaya:
1.11 gully 414: SectionEnd
415:
1.22 gully 416: ; --> .htm
417: Section /o ".htm (HyperText Markup Language)" SecAssHTM
418: ReadRegStr $R0 HKCR ".htm" ""
419: StrCmp $R0 "Amaya" allready_amaya no_amaya
420: no_amaya:
421: WriteRegStr HKCR ".htm" "AM_OLD_VALUE" $R0
422: WriteRegStr HKCR ".htm" "" "Amaya"
423: allready_amaya:
424: SectionEnd
425:
426: ; --> .xml
1.20 cvs 427: Section /o ".xml (eXtensible Markup Language)" SecAssXML
1.22 gully 428: ReadRegStr $R0 HKCR ".xml" ""
429: StrCmp $R0 "Amaya" allready_amaya no_amaya
430: no_amaya:
431: WriteRegStr HKCR ".xml" "AM_OLD_VALUE" $R0
1.11 gully 432: WriteRegStr HKCR ".xml" "" "Amaya"
1.22 gully 433: allready_amaya:
1.11 gully 434: SectionEnd
435:
1.22 gully 436: ; --> .svg
1.20 cvs 437: Section /o ".svg (Scalable Vector Graphics)" SecAssSVG
1.22 gully 438: ReadRegStr $R0 HKCR ".svg" ""
439: StrCmp $R0 "Amaya" allready_amaya no_amaya
440: no_amaya:
441: WriteRegStr HKCR ".svg" "AM_OLD_VALUE" $R0
1.11 gully 442: WriteRegStr HKCR ".svg" "" "Amaya"
1.22 gully 443: allready_amaya:
1.11 gully 444: SectionEnd
445:
1.22 gully 446: ; --> .mml
1.20 cvs 447: Section /o ".mml (MathML)" SecAssMML
1.22 gully 448: ReadRegStr $R0 HKCR ".mml" ""
449: StrCmp $R0 "Amaya" allready_amaya no_amaya
450: no_amaya:
451: WriteRegStr HKCR ".mml" "AM_OLD_VALUE" $R0
1.11 gully 452: WriteRegStr HKCR ".mml" "" "Amaya"
1.22 gully 453: allready_amaya:
1.11 gully 454: SectionEnd
455:
1.22 gully 456: ; --> .css
1.20 cvs 457: Section /o ".css (Cascading Style Sheets)" SecAssCSS
1.22 gully 458: ReadRegStr $R0 HKCR ".css" ""
459: StrCmp $R0 "Amaya" allready_amaya no_amaya
460: no_amaya:
461: WriteRegStr HKCR ".css" "AM_OLD_VALUE" $R0
1.11 gully 462: WriteRegStr HKCR ".css" "" "Amaya"
1.22 gully 463: allready_amaya:
1.11 gully 464: SectionEnd
465:
466: SubSectionEnd
467:
1.1 gully 468: ;--------------------------------
469: ;Installer Functions
470:
471: Function .onInit
472:
473: !insertmacro MUI_LANGDLL_DISPLAY
474:
475: FunctionEnd
476:
477: ;--------------------------------
478: ;Descriptions
479:
480: ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
481:
482: ;Assign descriptions to sections
483: !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1.22 gully 484: !insertmacro MUI_DESCRIPTION_TEXT ${SecAmaya} "Install main Amaya program (mandatory)."
1.19 gully 485: !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAss} "Selects Amaya as the default application for files of these types."
1.1 gully 486: !insertmacro MUI_FUNCTION_DESCRIPTION_END
487:
488: ;--------------------------------
489: ;Uninstaller Section
490:
491: Section "Uninstall"
492:
1.10 gully 493: SetDetailsPrint textonly
494: DetailPrint "Uninstalling Amaya..."
495: SetDetailsPrint listonly
496:
497: IfFileExists $INSTDIR\WindowsWX\bin\amaya.exe amaya_installed
498: MessageBox MB_YESNO "It does not appear that Amaya is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES amaya_installed
499: Abort "Uninstall aborted by user"
500: amaya_installed:
501:
502:
503: SetDetailsPrint textonly
504: DetailPrint "Deleting Files..."
505: SetDetailsPrint listonly
506:
1.22 gully 507: ReadRegStr $STARTMENU_FOLDER HKCU "Software\AmayaWX-debug" "Start Menu Folder"
1.10 gully 508: IfFileExists "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk" amaya_smp_installed
509: Goto amaya_smp_notinstalled
510: amaya_smp_installed:
1.5 gully 511: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk"
512: Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk"
513: RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
1.3 gully 514: Delete "$DESKTOP\AmayaWX.lnk"
1.10 gully 515: amaya_smp_notinstalled:
516:
517: RMDir /r "$INSTDIR"
518:
519: SetDetailsPrint textonly
520: DetailPrint "Deleting Registry Keys..."
521: SetDetailsPrint listonly
1.1 gully 522:
1.10 gully 523: DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AmayaWX"
524: DeleteRegKey HKLM "Software\AmayaWX"
1.11 gully 525: DeleteRegKey HKCR "Amaya"
1.18 gully 526: DeleteRegKey HKCU "Software\AmayaWX"
1.22 gully 527: ; uninstall files associations
528: ; --> .html
529: ReadRegStr $R0 HKCR ".html" ""
530: StrCmp $R0 "Amaya" 0 +3
531: ReadRegStr $R0 HKCR ".html" "AM_OLD_VALUE"
532: WriteRegStr HKCR ".html" "" $R0
533: ; --> .htm
534: ReadRegStr $R0 HKCR ".htm" ""
535: StrCmp $R0 "Amaya" 0 +3
536: ReadRegStr $R0 HKCR ".htm" "AM_OLD_VALUE"
537: WriteRegStr HKCR ".htm" "" $R0
538: ; --> .css
539: ReadRegStr $R0 HKCR ".css" ""
540: StrCmp $R0 "Amaya" 0 +3
541: ReadRegStr $R0 HKCR ".css" "AM_OLD_VALUE"
542: WriteRegStr HKCR ".css" "" $R0
543: ; --> .svg
544: ReadRegStr $R0 HKCR ".svg" ""
545: StrCmp $R0 "Amaya" 0 +3
546: ReadRegStr $R0 HKCR ".svg" "AM_OLD_VALUE"
547: WriteRegStr HKCR ".svg" "" $R0
548: ; --> .mml
549: ReadRegStr $R0 HKCR ".mml" ""
550: StrCmp $R0 "Amaya" 0 +3
551: ReadRegStr $R0 HKCR ".mml" "AM_OLD_VALUE"
552: WriteRegStr HKCR ".mml" "" $R0
553: ; --> .xml
554: ReadRegStr $R0 HKCR ".xml" ""
555: StrCmp $R0 "Amaya" 0 +3
556: ReadRegStr $R0 HKCR ".xml" "AM_OLD_VALUE"
557: WriteRegStr HKCR ".xml" "" $R0
1.1 gully 558:
559: SectionEnd
560:
561: ;--------------------------------
562: ;Uninstaller Functions
563:
564: Function un.onInit
565:
566: !insertmacro MUI_UNGETLANGUAGE
567:
568: FunctionEnd
Webmaster