Mercurial > pidgin
comparison gaim-installer.nsi @ 4857:cb0681cfb9f2
[gaim-migrate @ 5184]
Removed Aspell portion from Gaim installer
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sat, 22 Mar 2003 18:27:28 +0000 |
parents | e8f2fdf78662 |
children | 65a0a360e8c4 |
comparison
equal
deleted
inserted
replaced
4856:ac9ed6c5594f | 4857:cb0681cfb9f2 |
---|---|
32 Quit | 32 Quit |
33 no_version: | 33 no_version: |
34 MessageBox MB_OK "Gaim already exists on this machine. Uninstall first then try again." IDOK | 34 MessageBox MB_OK "Gaim already exists on this machine. Uninstall first then try again." IDOK |
35 Quit | 35 Quit |
36 cont_install: | 36 cont_install: |
37 ; Install Aspell | |
38 SetOutPath "$INSTDIR" | |
39 File ..\win32-dev\aspell-15\bin\aspell-0.50.2.exe | |
40 ; Don't do this silently (i.e /S switch).. because some people wish to specify | |
41 ; the location of the Aspell install directory. ( | |
42 ExecWait '"$INSTDIR\aspell-0.50.2.exe"' $R0 | |
43 ; cleanup aspell installer file | |
44 Delete "$INSTDIR\aspell-0.50.2.exe" | |
45 ; Check if aspell installer completed ok | |
46 StrCmp $R0 "0" have_aspell | |
47 ; Aspell exited uncleanly so we will exit uncleanly too. | |
48 RMDir /r "$INSTDIR" | |
49 Quit | |
50 have_aspell: | |
51 SetOutPath "$INSTDIR" | 37 SetOutPath "$INSTDIR" |
52 ; Gaim files | 38 ; Gaim files |
53 File /r .\win32-install-dir\*.* | 39 File /r .\win32-install-dir\*.* |
54 | 40 |
55 ; Gaim Registry Settings | 41 ; Gaim Registry Settings |
56 ; Read in Aspell install path | |
57 ReadRegStr $R0 HKEY_LOCAL_MACHINE "Software\Aspell" "" | |
58 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" | 42 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" |
59 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "Version" "${GAIM_VERSION}" | 43 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "Version" "${GAIM_VERSION}" |
60 ; Keep track of aspell install path, for when we uninstall | |
61 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "AspellPath" $R0 | |
62 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)" | 44 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)" |
63 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\gaim-uninst.exe"' | 45 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\gaim-uninst.exe"' |
64 ; Set App path to include aspell dir (so Gaim can find aspell dlls) | |
65 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "" "$INSTDIR\gaim.exe" | |
66 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "Path" $R0 | |
67 ; Increase refrence count for aspell dlls | |
68 Push "$R0\aspell-15.dll" | |
69 Call AddSharedDLL | |
70 Push "$R0\aspell-common-0-50-2.dll" | |
71 Call AddSharedDLL | |
72 Push "$R0\pspell-15.dll" | |
73 Call AddSharedDLL | |
74 | 46 |
75 ; Set Start Menu icons | 47 ; Set Start Menu icons |
76 SetShellVarContext "all" | 48 SetShellVarContext "all" |
77 SetOutPath "$SMPROGRAMS\Gaim" | 49 SetOutPath "$SMPROGRAMS\Gaim" |
78 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \ | 50 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \ |
97 ; Delete Start Menu group & Desktop icon | 69 ; Delete Start Menu group & Desktop icon |
98 SetShellVarContext "all" | 70 SetShellVarContext "all" |
99 RMDir /r "$SMPROGRAMS\Gaim" | 71 RMDir /r "$SMPROGRAMS\Gaim" |
100 Delete "$DESKTOP\Gaim.lnk" | 72 Delete "$DESKTOP\Gaim.lnk" |
101 | 73 |
102 ; Read in Aspell install path | |
103 ReadRegStr $R0 HKEY_LOCAL_MACHINE "Software\Gaim" "AspellPath" | |
104 | |
105 ; Delete Gaim Registry Settings | 74 ; Delete Gaim Registry Settings |
106 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" | 75 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" |
107 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" | 76 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" |
108 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" | |
109 | 77 |
110 ; Decrease refrence count for Aspell dlls | |
111 Push "$R0\aspell-15.dll" | |
112 Call un.RemoveSharedDLL | |
113 Push "$R0\aspell-common-0-50-2.dll" | |
114 Call un.RemoveSharedDLL | |
115 Push "$R0\pspell-15.dll" | |
116 Call un.RemoveSharedDLL | |
117 | |
118 ; Delete aspell dir if its empty | |
119 RMDir "$R0" | |
120 SectionEnd ; end of uninstall section | 78 SectionEnd ; end of uninstall section |
121 | |
122 ;;; | |
123 ;;; FUNCTIONS | |
124 ;;; | |
125 | |
126 ; AddSharedDLL | |
127 ; | |
128 ; Increments a shared DLLs reference count. | |
129 ; Use by passing one item on the stack (the full path of the DLL). | |
130 ; | |
131 ; Usage: | |
132 ; Push $SYSDIR\myDll.dll | |
133 ; Call AddSharedDLL | |
134 ; | |
135 | |
136 Function AddSharedDLL | |
137 Exch $R1 | |
138 Push $R0 | |
139 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
140 IntOp $R0 $R0 + 1 | |
141 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 | |
142 Pop $R0 | |
143 Pop $R1 | |
144 FunctionEnd | |
145 | |
146 ; un.RemoveSharedDLL | |
147 ; | |
148 ; Decrements a shared DLLs reference count, and removes if necessary. | |
149 ; Use by passing one item on the stack (the full path of the DLL). | |
150 ; Note: for use in the main installer (not the uninstaller), rename the | |
151 ; function to RemoveSharedDLL. | |
152 ; | |
153 ; Usage: | |
154 ; Push $SYSDIR\myDll.dll | |
155 ; Call un.RemoveShareDLL | |
156 ; | |
157 | |
158 Function un.RemoveSharedDLL | |
159 Exch $R1 | |
160 Push $R0 | |
161 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
162 StrCmp $R0 "" remove | |
163 IntOp $R0 $R0 - 1 | |
164 IntCmp $R0 0 rk rk uk | |
165 rk: | |
166 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
167 goto Remove | |
168 uk: | |
169 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 | |
170 Goto noremove | |
171 remove: | |
172 Delete /REBOOTOK $R1 | |
173 noremove: | |
174 Pop $R0 | |
175 Pop $R1 | |
176 FunctionEnd | |
177 | 79 |
178 ; eof | 80 ; eof |
179 | 81 |