*** keyword substitution change ***

This commit is contained in:
amontano 2005-04-26 05:24:02 +00:00
parent 30470cb634
commit 14ad55aa3f

View file

@ -1,280 +1,280 @@
; Script generated by the HM NIS Edit Script Wizard. ; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "The Tibetan Translation Tool" !define PRODUCT_NAME "The Tibetan Translation Tool"
!define PRODUCT_VERSION "3.1.2" !define PRODUCT_VERSION "3.1.2"
!define PRODUCT_PUBLISHER "Andres Montano in collaboration with THDL, University of Virginia" !define PRODUCT_PUBLISHER "Andres Montano in collaboration with THDL, University of Virginia"
!define PRODUCT_WEB_SITE "www.people.virginia.edu/~am2zb/tibetan/" !define PRODUCT_WEB_SITE "www.people.virginia.edu/~am2zb/tibetan/"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM" !define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" !define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
!define PATH_TO_DIC "..\..\..\..\..\install-tibetan\TranslationTool\free" !define PATH_TO_DIC "..\..\..\..\..\install-tibetan\TranslationTool\free"
!define PATH_TO_LIC "..\..\license" !define PATH_TO_LIC "..\..\license"
!define PATH_TO_INSTALLERS "..\..\..\Fieldling\internal-stuff\programs" !define PATH_TO_INSTALLERS "..\..\..\Fieldling\internal-stuff\programs"
!define JRE_INSTALLER "jre-1_5_0_02-windows-i586-p.exe" !define JRE_INSTALLER "jre-1_5_0_02-windows-i586-p.exe"
; MUI 1.67 compatible ------ ; MUI 1.67 compatible ------
!include "MUI.nsh" !include "MUI.nsh"
; MUI Settings ; MUI Settings
!define MUI_ABORTWARNING !define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
; Language Selection Dialog Settings ; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" !define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
; Welcome page ; Welcome page
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
; License page ; License page
!insertmacro MUI_PAGE_LICENSE "${PATH_TO_LIC}\amp_license.txt" !insertmacro MUI_PAGE_LICENSE "${PATH_TO_LIC}\amp_license.txt"
; Directory page ; Directory page
!insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_DIRECTORY
; Start menu page ; Start menu page
var ICONS_GROUP var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE !define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "THDL Tools" !define MUI_STARTMENUPAGE_DEFAULTFOLDER "THDL Tools"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" !define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" !define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP !insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page ; Instfiles page
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
; Finish page ; Finish page
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
; Uninstaller pages ; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_INSTFILES
; Language files ; Language files
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "SimpChinese" !insertmacro MUI_LANGUAGE "SimpChinese"
; MUI end ------ ; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup-TranslationTool.exe" OutFile "Setup-TranslationTool.exe"
InstallDir "$PROGRAMFILES\Translation Tool" InstallDir "$PROGRAMFILES\Translation Tool"
ShowInstDetails show ShowInstDetails show
ShowUnInstDetails show ShowUnInstDetails show
XPStyle on XPStyle on
Function .onInit Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY !insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd FunctionEnd
Section "MainSection" SEC01 Section "MainSection" SEC01
SetOverwrite ifnewer SetOverwrite ifnewer
call GetJRE call GetJRE
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
File "${PATH_TO_LIC}\amp_license.txt" File "${PATH_TO_LIC}\amp_license.txt"
File "${PATH_TO_LIC}\opl_license.txt" File "${PATH_TO_LIC}\opl_license.txt"
File "${PATH_TO_LIC}\Readme.txt" File "${PATH_TO_LIC}\Readme.txt"
File "${PATH_TO_LIC}\thdl_license.txt" File "${PATH_TO_LIC}\thdl_license.txt"
File "${PATH_TO_LIC}\thdl_rationale.html" File "${PATH_TO_LIC}\thdl_rationale.html"
File "${PATH_TO_DIC}\free.dic" File "${PATH_TO_DIC}\free.dic"
File "${PATH_TO_DIC}\free.def" File "${PATH_TO_DIC}\free.def"
File "${PATH_TO_DIC}\free.wrd" File "${PATH_TO_DIC}\free.wrd"
File "..\..\dist\lib-vanilla\DictionarySearchStandalone.jar" File "..\..\dist\lib-vanilla\DictionarySearchStandalone.jar"
File "TranslationTool.ico" File "TranslationTool.ico"
; Shortcuts ; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd SectionEnd
Section -AdditionalIcons Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
Pop $R0 Pop $R0
StrCpy $R0 '$R0\bin\javaw.exe' StrCpy $R0 '$R0\bin\javaw.exe'
StrCpy $R1 '-jar DictionarySearchStandalone.jar free' StrCpy $R1 '-jar DictionarySearchStandalone.jar free'
push $R0 push $R0
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk" "$R0" "$R1" "$INSTDIR\TranslationTool.ico" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk" "$R0" "$R1" "$INSTDIR\TranslationTool.ico"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Translation Tool Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Translation Tool Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall Translation Tool.lnk" "$INSTDIR\uninst.exe" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall Translation Tool.lnk" "$INSTDIR\uninst.exe"
!insertmacro MUI_STARTMENU_WRITE_END !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd SectionEnd
Section -InstallFonts Section -InstallFonts
IfFileExists "$FONTS\timwn.ttf" nofont IfFileExists "$FONTS\timwn.ttf" nofont
SetOutPath "$FONTS" SetOutPath "$FONTS"
File "C:\WINDOWS\Fonts\timwn.ttf" File "C:\WINDOWS\Fonts\timwn.ttf"
File "C:\WINDOWS\Fonts\timwn1.ttf" File "C:\WINDOWS\Fonts\timwn1.ttf"
File "C:\WINDOWS\Fonts\timwn2.ttf" File "C:\WINDOWS\Fonts\timwn2.ttf"
File "C:\WINDOWS\Fonts\timwn3.ttf" File "C:\WINDOWS\Fonts\timwn3.ttf"
File "C:\WINDOWS\Fonts\timwn4.ttf" File "C:\WINDOWS\Fonts\timwn4.ttf"
File "C:\WINDOWS\Fonts\timwn5.ttf" File "C:\WINDOWS\Fonts\timwn5.ttf"
File "C:\WINDOWS\Fonts\timwn6.ttf" File "C:\WINDOWS\Fonts\timwn6.ttf"
File "C:\WINDOWS\Fonts\timwn7.ttf" File "C:\WINDOWS\Fonts\timwn7.ttf"
File "C:\WINDOWS\Fonts\timwn8.ttf" File "C:\WINDOWS\Fonts\timwn8.ttf"
File "C:\WINDOWS\Fonts\timwn9.ttf" File "C:\WINDOWS\Fonts\timwn9.ttf"
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion" ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
IfErrors 0 lbl_nt IfErrors 0 lbl_nt
StrCpy $0 'SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts' StrCpy $0 'SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts'
Goto regfont Goto regfont
lbl_nt: lbl_nt:
StrCpy $0 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' StrCpy $0 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts'
regfont: regfont:
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb (TrueType)" "timwn.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb (TrueType)" "timwn.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb1 (TrueType)" "timwn1.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb1 (TrueType)" "timwn1.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb2 (TrueType)" "timwn2.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb2 (TrueType)" "timwn2.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb3 (TrueType)" "timwn3.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb3 (TrueType)" "timwn3.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb4 (TrueType)" "timwn4.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb4 (TrueType)" "timwn4.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb5 (TrueType)" "timwn5.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb5 (TrueType)" "timwn5.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb6 (TrueType)" "timwn6.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb6 (TrueType)" "timwn6.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb7 (TrueType)" "timwn7.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb7 (TrueType)" "timwn7.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb8 (TrueType)" "timwn8.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb8 (TrueType)" "timwn8.ttf"
WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb9 (TrueType)" "timwn9.ttf" WriteRegStr HKEY_LOCAL_MACHINE "$0" "TibetanMachineWeb9 (TrueType)" "timwn9.ttf"
nofont: nofont:
SectionEnd SectionEnd
Section -Post Section -Post
WriteUninstaller "$INSTDIR\uninst.exe" WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd SectionEnd
Function GetJRE Function GetJRE
; Find JRE (Javaw.exe) ; Find JRE (Javaw.exe)
; 1 - in JAVA_HOME environment variable ; 1 - in JAVA_HOME environment variable
; 2 - in the registry ; 2 - in the registry
Push $R0 Push $R0
Push $R1 Push $R1
;ClearErrors ;ClearErrors
;ReadEnvStr $R0 "JAVA_HOME" ;ReadEnvStr $R0 "JAVA_HOME"
;IfErrors 0 JreFound ;IfErrors 0 JreFound
ClearErrors ClearErrors
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome" ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
IfErrors 0 JreFound IfErrors 0 JreFound
; Was not found. Install. ; Was not found. Install.
StrCmp $LANGUAGE "1033" wantjre_eng StrCmp $LANGUAGE "1033" wantjre_eng
; message in chinese ; message in chinese
MessageBox MB_ICONEXCLAMATION|MB_YESNO \ MessageBox MB_ICONEXCLAMATION|MB_YESNO \
'在你的计算机上未安装过Java运行环境$\n\ '在你的计算机上未安装过Java运行环境$\n\
没有它不能运行${PRODUCT_NAME}。$\n$\n\ 没有它不能运行${PRODUCT_NAME}。$\n$\n\
你现在要安装它吗?' \ 你现在要安装它吗?' \
IDYES InstallJre IDYES InstallJre
Abort Abort
wantjre_eng: wantjre_eng:
MessageBox MB_ICONEXCLAMATION|MB_YESNO \ MessageBox MB_ICONEXCLAMATION|MB_YESNO \
'Could not find a Java Runtime Environment installed on $\n\ 'Could not find a Java Runtime Environment installed on $\n\
your computer. Without it you cannot run ${PRODUCT_NAME}. $\n$\n\ your computer. Without it you cannot run ${PRODUCT_NAME}. $\n$\n\
Would you like to install it now?' \ Would you like to install it now?' \
IDYES InstallJre IDYES InstallJre
Abort Abort
InstallJre: InstallJre:
StrCmp $LANGUAGE "1033" jrewarning_eng StrCmp $LANGUAGE "1033" jrewarning_eng
; warning in Chinese ; warning in Chinese
MessageBox MB_OK \ MessageBox MB_OK \
'安装程序将开始安装Java虚拟机。$\n$\n\ '安装程序将开始安装Java虚拟机。$\n$\n\
提示若询问重新启动计算机请点击NO(不)$\n\ 提示若询问重新启动计算机请点击NO(不)$\n\
使之继续安装${PRODUCT_NAME}。' 使之继续安装${PRODUCT_NAME}。'
goto resume_after_jrewarning goto resume_after_jrewarning
jrewarning_eng: jrewarning_eng:
MessageBox MB_OK \ MessageBox MB_OK \
'The installer for the Java Runtime Enviroment will begin now. $\n$\n\ 'The installer for the Java Runtime Enviroment will begin now. $\n$\n\
IMPORTANT: If it asks to restart the computer please click NO$\n\ IMPORTANT: If it asks to restart the computer please click NO$\n\
in order to complete the ${PRODUCT_NAME} installation.' in order to complete the ${PRODUCT_NAME} installation.'
resume_after_jrewarning: resume_after_jrewarning:
SetOutPath "$TEMP" SetOutPath "$TEMP"
File "${PATH_TO_INSTALLERS}\${JRE_INSTALLER}" File "${PATH_TO_INSTALLERS}\${JRE_INSTALLER}"
ExecWait "$TEMP\${JRE_INSTALLER}" ExecWait "$TEMP\${JRE_INSTALLER}"
Delete "$TEMP\${JRE_INSTALLER}" Delete "$TEMP\${JRE_INSTALLER}"
; Now find the path again ; Now find the path again
;ClearErrors ;ClearErrors
;ReadEnvStr $R0 "JAVA_HOME" ;ReadEnvStr $R0 "JAVA_HOME"
;IfErrors 0 JreFound ;IfErrors 0 JreFound
ClearErrors ClearErrors
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome" ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
IfErrors 0 JreFound IfErrors 0 JreFound
StrCmp $LANGUAGE "1033" abortjre_eng StrCmp $LANGUAGE "1033" abortjre_eng
; Abort in Chinese ; Abort in Chinese
Abort '未能找到Java运行环境安装失败。' Abort '未能找到Java运行环境安装失败。'
abortjre_eng: abortjre_eng:
Abort 'Unable to find Java Runtime Environment.$\n\ Abort 'Unable to find Java Runtime Environment.$\n\
Installation failed.' Installation failed.'
JreFound: JreFound:
Pop $R1 Pop $R1
Exch $R0 Exch $R0
FunctionEnd FunctionEnd
Function un.onUninstSuccess Function un.onUninstSuccess
HideWindow HideWindow
StrCmp $LANGUAGE "1033" removesuccess_eng StrCmp $LANGUAGE "1033" removesuccess_eng
; Ask in Chinese ; Ask in Chinese
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name)从你计算机上已成功删除。" MessageBox MB_ICONINFORMATION|MB_OK "$(^Name)从你计算机上已成功删除。"
Goto resume_after_remove Goto resume_after_remove
removesuccess_eng: removesuccess_eng:
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
resume_after_remove: resume_after_remove:
FunctionEnd FunctionEnd
Function un.onInit Function un.onInit
!insertmacro MUI_UNGETLANGUAGE !insertmacro MUI_UNGETLANGUAGE
StrCmp $LANGUAGE "1033" askifsure_eng StrCmp $LANGUAGE "1033" askifsure_eng
; ask in Chinese ; ask in Chinese
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "你确定从你计算机上要完全删除$(^Name) 及其组件?" IDYES issure MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "你确定从你计算机上要完全删除$(^Name) 及其组件?" IDYES issure
Abort Abort
askifsure_eng: askifsure_eng:
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES issure MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES issure
Abort Abort
issure: issure:
FunctionEnd FunctionEnd
Section Uninstall Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\amp_license.txt" Delete "$INSTDIR\amp_license.txt"
Delete "$INSTDIR\opl_license.txt" Delete "$INSTDIR\opl_license.txt"
Delete "$INSTDIR\Readme.txt" Delete "$INSTDIR\Readme.txt"
Delete "$INSTDIR\thdl_license.txt" Delete "$INSTDIR\thdl_license.txt"
Delete "$INSTDIR\thdl_rationale.html" Delete "$INSTDIR\thdl_rationale.html"
Delete "$INSTDIR\free.dic" Delete "$INSTDIR\free.dic"
Delete "$INSTDIR\free.def" Delete "$INSTDIR\free.def"
Delete "$INSTDIR\free.wrd" Delete "$INSTDIR\free.wrd"
Delete "$INSTDIR\DictionarySearchStandalone.jar" Delete "$INSTDIR\DictionarySearchStandalone.jar"
Delete "$INSTDIR\TranslationTool.ico" Delete "$INSTDIR\TranslationTool.ico"
Delete "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\${PRODUCT_NAME}.lnk"
Delete "$INSTDIR\${PRODUCT_NAME}.url" Delete "$INSTDIR\${PRODUCT_NAME}.url"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall Translation Tool.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall Translation Tool.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Translation Tool Website.lnk" Delete "$SMPROGRAMS\$ICONS_GROUP\Translation Tool Website.lnk"
RMDir "$SMPROGRAMS\$ICONS_GROUP" RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR" RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SetAutoClose true SetAutoClose true
SectionEnd SectionEnd