comparison pidgin/win32/nsis/pidgin-installer.nsi @ 21150:476586ae4aff

Add /DS=[0,1] and /SMS=[0,1] to the win32 installer for enabling and disabling the Desktop Shortcut and Start Menu Shortcut respectively. Fixes #3814.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 06 Nov 2007 04:42:45 +0000
parents 23d046a20aa0
children c8e37362179a
comparison
equal deleted inserted replaced
21149:b2d9f859663e 21150:476586ae4aff
1101 StrCpy $2 "HKLM" 1101 StrCpy $2 "HKLM"
1102 StrCmp $0 "" no_gtk have_gtk 1102 StrCmp $0 "" no_gtk have_gtk
1103 1103
1104 have_gtk: 1104 have_gtk:
1105 ; GTK+ is already installed; check version. 1105 ; GTK+ is already installed; check version.
1106 ; Change this to not even run the GTK installer if this version is already installed. 1106 ; Change this to not even run the GTK installer if this version is already installed.
1107 ${VersionCompare} ${GTK_INSTALL_VERSION} $0 $3 1107 ${VersionCompare} ${GTK_INSTALL_VERSION} $0 $3
1108 IntCmp $3 1 +1 good_version good_version 1108 IntCmp $3 1 +1 good_version good_version
1109 ${VersionCompare} ${GTK_MIN_VERSION} $0 $3 1109 ${VersionCompare} ${GTK_MIN_VERSION} $0 $3
1110 1110
1111 ; Bad version. If hklm ver and we have hkcu or no rights.. return no gtk 1111 ; Bad version. If hklm ver and we have hkcu or no rights.. return no gtk
1165 !insertmacro RunCheckMacro "" 1165 !insertmacro RunCheckMacro ""
1166 !insertmacro RunCheckMacro "un." 1166 !insertmacro RunCheckMacro "un."
1167 1167
1168 Function .onInit 1168 Function .onInit
1169 Push $R0 1169 Push $R0
1170 Push $R1
1171 Push $R2
1170 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "pidgin_installer_running") i .r1 ?e' 1172 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "pidgin_installer_running") i .r1 ?e'
1171 Pop $R0 1173 Pop $R0
1172 StrCmp $R0 0 +3 1174 StrCmp $R0 0 +3
1173 MessageBox MB_OK|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) /SD IDOK 1175 MessageBox MB_OK|MB_ICONEXCLAMATION $(INSTALLER_IS_RUNNING) /SD IDOK
1174 Abort 1176 Abort
1231 StrCpy $ISSILENT "/S" 1233 StrCpy $ISSILENT "/S"
1232 set_gtk_normal: 1234 set_gtk_normal:
1233 1235
1234 ${GetParameters} $R0 1236 ${GetParameters} $R0
1235 ClearErrors 1237 ClearErrors
1236 ${GetOptions} $R0 "/L=" $R0 1238 ${GetOptions} "$R0" "/L=" $R1
1237 IfErrors +3 1239 IfErrors +3
1238 StrCpy $LANGUAGE $R0 1240 StrCpy $LANGUAGE $R1
1239 Goto skip_lang 1241 Goto skip_lang
1240 1242
1241 ; Select Language 1243 ; Select Language
1242 ; Display Language selection dialog 1244 ; Display Language selection dialog
1243 !insertmacro MUI_LANGDLL_DISPLAY 1245 !insertmacro MUI_LANGDLL_DISPLAY
1244 skip_lang: 1246 skip_lang:
1247
1248 ClearErrors
1249 ${GetOptions} "$R0" "/DS=" $R1
1250 IfErrors +7
1251 SectionGetFlags ${SecDesktopShortcut} $R2
1252 StrCmp "1" $R1 0 +2
1253 IntOp $R2 $R2 | ${SF_SELECTED}
1254 StrCmp "0" $R1 0 +3
1255 IntOp $R1 ${SF_SELECTED} ~
1256 IntOp $R2 $R2 & $R1
1257 SectionSetFlags ${SecDesktopShortcut} $R2
1258
1259 ClearErrors
1260 ${GetOptions} "$R0" "/SMS=" $R1
1261 IfErrors +7
1262 SectionGetFlags ${SecStartMenuShortcut} $R2
1263 StrCmp "1" $R1 0 +2
1264 IntOp $R2 $R2 | ${SF_SELECTED}
1265 StrCmp "0" $R1 0 +3
1266 IntOp $R1 ${SF_SELECTED} ~
1267 IntOp $R2 $R2 & $R1
1268 SectionSetFlags ${SecStartMenuShortcut} $R2
1245 1269
1246 ; If install path was set on the command, use it. 1270 ; If install path was set on the command, use it.
1247 StrCmp $INSTDIR "" 0 instdir_done 1271 StrCmp $INSTDIR "" 0 instdir_done
1248 1272
1249 ; If pidgin or gaim is currently installed, we should default to where it is currently installed 1273 ; If pidgin or gaim is currently installed, we should default to where it is currently installed
1268 ${GetParent} $R2 $R2 1292 ${GetParent} $R2 $R2
1269 StrCpy $INSTDIR "$R2\Pidgin" 1293 StrCpy $INSTDIR "$R2\Pidgin"
1270 1294
1271 instdir_done: 1295 instdir_done:
1272 ;LogSet on 1296 ;LogSet on
1297 Pop $R2
1298 Pop $R1
1273 Pop $R0 1299 Pop $R0
1274 FunctionEnd 1300 FunctionEnd
1275 1301
1276 Function un.onInit 1302 Function un.onInit
1277 Call un.RunCheck 1303 Call un.RunCheck