Mercurial > pidgin.yaz
comparison gaim-installer.nsi @ 3853:eddcb3a8c74e
[gaim-migrate @ 4005]
Gtkspell/aspell update
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sat, 02 Nov 2002 01:30:20 +0000 |
parents | a3093efd9027 |
children | d0897828bd0d |
comparison
equal
deleted
inserted
replaced
3852:c167a851933a | 3853:eddcb3a8c74e |
---|---|
19 InstallDir "$PROGRAMFILES\Gaim" | 19 InstallDir "$PROGRAMFILES\Gaim" |
20 InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" | 20 InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" |
21 DirShow show ; (make this hide to not let the user change it) | 21 DirShow show ; (make this hide to not let the user change it) |
22 DirText "Select the directory to install Gaim in:" | 22 DirText "Select the directory to install Gaim in:" |
23 | 23 |
24 Section "Aspell" | |
25 SetOutPath $OUTDIR | |
26 File ..\win32-dev\aspell-15\bin\aspell-0.50.2.exe | |
27 ExecWait "$OUTDIR\aspell-0.50.2.exe" | |
28 SectionEnd | |
24 | 29 |
25 Section "" ; (default section) | 30 Section "" ; (default section) |
26 SetOutPath "$INSTDIR" | 31 SetOutPath "$INSTDIR" |
27 ; add files / whatever that need to be installed here. | 32 ; Gaim files |
28 File /r .\win32-install-dir\*.* | 33 File /r .\win32-install-dir\*.* |
29 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" | 34 ; Gaim Registry Settings |
30 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)" | 35 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR" |
31 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\uninst.exe"' | 36 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)" |
32 ; write out uninstaller | 37 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\gaim-uninst.exe"' |
33 WriteUninstaller "$INSTDIR\uninst.exe" | 38 ; Set App path to include aspell dir |
39 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "" "$INSTDIR\gaim.exe" | |
40 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "Path" "$PROGRAMFILES\aspell" | |
41 ; Increase refrence count for aspell dlls | |
42 Push "C:\Program Files\aspell\aspell-15.dll" | |
43 Call AddSharedDLL | |
44 Push "C:\Program Files\aspell\aspell-common-0-50-2.dll" | |
45 Call AddSharedDLL | |
46 Push "C:\Program Files\aspell\pspell-15.dll" | |
47 Call AddSharedDLL | |
48 | |
49 ; write out uninstaller | |
50 WriteUninstaller "$INSTDIR\gaim-uninst.exe" | |
34 SectionEnd ; end of default section | 51 SectionEnd ; end of default section |
35 | 52 |
36 Section "Gaim Start Menu Group" | 53 Section "Gaim Start Menu Group" |
37 SetOutPath "$SMPROGRAMS\Gaim" | 54 SetOutPath "$SMPROGRAMS\Gaim" |
38 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \ | 55 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \ |
39 "$INSTDIR\gaim.exe" | 56 "$INSTDIR\gaim.exe" |
40 CreateShortCut "$SMPROGRAMS\Gaim\Unistall.lnk" \ | 57 CreateShortCut "$SMPROGRAMS\Gaim\Unistall.lnk" \ |
41 "$INSTDIR\uninst.exe" | 58 "$INSTDIR\gaim-uninst.exe" |
42 SectionEnd | 59 SectionEnd |
43 | 60 |
44 | 61 |
45 | 62 |
46 ; begin uninstall settings/section | 63 ; begin uninstall settings/section |
47 UninstallText "This will uninstall Gaim from your system" | 64 UninstallText "This will uninstall Gaim from your system" |
48 | 65 |
49 Section Uninstall | 66 Section Uninstall |
50 ; add delete commands to delete whatever files/registry keys/etc you installed here. | 67 ; Delete Gaim Dir |
51 RMDir /r "$SMPROGRAMS\Gaim" | 68 RMDir /r "$INSTDIR" |
52 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" | 69 RMDir /r "$SMPROGRAMS\Gaim" |
53 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" | 70 |
54 RMDir /r "$INSTDIR" | 71 ; Delete Aspell Files |
72 ;RMDir /r $PROGRAMFILES\aspell\data | |
73 ;RMDir /r $PROGRAMFILES\aspell\dict | |
74 ;Delete $PROGRAMFILES\aspell\aspell-15.dll | |
75 ;Delete $PROGRAMFILES\aspell\aspell-common-0-50-2.dll | |
76 ;Delete $PROGRAMFILES\aspell\pspell-15.dll | |
77 | |
78 ; Delete Gaim Registry Settings | |
79 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" | |
80 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" | |
81 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" | |
82 | |
83 ; Decrease refrence count for Aspell dlls | |
84 Push "C:\Program Files\aspell\aspell-15.dll" | |
85 Call un.RemoveSharedDLL | |
86 Push "C:\Program Files\aspell\aspell-common-0-50-2.dll" | |
87 Call un.RemoveSharedDLL | |
88 Push "C:\Program Files\aspell\pspell-15.dll" | |
89 Call un.RemoveSharedDLL | |
90 ; Delete aspell dir if its empty | |
91 RMDir "C:\Program Files\aspell" | |
55 SectionEnd ; end of uninstall section | 92 SectionEnd ; end of uninstall section |
93 | |
94 | |
95 ; AddSharedDLL | |
96 ; | |
97 ; Increments a shared DLLs reference count. | |
98 ; Use by passing one item on the stack (the full path of the DLL). | |
99 ; | |
100 ; Usage: | |
101 ; Push $SYSDIR\myDll.dll | |
102 ; Call AddSharedDLL | |
103 ; | |
104 | |
105 Function AddSharedDLL | |
106 Exch $R1 | |
107 Push $R0 | |
108 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
109 IntOp $R0 $R0 + 1 | |
110 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 | |
111 Pop $R0 | |
112 Pop $R1 | |
113 FunctionEnd | |
114 | |
115 ; un.RemoveSharedDLL | |
116 ; | |
117 ; Decrements a shared DLLs reference count, and removes if necessary. | |
118 ; Use by passing one item on the stack (the full path of the DLL). | |
119 ; Note: for use in the main installer (not the uninstaller), rename the | |
120 ; function to RemoveSharedDLL. | |
121 ; | |
122 ; Usage: | |
123 ; Push $SYSDIR\myDll.dll | |
124 ; Call un.RemoveShareDLL | |
125 ; | |
126 | |
127 Function un.RemoveSharedDLL | |
128 Exch $R1 | |
129 Push $R0 | |
130 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
131 StrCmp $R0 "" remove | |
132 IntOp $R0 $R0 - 1 | |
133 IntCmp $R0 0 rk rk uk | |
134 rk: | |
135 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 | |
136 goto Remove | |
137 uk: | |
138 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0 | |
139 Goto noremove | |
140 remove: | |
141 Delete /REBOOTOK $R1 | |
142 noremove: | |
143 Pop $R0 | |
144 Pop $R1 | |
145 FunctionEnd | |
56 | 146 |
57 ; eof | 147 ; eof |
58 | 148 |