1 ; Script generated by the HM NIS Edit Script Wizard.
3 !define VTKBINDIR
"vtk-5.4.2-install\bin"
4 !define VTKINCDIR
"vtk-5.4.2-install\include\vtk-5.4"
5 !define VTKLIBDIR
"vtk-5.4.2-install\lib\vtk-5.4"
6 !define QWTINCDIR
"Qwt-5.3.0-svn\include"
7 !define QWTLIBDIR
"Qwt-5.3.0-svn\lib"
8 !define QWTPLOT3DINCDIR
"qwtplot3d\include"
9 !define QWTPLOT3DLIBDIR
"qwtplot3d\lib"
12 !define EXAMPLES_SOURCE_PATH
"Libraries\Examples"
13 !define VTK_SOURCE_PATH
"Libraries\vtk-5.4.2-install"
14 !define QWT_SOURCE_PATH
"Libraries\Qwt-5.3.0-svn"
15 !define QWTPLOT3D_SOURCE_PATH
"Libraries\qwtplot3d"
16 !define PLUGINS_SOURCE_PATH
"Plugins"
19 !define EXAMPLES_DEST_PATH
"$INSTDIR\Examples"
20 !define VTK_DEST_PATH
"$INSTDIR\vtk-5.4.2-install"
21 !define QWT_DEST_PATH
"$INSTDIR\Qwt-5.3.0-svn"
22 !define QWTPLOT3D_DEST_PATH
"$INSTDIR\qwtplot3d"
23 !define PLUGINS_DEST_PATH
"C:\Qt\2009.03\qt\plugins\designer"
25 ; HM NIS Edit Wizard helper defines
26 !define PRODUCT_NAME
"enGits Development Environment"
27 !define PRODUCT_VERSION
"1.0"
28 !define PRODUCT_PUBLISHER
"enGits GmbH"
29 !define PRODUCT_WEB_SITE
"http://www.engits.com"
30 !define PRODUCT_UNINST_KEY
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
31 !define PRODUCT_UNINST_ROOT_KEY
"HKLM"
33 ; MUI 1.67 compatible ------
35 !include "EnvVarUpdate.nsh"
36 ; HKLM (all users) vs HKCU (current user) defines
37 !define env_hklm
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
38 !define env_hkcu
'HKCU "Environment"'
41 !define MUI_ABORTWARNING
42 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
43 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
46 !insertmacro MUI_PAGE_WELCOME
48 !insertmacro MUI_PAGE_LICENSE
"license.txt"
50 !insertmacro MUI_PAGE_COMPONENTS
52 !insertmacro MUI_PAGE_INSTFILES
54 !insertmacro MUI_PAGE_FINISH
57 !insertmacro MUI_UNPAGE_INSTFILES
60 !insertmacro MUI_LANGUAGE
"English"
64 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
65 OutFile "SetupEnGitsDevelopmentEnvironment.exe"
66 InstallDir "C:\Libraries"
67 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
69 ShowUnInstDetails show
73 CreateDirectory "$SMPROGRAMS\enGits Development Environment"
76 !include "install_VTK.nsh"
78 ;VTK ENVIRONMENT SETUP
79 ; include for some of the windows messages defines
80 !include "winmessages.nsh"
82 WriteRegExpandStr ${env_hklm} VTKBINDIR
"$INSTDIR\${VTKBINDIR}"
83 WriteRegExpandStr ${env_hklm} VTKINCDIR
"$INSTDIR\${VTKINCDIR}"
84 WriteRegExpandStr ${env_hklm} VTKLIBDIR
"$INSTDIR\${VTKLIBDIR}"
85 ; make sure windows knows about the change
86 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=
5000
88 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\${VTKBINDIR}" ; Append
94 CreateDirectory "$SMPROGRAMS\enGits Development Environment"
97 !include "install_Qwt.nsh"
99 ;QWT ENVIRONMENT SETUP
100 ; include for some of the windows messages defines
101 !include "winmessages.nsh"
103 WriteRegExpandStr ${env_hklm} QWTINCDIR
"$INSTDIR\${QWTINCDIR}"
104 WriteRegExpandStr ${env_hklm} QWTLIBDIR
"$INSTDIR\${QWTLIBDIR}"
105 ; make sure windows knows about the change
106 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=
5000
108 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\${QWTLIBDIR}" ; Append
112 Section "QwtPlot3D" SEC03
114 CreateDirectory "$SMPROGRAMS\enGits Development Environment"
116 ;QWTPLOT3D_INSTALL_LIST
117 !include "install_QwtPlot3D.nsh"
119 ;QWTPLOT3D ENVIRONMENT SETUP
120 ; include for some of the windows messages defines
121 !include "winmessages.nsh"
123 WriteRegExpandStr ${env_hklm} QWTPLOT3DINCDIR
"$INSTDIR\${QWTPLOT3DINCDIR}"
124 WriteRegExpandStr ${env_hklm} QWTPLOT3DLIBDIR
"$INSTDIR\${QWTPLOT3DLIBDIR}"
125 ; make sure windows knows about the change
126 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=
5000
128 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\${QWTPLOT3DLIBDIR}" ; Append
132 Section "Examples" SEC04
133 ;EXAMPLES_INSTALL_LIST
134 !include "install_examples.nsh"
137 Section "Plugins" SEC05
138 ;PLUGINS_INSTALL_LIST
139 !include "install_Plugins.nsh"
142 Section -AdditionalIcons
144 WriteIniStr
"$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
145 CreateShortCut "$SMPROGRAMS\enGits Development Environment\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
146 CreateShortCut "$SMPROGRAMS\enGits Development Environment\Uninstall.lnk" "$INSTDIR\uninst.exe"
150 WriteUninstaller "$INSTDIR\uninst.exe"
151 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
152 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
153 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
154 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
155 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
158 ; Section descriptions
159 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
160 !insertmacro MUI_DESCRIPTION_TEXT
${SEC01} ""
161 !insertmacro MUI_DESCRIPTION_TEXT
${SEC02} ""
162 !insertmacro MUI_DESCRIPTION_TEXT
${SEC03} ""
163 !insertmacro MUI_DESCRIPTION_TEXT
${SEC04} ""
164 !insertmacro MUI_DESCRIPTION_TEXT
${SEC05} ""
165 !insertmacro MUI_FUNCTION_DESCRIPTION_END
168 Function un
.onUninstSuccess
170 MessageBox MB_ICONINFORMATION|
MB_OK "$(^Name) was successfully removed from your computer."
174 MessageBox MB_ICONQUESTION|
MB_YESNO|MB_DEFBUTTON2
"Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
180 !include "uninstall_examples.nsh"
181 !include "uninstall_VTK.nsh"
182 !include "uninstall_Qwt.nsh"
183 !include "uninstall_QwtPlot3D.nsh"
184 !include "uninstall_Plugins.nsh"
186 Delete "$INSTDIR\${PRODUCT_NAME}.url"
187 Delete "$INSTDIR\uninst.exe"
188 Delete "$SMPROGRAMS\enGits Development Environment\Uninstall.lnk"
189 Delete "$SMPROGRAMS\enGits Development Environment\Website.lnk"
191 RMDir "C:\Qt\2009.03\qt\plugins\designer"
192 RMDir "$SMPROGRAMS\enGits Development Environment"
195 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
196 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
199 ;CLEAN UP ENVIRONMENT
201 DeleteRegValue ${env_hklm} VTKBINDIR
202 DeleteRegValue ${env_hklm} VTKINCDIR
203 DeleteRegValue ${env_hklm} VTKLIBDIR
204 DeleteRegValue ${env_hklm} QWTINCDIR
205 DeleteRegValue ${env_hklm} QWTLIBDIR
206 DeleteRegValue ${env_hklm} QWTPLOT3DINCDIR
207 DeleteRegValue ${env_hklm} QWTPLOT3DLIBDIR
208 ; make sure windows knows about the change
209 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=
5000
211 ${un
.EnvVarUpdate
} $0 "PATH" "R" "HKLM" "$INSTDIR\${VTKBINDIR}"
212 ${un
.EnvVarUpdate
} $0 "PATH" "R" "HKLM" "$INSTDIR\${QWTLIBDIR}"
213 ${un
.EnvVarUpdate
} $0 "PATH" "R" "HKLM" "$INSTDIR\${QWTPLOT3DLIBDIR}"