bugfixes
This commit is contained in:
parent
c5364490f2
commit
8540016455
5 changed files with 437 additions and 2 deletions
136
assets/aboutDialog/aboutDialog.css
Normal file
136
assets/aboutDialog/aboutDialog.css
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@namespace html "http://www.w3.org/1999/xhtml";
|
||||
|
||||
#aboutDialog {
|
||||
width: 620px;
|
||||
/* Set an explicit line-height to avoid discrepancies in 'auto' spacing
|
||||
across screens with different device DPI, which may cause font metrics
|
||||
to round differently. */
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
#rightBox {
|
||||
background-image: url("chrome://branding/content/about-wordmark.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 288px auto;
|
||||
/* padding-top creates room for the wordmark */
|
||||
padding-top: 38px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#rightBox:-moz-locale-dir(rtl) {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
|
||||
#bottomBox {
|
||||
padding: 15px 10px 0;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
#release {
|
||||
font-weight: bold;
|
||||
font-size: 125%;
|
||||
margin-top: 10px;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
#version {
|
||||
font-weight: bold;
|
||||
margin-inline-start: 0;
|
||||
user-select: text;
|
||||
-moz-user-focus: normal;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
#version.update {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#distribution,
|
||||
#distributionId {
|
||||
display: none;
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
.text-blurb {
|
||||
margin-bottom: 10px;
|
||||
margin-inline-start: 0;
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
|
||||
#updateDeck > *:not(.selected) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#updateButton,
|
||||
#updateDeck > hbox > label {
|
||||
margin-inline-start: 0;
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
|
||||
.update-throbber {
|
||||
width: 16px;
|
||||
min-height: 16px;
|
||||
margin-inline-end: 3px;
|
||||
}
|
||||
|
||||
html|img.update-throbber {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
image.update-throbber {
|
||||
list-style-image: url("chrome://global/skin/icons/loading.png");
|
||||
}
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
.update-throbber {
|
||||
list-style-image: url("chrome://global/skin/icons/loading@2x.png");
|
||||
}
|
||||
}
|
||||
|
||||
description > .text-link {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#submit-feedback {
|
||||
margin-inline-start: .9em;
|
||||
}
|
||||
|
||||
.bottom-link {
|
||||
text-align: center;
|
||||
margin: 0 40px;
|
||||
}
|
||||
|
||||
#currentChannel {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#updateBox {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
#icons > .icon {
|
||||
-moz-context-properties: fill;
|
||||
margin: 5px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
#icons:not(.checkingForUpdates, .downloading, .applying, .restarting) > .update-throbber,
|
||||
#icons:not(.noUpdatesFound) > .noUpdatesFound,
|
||||
#icons:not(.apply) > .apply {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#icons > .noUpdatesFound {
|
||||
fill: #30e60b;
|
||||
}
|
||||
|
||||
#icons > .apply {
|
||||
fill: white;
|
||||
}
|
||||
121
assets/aboutDialog/aboutDialog.js
Normal file
121
assets/aboutDialog/aboutDialog.js
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
/* import-globals-from aboutDialog-appUpdater.js */
|
||||
|
||||
// Services = object with smart getters for common XPCOM services
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://browser/content/aboutDialog-appUpdater.js",
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
async function init(aEvent) {
|
||||
if (aEvent.target != document) {
|
||||
return;
|
||||
}
|
||||
|
||||
let defaults = Services.prefs.getDefaultBranch(null);
|
||||
let distroId = defaults.getCharPref("distribution.id", "");
|
||||
if (distroId) {
|
||||
let distroAbout = defaults.getStringPref("distribution.about", "");
|
||||
// If there is about text, we always show it.
|
||||
if (distroAbout) {
|
||||
let distroField = document.getElementById("distribution");
|
||||
distroField.value = distroAbout;
|
||||
distroField.style.display = "block";
|
||||
}
|
||||
// If it's not a mozilla distribution, show the rest,
|
||||
// unless about text exists, then we always show.
|
||||
if (!distroId.startsWith("mozilla-") || distroAbout) {
|
||||
let distroVersion = defaults.getCharPref("distribution.version", "");
|
||||
if (distroVersion) {
|
||||
distroId += " - " + distroVersion;
|
||||
}
|
||||
|
||||
let distroIdField = document.getElementById("distributionId");
|
||||
distroIdField.value = distroId;
|
||||
distroIdField.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build
|
||||
let versionId = "aboutDialog-version";
|
||||
let versionAttributes = {
|
||||
version: AppConstants.MOZ_APP_VERSION_DISPLAY,
|
||||
bits: Services.appinfo.is64Bit ? 64 : 32,
|
||||
};
|
||||
|
||||
let version = Services.appinfo.version;
|
||||
if (/a\d+$/.test(version)) {
|
||||
versionId = "aboutDialog-version-nightly";
|
||||
let buildID = Services.appinfo.appBuildID;
|
||||
let year = buildID.slice(0, 4);
|
||||
let month = buildID.slice(4, 6);
|
||||
let day = buildID.slice(6, 8);
|
||||
versionAttributes.isodate = `${year}-${month}-${day}`;
|
||||
|
||||
document.getElementById("experimental").hidden = false;
|
||||
document.getElementById("communityDesc").hidden = true;
|
||||
}
|
||||
|
||||
// Use Fluent arguments for append version and the architecture of the build
|
||||
let versionField = document.getElementById("version");
|
||||
|
||||
document.l10n.setAttributes(versionField, versionId, versionAttributes);
|
||||
|
||||
await document.l10n.translateElements([versionField]);
|
||||
|
||||
// Show a release notes link if we have a URL.
|
||||
let relNotesLink = document.getElementById("releasenotes");
|
||||
let relNotesPrefType = Services.prefs.getPrefType(
|
||||
"app.releaseNotesURL.aboutDialog"
|
||||
);
|
||||
if (relNotesPrefType != Services.prefs.PREF_INVALID) {
|
||||
let relNotesURL = Services.urlFormatter.formatURLPref(
|
||||
"app.releaseNotesURL.aboutDialog"
|
||||
);
|
||||
if (relNotesURL != "about:blank") {
|
||||
relNotesLink.href = relNotesURL;
|
||||
relNotesLink.hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
gAppUpdater = new appUpdater({ buttonAutoFocus: true });
|
||||
|
||||
let channelLabel = document.getElementById("currentChannel");
|
||||
let currentChannelText = document.getElementById("currentChannelText");
|
||||
channelLabel.value = UpdateUtils.UpdateChannel;
|
||||
let hasWinPackageId = false;
|
||||
try {
|
||||
hasWinPackageId = Services.sysinfo.getProperty("hasWinPackageId");
|
||||
} catch (_ex) {
|
||||
// The hasWinPackageId property doesn't exist; assume it should be false.
|
||||
}
|
||||
if (/^release($|\-)/.test(channelLabel.value) || hasWinPackageId) {
|
||||
currentChannelText.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (AppConstants.IS_ESR) {
|
||||
document.getElementById("release").hidden = false;
|
||||
}
|
||||
|
||||
window.sizeToContent();
|
||||
|
||||
if (AppConstants.platform == "macosx") {
|
||||
window.moveTo(
|
||||
screen.availWidth / 2 - window.outerWidth / 2,
|
||||
screen.availHeight / 5
|
||||
);
|
||||
}
|
||||
}
|
||||
168
assets/aboutDialog/aboutDialog.xhtml
Normal file
168
assets/aboutDialog/aboutDialog.xhtml
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="aboutDialog"
|
||||
windowtype="Browser:About"
|
||||
onload="init(event);"
|
||||
#ifdef MOZ_UPDATER
|
||||
onunload="onUnload(event);"
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
inwindowmenu="false"
|
||||
#else
|
||||
data-l10n-id="aboutDialog-title"
|
||||
#endif
|
||||
role="dialog"
|
||||
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
|
||||
>
|
||||
#ifdef XP_MACOSX
|
||||
#include macWindow.inc.xhtml
|
||||
#else
|
||||
<script src="chrome://browser/content/utilityOverlay.js"/>
|
||||
#endif
|
||||
|
||||
<linkset>
|
||||
<html:link rel="localization" href="branding/brand.ftl"/>
|
||||
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<script src="chrome://browser/content/aboutDialog.js"/>
|
||||
|
||||
<vbox id="aboutDialogContainer">
|
||||
<hbox id="clientBox">
|
||||
<vbox id="leftBox" flex="1"/>
|
||||
<vbox id="rightBox" flex="1">
|
||||
<label id="release" hidden="true">
|
||||
<!-- This string is explicitly not translated -->
|
||||
Extended Support Release
|
||||
</label>
|
||||
#ifndef MOZ_UPDATER
|
||||
<!-- This HBOX is duplicated below with class="update" -->
|
||||
<hbox align="baseline">
|
||||
<label id="version"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
||||
</hbox>
|
||||
#endif
|
||||
|
||||
<label id="distribution" class="text-blurb"/>
|
||||
<label id="distributionId" class="text-blurb"/>
|
||||
|
||||
<vbox id="detailsBox">
|
||||
<hbox id="updateBox">
|
||||
#ifdef MOZ_UPDATER
|
||||
<html:div id="icons">
|
||||
<html:img class="icon update-throbber" src="chrome://global/skin/icons/loading.png" role="presentation"/>
|
||||
<html:img class="icon noUpdatesFound" src="chrome://global/skin/icons/check.svg" role="presentation"/>
|
||||
<html:img class="icon apply" src="chrome://global/skin/icons/reload.svg" role="presentation"/>
|
||||
</html:div>
|
||||
<vbox>
|
||||
<stack id="updateDeck" orient="vertical">
|
||||
<hbox id="checkForUpdates" align="center">
|
||||
<button id="checkForUpdatesButton" align="start"
|
||||
data-l10n-id="update-checkForUpdatesButton"
|
||||
oncommand="gAppUpdater.checkForUpdates();"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<hbox id="downloadAndInstall" align="center">
|
||||
<button id="downloadAndInstallButton" align="start"
|
||||
oncommand="gAppUpdater.startDownload();"/>
|
||||
<!-- label and accesskey will be filled by JS -->
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<hbox id="apply" align="center">
|
||||
<button id="updateButton" align="start"
|
||||
data-l10n-id="update-updateButton"
|
||||
oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<hbox id="checkingForUpdates" align="center">
|
||||
<label data-l10n-id="update-checkingForUpdates"/>
|
||||
</hbox>
|
||||
<hbox id="downloading" data-l10n-id="update-downloading-message" align="center">
|
||||
<label id="downloadStatus" data-l10n-name="download-status"/>
|
||||
</hbox>
|
||||
<hbox id="applying" align="center">
|
||||
<label data-l10n-id="update-applying"/>
|
||||
</hbox>
|
||||
<hbox id="downloadFailed" align="center" data-l10n-id="update-failed">
|
||||
<label id="failedLink" is="text-link" data-l10n-name="failed-link"/>
|
||||
</hbox>
|
||||
<hbox id="policyDisabled" align="center">
|
||||
<label data-l10n-id="update-adminDisabled"/>
|
||||
</hbox>
|
||||
<hbox id="noUpdatesFound" align="center">
|
||||
<label data-l10n-id="update-noUpdatesFound"/>
|
||||
</hbox>
|
||||
<hbox id="otherInstanceHandlingUpdates" align="center">
|
||||
<label data-l10n-id="update-otherInstanceHandlingUpdates"/>
|
||||
</hbox>
|
||||
<hbox id="manualUpdate" align="center" data-l10n-id="update-manual">
|
||||
<label id="manualLink" is="text-link" data-l10n-name="manual-link"/>
|
||||
</hbox>
|
||||
<hbox id="unsupportedSystem" align="center" data-l10n-id="update-unsupported">
|
||||
<label id="unsupportedLink" is="text-link" data-l10n-name="unsupported-link"/>
|
||||
</hbox>
|
||||
<hbox id="restarting" align="center">
|
||||
<label data-l10n-id="update-restarting"/>
|
||||
</hbox>
|
||||
</stack>
|
||||
<!-- This HBOX is duplicated above without class="update" -->
|
||||
<hbox align="baseline">
|
||||
<label id="version" class="update"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
||||
</hbox>
|
||||
<description class="text-blurb">
|
||||
<label is="text-link" onclick="openHelpLink('firefox-help')" data-l10n-id="aboutdialog-help-user"/>
|
||||
<label id="submit-feedback" is="text-link" onclick="openFeedbackPage()" data-l10n-id="aboutdialog-submit-feedback"/>
|
||||
</description>
|
||||
</vbox>
|
||||
#endif
|
||||
</hbox>
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
<description class="text-blurb" id="currentChannelText" data-l10n-id="channel-description">
|
||||
<label id="currentChannel" data-l10n-name="current-channel"/>
|
||||
</description>
|
||||
#endif
|
||||
<vbox id="experimental" hidden="true">
|
||||
<description class="text-blurb" id="warningDesc" data-l10n-id="warningDesc-version"></description>
|
||||
<description class="text-blurb" id="communityExperimentalDesc" data-l10n-id="community-exp">
|
||||
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="community-exp-mozillaLink"/>
|
||||
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-exp-creditsLink"/>
|
||||
</description>
|
||||
</vbox>
|
||||
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
|
||||
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
|
||||
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
|
||||
</description>
|
||||
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
|
||||
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&utm_medium=referral&utm_campaign=firefox_about&utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
|
||||
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
|
||||
</description>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="bottomBox">
|
||||
<hbox pack="center">
|
||||
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
|
||||
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:rights" data-l10n-id="bottomLinks-rights"/>
|
||||
<label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
|
||||
</hbox>
|
||||
<description id="trademark" data-l10n-id="trademarkInfo"></description>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
<keyset>
|
||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
</window>
|
||||
|
|
@ -11,7 +11,7 @@ ac_add_options --enable-release
|
|||
ac_add_options --enable-rust-simd
|
||||
|
||||
ac_add_options --with-app-name=firefox
|
||||
ac_add_options --with-branding=browser/branding/librewolf
|
||||
#ac_add_options --with-branding=browser/branding/librewolf
|
||||
|
||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||
|
||||
|
|
|
|||
12
mk.py
12
mk.py
|
|
@ -28,7 +28,7 @@ def full_mar():
|
|||
objdir = 'obj-x86_64-pc-mingw32'
|
||||
mar_output_path = 'MAR'
|
||||
# version already set
|
||||
channel = 'default'
|
||||
channel = 'DeFauLT'
|
||||
|
||||
exec('mkdir -p MAR') # output folder
|
||||
exec('touch {}/dist/firefox/precomplete'.format(objdir))
|
||||
|
|
@ -65,6 +65,10 @@ def full_mar():
|
|||
os.chdir('..')
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def fetch():
|
||||
exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version')
|
||||
exec('wget -q -O source_release https://gitlab.com/librewolf-community/browser/source/-/raw/main/release')
|
||||
|
|
@ -75,6 +79,10 @@ def fetch():
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def build(debug=False):
|
||||
|
||||
exec('rm -rf librewolf-$(cat version)-$(cat source_release)')
|
||||
|
|
@ -95,6 +103,8 @@ def build(debug=False):
|
|||
# two patches for windows only, currently
|
||||
patch('../assets/disable-verify-mar.patch')
|
||||
patch('../assets/package-manifest.patch')
|
||||
# hack out our custom about box
|
||||
exec('cd browser/base/content && unzip -o ../../../../assets/aboutDialog.zip')
|
||||
|
||||
# perform the build and package
|
||||
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue