summaryrefslogtreecommitdiff
path: root/cad/plugins/GROMACS/gromacs-3.3.3/packaging/Win32/GMX-installer.nsi
blob: 28cfe8e7e968f9daf4b592132b9fe3f8bf5f7dbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_VERSION "3.3.3"
!define PRODUCT_NAME "GROMACS"
!define PRODUCT_PUBLISHER "Nanorex, Inc"
!define PRODUCT_WEB_SITE "http://www.nanorex.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}\${PRODUCT_VERSION}"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "install.ico"
!define MUI_UNICON "uninstall.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "install-header.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "install-header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "wizard-sidebar.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "wizard-sidebar.bmp"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE ".\License.txt"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Install Folder"
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_SHOWREADME ".\ReadMe.html"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME}-${PRODUCT_VERSION}"
OutFile "GROMACS_${PRODUCT_VERSION}.exe"
InstallDir "c:\GROMACS_${PRODUCT_VERSION}\"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

SectionGroup /e "GROMACS"
Section "GROMACS (Required)" SEC_GMX_BASE
  SetOutPath "$INSTDIR"
  SetOverwrite try
  File ".\ReadMe.html"
  File ".\License.txt"
  SetOutPath "$INSTDIR\bin"
  SetOverwrite try
  File ".\dist\bin\*"
SectionEnd
Section /o "Headers & Libraries" SEC_GMX_LIBHDR
  SetOutPath "$INSTDIR\include\gromacs"
  File ".\dist\include\gromacs\*"
  SetOutPath "$INSTDIR\include\gromacs\types"
  File ".\dist\include\gromacs\types\*"
  SetOutPath "$INSTDIR\include\gromacs"
  File ".\dist\include\gromacs\*"
  SetOutPath "$INSTDIR\lib"
  File ".\dist\lib\*"
SectionEnd
Section "Documentation" SEC_GMX_DOC
  SetOverwrite try
  SetOutPath "$INSTDIR\share\gromacs\html"
  File ".\dist\share\gromacs\html\*"
  SetOutPath "$INSTDIR\share\gromacs\html\images"
  File ".\dist\share\gromacs\html\images\*"
  SetOutPath "$INSTDIR\share\gromacs\html\online"
  File ".\dist\share\gromacs\html\online\*"
  SetOutPath "$INSTDIR\share\gromacs\template"
  File ".\dist\share\gromacs\template\*"
  SetOutPath "$INSTDIR\share\gromacs\top"
  File ".\dist\share\gromacs\top\*"
SectionEnd
Section "Tutorials" SEC_GMX_TUTOR
  SetOverwrite try
  SetOutPath "$INSTDIR\share\gromacs\tutor"
  File ".\dist\share\gromacs\tutor\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\gmxdemo"
  File ".\dist\share\gromacs\tutor\gmxdemo\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\methanol"
  File ".\dist\share\gromacs\tutor\methanol\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\mixed"
  File ".\dist\share\gromacs\tutor\mixed\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\nmr1"
  File ".\dist\share\gromacs\tutor\nmr1\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\nmr2"
  File ".\dist\share\gromacs\tutor\nmr2\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\speptide"
  File ".\dist\share\gromacs\tutor\speptide\*"
  SetOutPath "$INSTDIR\share\gromacs\tutor\water"
  File ".\dist\share\gromacs\tutor\water\*"
SectionEnd
Section /o "Source" SEC_GMX_SRC
  SetOverwrite try
  SetOutPath "$INSTDIR\source"
  file /r ".\dist\src\gromacs-3.3.3\*"
SectionEnd
SectionGroupEnd

SectionGroup /e "MCPP"
Section "MCPP (Required)" SEC_MCPP
  SetOutPath "$INSTDIR\MCPP\bin"
  File ".\mcpp\bin\mcpp.exe"
  SetOutPath "$INSTDIR\MCPP"
  File ".\mcpp\LICENSE"
  File ".\mcpp\mcpp-manual-jp.html"
  File ".\mcpp\mcpp-manual.html"
  File ".\mcpp\NEWS"
  File ".\mcpp\README"
SectionEnd
Section /o "Source" SEC_MCPP_SRC
  SetOutPath "$INSTDIR\MCPP\source"
  File /r ".\mcpp\source\*"
SectionEnd
SectionGroupEnd

Section -AdditionalIcons
  SetOutPath $INSTDIR
  CreateDirectory "$SMPROGRAMS\Nanorex\GROMACS_${PRODUCT_VERSION}"
  CreateShortCut "$SMPROGRAMS\Nanorex\GROMACS_${PRODUCT_VERSION}\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\mdrun.exe"
  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}" "DisplayIcon" "$INSTDIR\bin\mdrun.exe"
  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}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd

; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_GMX_BASE} "Base GROMACS install with experimental HDF5 support (will not affect regular GMX performance.)"
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_GMX_DOC} "GROMACS documentation."
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_GMX_TUTOR} "GROMACS tutorials."
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_GMX_SRC} "Source code for GROMACS patched with the experimental HDF5_SimResults file format."
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_GMX_LIBHDR} "Headers and libraries for GROMACS development."
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_MCPP} "A free, open-source C pre-processor for use with GROMACS."
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC_MCPP_SRC} "Source code for MCPP"
!insertmacro MUI_FUNCTION_DESCRIPTION_END


Function un.onUninstSuccess
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  Abort
FunctionEnd

Section Uninstall
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\Readme.html"
  Delete "$INSTDIR\License.txt"
  Delete "$INSTDIR\MCCP\README"
  Delete "$INSTDIR\MCCP\NEWS"
  Delete "$INSTDIR\MCCP\mcpp-manual.html"
  Delete "$INSTDIR\MCCP\mcpp-manual-jp.html"
  Delete "$INSTDIR\MCCP\LICENSE"
  Delete "$INSTDIR\MCCP\bin\mcpp.exe"
  Delete "$INSTDIR\lib\*"
  Delete "$INSTDIR\include\gromacs\*"
  Delete "$INSTDIR\include\gromacs\types\*"
  Delete "$INSTDIR\share\gromacs\html\images\*"
  Delete "$INSTDIR\share\gromacs\html\online\*"
  Delete "$INSTDIR\share\gromacs\html\*"
  Delete "$INSTDIR\share\gromacs\template\*"
  Delete "$INSTDIR\share\gromacs\top\*"
  Delete "$INSTDIR\share\gromacs\tutor\methanol\*"
  Delete "$INSTDIR\share\gromacs\tutor\mixed\*"
  Delete "$INSTDIR\share\gromacs\tutor\nmr1\*"
  Delete "$INSTDIR\share\gromacs\tutor\nmr2\*"
  Delete "$INSTDIR\share\gromacs\tutor\speptide\*"
  Delete "$INSTDIR\share\gromacs\tutor\water\*"
  Delete "$INSTDIR\share\gromacs\tutor\gmxdemo\*"
  Delete "$INSTDIR\share\gromacs\tutor\*"
  Delete "$INSTDIR\share\*"
  Delete "$INSTDIR\bin\*"

  Delete "$SMPROGRAMS\Nanorex\GROMACS_${PRODUCT_VERSION}\Uninstall.lnk"

  RMDir "$SMPROGRAMS\Nanorex\GROMACS_${PRODUCT_VERSION}"
  RMDir "$SMPROGRAMS\Nanorex"
  RMDir "$INSTDIR\MCPP\bin"
  RMDir /r "$INSTDIR\MCPP"
  RMDir "$INSTDIR\lib"
  RMDir "$INSTDIR\include\gromacs\types"
  RMDir "$INSTDIR\include\gromacs"
  RMDir "$INSTDIR\include\"
  RMDir "$INSTDIR\share\gromacs\html\images"
  RMDir "$INSTDIR\share\gromacs\html\online"
  RMDir "$INSTDIR\share\gromacs\html"
  RMDir "$INSTDIR\share\gromacs\template"
  RMDir "$INSTDIR\share\gromacs\top"
  RMDir "$INSTDIR\share\gromacs\tutor\methanol"
  RMDir "$INSTDIR\share\gromacs\tutor\mixed"
  RMDir "$INSTDIR\share\gromacs\tutor\nmr1"
  RMDir "$INSTDIR\share\gromacs\tutor\nmr2"
  RMDir "$INSTDIR\share\gromacs\tutor\speptide"
  RMDir "$INSTDIR\share\gromacs\tutor\water"
  RMDir "$INSTDIR\share\gromacs\tutor\gmxdemo"
  RMDir "$INSTDIR\share\gromacs\tutor"
  RMDir "$INSTDIR\share\gromacs"
  RMDir "$INSTDIR\share"
  RMDir "$INSTDIR\bin"
  RMDir /r "$INSTDIR\source"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd