diff --git a/artifacts_deb.sh b/artifacts_deb.sh index f11f6c3..4c28ef2 100644 --- a/artifacts_deb.sh +++ b/artifacts_deb.sh @@ -20,8 +20,9 @@ cp -rv settings/* librewolf pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd # clean garbage files cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. -# copy the windows icon -cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico + +# linux: copy app icon stuff +cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf # create the final zip artifact rm -f librewolf-$pkgver.en-US.$ospkg.zip diff --git a/artifacts_rpm.sh b/artifacts_rpm.sh index fd30bf2..3f00162 100644 --- a/artifacts_rpm.sh +++ b/artifacts_rpm.sh @@ -20,8 +20,10 @@ cp -rv settings/* librewolf pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd # clean garbage files cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. -# copy the windows icon -cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico + +# linux: copy app icon stuff +cp branding_files/register-librewolf branding_files/start-librewolf branding_files/start-librewolf.desktop.in librewolf + # create the final zip artifact rm -f librewolf-$pkgver.en-US.$ospkg.zip diff --git a/artifacts_win.sh b/artifacts_win.sh index a4fe005..b7429ca 100644 --- a/artifacts_win.sh +++ b/artifacts_win.sh @@ -20,7 +20,8 @@ cp -rv settings/* librewolf pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd # clean garbage files cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. -# copy the windows icon + +# windows: copy the windows icon cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico # create the final zip artifact diff --git a/branding_files/confvars.sh b/branding_files/confvars.sh deleted file mode 100644 index 1e15118..0000000 --- a/branding_files/confvars.sh +++ /dev/null @@ -1,46 +0,0 @@ -#! /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 934f8d6..2b69dff 100755 --- a/build.sh +++ b/build.sh @@ -65,7 +65,8 @@ fetch() { # fetch the firefox source. rm -f firefox-$pkgver.source.tar.xz - wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz + echo "Downloading firefox-$pkgver.source.tar.xz ..." + wget -q https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz if [ $? -ne 0 ]; then exit 1; fi if [ ! -f firefox-$pkgver.source.tar.xz ]; then exit 1; fi @@ -89,33 +90,7 @@ extract() { } - -do_patches() { - echo "do_patches: begin." - - # get the patches - echo 'Getting patches..' - rm -f context-menu.patch megabar.patch mozilla-vpn-ad.patch remove_addons.patch unity-menubar.patch - - wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/context-menu.patch - if [ $? -ne 0 ]; then exit 1; fi - if [ ! -f context-menu.patch ]; then exit 1; fi - wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch - if [ $? -ne 0 ]; then exit 1; fi - if [ ! -f megabar.patch ]; then exit 1; fi - wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/mozilla-vpn-ad.patch - if [ $? -ne 0 ]; then exit 1; fi - if [ ! -f mozilla-vpn-ad.patch ]; then exit 1; fi - wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch - if [ $? -ne 0 ]; then exit 1; fi - if [ ! -f remove_addons.patch ]; then exit 1; fi - - - # create mozconfig.. - - if [ ! -d firefox-$pkgver ]; then exit 1; fi - cd firefox-$pkgver - +create_mozconfig() { cat >../mozconfig < /dev/null } +git_init() { + echo "git_init: begin." + if [ ! -d firefox-$pkgver ]; then exit 1; fi + cd firefox-$pkgver + + echo "Removing old .git folder..." + rm -rf .git + + echo "Creating new .git folder..." + git init + git config core.safecrlf false + git config commit.gpgsign false + git add -f * .[a-z]* + git commit -am 'Initial commit' + + cd .. + echo "git_init: done." +} + @@ -396,16 +422,7 @@ fi done_something=0 -if [[ "$*" == *config_diff* ]]; then - config_diff - done_something=1 -fi -if [[ "$*" == *policies_diff* ]]; then - policies_diff - done_something=1 -fi - -# +# various administrative actions... if [[ "$*" == *clean* ]]; then clean @@ -419,8 +436,12 @@ if [[ "$*" == *rustup* ]]; then rustup done_something=1 fi +if [[ "$*" == *mach_env* ]]; then + mach_env + done_something=1 +fi -# +# dependencies on various platforms... if [[ "$*" == *deps_deb* ]]; then deps_deb @@ -435,7 +456,7 @@ if [[ "$*" == *deps_pkg* ]]; then done_something=1 fi -# +# main building actions... if [[ "$*" == *fetch* ]]; then fetch @@ -449,8 +470,8 @@ if [[ "$*" == *do_patches* ]]; then do_patches done_something=1 fi -if [[ "$*" == *mach_env* ]]; then - mach_env +if [[ "$*" == *git_init* ]]; then + git_init done_something=1 fi if [[ "$*" == *build* ]]; then @@ -458,7 +479,7 @@ if [[ "$*" == *build* ]]; then done_something=1 fi -# +# creating the artifacts... if [[ "$*" == *artifacts_exp* ]]; then experimental=experimental @@ -491,18 +512,34 @@ else fi fi +# librewolf.cfg and policies.json differences + +if [[ "$*" == *config_diff* ]]; then + config_diff + done_something=1 +fi +if [[ "$*" == *policies_diff* ]]; then + policies_diff + done_something=1 +fi +if [[ "$*" == *mach_run_config* ]]; then + cp -r settings/* $(echo firefox-$pkgver/obj-*)/dist/bin + done_something=1 +fi + + # by default, give help.. if (( done_something == 0 )); then - cat <