1 /* Resources.Designer.cs $
\r
3 This file is part of the HandBrake source code.
\r
4 Homepage: <http://handbrake.fr/>.
\r
5 It may be used under the terms of the GNU General Public License. */
\r
7 ; Script generated by the HM NIS Edit Script Wizard.
\r
9 ; HM NIS Edit Wizard helper defines
\r
10 !define PRODUCT_NAME "Handbrake"
\r
11 !define PRODUCT_VERSION "Nightly SVN Snapshot"
\r
12 !define PRODUCT_VERSION_NUMBER "Nightly"
\r
13 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
\r
14 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
\r
15 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
\r
19 ; MUI 1.67 compatible ------
\r
23 !define MUI_ABORTWARNING
\r
24 !define MUI_ICON "handbrakepineapple.ico"
\r
25 !define MUI_UNICON "handbrakepineapple.ico"
\r
28 !insertmacro MUI_PAGE_WELCOME
\r
30 !insertmacro MUI_PAGE_LICENSE "doc\COPYING"
\r
32 !insertmacro MUI_PAGE_DIRECTORY
\r
34 !insertmacro MUI_PAGE_INSTFILES
\r
36 !define MUI_FINISHPAGE_RUN "$INSTDIR\Handbrake.exe"
\r
37 !insertmacro MUI_PAGE_FINISH
\r
40 !insertmacro MUI_UNPAGE_INSTFILES
\r
43 !insertmacro MUI_LANGUAGE "English"
\r
47 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
\r
48 OutFile "HandBrake-${PRODUCT_VERSION_NUMBER}-Win_GUI.exe"
\r
50 !include WordFunc.nsh
\r
51 !insertmacro VersionCompare
\r
52 !include LogicLib.nsh
\r
54 ; Check to see if .NET Framework 2.0 or above is Installed.
\r
56 Call GetDotNETVersion
\r
58 ${If} $0 == "not found"
\r
59 MessageBox MB_OK|MB_ICONSTOP ".NET runtime library is not installed. $\r$\n You can download .Net Framework 2.0 redistributable from the microsoft website. $\r$\n Alternatively you can use google for a direct download URL"
\r
63 StrCpy $0 $0 "" 1 # skip "v"
\r
65 ${VersionCompare} $0 "2.0" $1
\r
67 MessageBox MB_OK|MB_ICONSTOP ".NET runtime library v2.0 or newer is required. You have $0. $\r$\n You can download .Net Framework 2.0 redistributable from the Microsoft website. $\r$\n Alternatively you can use google for a direct download URL"
\r
72 Function GetDotNETVersion
\r
76 System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i) i .r1 ?u"
\r
77 StrCmp $1 "error" 0 +2
\r
78 StrCpy $0 "not found"
\r
85 InstallDir "$PROGRAMFILES\Handbrake"
\r
86 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
\r
87 ShowInstDetails show
\r
88 ShowUnInstDetails show
\r
90 Section "Handbrake" SEC01
\r
91 SetOutPath "$INSTDIR"
\r
92 SetOverwrite ifnewer
\r
93 File "Handbrake.exe"
\r
94 CreateDirectory "$SMPROGRAMS\Handbrake"
\r
95 CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
\r
96 CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
\r
97 File "Interop.QTOLibrary.dll"
\r
98 File "Interop.QTOControlLib.dll"
\r
99 File "AxInterop.QTOControlLib.dll"
\r
100 File "Growl.Connector.dll"
\r
101 File "Growl.CoreLibrary.dll"
\r
102 File "Handbrake.exe.config"
\r
105 Section -AdditionalIcons
\r
106 CreateShortCut "$SMPROGRAMS\Handbrake\Uninstall.lnk" "$INSTDIR\uninst.exe"
\r
110 WriteUninstaller "$INSTDIR\uninst.exe"
\r
111 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Handbrake.exe"
\r
112 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
\r
113 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
\r
114 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Handbrake.exe"
\r
115 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
\r
119 Function un.onUninstSuccess
\r
121 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
\r
125 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
\r
130 Delete "$INSTDIR\uninst.exe"
\r
132 Delete "$INSTDIR\Interop.QTOLibrary.dll"
\r
133 Delete "$INSTDIR\Interop.QTOControlLib.dll"
\r
134 Delete "$INSTDIR\AxInterop.QTOControlLib.dll"
\r
135 Delete "$INSTDIR\Handbrake.exe"
\r
136 Delete "$INSTDIR\Handbrake.exe.config"
\r
137 Delete "$INSTDIR\Growl.Connector.dll"
\r
138 Delete "$INSTDIR\Growl.CoreLibrary.dll"
\r
140 Delete "$SMPROGRAMS\Handbrake\Uninstall.lnk"
\r
141 Delete "$DESKTOP\Handbrake.lnk"
\r
142 Delete "$SMPROGRAMS\Handbrake\Handbrake.lnk"
\r
143 RMDir "$SMPROGRAMS\Handbrake"
\r
146 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
\r
147 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
\r