Bug 540537 - In China, set default browser does not work. r=jmathies, a=blocking2.0
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 23 Jul 2010 18:02:46 -0700
changeset 48156 5b12b792b8a79055be703a09301c7b753b4b34c9
parent 48155 7ca4b43c32104b275037f713e212808508ee7ad1
child 48157 eb480da7ffd55e7b78c93fcf0ce3014de13c788e
push id14598
push userrstrong@mozilla.com
push dateSat, 24 Jul 2010 01:03:20 +0000
treeherdermozilla-central@eb480da7ffd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies, blocking2.0
bugs540537
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 540537 - In China, set default browser does not work. r=jmathies, a=blocking2.0
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -1239,22 +1239,22 @@
       StrCmp "$R8" "true" +1 +8
       WriteRegStr SHCTX "$R4" "URL Protocol" ""
       StrCpy $R3 ""
       ClearErrors
       ReadRegDWord $R3 SHCTX "$R4" "EditFlags"
       StrCmp $R3 "" +1 +3  ; Only add EditFlags if a value doesn't exist
       DeleteRegValue SHCTX "$R4" "EditFlags"
       WriteRegDWord SHCTX "$R4" "EditFlags" 0x00000002
-      
+
       StrCmp "$R6" "" +2 +1
       WriteRegStr SHCTX "$R4\DefaultIcon" "" "$R6"
-      
+
       StrCmp "$R5" "" +2 +1
-      WriteRegStr SHCTX "$R4\shell\open\command" "" "$R5"      
+      WriteRegStr SHCTX "$R4\shell\open\command" "" "$R5"
 
 !ifdef DDEApplication
       StrCmp "$R9" "true" +1 +11
       WriteRegStr SHCTX "$R4\shell\open\ddeexec" "" "$\"%1$\",,0,0,,,,"
       WriteRegStr SHCTX "$R4\shell\open\ddeexec" "NoActivateHandler" ""
       WriteRegStr SHCTX "$R4\shell\open\ddeexec\Application" "" "${DDEApplication}"
       WriteRegStr SHCTX "$R4\shell\open\ddeexec\Topic" "" "WWW_OpenURL"
       ; The ifexec key may have been added by another application so try to
@@ -1391,20 +1391,21 @@
       StrCmp "$R6" "true" +1 +8
       WriteRegStr SHCTX "$R0\$R2" "URL Protocol" ""
       StrCpy $R1 ""
       ClearErrors
       ReadRegDWord $R1 SHCTX "$R0\$R2" "EditFlags"
       StrCmp $R1 "" +1 +3  ; Only add EditFlags if a value doesn't exist
       DeleteRegValue SHCTX "$R0\$R2" "EditFlags"
       WriteRegDWord SHCTX "$R0\$R2" "EditFlags" 0x00000002
-      
+
       StrCmp "$R4" "" +2 +1
       WriteRegStr SHCTX "$R0\$R2\DefaultIcon" "" "$R4"
 
+      WriteRegStr SHCTX "$R0\$R2\shell" "" "open"
       WriteRegStr SHCTX "$R0\$R2\shell\open\command" "" "$R3"
 
       WriteRegStr SHCTX "$R0\$R2\shell\open\ddeexec" "" "$R8"
       WriteRegStr SHCTX "$R0\$R2\shell\open\ddeexec" "NoActivateHandler" ""
       WriteRegStr SHCTX "$R0\$R2\shell\open\ddeexec\Application" "" "$R7"
       WriteRegStr SHCTX "$R0\$R2\shell\open\ddeexec\Topic" "" "$R9"
 
       ; The ifexec key may have been added by another application so try to
@@ -2214,17 +2215,17 @@
       StrCmp $R7 "" +2 +1    ; Are there no more chars?
       StrCmp $R7 "\" +1 -3   ; Is it a \?
 
       ; Copy chars starting from the previously found \ to the counter.
       StrCpy $R5 $R8 $R6 $R4
 
       ; If this is the first \ found we want to swap R9 with R5 so a \ will
       ; be appended to the drive letter and colon (e.g. C: will become C:\).
-      StrCmp $R4 0 +1 +3     
+      StrCmp $R4 0 +1 +3
       StrCpy $R9 $R5
       StrCpy $R5 ""
 
       GetFullPathName $R9 "$R9\$R5"
 
       StrCmp $R7 "" end_GetLongPath +1 ; Are there no more chars?
 
       ; Store the counter for the current \ and prefix it for StrCpy operations.
@@ -5368,17 +5369,17 @@
       Exch $R9
       Push $R8
       Push $R7
       Push $R6
       Push $R5
       Push $R4
       Push $R3
       Push $R2
-      
+
       ${WriteLogSeparator}
       ${GetTime} "" "L" $R2 $R3 $R4 $R5 $R6 $R7 $R8
       FileWriteUTF16LE $fhInstallLog "$R9 Installation Finished: $R4-$R3-$R2 $R6:$R7:$R8$\r$\n"
       FileClose $fhInstallLog
 
       Pop $R2
       Pop $R3
       Pop $R4