mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-02 11:43:35 +00:00
gh-15144: Fixed installing updates does not updating registries (gh-15181)
This commit is contained in:
124
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
124
src/browser/installer/windows/nsis/shared-nsh.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
|
||||
index b81c7ef59be0d25f67668215028008a451860df2..fa0ab8947e011289d25158cab17ff9388b5cab0d 100755
|
||||
--- a/browser/installer/windows/nsis/shared.nsh
|
||||
+++ b/browser/installer/windows/nsis/shared.nsh
|
||||
@@ -873,50 +873,87 @@ FunctionEnd
|
||||
!ifdef MOZ_MAINTENANCE_SERVICE
|
||||
; Adds maintenance service certificate keys for the install dir.
|
||||
; For the cert to work, it must also be signed by a trusted cert for the user.
|
||||
+; Writes this application's allowed certificate values into _KEY, which must be
|
||||
+; a maintenance service registry path such as the one returned by
|
||||
+; ServicesHelper::PathToUniqueRegistryPath.
|
||||
+!macro AddMaintCertKeyValues _KEY
|
||||
+ ; PrefetchProcessName was originally used to experiment with deleting
|
||||
+ ; Windows prefetch as a speed optimization. It is no longer used though.
|
||||
+ DeleteRegValue HKLM "${_KEY}" "prefetchProcessName"
|
||||
+
|
||||
+ ; Setting the Attempted value will ensure that a new Maintenance Service
|
||||
+ ; install will never be attempted again after this from updates. The value
|
||||
+ ; is used only to see if updates should attempt new service installs.
|
||||
+ WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
+
|
||||
+ ; More than one certificate can be specified in a different subfolder
|
||||
+ ; for example: ${_KEY}\1, but each individual binary can be signed
|
||||
+ ; with at most one certificate. A fallback certificate can only be used
|
||||
+ ; if the binary is replaced with a different certificate.
|
||||
+ WriteRegStr HKLM "${_KEY}\0" "name" "${CERTIFICATE_NAME}"
|
||||
+ WriteRegStr HKLM "${_KEY}\0" "issuer" "${CERTIFICATE_ISSUER}"
|
||||
+ ; These values associate the allowed certificates for the previous
|
||||
+ ; installation, so that we can update from it cleanly using the
|
||||
+ ; old updater.exe (which will still have this signature).
|
||||
+ WriteRegStr HKLM "${_KEY}\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
+ WriteRegStr HKLM "${_KEY}\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
|
||||
+ ClearErrors
|
||||
+!macroend
|
||||
+
|
||||
!macro AddMaintCertKeys
|
||||
Push $R0
|
||||
; Allow main Mozilla cert information for updates
|
||||
; This call will push the needed key on the stack
|
||||
ServicesHelper::PathToUniqueRegistryPath "$INSTDIR"
|
||||
Pop $R0
|
||||
+ Push $R1
|
||||
+ Push $R2
|
||||
+ Push $R3
|
||||
+ ; We always use the 64bit registry for certs.
|
||||
+ ${If} ${RunningX64}
|
||||
+ ${OrIf} ${IsNativeARM64}
|
||||
+ SetRegView 64
|
||||
+ ${EndIf}
|
||||
+
|
||||
${If} $R0 != ""
|
||||
- ; More than one certificate can be specified in a different subfolder
|
||||
- ; for example: $R0\1, but each individual binary can be signed
|
||||
- ; with at most one certificate. A fallback certificate can only be used
|
||||
- ; if the binary is replaced with a different certificate.
|
||||
- ; We always use the 64bit registry for certs.
|
||||
- ${If} ${RunningX64}
|
||||
- ${OrIf} ${IsNativeARM64}
|
||||
- SetRegView 64
|
||||
- ${EndIf}
|
||||
+ !insertmacro AddMaintCertKeyValues "$R0"
|
||||
+ ${Else}
|
||||
+ ; ServicesHelper could not be loaded. This happens when PostUpdate is run
|
||||
+ ; by the updater, which launches it with an environment too minimal for
|
||||
+ ; NSIS to load its plugins, leaving the unique registry path uncomputable.
|
||||
+ ; Fall back to refreshing every key that already records one of our own
|
||||
+ ; certificate names, so that any installation of this application is kept
|
||||
+ ; current rather than only the first one found. Keys belonging to other
|
||||
+ ; applications record a different name and are left alone.
|
||||
+ StrCpy $R1 0
|
||||
+ ${Do}
|
||||
+ EnumRegKey $R2 HKLM "Software\Mozilla\MaintenanceService" $R1
|
||||
+ ${If} $R2 == ""
|
||||
+ ${ExitDo}
|
||||
+ ${EndIf}
|
||||
+ ReadRegStr $R3 HKLM "Software\Mozilla\MaintenanceService\$R2\0" "name"
|
||||
+ ${If} $R3 == "${CERTIFICATE_NAME}"
|
||||
+ ${OrIf} $R3 == "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
+ StrCpy $R0 "Software\Mozilla\MaintenanceService\$R2"
|
||||
+ !insertmacro AddMaintCertKeyValues "$R0"
|
||||
+ ${EndIf}
|
||||
+ IntOp $R1 $R1 + 1
|
||||
+ ${Loop}
|
||||
+ StrCpy $R0 ""
|
||||
+ ${EndIf}
|
||||
|
||||
- ; PrefetchProcessName was originally used to experiment with deleting
|
||||
- ; Windows prefetch as a speed optimization. It is no longer used though.
|
||||
- DeleteRegValue HKLM "$R0" "prefetchProcessName"
|
||||
-
|
||||
- ; Setting the Attempted value will ensure that a new Maintenance Service
|
||||
- ; install will never be attempted again after this from updates. The value
|
||||
- ; is used only to see if updates should attempt new service installs.
|
||||
- WriteRegDWORD HKLM "Software\Mozilla\MaintenanceService" "Attempted" 1
|
||||
-
|
||||
- ; These values associate the allowed certificates for the current
|
||||
- ; installation.
|
||||
- WriteRegStr HKLM "$R0\0" "name" "${CERTIFICATE_NAME}"
|
||||
- WriteRegStr HKLM "$R0\0" "issuer" "${CERTIFICATE_ISSUER}"
|
||||
- ; These values associate the allowed certificates for the previous
|
||||
- ; installation, so that we can update from it cleanly using the
|
||||
- ; old updater.exe (which will still have this signature).
|
||||
- WriteRegStr HKLM "$R0\1" "name" "${CERTIFICATE_NAME_PREVIOUS}"
|
||||
- WriteRegStr HKLM "$R0\1" "issuer" "${CERTIFICATE_ISSUER_PREVIOUS}"
|
||||
- ${If} ${RunningX64}
|
||||
- ${OrIf} ${IsNativeARM64}
|
||||
- SetRegView lastused
|
||||
- ${EndIf}
|
||||
- ClearErrors
|
||||
+ ${If} ${RunningX64}
|
||||
+ ${OrIf} ${IsNativeARM64}
|
||||
+ SetRegView lastused
|
||||
${EndIf}
|
||||
+
|
||||
+ Pop $R3
|
||||
+ Pop $R2
|
||||
+ Pop $R1
|
||||
; Restore the previously used value back
|
||||
Pop $R0
|
||||
!macroend
|
||||
+
|
||||
!define AddMaintCertKeys "!insertmacro AddMaintCertKeys"
|
||||
!endif
|
||||
|
||||
@@ -40,7 +40,7 @@ html|dialog {
|
||||
}
|
||||
|
||||
groupbox button {
|
||||
border-radius: 5px !important;
|
||||
border-radius: calc(5px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
|
||||
groupbox button,
|
||||
|
||||
@@ -27,7 +27,7 @@ dialog::part(dialog-button) {
|
||||
|
||||
position: relative;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
border-radius: calc(10px * var(--zen-squircle-value));
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
|
||||
@@ -60,6 +60,9 @@
|
||||
.urlbar-background {
|
||||
background: var(--zen-toolbar-element-bg) !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
:root:not([zen-single-toolbar="true"]) & {
|
||||
border-radius: calc(var(--border-radius-medium) * var(--zen-squircle-value));
|
||||
}
|
||||
outline: none !important;
|
||||
|
||||
#urlbar:not([breakout-extend]) & {
|
||||
@@ -137,12 +140,12 @@
|
||||
& #identity-box {
|
||||
margin-inline-end: 0 !important;
|
||||
|
||||
&[pageproxystate="invalid"] {
|
||||
:root[zen-has-empty-tab="true"] &[pageproxystate="invalid"]:not(.chromeUI) {
|
||||
margin-inline-end: -4px !important;
|
||||
}
|
||||
|
||||
&.chromeUI:not([pageproxystate="invalid"]) #identity-icon-box {
|
||||
border-radius: 10px !important;
|
||||
border-radius: calc(10px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,13 +174,9 @@
|
||||
}
|
||||
|
||||
:root:not([zen-single-toolbar="true"]):not([zen-has-empty-tab="true"]) #urlbar:not([breakout-extend]) .urlbar-input-container {
|
||||
padding: 2px 3px;
|
||||
padding: 2px 5px;
|
||||
gap: 2px;
|
||||
|
||||
& .urlbar-page-action {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
& #zen-copy-url-button {
|
||||
order: -1;
|
||||
}
|
||||
@@ -296,7 +295,7 @@
|
||||
|
||||
&,
|
||||
.urlbar-background {
|
||||
border-radius: 12px !important;
|
||||
border-radius: calc(12px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
|
||||
&[breakout-extend][animate-searchmode="true"]::before {
|
||||
@@ -411,7 +410,7 @@
|
||||
}
|
||||
|
||||
#notification-popup-box {
|
||||
border-radius: 10px !important;
|
||||
border-radius: calc(10px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
|
||||
/* Border radius on hover */
|
||||
@@ -706,7 +705,7 @@
|
||||
|
||||
:root:not([zen-single-toolbar="true"]) #urlbar[breakout-extend]:not([zen-floating-urlbar="true"]) {
|
||||
& .urlbar-background {
|
||||
border-radius: 10px !important;
|
||||
border-radius: calc(10px * var(--zen-squircle-value)) !important;
|
||||
}
|
||||
|
||||
#urlbar-results {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
.dialogBox {
|
||||
border-radius: 12px !important;
|
||||
border-radius: calc(12px * var(--zen-squircle-value)) !important;
|
||||
border: 0.5px solid light-dark(rgba(0, 0, 0, 0.4), var(--zen-dialog-background)) !important;
|
||||
outline: 1px solid light-dark(transparent, rgba(168, 168, 169, 0.50)) !important;
|
||||
box-shadow: 0 10px 8px rgba(0, 0 , 0, 0.15) !important;
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
--panel-width: 234px;
|
||||
--menu-panel-width-wide: calc(var(--panel-width) - var(--panel-padding) * 2);
|
||||
--uei-icon-size: 16px;
|
||||
--arrowpanel-menuitem-border-radius: 10px;
|
||||
--arrowpanel-menuitem-border-radius: calc(10px * var(--zen-squircle-value));
|
||||
}
|
||||
|
||||
#unified-extensions-empty-state,
|
||||
@@ -500,6 +500,7 @@
|
||||
transition:
|
||||
transform 0.12s ease-in-out,
|
||||
opacity 0.12s ease-in-out;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
/* stylelint-disable-next-line stylelint-plugin-mozilla/no-has-selector */
|
||||
@@ -603,6 +604,7 @@
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
will-change: transform;
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
background: linear-gradient(to bottom, light-dark(rgb(255, 255, 255), rgb(34, 34, 34)), light-dark(rgb(246, 246, 246), rgb(21, 21, 21)));
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
:root[zen-no-padding='true'] & {
|
||||
--zen-compact-float: 10px;
|
||||
--zen-compact-top-toolbar-hidden-fix: var(--zen-compact-float);
|
||||
--zen-compact-mode-no-padding-radius-fix: 2px;
|
||||
--zen-compact-mode-no-padding-radius-fix: 6px;
|
||||
}
|
||||
|
||||
/* Initial padding for when we are animating */
|
||||
|
||||
@@ -721,7 +721,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature {
|
||||
};
|
||||
|
||||
const dot = document.createElement("div");
|
||||
dot.classList.add("zen-theme-picker-dot");
|
||||
dot.classList.add("zen-theme-picker-dot", "no-squircles");
|
||||
|
||||
dot.style.left = `${dotData.x}px`;
|
||||
dot.style.top = `${dotData.y}px`;
|
||||
|
||||
@@ -52,7 +52,7 @@ zen-workspace-creation {
|
||||
|
||||
& .zen-workspace-creation-name-wrapper {
|
||||
padding: 9px 6px;
|
||||
border-radius: 8px !important;
|
||||
border-radius: calc(8px * var(--zen-squircle-value)) !important;
|
||||
margin: 0;
|
||||
background-color: var(--input-text-background-color);
|
||||
gap: 8px;
|
||||
@@ -119,7 +119,7 @@ zen-workspace-creation {
|
||||
|
||||
& .zen-workspace-creation-profile-wrapper {
|
||||
padding: 4px;
|
||||
border-radius: 8px !important;
|
||||
border-radius: calc(8px * var(--zen-squircle-value)) !important;
|
||||
margin: 0;
|
||||
background-color: var(--input-text-background-color);
|
||||
gap: 4px;
|
||||
@@ -148,7 +148,7 @@ zen-workspace-creation {
|
||||
}
|
||||
|
||||
& .zen-workspace-creation-edit-theme-button {
|
||||
border-radius: 8px !important;
|
||||
border-radius: calc(8px * var(--zen-squircle-value)) !important;
|
||||
margin: 0;
|
||||
background-color: var(--input-text-background-color);
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user