1
1
; Script based on generated HM NIS Edit Script Wizard.
2
; Forgive me, i am new at this. -- {paul,iang}@cypherpunks.ca
2
; Forgive me, i am new at this. -- {paul,ian}@cypherpunks.ca
4
; known issue. installer induced uninstaller abortion causes overwrite by installer without
6
; v3.0.0 - Version for pidgin-2.0.0
4
; known issue. installer induced uninstaller abortion causes overwrite
5
; by installer without uninstall.
6
; v3.2.0 - New source version.
7
; v3.1.0 - New source version. Install and uninstall i18n files.
8
; v3.0.0 - Version for pidgin-2.0.0
7
9
; v3.0.0 - Bump version number.
8
10
; v2.0.2 - Bump version number.
9
11
; v2.0.1 - Bump version number.
23
25
; todo: SetBrandingImage
24
26
; HM NIS Edit Wizard helper defines
25
27
!define PRODUCT_NAME "pidgin-otr"
26
!define PRODUCT_VERSION "3.0.0"
28
!define PRODUCT_VERSION "3.2.0-1"
27
29
!define PRODUCT_PUBLISHER "Cypherpunks CA"
28
30
!define PRODUCT_WEB_SITE "http://otr.cypherpunks.ca/"
29
31
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
69
71
ShowUnInstDetails show
71
73
Section "MainSection" SEC01
72
;InstallDir "$PROGRAMFILES\Pidgin\plugins"
74
; uninstall previous pidgin-otr install if found.
76
;Check for pidgin installation
77
Call GetPidginInstPath
78
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr" "pidgindir" "$PidginDir"
82
File "c:\otr\pidgin-otr.dll"
83
; move to pidgin plugin directory, check if not busy (pidgin is running)
85
; hard part is done, do the rest now.
87
File "c:\otr\README.Toolkit.txt"
88
File "c:\otr\README.txt"
89
File "c:\otr\Protocol-v2.html"
90
File "c:\otr\COPYING.txt"
91
File "c:\otr\COPYING.LIB.txt"
92
File "c:\otr\otr_mackey.exe"
93
File "c:\otr\otr_modify.exe"
94
File "c:\otr\otr_parse.exe"
95
File "c:\otr\otr_readforge.exe"
96
File "c:\otr\otr_remac.exe"
97
File "c:\otr\otr_sesskeys.exe"
98
File "c:\otr\pidgin-otr.nsi"
74
;InstallDir "$PROGRAMFILES\Pidgin\plugins"
76
; uninstall previous pidgin-otr install if found.
78
;Check for pidgin installation
79
Call GetPidginInstPath
80
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr" "pidgindir" "$PidginDir"
82
SetOutPath "$PidginDir\locale"
84
; What the next line means is to recursively search c:\otr\locale
85
; and install all files under there named pidgin-otr.mo
86
File /r "c:\otr\locale\pidgin-otr.mo"
90
File "c:\otr\pidgin-otr.dll"
91
; move to pidgin plugin directory, check if not busy (pidgin is running)
93
; hard part is done, do the rest now.
95
File "c:\otr\README.Toolkit.txt"
96
File "c:\otr\README.txt"
97
File "c:\otr\Protocol-v2.html"
98
File "c:\otr\COPYING.txt"
99
File "c:\otr\COPYING.LIB.txt"
100
File "c:\otr\otr_mackey.exe"
101
File "c:\otr\otr_modify.exe"
102
File "c:\otr\otr_parse.exe"
103
File "c:\otr\otr_readforge.exe"
104
File "c:\otr\otr_remac.exe"
105
File "c:\otr\otr_sesskeys.exe"
106
File "c:\otr\pidgin-otr.nsi"
101
109
Section -AdditionalIcons
126
134
Section Uninstall
127
135
Delete "$INSTDIR\pidgin-otr-uninst.exe"
128
Delete "$INSTDIR\README.Toolkit.txt"
129
Delete "$INSTDIR\README.txt"
130
Delete "$INSTDIR\Protocol-v2.txt"
131
Delete "$INSTDIR\COPYING.txt"
132
Delete "$INSTDIR\COPYING.LIB.txt"
133
Delete "$INSTDIR\otr_mackey.exe"
134
Delete "$INSTDIR\otr_modify.exe"
135
Delete "$INSTDIR\otr_parse.exe"
136
Delete "$INSTDIR\otr_readforge.exe"
137
Delete "$INSTDIR\otr_remac.exe"
138
Delete "$INSTDIR\otr_sesskeys.exe"
139
Delete "$INSTDIR\pidgin-otr.nsi"
136
Delete "$INSTDIR\README.Toolkit.txt"
137
Delete "$INSTDIR\README.txt"
138
Delete "$INSTDIR\Protocol-v2.txt"
139
Delete "$INSTDIR\COPYING.txt"
140
Delete "$INSTDIR\COPYING.LIB.txt"
141
Delete "$INSTDIR\otr_mackey.exe"
142
Delete "$INSTDIR\otr_modify.exe"
143
Delete "$INSTDIR\otr_parse.exe"
144
Delete "$INSTDIR\otr_readforge.exe"
145
Delete "$INSTDIR\otr_remac.exe"
146
Delete "$INSTDIR\otr_sesskeys.exe"
147
Delete "$INSTDIR\pidgin-otr.nsi"
140
148
Delete "$SMPROGRAMS\pidgin-otr\Uninstall.lnk"
141
149
RMDir "$SMPROGRAMS\pidgin-otr"
153
161
MessageBox MB_OK|MB_ICONINFORMATION "Could not find pidgin plugin directory, pidgin-otr.dll not uninstalled!" IDOK ok
155
163
Delete "$PidginDir\plugins\pidgin-otr.dll"
165
; Find all the language dirs and delete pidgin-otr.mo in all of them
168
FindFirst $0 $1 $PidginDir\locale\*
170
StrCmp $1 "" loopdone
171
Delete $PidginDir\locale\$1\LC_MESSAGES\pidgin-otr.mo
157
178
IfFileExists "$PidginDir\plugins\pidgin-otr.dll" 0 +2
158
179
MessageBox MB_OK|MB_ICONINFORMATION "pidgin-otr.dll is busy. Probably Pidgin is still running. Please delete $PidginDir\plugins\pidgin-otr.dll manually."
159
181
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
160
182
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr\pidgindir"
162
184
SetAutoClose true
164
187
Function GetPidginInstPath
166
189
ReadRegStr $0 HKLM "Software\pidgin" ""