comparison pidgin/win32/nsis/pidgin-installer.nsi @ 18463:18a81722d6d4

Preselect the Desktop and Startmenu shortcuts in the installer based on the previous installation (if there is one). Fixes #1620.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 09 Jul 2007 22:00:55 +0000
parents 234ab2c9ed36
children 9e9f3442764c
comparison
equal deleted inserted replaced
18462:d4d31d8112b5 18463:18a81722d6d4
1166 Call SelectAndDisableInstalledDictionaries 1166 Call SelectAndDisableInstalledDictionaries
1167 1167
1168 ;Preselect the URI handlers as appropriate 1168 ;Preselect the URI handlers as appropriate
1169 Call SelectURIHandlerSelections 1169 Call SelectURIHandlerSelections
1170 1170
1171 ;Preselect the "shortcuts" checkboxes according to the previous installation
1172 ClearErrors
1173 ;Make sure that there was a previous installation
1174 ReadRegStr $R0 HKCU "${PIDGIN_REG_KEY}" "Installer Language"
1175 IfErrors done_preselecting_shortcuts
1176 ;Does the Desktop shortcut exist?
1177 GetFileTime "$DESKTOP\Pidgin.lnk" $R0 $R0
1178 IfErrors +1 +4
1179 ClearErrors
1180 SetShellVarContext "all"
1181 GetFileTime "$DESKTOP\Pidgin.lnk" $R0 $R0
1182 IfErrors preselect_startmenu_shortcut ;Desktop Shortcut if off by default
1183 !insertmacro SelectSection ${SecDesktopShortcut}
1184 preselect_startmenu_shortcut:
1185 ;Reset ShellVarContext because we may have changed it
1186 SetShellVarContext "current"
1187 ClearErrors
1188 ;Does the StartMenu shortcut exist?
1189 GetFileTime "$SMPROGRAMS\Pidgin.lnk" $R0 $R0
1190 IfErrors +1 done_preselecting_shortcuts ;StartMenu Shortcut is on by default
1191 ClearErrors
1192 SetShellVarContext "all"
1193 GetFileTime "$SMPROGRAMS\Pidgin.lnk" $R0 $R0
1194 IfErrors +1 done_preselecting_shortcuts ;StartMenu Shortcut is on by default
1195 !insertmacro UnselectSection ${SecStartMenuShortcut}
1196 done_preselecting_shortcuts:
1197 ;Reset ShellVarContext because we may have changed it
1198 SetShellVarContext "current"
1199
1171 StrCpy $ISSILENT "/NOUI" 1200 StrCpy $ISSILENT "/NOUI"
1172 1201
1173 ; GTK installer has two silent states.. one with Message boxes, one without 1202 ; GTK installer has two silent states.. one with Message boxes, one without
1174 ; If pidgin installer was run silently, we want to supress gtk installer msg boxes. 1203 ; If pidgin installer was run silently, we want to supress gtk installer msg boxes.
1175 IfSilent 0 set_gtk_normal 1204 IfSilent 0 set_gtk_normal
1303 Function preWelcomePage 1332 Function preWelcomePage
1304 Push $R0 1333 Push $R0
1305 1334
1306 !ifndef WITH_GTK 1335 !ifndef WITH_GTK
1307 ; If this installer dosn't have GTK, check whether we need it. 1336 ; If this installer dosn't have GTK, check whether we need it.
1308 ; We do this here an not in .onInit because language change in 1337 ; We do this here and not in .onInit because language change in
1309 ; .onInit doesn't take effect until it is finished. 1338 ; .onInit doesn't take effect until it is finished.
1310 Call DoWeNeedGtk 1339 Call DoWeNeedGtk
1311 Pop $R0 1340 Pop $R0
1312 Pop $GTK_FOLDER 1341 Pop $GTK_FOLDER
1313 1342