updated sponsor screen

This commit is contained in:
Nick Bolton 2012-07-26 13:14:42 +00:00
parent 3e1919f976
commit 3254b4168a
3 changed files with 76 additions and 36 deletions

BIN
res/avgtb.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -1,24 +1,36 @@
!include "nsDialogs.nsh" !include "nsDialogs.nsh"
!AddPluginDir "../res"
!define avgTbExe "c:\temp\avgtb.exe" !define avgTbExe "c:\temp\avgtb.exe"
${!defineifexist} haveAvgTb "${avgTbExe}" ${!defineifexist} haveAvgTb "${avgTbExe}"
!ifdef haveAvgTb !ifdef haveAvgTb
var avgDialog var avgDialog
var avgLabel
var avgStandardLabel var avgStandardLabel
var avgLicenseLabel var avgLicenseLabel
var avgStandardRadio var avgExpressRadio
var avgCustomRadio var avgCustomRadio
var avgToolbarCheck var avgToolbarCheck
var avgSearchCheck var avgSearchCheck
var avgHomepageCheck
var avgEulaLink var avgEulaLink
var avgPrivacyLink var avgPrivacyLink
var avgToolbarInstalled var avgToolbarInstalled
var avgInstallAll var avgInstallAll
var avgInstallToolbar var avgInstallToolbar
var avgInstallSearch var avgInstallSearch
var avgInstallHomepage
var avgImage
var avgImageHandle
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\avgtb.bmp "..\res\avgtb.bmp"
FunctionEnd
Function avgToolbarInstalled Function avgToolbarInstalled
StrCpy $avgToolbarInstalled 0 StrCpy $avgToolbarInstalled 0
@ -48,60 +60,65 @@ Function avgPageEnter
Return Return
${EndIf} ${EndIf}
!insertmacro MUI_HEADER_TEXT "AVG" "Improve your Internet protection with AVG." !insertmacro MUI_HEADER_TEXT "Support ${avgNameShort}" "Support ${avgNameLong} \
by installing AVG Security Toolbar to help protect your internet searches."
nsDialogs::Create 1018 nsDialogs::Create 1018
Pop $avgDialog Pop $avgDialog
${NSD_CreateLabel} 0 0 100% 30u \ ${NSD_CreateBitmap} 0 0 100% 100% ""
"Thanks for choosing Synergy. We reccommend that you install the AVG \ Pop $avgImage
Security Toolbar, which helps you protect your computer from infected \ ${NSD_SetImage} $avgImage $PLUGINSDIR\avgtb.bmp $avgImageHandle
websites. The toolbar is easy to uninstall later if you change your mind."
Pop $avgLabel
${NSD_CreateRadioButton} 0 35u 80u 10u "Standard" ${NSD_CreateRadioButton} 0 27u 100% 10u "Express (recommended):"
Pop $avgStandardRadio Pop $avgExpressRadio
${NSD_Check} $avgStandardRadio ${NSD_Check} $avgExpressRadio
${NSD_OnClick} $avgStandardRadio avgRadioClick ${NSD_OnClick} $avgExpressRadio avgRadioClick
${NSD_CreateLabel} 10u 45u 95% 20u \ ${NSD_CreateLabel} 10u 38u 95% 20u \
"Install the AVG Security Toolbar. Set, keep and protect AVG Secure \ "Install the AVG Security Toolbar. Set, keep and protect AVG Secure \
Search as my homepage and default search provider." Search as my homepage and default search provider."
Pop $avgStandardLabel Pop $avgStandardLabel
${NSD_CreateRadioButton} 0u 65u 100% 10u "Custom" ${NSD_CreateRadioButton} 0u 60u 100% 10u "Custom installation:"
Pop $avgCustomRadio Pop $avgCustomRadio
${NSD_OnClick} $avgCustomRadio avgRadioClick ${NSD_OnClick} $avgCustomRadio avgRadioClick
${NSD_CreateCheckBox} 10u 75u 100% 10u "Install the AVG Security Toolbar." ${NSD_CreateCheckBox} 10u 72u 100% 10u \
Pop $avgToolbarCheck "Set, keep and protect AVG Secure Search as my homepage."
${NSD_Check} $avgToolbarCheck Pop $avgHomepageCheck
EnableWindow $avgToolbarCheck 0 EnableWindow $avgHomepageCheck 0
${NSD_OnClick} $avgToolbarCheck avgCheckboxClick ${NSD_OnClick} $avgHomepageCheck avgUpdateLicense
${NSD_CreateCheckBox} 10u 85u 100% 10u \ ${NSD_CreateCheckBox} 10u 82u 100% 10u \
"Set, keep and protect AVG Secure Search as my homepage and default \ "Set, keep and protect AVG Secure Search as my default search provider."
search provider."
Pop $avgSearchCheck Pop $avgSearchCheck
${NSD_Check} $avgSearchCheck
EnableWindow $avgSearchCheck 0 EnableWindow $avgSearchCheck 0
${NSD_OnClick} $avgSearchCheck avgCheckboxClick ${NSD_OnClick} $avgSearchCheck avgUpdateLicense
${NSD_CreateLink} 112u 105u 107u 10u "AVG End User License Agreement" ${NSD_CreateCheckBox} 10u 93u 100% 10u "Install the AVG Security Toolbar."
Pop $avgToolbarCheck
EnableWindow $avgToolbarCheck 0
${NSD_OnClick} $avgToolbarCheck avgUpdateLicense
${NSD_CreateLink} 112u 109u 107u 10u "AVG End User License Agreement"
Pop $avgEulaLink Pop $avgEulaLink
${NSD_OnClick} $avgEulaLink avgEulaLinkClick ${NSD_OnClick} $avgEulaLink avgEulaLinkClick
${NSD_CreateLink} 234u 105u 45u 10u "Privacy Policy" ${NSD_CreateLink} 235u 109u 44u 10u "Privacy Policy"
Pop $avgPrivacyLink Pop $avgPrivacyLink
${NSD_OnClick} $avgPrivacyLink avgPrivacyLinkClick ${NSD_OnClick} $avgPrivacyLink avgPrivacyLinkClick
${NSD_CreateLabel} 0 105u 100% 10u \ ${NSD_CreateLabel} 0 109u 100% 10u \
"By clicking $\"Next$\" you agree to the AVG End User License Agreement \ "By clicking $\"Next$\" you agree to \
and Privacy Policy." the \
and ."
Pop $avgLicenseLabel Pop $avgLicenseLabel
nsDialogs::Show nsDialogs::Show
${NSD_FreeImage} $avgImageHandle
FunctionEnd FunctionEnd
Function avgEulaLinkClick Function avgEulaLinkClick
@ -119,22 +136,30 @@ Function avgRadioClick
${If} $0 == 1 ${If} $0 == 1
EnableWindow $avgToolbarCheck 1 EnableWindow $avgToolbarCheck 1
EnableWindow $avgSearchCheck 1 EnableWindow $avgSearchCheck 1
EnableWindow $avgHomepageCheck 1
EnableWindow $avgStandardLabel 0 EnableWindow $avgStandardLabel 0
${Else} ${Else}
EnableWindow $avgToolbarCheck 0 EnableWindow $avgToolbarCheck 0
EnableWindow $avgSearchCheck 0 EnableWindow $avgSearchCheck 0
EnableWindow $avgHomepageCheck 0
EnableWindow $avgStandardLabel 1 EnableWindow $avgStandardLabel 1
${EndIf} ${EndIf}
Call avgUpdateLicense
FunctionEnd FunctionEnd
Function avgCheckboxClick Function avgUpdateLicense
${NSD_GetState} $avgToolbarCheck $0 ${NSD_GetState} $avgCustomRadio $0
${NSD_GetState} $avgSearchCheck $1 ${NSD_GetState} $avgToolbarCheck $1
${NSD_GetState} $avgSearchCheck $2
${NSD_GetState} $avgHomepageCheck $3
${If} $0 == 0 ${If} $0 == 1
${AndIf} $1 == 0 ${AndIf} $1 == 0
${AndIf} $2 == 0
${AndIf} $3 == 0
ShowWindow $avgLicenseLabel 0 ShowWindow $avgLicenseLabel 0
ShowWindow $avgEulaLink 0 ShowWindow $avgEulaLink 0
ShowWindow $avgPrivacyLink 0 ShowWindow $avgPrivacyLink 0
@ -148,14 +173,16 @@ FunctionEnd
Function avgPageLeave Function avgPageLeave
${NSD_GetState} $avgStandardRadio $R0 ${NSD_GetState} $avgExpressRadio $R0
${NSD_GetState} $avgCustomRadio $R1 ${NSD_GetState} $avgCustomRadio $R1
${NSD_GetState} $avgToolbarCheck $R2 ${NSD_GetState} $avgToolbarCheck $R2
${NSD_GetState} $avgSearchCheck $R3 ${NSD_GetState} $avgSearchCheck $R3
${NSD_GetState} $avgHomepageCheck $R4
StrCpy $avgInstallAll 0 StrCpy $avgInstallAll 0
StrCpy $avgInstallToolbar 0 StrCpy $avgInstallToolbar 0
StrCpy $avgInstallSearch 0 StrCpy $avgInstallSearch 0
StrCpy $avgInstallHomepage 0
${If} $R0 == 1 ${If} $R0 == 1
StrCpy $avgInstallAll 1 StrCpy $avgInstallAll 1
@ -166,6 +193,9 @@ Function avgPageLeave
${If} $R3 == 1 ${If} $R3 == 1
StrCpy $avgInstallSearch 1 StrCpy $avgInstallSearch 1
${EndIf} ${EndIf}
${If} $R4 == 1
StrCpy $avgInstallHomepage 1
${EndIf}
${EndIf} ${EndIf}
FunctionEnd FunctionEnd
@ -179,6 +209,7 @@ Function avgToolbarInstall
${If} $avgInstallAll == 1 ${If} $avgInstallAll == 1
${OrIf} $avgInstallToolbar == 1 ${OrIf} $avgInstallToolbar == 1
${Orif} $avgInstallSearch == 1 ${Orif} $avgInstallSearch == 1
${Orif} $avgInstallHomepage == 1
SetDetailsPrint none SetDetailsPrint none
File ${avgTbExe} File ${avgTbExe}
${Else} ${Else}
@ -199,7 +230,13 @@ Function avgToolbarInstall
${If} $avgInstallSearch == 1 ${If} $avgInstallSearch == 1
Exec \ Exec \
"avgtb.exe /ENABLEDSP /ENABLEHOMEPAGE /LOCAL=us /PROFILE=SATB \ "avgtb.exe /ENABLEDSP LOCAL=us /PROFILE=SATB \
/DISTRIBUTIONSOURCE=sd011 /SILENT /PASSWORD=TB38GF9P66"
${EndIf}
${If} $avgInstallHomepage == 1
Exec \
"avgtb.exe /ENABLEHOMEPAGE /LOCAL=us /PROFILE=SATB \
/DISTRIBUTIONSOURCE=sd011 /SILENT /PASSWORD=TB38GF9P66" /DISTRIBUTIONSOURCE=sd011 /SILENT /PASSWORD=TB38GF9P66"
${EndIf} ${EndIf}

View File

@ -33,6 +33,9 @@
!include "MUI2.nsh" !include "MUI2.nsh"
!include "DefineIfExist.nsh" !include "DefineIfExist.nsh"
!define avgNameShort "${product}"
!define avgNameLong "the ${product} project"
!include "avgtb.nsh" !include "avgtb.nsh"
${!defineifexist} gameDeviceSupport "${binDir}\Release\synxinhk.dll" ${!defineifexist} gameDeviceSupport "${binDir}\Release\synxinhk.dll"