From c8137fe7995224f199c455f4c924372fdf45cf5d Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Tue, 16 Mar 2021 19:29:58 +0100 Subject: [PATCH] changes --- branding_files/configure.sh | 2 +- branding_files/confvars.sh | 46 +++++++++++++++++++++++++++++++++++++ build.sh | 39 +++++++++++++++++++++++++++---- 3 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 branding_files/confvars.sh diff --git a/branding_files/configure.sh b/branding_files/configure.sh index 7b6fa5f..0abec86 100644 --- a/branding_files/configure.sh +++ b/branding_files/configure.sh @@ -5,7 +5,7 @@ MOZ_APP_NAME=librewolf MOZ_APP_BASENAME=LibreWolf MOZ_APP_PROFILE=LibreWolf -MOZ_APP_VENDOR="LibreWolf community" +MOZ_APP_VENDOR="LibreWolf Community" MOZ_APP_DISPLAYNAME=LibreWolf MOZ_APP_REMOTINGNAME=librewolf MOZ_DEV_EDITION=1 diff --git a/branding_files/confvars.sh b/branding_files/confvars.sh new file mode 100644 index 0000000..1e15118 --- /dev/null +++ b/branding_files/confvars.sh @@ -0,0 +1,46 @@ +#! /bin/sh +# 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/. + +MOZ_APP_BASENAME=LibreWolf +MOZ_APP_VENDOR="LibreWolf Community" + +MOZ_UPDATER=0 + +if test "$OS_ARCH" = "WINNT"; then + if ! test "$HAVE_64BIT_BUILD"; then + if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \ + "$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \ + "$MOZ_UPDATE_CHANNEL" = "aurora" -o \ + "$MOZ_UPDATE_CHANNEL" = "beta" -o \ + "$MOZ_UPDATE_CHANNEL" = "release"; then + if ! test "$MOZ_DEBUG"; then + if ! test "$USE_STUB_INSTALLER"; then + # Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency + echo "ERROR: STUB installer expected to be enabled but" + echo "ERROR: USE_STUB_INSTALLER is not specified in the environment" + exit 1 + fi + MOZ_STUB_INSTALLER=1 + fi + fi + fi +fi + +BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml + +# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh +# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is +# specified. It should never point to the "official" branding directory. +# For mozilla-beta, mozilla-release, or mozilla-central repositories, use +# "unofficial" branding. +# For the mozilla-aurora repository, use "aurora". +MOZ_BRANDING_DIRECTORY=browser/branding/librewolf +MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/librewolf +MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} + +MOZ_PROFILE_MIGRATOR=1 + +# Include the DevTools client, not just the server (which is the default) +MOZ_DEVTOOLS=all diff --git a/build.sh b/build.sh index 16e6712..7df244f 100644 --- a/build.sh +++ b/build.sh @@ -7,6 +7,29 @@ _pkgname=LibreWolf pkgver=86.0.1 +deps_apt() { + echo "deps_apt: begin." + $deps= + apt -y install $(deps) + echo "deps_apt: done." +} + +deps_rpm() { + echo "deps_rpm: begin." + $deps= + dnf -y install $(deps) + echo "deps_rpm: done." +} + +mach_env() { + echo "mach_env: begin." + if [ ! -d firefox-$pkgver ]; then exit 1; fi + cd firefox-$pkgver + ./mach create-mach-environment + if [ $? -ne 0 ]; then exit 1; fi + cd .. + echo "mach_env: done." +} fetch() { echo "fetch: begin." @@ -69,8 +92,8 @@ ac_add_options --enable-optimize # Branding ac_add_options --enable-update-channel=release -# suspect: ac_add_options --with-app-name=${pkgname} -# suspect: ac_add_options --with-app-basename=${_pkgname} +# theming bugs: ac_add_options --with-app-name=${pkgname} +# theming bugs: ac_add_options --with-app-basename=${_pkgname} ac_add_options --with-branding=browser/branding/${pkgname} ac_add_options --with-distribution-id=io.gitlab.${pkgname}-community ac_add_options --with-unsigned-addon-scopes=app,system @@ -143,12 +166,13 @@ END if [ $? -ne 0 ]; then exit 1; fi # copy branding resources - cp -r ../common/source_files/* ./ + cp -vr ../common/source_files/* ./ # new branding stuff - cp ../branding_files/configure.sh browser/branding/librewolf + cp -v ../branding_files/configure.sh browser/branding/librewolf + cp -v ../branding_files/confvars.sh browser/confvars.sh # just a straight copy for now.. - cp ../mozconfig . + cp -v ../mozconfig . cd .. echo "do_patches: done." @@ -214,6 +238,10 @@ if [[ "$*" == *do_patches* ]]; then do_patches done_something=1 fi +if [[ "$*" == *mach_env* ]]; then + mach_env + done_something=1 +fi if [[ "$*" == *build* ]]; then build done_something=1 @@ -231,6 +259,7 @@ Use: ./build.sh fetch extract do_patches build package installer_win fetch - fetch the tarball. extract - extract the tarball. do_patches - create a mozconfig, and patch the source. + mach_env - *create mach build environment. build - the actual build. artifacts - build the .zip and NSIS setup.exe installer.