Saturday, July 20, 2013

Windows only fix for Bug 882989 - Custom distribution settings for yahoo de and es distributions are not being set. r=bbondy, a=lsblakk

Windows only fix for Bug 882989 - Custom distribution settings for yahoo de and es distributions are not being set. r=bbondy, a=lsblakk
     1.1 --- a/browser/installer/windows/nsis/shared.nsh      1.2 +++ b/browser/installer/windows/nsis/shared.nsh      1.3 @@ -145,16 +145,19 @@ FunctionEnd      1.4    ${SetUninstallKeys}      1.5        1.6    ; Remove files that may be left behind by the application in the      1.7    ; VirtualStore directory.      1.8    ${CleanVirtualStore}      1.9       1.10    ${RemoveDeprecatedFiles}     1.11       1.12 +  ; Fix the distribution.ini file if applicable     1.13 +  ${FixDistributionsINI}     1.14 +     1.15    RmDir /r /REBOOTOK "$INSTDIR\${TO_BE_DELETED}"     1.16       1.17  !ifdef MOZ_MAINTENANCE_SERVICE     1.18    Call IsUserAdmin     1.19    Pop $R0     1.20    ${If} $R0 == "true"     1.21    ; Only proceed if we have HKLM write access     1.22    ${AndIf} $TmpVal == "HKLM"     1.23 @@ -173,30 +176,30 @@ FunctionEnd     1.24      ClearErrors     1.25      ${If} ${RunningX64}     1.26        SetRegView lastused     1.27      ${EndIf}     1.28       1.29      ; If the maintenance service is already installed, do nothing.     1.30      ; The maintenance service will launch:     1.31      ; maintenanceservice_installer.exe /Upgrade to upgrade the maintenance     1.32 -    ; service if necessary.   If the update was done from updater.exe without      1.33 -    ; the service (i.e. service is failing), updater.exe will do the update of      1.34 -    ; the service.  The reasons we do not do it here is because we don't want      1.35 -    ; to have to prompt for limited user accounts when the service isn't used      1.36 +    ; service if necessary.   If the update was done from updater.exe without     1.37 +    ; the service (i.e. service is failing), updater.exe will do the update of     1.38 +    ; the service.  The reasons we do not do it here is because we don't want     1.39 +    ; to have to prompt for limited user accounts when the service isn't used     1.40      ; and we currently call the PostUpdate twice, once for the user and once     1.41      ; for the SYSTEM account.  Also, this would stop the maintenance service     1.42      ; and we need a return result back to the service when run that way.     1.43      ${If} $5 == ""     1.44        ; An install of maintenance service was never attempted.     1.45        ; We know we are an Admin and that we have write access into HKLM     1.46        ; based on the above checks, so attempt to just run the EXE.     1.47 -      ; In the worst case, in case there is some edge case with the      1.48 +      ; In the worst case, in case there is some edge case with the     1.49        ; IsAdmin check and the permissions check, the maintenance service     1.50 -      ; will just fail to be attempted to be installed.      1.51 +      ; will just fail to be attempted to be installed.     1.52        nsExec::Exec "$\"$INSTDIR\maintenanceservice_installer.exe$\""     1.53      ${EndIf}     1.54    ${EndIf}     1.55  !endif     1.56       1.57  ; Register the DEH     1.58  !ifdef MOZ_METRO     1.59    ${If} ${AtLeastWin8}     1.60 @@ -694,17 +697,17 @@ FunctionEnd     1.61      DeleteRegKey HKLM "$R0"     1.62      WriteRegStr HKLM "$R0" "prefetchProcessName" "FIREFOX"     1.63      WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"     1.64      WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"     1.65      ${If} ${RunningX64}     1.66        SetRegView lastused     1.67      ${EndIf}     1.68      ClearErrors     1.69 -  ${EndIf}      1.70 +  ${EndIf}     1.71    ; Restore the previously used value back     1.72    Pop $R0     1.73  !macroend     1.74  !define AddMaintCertKeys "!insertmacro AddMaintCertKeys"     1.75  !endif     1.76       1.77  ; Removes various registry entries for reasons noted below (does not use SHCTX).     1.78  !macro RemoveDeprecatedKeys     1.79 @@ -919,16 +922,110 @@ FunctionEnd     1.80      RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0003-ABCDEFFEDCBA}"     1.81    ${EndIf}     1.82    ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0004-ABCDEFFEDCBA}"     1.83      RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0004-ABCDEFFEDCBA}"     1.84    ${EndIf}     1.85  !macroend     1.86  !define RemoveDeprecatedFiles "!insertmacro RemoveDeprecatedFiles"     1.87       1.88 +; Converts specific partner distribution.ini from ansi to utf-8 (bug 882989)     1.89 +!macro FixDistributionsINI     1.90 +  StrCpy $1 "$INSTDIR\distribution\distribution.ini"     1.91 +  StrCpy $2 "$INSTDIR\distribution\utf8fix"     1.92 +  StrCpy $0 "0" ; Default to not attempting to fix     1.93 +     1.94 +  ; Check if the distribution.ini settings are for a partner build that needs     1.95 +  ; to have its distribution.ini converted from ansi to utf-8.     1.96 +  ${If} ${FileExists} "$1"     1.97 +    ${Unless} ${FileExists} "$2"     1.98 +      ReadINIStr $3 "$1" "Preferences" "app.distributor"     1.99 +      ${If} "$3" == "yahoo"    1.100 +        ReadINIStr $3 "$1" "Preferences" "app.distributor.channel"    1.101 +        ${If} "$3" == "de"    1.102 +        ${OrIf} "$3" == "es"    1.103 +        ${OrIf} "$3" == "e1"    1.104 +        ${OrIf} "$3" == "mx"    1.105 +          StrCpy $0 "1"    1.106 +        ${EndIf}    1.107 +      ${EndIf}    1.108 +      ; Create the utf8fix so this only runs once    1.109 +      FileOpen $3 "$2" w    1.110 +      FileClose $3    1.111 +    ${EndUnless}    1.112 +  ${EndIf}    1.113 +    1.114 +  ${If} "$0" == "1"    1.115 +    StrCpy $0 "0"    1.116 +    ClearErrors    1.117 +    ReadINIStr $3 "$1" "Global" "version"    1.118 +    ${Unless} ${Errors}    1.119 +      StrCpy $4 "$3" 2    1.120 +      ${If} "$4" == "1."    1.121 +        StrCpy $4 "$3" "" 2 ; Everything after "1."    1.122 +        ${If} $4 < 23    1.123 +          StrCpy $0 "1"    1.124 +        ${EndIf}    1.125 +      ${EndIf}    1.126 +    ${EndUnless}    1.127 +  ${EndIf}    1.128 +    1.129 +  ${If} "$0" == "1"    1.130 +    ClearErrors    1.131 +    FileOpen $3 "$1" r    1.132 +    ${If} ${Errors}    1.133 +      FileClose $3    1.134 +    ${Else}    1.135 +      StrCpy $2 "$INSTDIR\distribution\distribution.new"    1.136 +      ClearErrors    1.137 +      FileOpen $4 "$2" w    1.138 +      ${If} ${Errors}    1.139 +        FileClose $3    1.140 +        FileClose $4    1.141 +      ${Else}    1.142 +        StrCpy $0 "0" ; Default to not replacing the original distribution.ini    1.143 +        ${Do}    1.144 +          FileReadByte $3 $5    1.145 +          ${If} $5 == ""    1.146 +            ${Break}    1.147 +          ${EndIf}    1.148 +          ${If} $5 == 233 ; ansi ?    1.149 +            StrCpy $0 "1"    1.150 +            FileWriteByte $4 195    1.151 +            FileWriteByte $4 169    1.152 +          ${ElseIf} $5 == 241 ; ansi ?    1.153 +            StrCpy $0 "1"    1.154 +            FileWriteByte $4 195    1.155 +            FileWriteByte $4 177    1.156 +          ${ElseIf} $5 == 252 ; ansi ?    1.157 +            StrCpy $0 "1"    1.158 +            FileWriteByte $4 195    1.159 +            FileWriteByte $4 188    1.160 +          ${ElseIf} $5 < 128    1.161 +            FileWriteByte $4 $5    1.162 +          ${EndIf}    1.163 +        ${Loop}    1.164 +        FileClose $3    1.165 +        FileClose $4    1.166 +        ${If} "$0" == "1"    1.167 +          ClearErrors    1.168 +          Rename "$1" "$1.bak"    1.169 +          ${Unless} ${Errors}    1.170 +            Rename "$2" "$1"    1.171 +            Delete "$1.bak"    1.172 +          ${EndUnless}    1.173 +        ${Else}    1.174 +          Delete "$2"    1.175 +        ${EndIf}    1.176 +      ${EndIf}    1.177 +    ${EndIf}    1.178 +  ${EndIf}    1.179 +!macroend    1.180 +!define FixDistributionsINI "!insertmacro FixDistributionsINI"    1.181 +    1.182  ; Adds a pinned shortcut to Task Bar on update for Windows 7 and above if this    1.183  ; macro has never been called before and the application is default (see    1.184  ; PinToTaskBar for more details).    1.185  ; Since defaults handling is handled by Windows in Win8 and later, we always    1.186  ; attempt to pin a taskbar on that OS.  If Windows sets the defaults at    1.187  ; installation time, then we don't get the opportunity to run this code at    1.188  ; that time.    1.189  !macro MigrateTaskBarShortcut 
     2.1 --- a/browser/installer/windows/nsis/uninstaller.nsi      2.2 +++ b/browser/installer/windows/nsis/uninstaller.nsi      2.3 @@ -56,17 +56,16 @@ Var MaintCertKey      2.4  !include locales.nsi      2.5        2.6  ; This is named BrandShortName helper because we use this for software update      2.7  ; post update cleanup.      2.8  VIAddVersionKey "FileDescription" "${BrandShortName} Helper"      2.9  VIAddVersionKey "OriginalFilename" "helper.exe"     2.10       2.11  !insertmacro AddDisabledDDEHandlerValues     2.12 -!insertmacro CleanUpdateDirectories     2.13  !insertmacro CleanVirtualStore     2.14  !insertmacro ElevateUAC     2.15  !insertmacro GetLongPath     2.16  !insertmacro GetPathFromString     2.17  !insertmacro InitHashAppModelId     2.18  !insertmacro IsHandlerForInstallDir     2.19  !insertmacro IsPinnedToTaskBar     2.20  !insertmacro IsUserAdmin 

Source: http://hg.mozilla.org/releases/mozilla-aurora/rev/090d7003ce50

desean jackson 2012 ncaa tournament schedule laurent robinson dantoni black and tan dwight howard trade ncaa bracket 2012

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.