annotate gaim-installer.nsi @ 4744:a0746ffce599

[gaim-migrate @ 5059] <i>None Advertised</i> is awful ugly. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 13 Mar 2003 10:16:59 +0000
parents e8f2fdf78662
children cb0681cfb9f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 ; Installer script for win32 Gaim
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
2 ; Herman Bloggs <hermanator12002@yahoo.com>
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
4 ; NOTE: this .NSI script is designed for NSIS v2.0b0+
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5
3966
ff8eb6508202 [gaim-migrate @ 4150]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3965
diff changeset
6 Name "Gaim ${GAIM_VERSION} (Win32)"
ff8eb6508202 [gaim-migrate @ 4150]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3965
diff changeset
7 OutFile "gaim-${GAIM_VERSION}.exe"
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8 Icon .\pixmaps\gaim-install.ico
3892
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
9 UninstallIcon .\pixmaps\gaim-install.ico
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11 ; Some default compiler settings (uncomment and change at will):
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
12 ; SetCompress auto ; (can be off or force)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13 ; SetDatablockOptimize on ; (can be off)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14 ; CRCCheck on ; (can be off)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
15 ; AutoCloseWindow false ; (can be true for the window go away automatically at end)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
16 ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
17 ; SetDateSave off ; (can be on to have files restored to their orginal date)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
18
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
19 InstallDir "$PROGRAMFILES\Gaim"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
20 InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" ""
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
21 DirShow show ; (make this hide to not let the user change it)
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
22 DirText "Select the directory to install Gaim in:"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
23
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
24 Section "" ; (default section)
3892
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
25 ; Check if previous intallation exists
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
26 ReadRegStr $R0 HKEY_LOCAL_MACHINE "SOFTWARE\gaim" ""
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
27 StrCmp $R0 "" cont_install
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
28 ReadRegStr $R1 HKEY_LOCAL_MACHINE "SOFTWARE\gaim" "Version"
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
29 StrCmp $R1 "" no_version
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
30 ; Gaim found, so exit Intallation
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
31 MessageBox MB_OK "Gaim (v$R1) already exists on this machine. Uninstall first then try again." IDOK
3892
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
32 Quit
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
33 no_version:
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
34 MessageBox MB_OK "Gaim already exists on this machine. Uninstall first then try again." IDOK
3892
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
35 Quit
ac76cf27f8d5 [gaim-migrate @ 4044]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3860
diff changeset
36 cont_install:
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
37 ; Install Aspell
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
38 SetOutPath "$INSTDIR"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
39 File ..\win32-dev\aspell-15\bin\aspell-0.50.2.exe
3989
85980320d468 [gaim-migrate @ 4180]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3966
diff changeset
40 ; Don't do this silently (i.e /S switch).. because some people wish to specify
85980320d468 [gaim-migrate @ 4180]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3966
diff changeset
41 ; the location of the Aspell install directory. (
85980320d468 [gaim-migrate @ 4180]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3966
diff changeset
42 ExecWait '"$INSTDIR\aspell-0.50.2.exe"' $R0
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
43 ; cleanup aspell installer file
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
44 Delete "$INSTDIR\aspell-0.50.2.exe"
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
45 ; Check if aspell installer completed ok
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
46 StrCmp $R0 "0" have_aspell
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
47 ; Aspell exited uncleanly so we will exit uncleanly too.
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
48 RMDir /r "$INSTDIR"
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
49 Quit
3917
29ccbc3eb9c1 [gaim-migrate @ 4076]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3910
diff changeset
50 have_aspell:
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
51 SetOutPath "$INSTDIR"
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
52 ; Gaim files
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
53 File /r .\win32-install-dir\*.*
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
54
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
55 ; Gaim Registry Settings
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
56 ; Read in Aspell install path
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
57 ReadRegStr $R0 HKEY_LOCAL_MACHINE "Software\Aspell" ""
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
58 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "" "$INSTDIR"
3966
ff8eb6508202 [gaim-migrate @ 4150]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3965
diff changeset
59 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "Version" "${GAIM_VERSION}"
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
60 ; Keep track of aspell install path, for when we uninstall
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
61 WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Gaim" "AspellPath" $R0
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
62 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "DisplayName" "Gaim (remove only)"
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
63 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gaim" "UninstallString" '"$INSTDIR\gaim-uninst.exe"'
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
64 ; Set App path to include aspell dir (so Gaim can find aspell dlls)
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
65 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "" "$INSTDIR\gaim.exe"
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
66 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe" "Path" $R0
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
67 ; Increase refrence count for aspell dlls
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
68 Push "$R0\aspell-15.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
69 Call AddSharedDLL
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
70 Push "$R0\aspell-common-0-50-2.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
71 Call AddSharedDLL
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
72 Push "$R0\pspell-15.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
73 Call AddSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
74
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
75 ; Set Start Menu icons
4126
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
76 SetShellVarContext "all"
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
77 SetOutPath "$SMPROGRAMS\Gaim"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
78 CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" \
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
79 "$INSTDIR\gaim.exe"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
80 CreateShortCut "$SMPROGRAMS\Gaim\Unistall.lnk" \
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
81 "$INSTDIR\gaim-uninst.exe"
4126
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
82 ; Set Desktop icon
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
83 CreateShortCut "$DESKTOP\Gaim.lnk" \
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
84 "$INSTDIR\gaim.exe"
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
85
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
86 ; write out uninstaller
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
87 WriteUninstaller "$INSTDIR\gaim-uninst.exe"
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
88 SectionEnd ; end of default section
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
89
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
90 ; begin uninstall settings/section
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
91 UninstallText "This will uninstall Gaim from your system"
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
92
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
93 Section Uninstall
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
94 ; Delete Gaim Dir
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
95 RMDir /r "$INSTDIR"
4126
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
96
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
97 ; Delete Start Menu group & Desktop icon
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
98 SetShellVarContext "all"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
99 RMDir /r "$SMPROGRAMS\Gaim"
4126
e8f2fdf78662 [gaim-migrate @ 4343]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3989
diff changeset
100 Delete "$DESKTOP\Gaim.lnk"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
101
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
102 ; Read in Aspell install path
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
103 ReadRegStr $R0 HKEY_LOCAL_MACHINE "Software\Gaim" "AspellPath"
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
104
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
105 ; Delete Gaim Registry Settings
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
106 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Gaim"
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
107 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Gaim"
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
108 DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\gaim.exe"
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
109
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
110 ; Decrease refrence count for Aspell dlls
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
111 Push "$R0\aspell-15.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
112 Call un.RemoveSharedDLL
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
113 Push "$R0\aspell-common-0-50-2.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
114 Call un.RemoveSharedDLL
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
115 Push "$R0\pspell-15.dll"
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
116 Call un.RemoveSharedDLL
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
117
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
118 ; Delete aspell dir if its empty
3910
0d8b11bed18b [gaim-migrate @ 4069]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3892
diff changeset
119 RMDir "$R0"
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
120 SectionEnd ; end of uninstall section
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
121
3860
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
122 ;;;
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
123 ;;; FUNCTIONS
d0897828bd0d [gaim-migrate @ 4012]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3853
diff changeset
124 ;;;
3853
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
125
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
126 ; AddSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
127 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
128 ; Increments a shared DLLs reference count.
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
129 ; Use by passing one item on the stack (the full path of the DLL).
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
130 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
131 ; Usage:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
132 ; Push $SYSDIR\myDll.dll
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
133 ; Call AddSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
134 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
135
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
136 Function AddSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
137 Exch $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
138 Push $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
139 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
140 IntOp $R0 $R0 + 1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
141 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
142 Pop $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
143 Pop $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
144 FunctionEnd
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
145
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
146 ; un.RemoveSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
147 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
148 ; Decrements a shared DLLs reference count, and removes if necessary.
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
149 ; Use by passing one item on the stack (the full path of the DLL).
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
150 ; Note: for use in the main installer (not the uninstaller), rename the
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
151 ; function to RemoveSharedDLL.
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
152 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
153 ; Usage:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
154 ; Push $SYSDIR\myDll.dll
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
155 ; Call un.RemoveShareDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
156 ;
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
157
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
158 Function un.RemoveSharedDLL
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
159 Exch $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
160 Push $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
161 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
162 StrCmp $R0 "" remove
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
163 IntOp $R0 $R0 - 1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
164 IntCmp $R0 0 rk rk uk
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
165 rk:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
166 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
167 goto Remove
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
168 uk:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
169 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
170 Goto noremove
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
171 remove:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
172 Delete /REBOOTOK $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
173 noremove:
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
174 Pop $R0
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
175 Pop $R1
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
176 FunctionEnd
eddcb3a8c74e [gaim-migrate @ 4005]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 3849
diff changeset
177
3630
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
178 ; eof
9682c0e022c6 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
179