Annotation of Amaya/amaya-wx_release.nsi, revision 1.35

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.34      cvs        11:   !define VERSION "9.55"
                     12:   Name "Amaya"
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.34      cvs        19:   InstallDir "$PROGRAMFILES\Amaya"
1.1       gully      20:   
                     21:   ;Get installation folder from registry if available
1.34      cvs        22:   InstallDirRegKey HKCU "Software\Amaya" ""
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.34      cvs        39:   !define MUI_LANGDLL_REGISTRY_KEY "Software\Amaya" 
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.34      cvs        51:   !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Amaya" 
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"
1.34      cvs        75:   !insertmacro MUI_LANGUAGE "SimpChinese"
                     76:   !insertmacro MUI_LANGUAGE "TradChinese"
1.1       gully      77: ;  !insertmacro MUI_LANGUAGE "Japanese"
                     78: ;  !insertmacro MUI_LANGUAGE "Korean"
1.30      cvs        79:   !insertmacro MUI_LANGUAGE "Italian"
1.1       gully      80: ;  !insertmacro MUI_LANGUAGE "Dutch"
                     81: ;  !insertmacro MUI_LANGUAGE "Danish"
                     82: ;  !insertmacro MUI_LANGUAGE "Swedish"
                     83: ;  !insertmacro MUI_LANGUAGE "Norwegian"
1.30      cvs        84:   !insertmacro MUI_LANGUAGE "Finnish"
                     85:   !insertmacro MUI_LANGUAGE "Greek"
1.1       gully      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"
1.30      cvs        95:   !insertmacro MUI_LANGUAGE "Hungarian"
1.1       gully      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:  
1.34      cvs       144:     
1.9       cvs       145:    StrCpy $R1 $R0 3
                    146:  
                    147:    StrCmp $R1 '4.0' lbl_win32_95
                    148:    StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
                    149:  
                    150:    lbl_win32_95:
1.10      gully     151:      Abort "Win95 not supported"
1.9       cvs       152:  
                    153:    lbl_win32_98:
1.10      gully     154:      Abort "Win98 not supported"
1.9       cvs       155:  
                    156:    lbl_win32_ME:
1.10      gully     157:      Abort "WinME not supported"
1.9       cvs       158:  
                    159:    lbl_winnt:
                    160:  
                    161:    StrCpy $R1 $R0 1
                    162:  
                    163:    StrCmp $R1 '3' lbl_winnt_x
                    164:    StrCmp $R1 '4' lbl_winnt_x
                    165:  
                    166:    StrCpy $R1 $R0 3
                    167:  
                    168:    StrCmp $R1 '5.0' lbl_winnt_2000
                    169:    StrCmp $R1 '5.1' lbl_winnt_XP
1.10      gully     170:    StrCmp $R1 '5.2' lbl_winnt_2003
1.34      cvs       171:     Abort "Only WinXP/2k/NT are supported"
1.9       cvs       172:  
                    173:    lbl_winnt_x:
                    174:      StrCpy $R0 "NT $R0" 6
                    175:    Goto lbl_done
                    176:  
                    177:    lbl_winnt_2000:
                    178:      Strcpy $R0 '2000'
                    179:    Goto lbl_done
                    180:  
                    181:    lbl_winnt_XP:
                    182:      Strcpy $R0 'XP'
                    183:    Goto lbl_done
                    184:  
                    185:    lbl_winnt_2003:
                    186:      Strcpy $R0 '2003'
                    187:    Goto lbl_done
                    188:  
                    189:    lbl_done:
                    190:   ;XXXXXXXXXXXXXXXXXXXXXXXXXX
                    191: 
1.1       gully     192:   ;This section is required : readonly mode
                    193:   SectionIn RO
                    194: 
1.10      gully     195:   SetDetailsPrint textonly
                    196:   DetailPrint "Installing Amaya binaries and wxWidgets DLL"
                    197:   SetDetailsPrint listonly
                    198: 
1.1       gully     199:   SetOutPath "$INSTDIR\WindowsWX\bin"
                    200:   File WindowsWX\bin\amaya.exe
                    201:   File WindowsWX\bin\wxmsw*u_xrc_vc_custom.dll
                    202:   File WindowsWX\bin\wxmsw*u_html_vc_custom.dll
                    203:   File WindowsWX\bin\wxmsw*u_core_vc_custom.dll
                    204:   File WindowsWX\bin\wxmsw*u_adv_vc_custom.dll
                    205:   File WindowsWX\bin\wxmsw*u_gl_vc_custom.dll
                    206:   File WindowsWX\bin\wxbase*u_vc_custom.dll
1.35    ! cvs       207:   File WindowsWX\bin\wxbase*u_net_vc_custom.dll
1.1       gully     208:   File WindowsWX\bin\wxbase*u_xml_vc_custom.dll
1.21      cvs       209:   File WindowsWX\bin\thotprinter.dll
1.1       gully     210: 
1.10      gully     211:   SetDetailsPrint textonly
                    212:   DetailPrint "Installing Amaya resources : icons, dialogues"
                    213:   SetDetailsPrint listonly
1.1       gully     214: 
1.14      gully     215:   SetOutPath "$INSTDIR\resources\icons\misc"
                    216:   File resources\icons\misc\*.png
                    217:   File resources\icons\misc\*.gif
                    218:   File resources\icons\misc\*.ico
                    219:   SetOutPath "$INSTDIR\resources\icons\16x16"
                    220:   File resources\icons\16x16\*.png
                    221:   File resources\icons\16x16\*.ico
                    222:   SetOutPath "$INSTDIR\resources\icons\22x22"
                    223:   File resources\icons\22x22\*.png
1.1       gully     224:   SetOutPath "$INSTDIR\resources\xrc"
                    225:   File resources\xrc\*.xrc
1.29      cvs       226: 
1.33      cvs       227:   
1.11      gully     228:   SetOutPath "$INSTDIR\amaya\wxdialog"
                    229:   File amaya\wxdialog\appicon.ico
1.12      gully     230:   File amaya\wxdialog\amaya.rc
1.1       gully     231: 
1.10      gully     232:   SetDetailsPrint textonly
                    233:   DetailPrint "Installing Amaya schemas"
                    234:   SetDetailsPrint listonly
1.1       gully     235: 
                    236:   SetOutPath "$INSTDIR\amaya"
                    237:   File amaya\COPYRIGHT
                    238:   File amaya\*.png
                    239:   File amaya\*.gif
                    240:   File amaya\*.css
                    241:   File amaya\*.html*
                    242:   File amaya\*.PRS
                    243:   File amaya\*.STR
                    244:   File amaya\*.TRA
                    245:   File amaya\*.conf
                    246:   File amaya\*.en
                    247:   File amaya\*.trans*
                    248:   File amaya\*.ico
                    249:   File amaya\*.svg
                    250: 
1.10      gully     251:   SetDetailsPrint textonly
                    252:   DetailPrint "Installing annotlib schemas"
                    253:   SetDetailsPrint listonly
                    254: 
1.1       gully     255:   SetOutPath "$INSTDIR\annotlib"
                    256:   File annotlib\*.png
                    257:   File annotlib\*.gif
                    258:   File annotlib\*.PRS
                    259:   File annotlib\*.STR
                    260:   File annotlib\*.TRA
                    261:   File annotlib\*.en
                    262: 
1.10      gully     263:   SetDetailsPrint textonly
                    264:   DetailPrint "Installing Amaya config files"
                    265:   SetDetailsPrint listonly
                    266: 
1.1       gully     267:   SetOutPath "$INSTDIR\config\libconfig"
                    268:   File config\libconfig\*.png
                    269:   File config\libconfig\*.svg
                    270:   File config\libconfig\*.css
                    271:   File config\libconfig\*.lhtml
                    272: 
                    273:   SetOutPath "$INSTDIR\config"
                    274:   File config\*-amayadialogue
                    275:   File config\*-libdialogue
                    276:   File config\*-amayamsg
                    277:   File config\*-libdialogue
                    278:   File config\lib_files.dat
                    279:   File config\fonts.*
                    280:   File config\amaya.kb
                    281:   File config\amaya.profiles
                    282:   File config\*.rdf
                    283:   File config\annot.schemas
                    284:   File config\win-thot.rc
                    285: 
1.10      gully     286:   SetDetailsPrint textonly
                    287:   DetailPrint "Installing Amaya dictionnaries"
                    288:   SetDetailsPrint listonly
                    289: 
1.1       gully     290:   SetOutPath "$INSTDIR\dicopar"
                    291:   File dicopar\alphabet
                    292:   File dicopar\*.ptn
                    293:   File dicopar\clavier
                    294:   File dicopar\*.dic
                    295: 
1.10      gully     296:   SetDetailsPrint textonly
                    297:   DetailPrint "Installing Amaya documentation"
                    298:   SetDetailsPrint listonly
                    299: 
1.17      gully     300:   SetOutPath "$INSTDIR\doc\WX"
                    301:   File doc\WX\*
                    302:   SetOutPath "$INSTDIR\doc\WX\HTML-elements"
                    303:   File doc\WX\HTML-elements\*
1.1       gully     304:   SetOutPath "$INSTDIR\doc\images"
                    305:   File doc\images\*
                    306: 
1.10      gully     307:   SetDetailsPrint textonly
                    308:   DetailPrint "Installing Amaya ttf fonts"
                    309:   SetDetailsPrint listonly
                    310: 
1.1       gully     311:   SetOutPath "$INSTDIR\fonts"
                    312:   File fonts\*
                    313: 
1.10      gully     314:   SetDetailsPrint textonly
                    315:   DetailPrint "Writting registry keys"
                    316:   SetDetailsPrint listonly
                    317: 
1.1       gully     318:   ;Store installation folder
1.34      cvs       319:   WriteRegStr HKCU "Software\Amaya" "" $INSTDIR 
                    320:   WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "UninstallString" '"$INSTDIR\Uninstall.exe"'
                    321:   WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "InstallLocation" "$INSTDIR"
                    322:   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "DisplayName" "Amaya"
                    323:   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "DisplayIcon" "$INSTDIR\WindowsWX\bin\amaya.exe"
                    324:   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "DisplayVersion" "${VERSION}"
                    325:   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya" "URLInfoAbout" "http://www.w3.org/Amaya"
1.11      gully     326: 
                    327:   ; Associate files to amaya
                    328:   WriteRegStr HKCR "Amaya" "" "Amaya Files"
                    329:   WriteRegStr HKCR "Amaya\DefaultIcon" "" "$INSTDIR\WindowsWX\bin\amaya.exe"
                    330:   ReadRegStr $R0 HKCR "Amaya\shell\open\command" ""
                    331:   StrCmp $R0 "" 0 no_amayaopen
                    332:     WriteRegStr HKCR "Amaya\shell" "" "open"
                    333:     WriteRegStr HKCR "Amaya\shell\open\command" "" '"$INSTDIR\WindowsWX\bin\amaya.exe" "%1"'
                    334:   no_amayaopen:
1.1       gully     335:   
                    336:   ;Create uninstaller
                    337:   WriteUninstaller "$INSTDIR\Uninstall.exe"
                    338: 
1.26      gully     339:   ;Install Amaya for all users
                    340:   SetShellVarContext all
                    341: 
1.1       gully     342:   ;Start Menu
                    343:   !insertmacro MUI_STARTMENU_WRITE_BEGIN Application   
                    344:     ;Create shortcuts
                    345:     CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
                    346:     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
                    347:     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
                    348:   !insertmacro MUI_STARTMENU_WRITE_END
                    349: 
1.3       gully     350:   ;Create desktop link
1.34      cvs       351:   CreateShortCut "$DESKTOP\Amaya.lnk" "$INSTDIR\WindowsWX\bin\amaya.exe"
1.1       gully     352: SectionEnd
                    353: 
1.11      gully     354: 
                    355: SubSection "File association" SecFileAss
                    356: 
1.22      gully     357: ; --> .html
1.20      cvs       358: Section /o ".html (HyperText Markup Language)" SecAssHTML
1.22      gully     359:   ReadRegStr $R0 HKCR ".html" ""
                    360:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    361:   no_amaya:
                    362:     WriteRegStr HKCR ".html" "AM_OLD_VALUE" $R0
1.11      gully     363:   WriteRegStr HKCR ".html" "" "Amaya"
1.22      gully     364:   allready_amaya:
1.11      gully     365: SectionEnd
                    366: 
1.22      gully     367: ; --> .htm
                    368: Section /o ".htm (HyperText Markup Language)" SecAssHTM
                    369:   ReadRegStr $R0 HKCR ".htm" ""
                    370:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    371:   no_amaya:
                    372:     WriteRegStr HKCR ".htm" "AM_OLD_VALUE" $R0
                    373:     WriteRegStr HKCR ".htm" "" "Amaya"
                    374:   allready_amaya:
                    375: SectionEnd
                    376: 
                    377: ; --> .xml
1.20      cvs       378: Section /o ".xml (eXtensible Markup Language)" SecAssXML
1.22      gully     379:   ReadRegStr $R0 HKCR ".xml" ""
                    380:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    381:   no_amaya:
                    382:     WriteRegStr HKCR ".xml" "AM_OLD_VALUE" $R0
1.11      gully     383:   WriteRegStr HKCR ".xml" "" "Amaya"
1.22      gully     384:   allready_amaya:
1.11      gully     385: SectionEnd
                    386: 
1.22      gully     387: ; --> .svg
1.20      cvs       388: Section /o ".svg (Scalable Vector Graphics)" SecAssSVG
1.22      gully     389:   ReadRegStr $R0 HKCR ".svg" ""
                    390:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    391:   no_amaya:
                    392:     WriteRegStr HKCR ".svg" "AM_OLD_VALUE" $R0
1.11      gully     393:   WriteRegStr HKCR ".svg" "" "Amaya"
1.22      gully     394:   allready_amaya:
1.11      gully     395: SectionEnd
                    396: 
1.22      gully     397: ; --> .mml
1.20      cvs       398: Section /o ".mml (MathML)" SecAssMML
1.22      gully     399:   ReadRegStr $R0 HKCR ".mml" ""
                    400:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    401:   no_amaya:
                    402:     WriteRegStr HKCR ".mml" "AM_OLD_VALUE" $R0
1.11      gully     403:   WriteRegStr HKCR ".mml" "" "Amaya"
1.22      gully     404:   allready_amaya:
1.11      gully     405: SectionEnd
                    406: 
1.22      gully     407: ; --> .css
1.20      cvs       408: Section /o ".css (Cascading Style Sheets)" SecAssCSS
1.22      gully     409:   ReadRegStr $R0 HKCR ".css" ""
                    410:   StrCmp $R0 "Amaya" allready_amaya no_amaya
                    411:   no_amaya:
                    412:     WriteRegStr HKCR ".css" "AM_OLD_VALUE" $R0
1.11      gully     413:   WriteRegStr HKCR ".css" "" "Amaya"
1.22      gully     414:   allready_amaya:
1.11      gully     415: SectionEnd
                    416: 
                    417: SubSectionEnd
                    418: 
1.1       gully     419: ;--------------------------------
                    420: ;Installer Functions
                    421: 
                    422: Function .onInit
                    423: 
                    424:   !insertmacro MUI_LANGDLL_DISPLAY
                    425: 
                    426: FunctionEnd
                    427: 
                    428: ;--------------------------------
                    429: ;Descriptions
                    430: 
                    431:   ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
                    432: 
                    433:   ;Assign descriptions to sections
                    434:   !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1.22      gully     435:     !insertmacro MUI_DESCRIPTION_TEXT ${SecAmaya} "Install main Amaya program (mandatory)."
1.19      gully     436:     !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAss} "Selects Amaya as the default application for files of these types."
1.1       gully     437:   !insertmacro MUI_FUNCTION_DESCRIPTION_END
                    438: 
                    439: ;--------------------------------
                    440: ;Uninstaller Section
                    441: 
                    442: Section "Uninstall"
                    443: 
1.10      gully     444:   SetDetailsPrint textonly
                    445:   DetailPrint "Uninstalling Amaya..."
                    446:   SetDetailsPrint listonly
                    447: 
                    448:   IfFileExists $INSTDIR\WindowsWX\bin\amaya.exe amaya_installed
                    449:     MessageBox MB_YESNO "It does not appear that Amaya is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES amaya_installed
                    450:     Abort "Uninstall aborted by user"
                    451:   amaya_installed:
                    452: 
                    453: 
                    454:   SetDetailsPrint textonly
                    455:   DetailPrint "Deleting Files..."
                    456:   SetDetailsPrint listonly
1.26      gully     457:   ;Uninstall Amaya for all users
                    458:   SetShellVarContext all
                    459:   
1.34      cvs       460:   ReadRegStr $STARTMENU_FOLDER HKCU "Software\Amaya" "Start Menu Folder"
1.10      gully     461:   IfFileExists "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk" amaya_smp_installed
                    462:     Goto amaya_smp_notinstalled
                    463:   amaya_smp_installed:
1.5       gully     464:   Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Amaya.lnk"
                    465:   Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk"
                    466:   RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
1.34      cvs       467:   Delete "$DESKTOP\Amaya.lnk"
1.10      gully     468:   amaya_smp_notinstalled:
                    469: 
                    470:   RMDir /r "$INSTDIR"
                    471: 
                    472:   SetDetailsPrint textonly
                    473:   DetailPrint "Deleting Registry Keys..."
                    474:   SetDetailsPrint listonly
1.1       gully     475: 
1.34      cvs       476:   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Amaya"
                    477:   DeleteRegKey HKLM "Software\Amaya"
1.11      gully     478:   DeleteRegKey HKCR "Amaya"
1.34      cvs       479:   DeleteRegKey HKCU "Software\Amaya"
1.22      gully     480:   ; uninstall files associations
                    481:   ; --> .html
                    482:   ReadRegStr $R0 HKCR ".html" ""
                    483:   StrCmp $R0 "Amaya" 0 +3
                    484:     ReadRegStr $R0 HKCR ".html" "AM_OLD_VALUE"
                    485:     WriteRegStr HKCR ".html" "" $R0
                    486:   ; --> .htm
                    487:   ReadRegStr $R0 HKCR ".htm" ""
                    488:   StrCmp $R0 "Amaya" 0 +3
                    489:     ReadRegStr $R0 HKCR ".htm" "AM_OLD_VALUE"
                    490:     WriteRegStr HKCR ".htm" "" $R0
                    491:   ; --> .css
                    492:   ReadRegStr $R0 HKCR ".css" ""
                    493:   StrCmp $R0 "Amaya" 0 +3
                    494:     ReadRegStr $R0 HKCR ".css" "AM_OLD_VALUE"
                    495:     WriteRegStr HKCR ".css" "" $R0
                    496:   ; --> .svg
                    497:   ReadRegStr $R0 HKCR ".svg" ""
                    498:   StrCmp $R0 "Amaya" 0 +3
                    499:     ReadRegStr $R0 HKCR ".svg" "AM_OLD_VALUE"
                    500:     WriteRegStr HKCR ".svg" "" $R0
                    501:   ; --> .mml
                    502:   ReadRegStr $R0 HKCR ".mml" ""
                    503:   StrCmp $R0 "Amaya" 0 +3
                    504:     ReadRegStr $R0 HKCR ".mml" "AM_OLD_VALUE"
                    505:     WriteRegStr HKCR ".mml" "" $R0
                    506:   ; --> .xml
                    507:   ReadRegStr $R0 HKCR ".xml" ""
                    508:   StrCmp $R0 "Amaya" 0 +3
                    509:     ReadRegStr $R0 HKCR ".xml" "AM_OLD_VALUE"
                    510:     WriteRegStr HKCR ".xml" "" $R0
1.1       gully     511: 
                    512: SectionEnd
                    513: 
                    514: ;--------------------------------
                    515: ;Uninstaller Functions
                    516: 
                    517: Function un.onInit
                    518: 
                    519:   !insertmacro MUI_UNGETLANGUAGE
                    520:   
                    521: FunctionEnd

Webmaster