Compare commits
No commits in common. "master" and "v94.0.2-2" have entirely different histories.
124 changed files with 5292 additions and 26 deletions
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/firefox-*
|
||||||
|
/librewolf
|
||||||
|
/mozilla-unified
|
||||||
|
/tor-browser
|
||||||
|
/gecko-dev
|
||||||
|
/bootstrap.py
|
||||||
|
/mozconfig
|
||||||
|
/dist
|
||||||
|
/tmp.nsi
|
||||||
|
/tmp-permissive.nsi
|
||||||
|
/tmp-strict.nsi
|
||||||
|
/__pycache__
|
||||||
|
/sha256sums.txt
|
||||||
|
/upload.txt
|
||||||
|
build_tag
|
||||||
|
/docker/librewolf/debian10/deb/artifacts
|
||||||
|
/docker/librewolf/debian11/deb/artifacts
|
||||||
|
/docker/librewolf/fedora34/rpm/artifacts
|
||||||
|
/docker/librewolf/mint20/deb/artifacts
|
||||||
|
/docker/librewolf/ubuntu20/deb/artifacts
|
||||||
|
/docker/*.log
|
||||||
|
version
|
||||||
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[submodule "settings"]
|
||||||
|
path = settings
|
||||||
|
url = https://gitlab.com/librewolf-community/settings.git
|
||||||
|
[submodule "common"]
|
||||||
|
path = common
|
||||||
|
url = https://gitlab.com/librewolf-community/browser/common.git
|
||||||
41
CONTRIBUTING.md
Normal file
41
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
# How to contribute:
|
||||||
|
|
||||||
|
If you want to contribute, or just build from source yourself, below are the inistructions to do that. If there is something unclear please type your feedback in **[this ticket](https://gitlab.com/librewolf-community/browser/windows/-/issues/112)** and we can adress it.
|
||||||
|
|
||||||
|
## Reference documentation:
|
||||||
|
|
||||||
|
* [Building Firefox On Windows](https://firefox-source-docs.mozilla.org/setup/windows_build.html).
|
||||||
|
|
||||||
|
## Compiling:
|
||||||
|
|
||||||
|
To compile on Windows, you need to:
|
||||||
|
|
||||||
|
* Install Mozilla build setup tools: [MozillaBuildSetup-Latest.exe](https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe).
|
||||||
|
* Install Microsoft visual studio community edition: [here](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022).
|
||||||
|
* Within Visual Studio:
|
||||||
|
** Desktop development with C++.
|
||||||
|
** Windows 10 SDK (at least 10.0.19041.0).
|
||||||
|
** C++ ATL for v143 build tools (x86 and x64).
|
||||||
|
|
||||||
|
* Open start-shell terminal and basically do the following:
|
||||||
|
```
|
||||||
|
wget -q "https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py"
|
||||||
|
python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
```
|
||||||
|
If you choose to, you can now build Firefox Nightly as follows:
|
||||||
|
```
|
||||||
|
cd mozilla-unified
|
||||||
|
./mach build
|
||||||
|
./mach package
|
||||||
|
./mach run # or just run it..
|
||||||
|
```
|
||||||
|
Or you can just forget about that, and remove the firefox tree:
|
||||||
|
```
|
||||||
|
rm -rf bootstrap.py mozilla-unified
|
||||||
|
```
|
||||||
|
To build the current windows setup.exe, we do the following:
|
||||||
|
```
|
||||||
|
git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
cd windows
|
||||||
|
./build.py all
|
||||||
|
```
|
||||||
48
Makefile
Normal file
48
Makefile
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
.phony: all clean veryclean fetch extract lw_do_patches build lw_post_build package lw_artifacts
|
||||||
|
|
||||||
|
BUILD=python3 build.py ${OPTS}
|
||||||
|
|
||||||
|
|
||||||
|
all :
|
||||||
|
$(BUILD) all
|
||||||
|
clean :
|
||||||
|
$(BUILD) clean
|
||||||
|
make -C docker clean
|
||||||
|
|
||||||
|
veryclean :
|
||||||
|
$(BUILD) veryclean
|
||||||
|
|
||||||
|
fetch :
|
||||||
|
$(BUILD) fetch
|
||||||
|
extract :
|
||||||
|
$(BUILD) extract
|
||||||
|
do_patches lw_do_patches :
|
||||||
|
$(BUILD) lw_do_patches
|
||||||
|
build :
|
||||||
|
$(BUILD) build
|
||||||
|
post_build lw_post_build :
|
||||||
|
$(BUILD) lw_post_build
|
||||||
|
package :
|
||||||
|
$(BUILD) package
|
||||||
|
artifacts lw_artifacts :
|
||||||
|
$(BUILD) lw_artifacts
|
||||||
|
|
||||||
|
update update_submodules :
|
||||||
|
$(BUILD) update_submodules
|
||||||
|
upload :
|
||||||
|
$(BUILD) upload
|
||||||
|
git_init :
|
||||||
|
$(BUILD) git_init
|
||||||
|
reset :
|
||||||
|
$(BUILD) reset
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Building docker files..
|
||||||
|
.phony : docker docker-all docker-clean
|
||||||
|
docker : docker-all
|
||||||
|
docker-all :
|
||||||
|
make -C docker all
|
||||||
|
docker-clean :
|
||||||
|
make -C docker clean
|
||||||
|
|
||||||
40
README.md
40
README.md
|
|
@ -1,30 +1,18 @@
|
||||||
# LibreWolf Issue Tracker & Update Tools 🚀
|
# LibreWolf for windows
|
||||||
|
|
||||||
Welcome to the **LibreWolf for Windows** repository! This repository is now dedicated to the **Issue Tracker**. Submit your issues and get the latest updates on LibreWolf for Windows.
|
* **[download latest release](https://gitlab.com/librewolf-community/browser/windows/-/releases)**
|
||||||
|
* Visit [the FAQ](https://librewolf.net/docs/faq/).
|
||||||
|
* Install via _[chocolatey](https://community.chocolatey.org/packages/librewolf)_: `choco install librewolf`
|
||||||
|
* or install via _winget_: `winget install librewolf`
|
||||||
|
* **If your LibreWolf crashes on startup**, you probably miss the right [Visual C++ Runtime](https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0). You want the _Visual Studio 2015, 2017 and 2019_ version for **x64**, which would be **[this file](https://aka.ms/vs/16/release/vc_redist.x64.exe)**.
|
||||||
|
* The .zip files are _'portable zip files'_ that allows for a user profile in the extracted zip file folders. It is _self-contained_.
|
||||||
|
|
||||||
To download the latest release, visit the [official LibreWolf release page](https://gitlab.com/librewolf-community/browser/bsys6/-/releases). For installation options, check out the [FAQ](https://librewolf.net/docs/faq/).
|
# Settings repository
|
||||||
|
|
||||||
## Update Tools 🛠️
|
* For all librewolf.cfg issues, go here: [[settings repository](https://gitlab.com/librewolf-community/settings)] - _([issues](https://gitlab.com/librewolf-community/settings/-/issues))_
|
||||||
|
|
||||||
Stay secure and up-to-date with these LibreWolf update tools:
|
# Community links
|
||||||
|
* [[reddit](https://www.reddit.com/r/LibreWolf/)] - [r/LibreWolf](https://www.reddit.com/r/LibreWolf/) 😺
|
||||||
1. **LibreWolf WinUpdater**: Kudos to @ltguillaume for this [automatic updater](https://codeberg.org/ltguillaume/librewolf-winupdater) that can be set up to update LibreWolf automatically or run manually.
|
* [[gitter](https://gitter.im/librewolf-community/librewolf)], and the same room on [matrix](https://app.element.io/#/room/#librewolf-community_librewolf:gitter.im) (element.io).
|
||||||
|
* The install instructions for Windows on [librewolf.net](https://librewolf.net/installation/windows/).
|
||||||
2. **LibreWolf Update Checker Extension**: Created by Defkev, this [extension](https://addons.mozilla.org/en-US/firefox/addon/librewolf-updater/) will notify you when an update is available and guide you to the download link.
|
* Want to compile it for yourself or contribute? check [CONTRIBUTING.md](https://gitlab.com/librewolf-community/browser/windows/-/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
> Please note: The *updater* can _install_ updates automatically, while the *extension* can only _check_ for updates.
|
|
||||||
|
|
||||||
## LibreWolf for Windows 🖥️
|
|
||||||
|
|
||||||
- LibreWolf supports multiple UI languages, available in settings.
|
|
||||||
- The latest **-portable.zip** release is self-contained and can be run on removable storage.
|
|
||||||
|
|
||||||
## Issue Tracker 🎫
|
|
||||||
|
|
||||||
- For issues with Settings or Advanced Settings (`about:config`), submit them to the [settings repository](https://gitlab.com/librewolf-community/settings/-/issues).
|
|
||||||
- For other issues, such as crashes/theme/graphics/speed problems, submit them to [issues for windows repository](https://gitlab.com/librewolf-community/browser/windows/-/issues).
|
|
||||||
|
|
||||||
## Building from Source 🏗️
|
|
||||||
|
|
||||||
- Our `bsys` build system supports cross-compiling from Linux to Windows. Building the Windows version from within Windows is not tested yet.
|
|
||||||
- The build system can be found here: [bsys6](https://gitlab.com/librewolf-community/browser/bsys6).
|
|
||||||
|
|
|
||||||
750
build.py
Executable file
750
build.py
Executable file
|
|
@ -0,0 +1,750 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
pkgver = '94.0.2'
|
||||||
|
nightly_ver = '96.0a1'
|
||||||
|
|
||||||
|
#
|
||||||
|
# build.py - try move functionality away from that too big/horrible build script.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
import optparse
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import glob
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
start_time = time.time()
|
||||||
|
parser = optparse.OptionParser()
|
||||||
|
|
||||||
|
parser.add_option('-x', '--cross', dest='cross_compile', default=False, action="store_true")
|
||||||
|
parser.add_option('-n', '--no-execute', dest='no_execute', default=False, action="store_true")
|
||||||
|
parser.add_option('-l', '--no-librewolf', dest='no_librewolf', default=False, action="store_true")
|
||||||
|
parser.add_option('-s', '--src', dest='src', default='release')
|
||||||
|
parser.add_option('-t', '--distro', dest='distro', default='autodetect')
|
||||||
|
parser.add_option('-T', '--token', dest='token', default='')
|
||||||
|
parser.add_option('-3', '--i386', dest='i386', default=False, action="store_true")
|
||||||
|
parser.add_option('-P', '--no-settings-pane', dest='settings_pane', default=True, action="store_false")
|
||||||
|
parser.add_option('-v', '--version', dest='version', action="store", type="string")
|
||||||
|
|
||||||
|
options, remainder = parser.parse_args()
|
||||||
|
|
||||||
|
# try autodetecting options.distro
|
||||||
|
if options.distro == 'autodetect':
|
||||||
|
options.distro = 'win'
|
||||||
|
if os.path.isdir('/Applications'):
|
||||||
|
options.distro = 'osx'
|
||||||
|
elif os.path.isdir('/etc'):
|
||||||
|
options.distro = 'rpm'
|
||||||
|
if os.path.isdir('/etc/apt'):
|
||||||
|
options.distro = 'deb'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if options.version != None:
|
||||||
|
if options.src != 'release':
|
||||||
|
print('error: cant use --version and --src at the same time')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
pkgver=options.version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def script_exit(statuscode):
|
||||||
|
if (time.time() - start_time) > 60:
|
||||||
|
# print elapsed time
|
||||||
|
elapsed = time.strftime("%H:%M:%S", time.gmtime(time.time() - start_time))
|
||||||
|
print(f"\n\aElapsed time: {elapsed}")
|
||||||
|
|
||||||
|
sys.exit(statuscode)
|
||||||
|
|
||||||
|
def enter_srcdir():
|
||||||
|
dir = "firefox-{}".format(pkgver)
|
||||||
|
if options.src == 'nightly':
|
||||||
|
dir = 'mozilla-unified'
|
||||||
|
elif options.src == 'tor-browser':
|
||||||
|
dir = 'tor-browser'
|
||||||
|
elif options.src == 'gecko-dev':
|
||||||
|
dir = 'gecko-dev'
|
||||||
|
print("cd {}".format(dir))
|
||||||
|
if not options.no_execute:
|
||||||
|
try:
|
||||||
|
os.chdir(dir)
|
||||||
|
except:
|
||||||
|
print("fatal error: can't change to '{}' folder.".format(dir))
|
||||||
|
script_exit(1)
|
||||||
|
|
||||||
|
def leave_srcdir():
|
||||||
|
print("cd ..")
|
||||||
|
if not options.no_execute:
|
||||||
|
os.chdir("..")
|
||||||
|
|
||||||
|
def exec(cmd):
|
||||||
|
if cmd != '':
|
||||||
|
print(cmd)
|
||||||
|
if not options.no_execute:
|
||||||
|
retval = os.system(cmd)
|
||||||
|
if retval != 0:
|
||||||
|
print("fatal error: command '{}' failed".format(cmd))
|
||||||
|
script_exit(1)
|
||||||
|
|
||||||
|
def patch(patchfile):
|
||||||
|
cmd = "patch -p1 -i {}".format(patchfile)
|
||||||
|
print("\n*** -> {}".format(cmd))
|
||||||
|
if not options.no_execute:
|
||||||
|
retval = os.system(cmd)
|
||||||
|
if retval != 0:
|
||||||
|
print("fatal error: patch '{}' failed".format(patchfile))
|
||||||
|
script_exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Utilities:
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute_update_submodules():
|
||||||
|
exec("git submodule foreach git pull origin master")
|
||||||
|
|
||||||
|
def execute_git_init():
|
||||||
|
if options.src != 'release':
|
||||||
|
print("fatal error: git_init only works with the release source (--src release)")
|
||||||
|
script_exit(1)
|
||||||
|
enter_srcdir()
|
||||||
|
exec("rm -rf .git")
|
||||||
|
exec("git init")
|
||||||
|
exec("git config core.safecrlf false")
|
||||||
|
exec("git config commit.gpgsign false")
|
||||||
|
exec("git add -f * .[a-z]*")
|
||||||
|
exec("git commit -am initial")
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
|
||||||
|
def execute_deps_deb():
|
||||||
|
deps1 = "python python-dev python3 python3-dev python3-distutils clang pkg-config libpulse-dev gcc"
|
||||||
|
deps2 = "curl wget nodejs libpango1.0-dev nasm yasm zip m4 libgtk-3-dev libgtk2.0-dev libdbus-glib-1-dev"
|
||||||
|
deps3 = "libxt-dev python3-pip mercurial automake autoconf libtool m4"
|
||||||
|
exec("apt install -y {} {} {}".format(deps1,deps2,deps3))
|
||||||
|
|
||||||
|
def execute_deps_rpm():
|
||||||
|
deps1 = "python3 python3-distutils-extra clang pkg-config gcc curl wget nodejs nasm yasm zip m4"
|
||||||
|
deps2 = "python3-zstandard python-zstandard python-devel python3-devel gtk3-devel llvm gtk2-devel dbus-glib-devel libXt-devel pulseaudio-libs-devel"
|
||||||
|
exec("dnf -y install {} {}".format(deps1,deps2))
|
||||||
|
|
||||||
|
def execute_deps_pkg():
|
||||||
|
deps = "wget gmake m4 python3 py37-sqlite3 pkgconf llvm node nasm zip unzip yasm"
|
||||||
|
exec("pkg install {}".format(deps))
|
||||||
|
|
||||||
|
|
||||||
|
def execute_rustup():
|
||||||
|
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
|
||||||
|
exec("curl https://sh.rustup.rs -sSf | sh")
|
||||||
|
exec("cargo install cbindgen")
|
||||||
|
|
||||||
|
def execute_mach_env():
|
||||||
|
enter_srcdir()
|
||||||
|
exec("bash ./mach create-mach-environment")
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
|
||||||
|
def execute_reset():
|
||||||
|
if options.src == 'release':
|
||||||
|
path = "firefox-{}/.git/index".format(pkgver)
|
||||||
|
if not os.path.isfile(path):
|
||||||
|
print("fatal error: cannot reset '--src release' sources as it's not under version control.")
|
||||||
|
script_exit(1)
|
||||||
|
enter_srcdir()
|
||||||
|
exec("git reset --hard")
|
||||||
|
leave_srcdir()
|
||||||
|
elif options.src == 'nightly':
|
||||||
|
enter_srcdir()
|
||||||
|
exec("hg up -C")
|
||||||
|
exec("hg purge")
|
||||||
|
exec("hg pull -u")
|
||||||
|
leave_srcdir()
|
||||||
|
elif options.src == 'tor-browser':
|
||||||
|
enter_srcdir()
|
||||||
|
exec("git reset --hard")
|
||||||
|
leave_srcidr()
|
||||||
|
elif options.src == 'gecko-dev':
|
||||||
|
enter_srcdir()
|
||||||
|
exec("git reset --hard")
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Targets:
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
def execute_fetch():
|
||||||
|
if options.src == 'release':
|
||||||
|
exec("rm -f firefox-{}.source.tar.xz".format(pkgver))
|
||||||
|
exec("wget -q https://archive.mozilla.org/pub/firefox/releases/{}/source/firefox-{}.source.tar.xz".format(pkgver, pkgver))
|
||||||
|
elif options.src == 'nightly':
|
||||||
|
if not os.path.isdir('mozilla-unified'):
|
||||||
|
exec("rm -f bootstrap.py")
|
||||||
|
exec("rm -rf mozilla-unified")
|
||||||
|
exec("wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py")
|
||||||
|
exec("python3 bootstrap.py --no-interactive --application-choice=browser")
|
||||||
|
elif options.src == 'tor-browser':
|
||||||
|
if not os.path.isdir('tor-browser'):
|
||||||
|
exec("rm -rf tor-browser")
|
||||||
|
exec("git clone --no-checkout --recursive https://git.torproject.org/tor-browser.git")
|
||||||
|
patch("../patches/tb-mozconfig-win10.patch")
|
||||||
|
enter_srcdir()
|
||||||
|
exec("git checkout tor-browser-89.0-10.5-1-build1")
|
||||||
|
exec("git submodule update --recursive")
|
||||||
|
leave_srcdir()
|
||||||
|
elif options.src == 'gecko-dev':
|
||||||
|
if not os.path.isdir('gecko-dev'):
|
||||||
|
exec("rm -rf gecko-dev")
|
||||||
|
exec("git clone --depth=1 https://github.com/mozilla/gecko-dev.git")
|
||||||
|
|
||||||
|
def execute_extract():
|
||||||
|
if options.src == 'release':
|
||||||
|
exec("rm -rf firefox-{}".format(pkgver))
|
||||||
|
exec("tar xf firefox-{}.source.tar.xz".format(pkgver))
|
||||||
|
|
||||||
|
def execute_build():
|
||||||
|
enter_srcdir()
|
||||||
|
exec("bash ./mach build")
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
def execute_package():
|
||||||
|
enter_srcdir()
|
||||||
|
exec("bash ./mach package")
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LibreWolf specific:
|
||||||
|
#
|
||||||
|
|
||||||
|
def create_mozconfig(contents):
|
||||||
|
if not options.no_execute:
|
||||||
|
f = open('mozconfig', 'w')
|
||||||
|
f.write(contents)
|
||||||
|
if not options.distro == 'win':
|
||||||
|
f.write("\nac_add_options --with-app-name=librewolf")
|
||||||
|
if options.distro == 'osx' and options.cross_compile:
|
||||||
|
f.write("\nac_add_options --target=aarch64")
|
||||||
|
if options.i386:
|
||||||
|
f.write("\nac_add_options --target=i386")
|
||||||
|
f.write("\n")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
def execute_lw_do_patches():
|
||||||
|
if options.no_librewolf:
|
||||||
|
return
|
||||||
|
if not options.src in ['release','nightly','gecko-dev']:
|
||||||
|
return
|
||||||
|
|
||||||
|
enter_srcdir()
|
||||||
|
# create the right mozconfig file..
|
||||||
|
create_mozconfig(mozconfig_release)
|
||||||
|
|
||||||
|
# macos : if have compatibilty osx api headers, add that to mozconfig_release
|
||||||
|
dir = os.environ['HOME'] + '/.mozbuild/macos-sdk/MacOSX11.1.sdk'
|
||||||
|
if os.path.isdir(dir):
|
||||||
|
with open('mozconfig','a') as f:
|
||||||
|
f.write("\nac_add_options --with-macos-sdk=$HOME/.mozbuild/macos-sdk/MacOSX11.1.sdk")
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
# copy branding files..
|
||||||
|
|
||||||
|
exec('echo +++ && pwd && ls ../common')
|
||||||
|
exec("cp -vr ../common/source_files/browser .")
|
||||||
|
exec("cp -v ../files/configure.sh browser/branding/librewolf")
|
||||||
|
|
||||||
|
patches = []
|
||||||
|
|
||||||
|
if options.src == 'release':
|
||||||
|
# production patches
|
||||||
|
patches = [
|
||||||
|
|
||||||
|
"../common/patches/about-dialog.patch",
|
||||||
|
"../common/patches/allow-ubo-private-mode.patch",
|
||||||
|
"../common/patches/allow_dark_preference_with_rfp.patch",
|
||||||
|
"../common/patches/context-menu.patch",
|
||||||
|
"../common/patches/megabar.patch",
|
||||||
|
"../common/patches/mozilla-vpn-ad.patch",
|
||||||
|
"../common/patches/mozilla_dirs.patch",
|
||||||
|
"../common/patches/remove_addons.patch",
|
||||||
|
"../common/patches/search-config.patch",
|
||||||
|
"../common/patches/sed-patches/allow-searchengines-non-esr.patch",
|
||||||
|
"../common/patches/sed-patches/disable-pocket.patch",
|
||||||
|
"../common/patches/sed-patches/remove-internal-plugin-certs.patch",
|
||||||
|
"../common/patches/sed-patches/stop-undesired-requests.patch",
|
||||||
|
"../common/patches/ui-patches/add-language-warning.patch",
|
||||||
|
"../common/patches/ui-patches/pref-naming.patch",
|
||||||
|
"../common/patches/ui-patches/remove-branding-urlbar.patch",
|
||||||
|
"../common/patches/ui-patches/remove-cfrprefs.patch",
|
||||||
|
"../common/patches/ui-patches/remove-organization-policy-banner.patch",
|
||||||
|
"../common/patches/ui-patches/remove-snippets-from-home.patch",
|
||||||
|
"../common/patches/ui-patches/sanitizing-description.patch",
|
||||||
|
"../common/patches/urlbarprovider-interventions.patch",
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
elif options.src == 'nightly' or options.src == 'gecko-dev':
|
||||||
|
# patches for future releases are caught with nightly
|
||||||
|
patches = [
|
||||||
|
|
||||||
|
"../common/patches/about-dialog.patch",
|
||||||
|
"../common/patches/allow-ubo-private-mode.patch",
|
||||||
|
"../common/patches/allow_dark_preference_with_rfp.patch",
|
||||||
|
"../common/patches/context-menu.patch",
|
||||||
|
"../common/patches/megabar.patch",
|
||||||
|
"../common/patches/mozilla-vpn-ad.patch",
|
||||||
|
"../common/patches/mozilla_dirs.patch",
|
||||||
|
"../common/patches/remove_addons.patch",
|
||||||
|
"../common/patches/search-config.patch",
|
||||||
|
"../common/patches/sed-patches/allow-searchengines-non-esr.patch",
|
||||||
|
"../common/patches/sed-patches/disable-pocket.patch",
|
||||||
|
"../common/patches/sed-patches/remove-internal-plugin-certs.patch",
|
||||||
|
"../common/patches/sed-patches/stop-undesired-requests.patch",
|
||||||
|
"../common/patches/ui-patches/add-language-warning.patch",
|
||||||
|
"../common/patches/ui-patches/pref-naming.patch",
|
||||||
|
"../common/patches/ui-patches/remove-branding-urlbar.patch",
|
||||||
|
"../common/patches/ui-patches/remove-cfrprefs.patch",
|
||||||
|
"../common/patches/ui-patches/remove-organization-policy-banner.patch",
|
||||||
|
"../common/patches/ui-patches/remove-snippets-from-home.patch",
|
||||||
|
"../common/patches/ui-patches/sanitizing-description.patch",
|
||||||
|
"../common/patches/urlbarprovider-interventions.patch",
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
for p in patches:
|
||||||
|
patch(p)
|
||||||
|
|
||||||
|
# local windows patches
|
||||||
|
for p in ["../patches/browser-confvars.patch", "../patches/package-manifest.patch"]:
|
||||||
|
patch(p)
|
||||||
|
|
||||||
|
# insert the settings pane source (experimental)
|
||||||
|
if options.settings_pane:
|
||||||
|
|
||||||
|
exec('rm -rf librewolf-pref-pane')
|
||||||
|
exec('git clone https://gitlab.com/ohfp/librewolf-pref-pane.git')
|
||||||
|
os.chdir('librewolf-pref-pane')
|
||||||
|
exec('git diff 1fee314adc81000294fc0cf3196a758e4b64dace > ../../patches/librewolf-pref-pane.patch')
|
||||||
|
os.chdir('..')
|
||||||
|
patch('../patches/librewolf-pref-pane.patch')
|
||||||
|
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
|
||||||
|
def get_objdir():
|
||||||
|
pattern = "obj-*"
|
||||||
|
retval = glob.glob(pattern)
|
||||||
|
if options.no_execute:
|
||||||
|
return "obj-XXX"
|
||||||
|
if len(retval) != 1:
|
||||||
|
print("fatal error: in execute_lw_post_build(): cannot glob build output folder '{}'".format(pattern))
|
||||||
|
script_exit(1)
|
||||||
|
return retval[0]
|
||||||
|
|
||||||
|
def execute_lw_post_build():
|
||||||
|
if options.no_librewolf:
|
||||||
|
return
|
||||||
|
enter_srcdir()
|
||||||
|
dirname = get_objdir()
|
||||||
|
|
||||||
|
distfolder = "dist/bin"
|
||||||
|
if options.distro == 'osx':
|
||||||
|
distfolder = 'dist/LibreWolf.app/Contents/Resources'
|
||||||
|
|
||||||
|
if not options.no_execute:
|
||||||
|
os.makedirs("{}/{}/defaults/pref".format(dirname,distfolder), exist_ok=True)
|
||||||
|
os.makedirs("{}/{}/distribution".format(dirname,distfolder), exist_ok=True)
|
||||||
|
exec("cp -v ../settings/defaults/pref/local-settings.js {}/{}/defaults/pref/".format(dirname,distfolder))
|
||||||
|
exec("cp -v ../settings/distribution/policies.json {}/{}/distribution/".format(dirname,distfolder))
|
||||||
|
exec("cp -v ../settings/librewolf.cfg {}/{}/".format(dirname,distfolder))
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
def execute_lw_artifacts():
|
||||||
|
if options.no_librewolf:
|
||||||
|
return
|
||||||
|
|
||||||
|
enter_srcdir()
|
||||||
|
|
||||||
|
if options.distro == 'win':
|
||||||
|
exe = ".exe"
|
||||||
|
ospkg = "win64"
|
||||||
|
dirname = "{}/dist/firefox".format(get_objdir())
|
||||||
|
elif options.distro == 'deb':
|
||||||
|
exe = ""
|
||||||
|
ospkg = "deb"
|
||||||
|
dirname = "{}/dist/librewolf".format(get_objdir())
|
||||||
|
elif options.distro == 'rpm':
|
||||||
|
exe = ""
|
||||||
|
ospkg = "rpm"
|
||||||
|
dirname = "{}/dist/librewolf".format(get_objdir())
|
||||||
|
elif options.distro == 'osx':
|
||||||
|
#exe = ""
|
||||||
|
#ospkg = "osx"
|
||||||
|
#dirname = "{}/dist/firefox".format(get_objdir())
|
||||||
|
exec("cp {}/dist/librewolf*.dmg ..".format(get_objdir()))
|
||||||
|
leave_srcdir()
|
||||||
|
return
|
||||||
|
|
||||||
|
exec("rm -rf ../firefox ../librewolf")
|
||||||
|
exec("cp -rv {} ..".format(dirname))
|
||||||
|
leave_srcdir()
|
||||||
|
|
||||||
|
librewolfdir = "librewolf"
|
||||||
|
if options.distro == 'osx':
|
||||||
|
librewolfdir = 'librewolf/Librewolf.app'
|
||||||
|
if options.distro == 'win':
|
||||||
|
exec("mv firefox librewolf")
|
||||||
|
if options.distro != 'osx':
|
||||||
|
if options.distro == 'win':
|
||||||
|
exec("mv -v {}/firefox{} {}/librewolf{}".format(librewolfdir,exe,librewolfdir,exe));
|
||||||
|
exec("rm -rf {}/default-browser-agent* {}/maintainanceservice* {}/pingsender* {}/firefox.*.xml {}/precomplete {}/removed-files {}/uninstall"
|
||||||
|
.format(librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir))
|
||||||
|
exec("cp -v common/source_files/browser/branding/librewolf/firefox.ico {}/librewolf.ico".format(librewolfdir))
|
||||||
|
if options.distro != 'win':
|
||||||
|
exec("cp -v files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf")
|
||||||
|
|
||||||
|
# create zip filename
|
||||||
|
if options.src == 'release':
|
||||||
|
zipname = "librewolf-{}.en-US.{}.zip".format(pkgver,ospkg)
|
||||||
|
elif options.src == 'nightly':
|
||||||
|
zipname = "librewolf-{}.en-US.{}-nightly.zip".format(nightly_ver,ospkg)
|
||||||
|
elif options.src == 'gecko-dev':
|
||||||
|
zipname = "librewolf-{}.en-US.{}-gecko-dev.zip".format(nightly_ver,ospkg)
|
||||||
|
|
||||||
|
# 'windows portable' zip stuff..
|
||||||
|
if options.distro == 'win':
|
||||||
|
# we need tmp to tell us what portable folder to make
|
||||||
|
if options.src == 'release':
|
||||||
|
tmp = pkgver
|
||||||
|
else:
|
||||||
|
tmp = nightly_ver
|
||||||
|
|
||||||
|
exec("rm -rf librewolf-{}".format(tmp))
|
||||||
|
#exec("mkdir -p librewolf-{}/Profiles/Default librewolf-{}/LibreWolf".format(pkgver,pkgver))
|
||||||
|
os.makedirs("librewolf-{}/Profiles/Default".format(tmp), exist_ok=True)
|
||||||
|
os.makedirs("librewolf-{}/LibreWolf".format(tmp), exist_ok=True)
|
||||||
|
exec("cp -vr librewolf/* librewolf-{}/LibreWolf".format(tmp))
|
||||||
|
|
||||||
|
exec("rm -f librewolf-portable.exe")
|
||||||
|
exec("wget -q https://gitlab.com/librewolf-community/browser/windows/uploads/8347381f01806245121adcca11b7f35c/librewolf-portable.exe")
|
||||||
|
exec("mv librewolf-portable.exe librewolf-{}".format(tmp))
|
||||||
|
|
||||||
|
exec("rm -f {}".format(zipname))
|
||||||
|
exec("zip -qr9 {} librewolf-{}".format(zipname,tmp))
|
||||||
|
|
||||||
|
# 'normal' zip file..
|
||||||
|
else:
|
||||||
|
exec("rm -f {}".format(zipname))
|
||||||
|
exec("zip -qr9 {} librewolf".format(zipname))
|
||||||
|
|
||||||
|
# create installer
|
||||||
|
if options.distro == 'win':
|
||||||
|
setupname = "librewolf-{}.en-US.win64-setup.exe".format(pkgver)
|
||||||
|
if options.src == 'nightly':
|
||||||
|
if os.path.isfile(setupname):
|
||||||
|
exec("rm -f tmp.exe")
|
||||||
|
exec("mv {} tmp.exe".format(setupname))
|
||||||
|
setupname = "librewolf-{}.en-US.win64-nightly-setup.exe".format(nightly_ver)
|
||||||
|
elif options.src == 'gecko-dev':
|
||||||
|
if os.path.isfile(setupname):
|
||||||
|
exec("rm -f tmp.exe")
|
||||||
|
exec("mv {} tmp.exe".format(setupname))
|
||||||
|
setupname = "librewolf-{}.en-US.win64-gecko-dev-setup.exe".format(nightly_ver)
|
||||||
|
|
||||||
|
exec("rm -f {} tmp.nsi".format(setupname))
|
||||||
|
s = pkgver
|
||||||
|
if options.src == 'nightly' or options.src == 'gecko-dev':
|
||||||
|
s = nightly_ver
|
||||||
|
exec("sed \"s/pkg_version/{}/g\" < setup.nsi > tmp.nsi".format(s))
|
||||||
|
exec("makensis-3.01.exe -V1 tmp.nsi")
|
||||||
|
exec("rm -f tmp.nsi")
|
||||||
|
from_name = 'librewolf-{}.en-US.win64-setup.exe'.format(s)
|
||||||
|
if from_name != setupname:
|
||||||
|
exec("mv {} {}".format(from_name,setupname))
|
||||||
|
if os.path.isfile("tmp.exe"):
|
||||||
|
exec("mv tmp.exe librewolf-{}.en-US.win64-setup.exe".format(pkgver))
|
||||||
|
|
||||||
|
def do_upload(filename):
|
||||||
|
exec("echo \".\" >> upload.txt")
|
||||||
|
exec("curl --request POST --header \"PRIVATE-TOKEN: {}\" --form \"file=@{}\" \"https://gitlab.com/api/v4/projects/13852981/uploads\" >> upload.txt".format(options.token,filename))
|
||||||
|
exec("echo \".\" >> upload.txt")
|
||||||
|
|
||||||
|
def execute_upload():
|
||||||
|
if options.token =='':
|
||||||
|
print("fatal error: You must specify a private token when using the 'upload' command.")
|
||||||
|
script_exit(1)
|
||||||
|
|
||||||
|
if options.distro == 'win':
|
||||||
|
ospkg = "win64"
|
||||||
|
elif options.distro == 'deb':
|
||||||
|
ospkg = "deb"
|
||||||
|
elif options.distro == 'rpm':
|
||||||
|
ospkg = "rpm"
|
||||||
|
elif options.distro == 'osx':
|
||||||
|
ospkg = "osx"
|
||||||
|
|
||||||
|
|
||||||
|
zip_filename = "librewolf-{}.en-US.{}.zip".format(pkgver,ospkg)
|
||||||
|
setup_filename = "librewolf-{}.en-US.{}-setup.exe".format(pkgver,ospkg)
|
||||||
|
# nightly_setup_filename = "librewolf-{}.en-US.{}-gecko-dev.zip".format(nightly_ver,ospkg)
|
||||||
|
|
||||||
|
if not os.path.isfile(zip_filename):
|
||||||
|
print("fatal error: File '{}' not found.".format(zip_filename))
|
||||||
|
script_exit(1)
|
||||||
|
if not os.path.isfile(setup_filename):
|
||||||
|
print("fatal error: File '{}' not found.".format(setup_filename))
|
||||||
|
script_exit(1)
|
||||||
|
# if not os.path.isfile(nightly_setup_filename):
|
||||||
|
# print("fatal error: File '{}' not found.".format(nightly_setup_filename))
|
||||||
|
# script_exit(1)
|
||||||
|
|
||||||
|
exec("sha256sum {} {} > sha256sums.txt".format(zip_filename,setup_filename))
|
||||||
|
exec("rm -f upload.txt")
|
||||||
|
do_upload(setup_filename)
|
||||||
|
do_upload(zip_filename)
|
||||||
|
# do_upload(nightly_setup_filename)
|
||||||
|
do_upload("sha256sums.txt")
|
||||||
|
print("upload.txt: Upload JSON api results are in the file \'upload.txt\'.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Main targets:
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def execute_all():
|
||||||
|
execute_update_submodules()
|
||||||
|
execute_fetch()
|
||||||
|
execute_extract()
|
||||||
|
execute_lw_do_patches()
|
||||||
|
execute_build()
|
||||||
|
execute_lw_post_build()
|
||||||
|
execute_package()
|
||||||
|
execute_lw_artifacts()
|
||||||
|
|
||||||
|
def execute_clean():
|
||||||
|
exec("rm -rf librewolf-{} librewolf-{}".format(pkgver,nightly_ver))
|
||||||
|
exec("rm -rf librewolf bootstrap.py tmp.nsi tmp.exe sha256sums.txt upload.txt librewolf-portable.exe")
|
||||||
|
for filename in glob.glob("librewolf-*"):
|
||||||
|
try:
|
||||||
|
os.remove(filename)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def execute_veryclean():
|
||||||
|
exec("rm -rf firefox-{}.source.tar.xz mozilla-unified tor-browser gecko-dev".format(pkgver))
|
||||||
|
exec("rm -rf firefox-{}".format(pkgver))
|
||||||
|
execute_clean()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# main commandline interface
|
||||||
|
#
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if options.src == 'tor-browser':
|
||||||
|
options.no_librewolf = True
|
||||||
|
|
||||||
|
if len(remainder) > 0:
|
||||||
|
if not options.src in ['release','nightly','tor-browser','gecko-dev']:
|
||||||
|
print("error: option --src invalid value")
|
||||||
|
script_exit(1)
|
||||||
|
if not options.distro in ['deb','rpm', 'win','osx']:
|
||||||
|
print("error: option --distro invalid value")
|
||||||
|
script_exit(1)
|
||||||
|
|
||||||
|
for arg in remainder:
|
||||||
|
if arg == 'all':
|
||||||
|
execute_all()
|
||||||
|
elif arg == 'clean':
|
||||||
|
execute_clean()
|
||||||
|
elif arg == 'veryclean':
|
||||||
|
execute_veryclean()
|
||||||
|
|
||||||
|
# Targets:
|
||||||
|
|
||||||
|
elif arg == 'fetch':
|
||||||
|
execute_fetch()
|
||||||
|
elif arg == 'extract':
|
||||||
|
execute_extract()
|
||||||
|
elif arg == 'lw_do_patches':
|
||||||
|
execute_lw_do_patches()
|
||||||
|
elif arg == 'build':
|
||||||
|
execute_build()
|
||||||
|
elif arg == 'lw_post_build':
|
||||||
|
execute_lw_post_build()
|
||||||
|
elif arg == 'package':
|
||||||
|
execute_package()
|
||||||
|
elif arg == 'lw_artifacts':
|
||||||
|
execute_lw_artifacts()
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
|
||||||
|
elif arg == 'update_submodules':
|
||||||
|
execute_update_submodules()
|
||||||
|
elif arg == 'upload':
|
||||||
|
execute_upload()
|
||||||
|
|
||||||
|
elif arg == 'git_init':
|
||||||
|
execute_git_init()
|
||||||
|
|
||||||
|
elif arg == 'deps_deb':
|
||||||
|
execute_deps_deb()
|
||||||
|
elif arg == 'deps_rpm':
|
||||||
|
execute_deps_rpm()
|
||||||
|
elif arg == 'deps_pkg':
|
||||||
|
execute_deps_pkg()
|
||||||
|
|
||||||
|
elif arg == 'rustup':
|
||||||
|
execute_rustup()
|
||||||
|
elif arg == 'mach_env':
|
||||||
|
execute_mach_env()
|
||||||
|
elif arg == 'reset':
|
||||||
|
execute_reset()
|
||||||
|
|
||||||
|
else:
|
||||||
|
print("error: unknown command on command line: ", arg)
|
||||||
|
script_exit(1)
|
||||||
|
else:
|
||||||
|
# Print help message
|
||||||
|
print(help_message.format(options.distro))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Large multiline strings
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
help_message = """# Use:
|
||||||
|
|
||||||
|
build.py [<options>] clean | all | <targets> | <utilities>
|
||||||
|
|
||||||
|
# Options:
|
||||||
|
|
||||||
|
-n,--no-execute - print commands, don't execute them
|
||||||
|
-l,--no-librewolf - skip LibreWolf specific stages.
|
||||||
|
-x,--cross - crosscompile from linux, implies -t win
|
||||||
|
-s,--src <src> - release,nightly,tor-browser,gecko-dev
|
||||||
|
(default=release)
|
||||||
|
-t,--distro <distro> - deb,rpm,win,osx (default={})
|
||||||
|
-T,--token <private_token> - private token used to upload to gitlab.com
|
||||||
|
-3,--i386 - build 32-bit
|
||||||
|
-P,--settings-pane - build with the experimental settings pane
|
||||||
|
|
||||||
|
# Targets:
|
||||||
|
|
||||||
|
all - all steps from fetch to producing setup.exe
|
||||||
|
clean - clean everything, including extracted/fetched sources
|
||||||
|
veryclean - clean like above, and also remove build artifacts.
|
||||||
|
|
||||||
|
fetch - wget or hg clone or git pull
|
||||||
|
extract - when using wget, extract the archive.
|
||||||
|
lw_do_patches - [librewolf] patch the source
|
||||||
|
build - build the browser
|
||||||
|
lw_post_build - [librewolf] insert our settings
|
||||||
|
package - package the browser into zip/apk
|
||||||
|
lw_artifacts - [librewolf] build setup.exe
|
||||||
|
|
||||||
|
# Utilities:
|
||||||
|
|
||||||
|
update_submodules - git update submodules
|
||||||
|
upload - upload the build artifacts to gitlab.com
|
||||||
|
|
||||||
|
git_init - put the source folder in a .git repository
|
||||||
|
reset - use git/mercurial to revert changes to a clean state
|
||||||
|
|
||||||
|
deps_deb - install dependencies with apt
|
||||||
|
deps_rpm - install dependencies with dnf
|
||||||
|
deps_pkg - install dependencies on freebsd
|
||||||
|
|
||||||
|
rustup - update rust
|
||||||
|
mach_env - create mach environment
|
||||||
|
"""
|
||||||
|
|
||||||
|
#
|
||||||
|
# mozconfig files:
|
||||||
|
#
|
||||||
|
|
||||||
|
mozconfig_release = """
|
||||||
|
ac_add_options --enable-application=browser
|
||||||
|
|
||||||
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
#ac_add_options --enable-debug
|
||||||
|
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
#ac_add_options --disable-rust-simd
|
||||||
|
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
#ac_add_options --disable-optimize
|
||||||
|
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
ac_add_options --enable-update-channel=release
|
||||||
|
# theming bugs: ac_add_options --with-app-name=librewolf
|
||||||
|
# theming bugs: ac_add_options --with-app-basename=LibreWolf
|
||||||
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
|
# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49
|
||||||
|
export MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
|
# Features
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
ac_add_options --disable-default-browser-agent
|
||||||
|
|
||||||
|
# Disables crash reporting, telemetry and other data gathering tools
|
||||||
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
mk_add_options MOZ_DATA_REPORTING=0
|
||||||
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
|
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
|
|
||||||
|
# testing..
|
||||||
|
# MOZ_APP_NAME=librewolf
|
||||||
|
# This gives the same theming issue as --with-app-name=librewolf
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
||||||
|
script_exit(0)
|
||||||
1
common
Submodule
1
common
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1e529672fc81de6c15d584d41efa17880b28fea4
|
||||||
82
docker/Makefile
Normal file
82
docker/Makefile
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
all :
|
||||||
|
cp version librewolf
|
||||||
|
make debian10 debian11 fedora34 mint20 ubuntu20 windows
|
||||||
|
|
||||||
|
help :
|
||||||
|
@echo "Use: make all clean lw prune mozilla full"
|
||||||
|
@echo " make debian10 debian11 fedora34 mint20 ubuntu20"
|
||||||
|
@echo " make low-disk-full-build upload-logs"
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f librewolf/version release/version
|
||||||
|
make -C librewolf clean
|
||||||
|
make -C release clean
|
||||||
|
|
||||||
|
veryclean : clean
|
||||||
|
rm -f *.log
|
||||||
|
|
||||||
|
mozilla :
|
||||||
|
cp version release
|
||||||
|
make -C buildenv
|
||||||
|
make -C nightly
|
||||||
|
make -C release
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
debian10 :
|
||||||
|
script -O ubuntu20.build.env.log -c "time make -C buildenv/debian10"
|
||||||
|
cp version librewolf && cp version librewolf/debian10
|
||||||
|
script -O ubuntu20.build.app.log -c "time make -C librewolf/debian10"
|
||||||
|
|
||||||
|
debian11 :
|
||||||
|
script -O ubuntu20.build.env.log -c "time make -C buildenv/debian11"
|
||||||
|
cp version librewolf && cp version librewolf/debian11
|
||||||
|
script -O ubuntu20.build.app.log -c "time make -C librewolf/debian11"
|
||||||
|
|
||||||
|
fedora34 :
|
||||||
|
script -O ubuntu20.build.env.log -c "time make -C buildenv/fedora34"
|
||||||
|
cp version librewolf && cp version librewolf/fedora34
|
||||||
|
script -O ubuntu20.build.app.log -c "time make -C librewolf/fedora34"
|
||||||
|
|
||||||
|
mint20 :
|
||||||
|
script -O ubuntu20.build.env.log -c "time make -C buildenv/mint20"
|
||||||
|
cp version librewolf && cp version librewolf/mint20
|
||||||
|
script -O ubuntu20.build.app.log -c "time make -C librewolf/mint20"
|
||||||
|
|
||||||
|
ubuntu20 :
|
||||||
|
script -O ubuntu20.build.env.log -c "time make -C buildenv/ubuntu20"
|
||||||
|
cp version librewolf && cp version librewolf/ubuntu20
|
||||||
|
script -O ubuntu20.build.app.log -c "time make -C librewolf/ubuntu20"
|
||||||
|
|
||||||
|
windows :
|
||||||
|
script -O windows.build.env.log -c "time make -C buildenv/windows"
|
||||||
|
cp version librewolf && cp version librewolf/windows
|
||||||
|
script -O windows.build.app.log -c "time make -C librewolf/windows"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
low-disk-full-build :
|
||||||
|
cp version librewolf
|
||||||
|
|
||||||
|
make prune
|
||||||
|
make debian10
|
||||||
|
make prune
|
||||||
|
make debian11
|
||||||
|
make prune
|
||||||
|
make fedora34
|
||||||
|
make prune
|
||||||
|
make mint20
|
||||||
|
make prunt
|
||||||
|
make ubuntu20
|
||||||
|
make prune
|
||||||
|
make windows
|
||||||
|
make prune
|
||||||
|
|
||||||
|
upload-logs :
|
||||||
|
scp *.log vps:pub/pub/librewolf/buildlogs
|
||||||
|
|
||||||
|
prune :
|
||||||
|
sudo docker system prune --all --force
|
||||||
6
docker/buildenv/Makefile
Normal file
6
docker/buildenv/Makefile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
all :
|
||||||
|
make -C debian10
|
||||||
|
make -C debian11
|
||||||
|
make -C fedora34
|
||||||
|
make -C mint20
|
||||||
|
make -C ubuntu20
|
||||||
15
docker/buildenv/debian10/Dockerfile
Normal file
15
docker/buildenv/debian10/Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# This is Debian 10, codenamed buster.
|
||||||
|
|
||||||
|
FROM debian:buster
|
||||||
|
MAINTAINER Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV TZ=Europe/Amsterdam
|
||||||
|
RUN apt-get -y update && apt-get -y upgrade
|
||||||
|
|
||||||
|
# Install build dependencies..
|
||||||
|
run apt-get -y install wget python3 python3-pip python3-dev mercurial
|
||||||
|
|
||||||
|
# Fetch mozilla nightly..
|
||||||
|
run wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
run python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
run rm bootstrap.py
|
||||||
2
docker/buildenv/debian10/Makefile
Normal file
2
docker/buildenv/debian10/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/buildenv-debian10 .
|
||||||
15
docker/buildenv/debian11/Dockerfile
Normal file
15
docker/buildenv/debian11/Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# This is Debian 11, codenamed bullseye.
|
||||||
|
|
||||||
|
FROM debian:bullseye
|
||||||
|
MAINTAINER Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV TZ=Europe/Amsterdam
|
||||||
|
RUN apt-get -y update && apt-get -y upgrade
|
||||||
|
|
||||||
|
# Install build dependencies..
|
||||||
|
run apt-get -y install wget python3 python3-pip python3-dev mercurial
|
||||||
|
|
||||||
|
# Fetch mozilla nightly..
|
||||||
|
run wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
run python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
run rm bootstrap.py
|
||||||
2
docker/buildenv/debian11/Makefile
Normal file
2
docker/buildenv/debian11/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/buildenv-debian11 .
|
||||||
15
docker/buildenv/fedora34/Dockerfile
Normal file
15
docker/buildenv/fedora34/Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
FROM fedora:34
|
||||||
|
MAINTAINER Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
RUN dnf -y update
|
||||||
|
|
||||||
|
# locale stuff, see: https://superuser.com/questions/959380/how-do-i-install-generate-all-locales-on-fedora
|
||||||
|
RUN echo "%_install_langs C:en:en_US:en_US.UTF-8" > /etc/rpm/macros.image-language-conf
|
||||||
|
RUN dnf -y reinstall glibc-common
|
||||||
|
|
||||||
|
# Install build dependencies..
|
||||||
|
run dnf -y install wget python3 python3-pip python3-devel mercurial
|
||||||
|
|
||||||
|
# Fetch mozilla nightly..
|
||||||
|
run wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
run python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
run rm bootstrap.py
|
||||||
2
docker/buildenv/fedora34/Makefile
Normal file
2
docker/buildenv/fedora34/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/buildenv-fedora34 .
|
||||||
13
docker/buildenv/mint20/Dockerfile
Normal file
13
docker/buildenv/mint20/Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
FROM linuxmintd/mint20.2-amd64
|
||||||
|
MAINTAINER Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV TZ=Europe/Amsterdam
|
||||||
|
RUN apt-get -y update && apt-get -y upgrade
|
||||||
|
|
||||||
|
# Install build dependencies..
|
||||||
|
run apt-get -y install wget python3 python3-pip python3-dev mercurial
|
||||||
|
|
||||||
|
# Fetch mozilla nightly..
|
||||||
|
run wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
run python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
run rm bootstrap.py
|
||||||
2
docker/buildenv/mint20/Makefile
Normal file
2
docker/buildenv/mint20/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/buildenv-mint20 .
|
||||||
13
docker/buildenv/ubuntu20/Dockerfile
Normal file
13
docker/buildenv/ubuntu20/Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
MAINTAINER Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV TZ=Europe/Amsterdam
|
||||||
|
RUN apt-get -y update && apt-get -y upgrade
|
||||||
|
|
||||||
|
# Install build dependencies..
|
||||||
|
run apt-get -y install wget python3 python3-pip python3-dev mercurial
|
||||||
|
|
||||||
|
# Build mozilla nightly..
|
||||||
|
run wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
run python3 bootstrap.py --no-interactive --application-choice=browser
|
||||||
|
run rm bootstrap.py
|
||||||
2
docker/buildenv/ubuntu20/Makefile
Normal file
2
docker/buildenv/ubuntu20/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/buildenv-ubuntu20 .
|
||||||
56
docker/librewolf/Makefile
Normal file
56
docker/librewolf/Makefile
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
.phony : all clean
|
||||||
|
|
||||||
|
all :
|
||||||
|
|
||||||
|
cp ../version .
|
||||||
|
cp version debian10/version && cp version debian11/version && cp version fedora34/version && cp version ubuntu20/version && cp version mint20/version && cp version arch && cp version macos && cp version windows && cp version portable-linux
|
||||||
|
|
||||||
|
make -C arch
|
||||||
|
make -C macos
|
||||||
|
make -C windows
|
||||||
|
make -C portable-linux
|
||||||
|
|
||||||
|
make -C debian10
|
||||||
|
make -C debian11
|
||||||
|
make -C fedora34
|
||||||
|
make -C mint20
|
||||||
|
make -C ubuntu20
|
||||||
|
make -C windows
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f version debian10/version debian11/version fedora34/version ubuntu20/version mint20/version arch/version macos/version windows/version portable-linux/version
|
||||||
|
make -C portable-linux clean
|
||||||
|
make -C debian10 clean
|
||||||
|
make -C debian11 clean
|
||||||
|
make -C fedora34 clean
|
||||||
|
make -C mint20 clean
|
||||||
|
make -C ubuntu20 clean
|
||||||
|
make -C windows clean
|
||||||
|
|
||||||
|
build.debian10 :
|
||||||
|
cp version debian10
|
||||||
|
make -C debian10
|
||||||
|
build.debian11 :
|
||||||
|
cp version debian11
|
||||||
|
make -C debian11
|
||||||
|
build.fedora34 :
|
||||||
|
cm version fedora34
|
||||||
|
make -C fedora34
|
||||||
|
build.mint20 :
|
||||||
|
cp version mint20
|
||||||
|
make -C mint20
|
||||||
|
build.ubuntu :
|
||||||
|
cp version ubuntu20
|
||||||
|
make -C ubuntu20
|
||||||
|
|
||||||
|
|
||||||
|
build.arch :
|
||||||
|
cp version arch
|
||||||
|
make -C arch
|
||||||
|
build.macos :
|
||||||
|
cp version macos
|
||||||
|
make -C macos
|
||||||
|
build.windows :
|
||||||
|
cp version windows
|
||||||
|
make -C windows
|
||||||
|
|
||||||
5
docker/librewolf/arch/Makefile
Normal file
5
docker/librewolf/arch/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
@echo Todo...
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
@echo Todo...
|
||||||
1
docker/librewolf/debian10/.gitignore
vendored
Normal file
1
docker/librewolf/debian10/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
18
docker/librewolf/debian10/Dockerfile
Normal file
18
docker/librewolf/debian10/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from mozilla/buildenv-debian10
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run apt-get install -y git
|
||||||
|
run ## [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --version $(cat /version) build
|
||||||
|
run ./build.py --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --version $(cat /version) package
|
||||||
10
docker/librewolf/debian10/Makefile
Normal file
10
docker/librewolf/debian10/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t librewolf/release-debian10 .
|
||||||
|
make -C deb all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/release-debian10 .
|
||||||
|
make -C deb no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
make -C deb clean
|
||||||
8
docker/librewolf/debian10/deb/Dockerfile
Normal file
8
docker/librewolf/debian10/deb/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
from librewolf/release-debian10
|
||||||
|
run ./build.py --version $(cat /version) lw_artifacts
|
||||||
|
run mkdir /artifacts
|
||||||
|
run cp librewolf-$(cat /version).en-US.deb.zip /artifacts
|
||||||
|
workdir /
|
||||||
|
copy build-deb.sh /
|
||||||
|
run ./build-deb.sh
|
||||||
|
run rm -f artifacts/build_tag && date > artifacts/build_tag
|
||||||
35
docker/librewolf/debian10/deb/Makefile
Normal file
35
docker/librewolf/debian10/deb/Makefile
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
distro = debian10
|
||||||
|
extractor = extract10
|
||||||
|
docker_stage = deb-$(distro)
|
||||||
|
version = `cat ../version`
|
||||||
|
|
||||||
|
|
||||||
|
all : cache
|
||||||
|
|
||||||
|
cache :
|
||||||
|
sudo docker build -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
clean :
|
||||||
|
sudo rm -f build_tag artifacts/build_tag
|
||||||
|
|
||||||
|
get_zip : build_tag
|
||||||
|
|
||||||
|
build_tag : artifacts/build_tag
|
||||||
|
cp -v artifacts/build_tag build_tag
|
||||||
|
|
||||||
|
artifacts/build_tag :
|
||||||
|
sudo docker create --name $(extractor) librewolf/$(docker_stage)
|
||||||
|
sudo rm -rf artifacts
|
||||||
|
sudo docker cp $(extractor):/artifacts .
|
||||||
|
sudo docker rm $(extractor)
|
||||||
|
sudo mv -v artifacts/librewolf-$(version).en-US.deb.zip artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo mv -v artifacts/librewolf.deb artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
scp artifacts/*.deb vps:pub/pub/librewolf
|
||||||
|
|
||||||
40
docker/librewolf/debian10/deb/build-deb.sh
Executable file
40
docker/librewolf/debian10/deb/build-deb.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
||||||
|
version=$(cat /version)
|
||||||
|
|
||||||
|
mkdir -p librewolf/DEBIAN
|
||||||
|
cd librewolf/DEBIAN
|
||||||
|
|
||||||
|
# Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.28), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libdbus-1-3 (>= 1.9.14), libdbus-glib-1-2 (>= 0.78), libevent-2.1-6 (>= 2.1.8-stable), libffi6 (>= 3.0.4), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.3.5), libgcc1 (>= 1:4.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk-3-0 (>= 3.0.0), libpango-1.0-0 (>= 1.14.0), libstdc++6 (>= 6), libx11-6, libx11-xcb1, libxcb-shm0, libxcb1, libxcomposite1 (>= 1:0.3-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxrender1, zlib1g (>= 1:1.2.11.dfsg), fontconfig, procps, debianutils (>= 1.16)
|
||||||
|
# Recommends: libavcodec58 | libavcodec-extra58 | libavcodec57 | libavcodec-extra57 | libavcodec56 | libavcodec-extra56 | libavcodec55 | libavcodec-extra55 | libavcodec54 | libavcodec-extra54 | libavcodec53 | libavcodec-extra53
|
||||||
|
# Suggests: fonts-stix | otf-stix, fonts-lmodern, libgssapi-krb5-2 | libkrb53, libcanberra0, libgtk2.0-0, pulseaudio
|
||||||
|
|
||||||
|
cat <<EOF > control
|
||||||
|
Architecture: all
|
||||||
|
Build-Depends: inkscape, librsvg2-bin
|
||||||
|
Depends: libc6, libgcc1, libstdc++6, wget
|
||||||
|
Description: The Librewolf browser.
|
||||||
|
Download-Size: 56.0 MB
|
||||||
|
Essential: no
|
||||||
|
Installed-Size: 204 MB
|
||||||
|
Maintainer: Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
Package: librewolf
|
||||||
|
Priority: optional
|
||||||
|
Provides: gnome-www-browser, www-browser, x-www-browser
|
||||||
|
Section: web
|
||||||
|
Version: $version
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
mkdir -p usr/share/librewolf
|
||||||
|
unzip /artifacts/librewolf-*.zip
|
||||||
|
mv -v librewolf/* usr/share/librewolf
|
||||||
|
rmdir librewolf
|
||||||
|
|
||||||
|
mkdir -p usr/bin
|
||||||
|
cd usr/bin
|
||||||
|
ln -s ../share/librewolf/librewolf
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
dpkg-deb --build librewolf
|
||||||
|
cp *.deb artifacts
|
||||||
1
docker/librewolf/debian11/.gitignore
vendored
Normal file
1
docker/librewolf/debian11/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
18
docker/librewolf/debian11/Dockerfile
Normal file
18
docker/librewolf/debian11/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from mozilla/buildenv-debian11
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run apt-get install -y git
|
||||||
|
run ## [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --version $(cat /version) build
|
||||||
|
run ./build.py --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --version $(cat /version) package
|
||||||
10
docker/librewolf/debian11/Makefile
Normal file
10
docker/librewolf/debian11/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t librewolf/release-debian11 .
|
||||||
|
make -C deb all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/release-debian11 .
|
||||||
|
make -C deb no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
make -C deb clean
|
||||||
8
docker/librewolf/debian11/deb/Dockerfile
Normal file
8
docker/librewolf/debian11/deb/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
from librewolf/release-debian11
|
||||||
|
run ./build.py --version $(cat /version) lw_artifacts
|
||||||
|
run mkdir /artifacts
|
||||||
|
run cp librewolf-$(cat /version).en-US.deb.zip /artifacts
|
||||||
|
workdir /
|
||||||
|
copy build-deb.sh /
|
||||||
|
run ./build-deb.sh
|
||||||
|
run rm -f artifacts/build_tag && date > artifacts/build_tag
|
||||||
35
docker/librewolf/debian11/deb/Makefile
Normal file
35
docker/librewolf/debian11/deb/Makefile
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
distro = debian11
|
||||||
|
extractor = extract11
|
||||||
|
docker_stage = deb-$(distro)
|
||||||
|
version = `cat ../version`
|
||||||
|
|
||||||
|
|
||||||
|
all : cache
|
||||||
|
|
||||||
|
cache :
|
||||||
|
sudo docker build -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
clean :
|
||||||
|
sudo rm -f build_tag artifacts/build_tag
|
||||||
|
|
||||||
|
get_zip : build_tag
|
||||||
|
|
||||||
|
build_tag : artifacts/build_tag
|
||||||
|
cp -v artifacts/build_tag build_tag
|
||||||
|
|
||||||
|
artifacts/build_tag :
|
||||||
|
sudo docker create --name $(extractor) librewolf/$(docker_stage)
|
||||||
|
sudo rm -rf artifacts
|
||||||
|
sudo docker cp $(extractor):/artifacts .
|
||||||
|
sudo docker rm $(extractor)
|
||||||
|
sudo mv -v artifacts/librewolf-$(version).en-US.deb.zip artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo mv -v artifacts/librewolf.deb artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
scp artifacts/*.deb vps:pub/pub/librewolf
|
||||||
|
|
||||||
44
docker/librewolf/debian11/deb/build-deb.sh
Executable file
44
docker/librewolf/debian11/deb/build-deb.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
||||||
|
version=$(cat /version)
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p librewolf/DEBIAN
|
||||||
|
cd librewolf/DEBIAN
|
||||||
|
|
||||||
|
cat <<EOF > control
|
||||||
|
Architecture: all
|
||||||
|
Build-Depends: inkscape, librsvg2-bin
|
||||||
|
Depends: libc6, libgcc1, libstdc++6, wget
|
||||||
|
Description: The Librewolf browser.
|
||||||
|
Download-Size: 56.0 MB
|
||||||
|
Essential: no
|
||||||
|
Installed-Size: 204 MB
|
||||||
|
Maintainer: Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
Package: librewolf
|
||||||
|
Priority: optional
|
||||||
|
Provides: gnome-www-browser, www-browser, x-www-browser
|
||||||
|
Section: web
|
||||||
|
Version: $version
|
||||||
|
EOF
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Fill /usr/share/librewolf
|
||||||
|
mkdir -p usr/share/librewolf
|
||||||
|
unzip /artifacts/librewolf-*.zip
|
||||||
|
mv -v librewolf/* usr/share/librewolf
|
||||||
|
rmdir librewolf
|
||||||
|
|
||||||
|
# Symlink
|
||||||
|
mkdir -p usr/bin
|
||||||
|
cd usr/bin
|
||||||
|
ln -s ../share/librewolf/librewolf
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Application icon
|
||||||
|
mkdir -p usr/share/applications
|
||||||
|
mkdir -p usr/share/icons
|
||||||
|
cp -v usr/share/librewolf/browser/chrome/icons/default/default64.png usr/share/icons/librewolf.png
|
||||||
|
sed "s/MYDIR/\/usr\/share\/librewolf/g" < usr/share/librewolf/start-librewolf.desktop.in > usr/share/applications/librewolf.desktop
|
||||||
|
# Build .deb file
|
||||||
|
cd ..
|
||||||
|
dpkg-deb --build librewolf
|
||||||
|
cp *.deb artifacts
|
||||||
1
docker/librewolf/fedora34/.gitignore
vendored
Normal file
1
docker/librewolf/fedora34/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
19
docker/librewolf/fedora34/Dockerfile
Normal file
19
docker/librewolf/fedora34/Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
from mozilla/buildenv-fedora34
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run dnf -y install git
|
||||||
|
run ### [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --version $(cat /version) build
|
||||||
|
run ./build.py --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --version $(cat /version) package
|
||||||
|
|
||||||
10
docker/librewolf/fedora34/Makefile
Normal file
10
docker/librewolf/fedora34/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t librewolf/release-fedora34 .
|
||||||
|
make -C rpm all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/release-fedora34 .
|
||||||
|
make -C rpm no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
make -C rpm clean
|
||||||
14
docker/librewolf/fedora34/rpm/Dockerfile
Normal file
14
docker/librewolf/fedora34/rpm/Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
from librewolf/release-fedora34
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_artifacts
|
||||||
|
run mkdir /artifacts
|
||||||
|
run cp librewolf-$(cat /version).en-US.rpm.zip /artifacts
|
||||||
|
|
||||||
|
run sudo dnf -y install rpm-build
|
||||||
|
|
||||||
|
workdir /
|
||||||
|
copy build-rpm.sh .
|
||||||
|
copy librewolf.spec .
|
||||||
|
run ./build-rpm.sh
|
||||||
|
|
||||||
|
run rm -f /artifacts/build_tag && date > /artifacts/build_tag
|
||||||
36
docker/librewolf/fedora34/rpm/Makefile
Normal file
36
docker/librewolf/fedora34/rpm/Makefile
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
distro = fedora34
|
||||||
|
extractor = extract12
|
||||||
|
docker_stage = rpm-$(distro)
|
||||||
|
version = `cat ../version`
|
||||||
|
|
||||||
|
|
||||||
|
all : cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
sudo rm -f build_tag artifacts/build_tag
|
||||||
|
|
||||||
|
cache :
|
||||||
|
sudo docker build -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
dist : clean get_zip
|
||||||
|
|
||||||
|
get_zip : build_tag
|
||||||
|
|
||||||
|
build_tag : artifacts/build_tag
|
||||||
|
cp -v artifacts/build_tag build_tag
|
||||||
|
|
||||||
|
artifacts/build_tag :
|
||||||
|
sudo docker create --name $(extractor) librewolf/$(docker_stage)
|
||||||
|
sudo rm -rf artifacts
|
||||||
|
sudo docker cp $(extractor):/artifacts .
|
||||||
|
sudo docker rm $(extractor)
|
||||||
|
sudo mv -v artifacts/librewolf-$(version).en-US.rpm.zip artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version)*.rpm
|
||||||
|
scp artifacts/librewolf-$(version)*.rpm vps:pub/pub/librewolf
|
||||||
|
|
||||||
63
docker/librewolf/fedora34/rpm/build-rpm.sh
Executable file
63
docker/librewolf/fedora34/rpm/build-rpm.sh
Executable file
|
|
@ -0,0 +1,63 @@
|
||||||
|
rm -rf /WORK
|
||||||
|
mkdir /WORK
|
||||||
|
cd /WORK
|
||||||
|
|
||||||
|
version=$(cat ../version)
|
||||||
|
|
||||||
|
echo '---'
|
||||||
|
echo "--- LibreWolf version file is: $version"
|
||||||
|
echo '---'
|
||||||
|
echo '--- Contents of /artifacts folder:'
|
||||||
|
ls -la /artifacts
|
||||||
|
echo '---'
|
||||||
|
echo '--- Contents of /WORK folder:'
|
||||||
|
ls -la /WORK
|
||||||
|
echo '---'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rm -rf rpmbuild
|
||||||
|
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||||
|
|
||||||
|
sed "s/__VERSION__/$version/g" < /librewolf.spec > rpmbuild/SPECS/librewolf.spec
|
||||||
|
|
||||||
|
cp -v /artifacts/librewolf-$version.en-US.rpm.zip rpmbuild/SOURCES/librewolf.zip
|
||||||
|
cd rpmbuild/SOURCES
|
||||||
|
|
||||||
|
unzip librewolf.zip
|
||||||
|
rm librewolf.zip
|
||||||
|
|
||||||
|
mkdir -p librewolf-$version/usr/share/librewolf
|
||||||
|
mkdir -p librewolf-$version/usr/bin
|
||||||
|
|
||||||
|
mv -v librewolf/* librewolf-$version/usr/share/librewolf
|
||||||
|
rmdir librewolf
|
||||||
|
cd librewolf-$version/usr/bin
|
||||||
|
ln -s ../share/librewolf/librewolf
|
||||||
|
cd ../../..
|
||||||
|
|
||||||
|
# Application icon
|
||||||
|
mkdir -p librewolf-$version/usr/share/applications
|
||||||
|
mkdir -p librewolf-$version/usr/share/icons
|
||||||
|
cp -v librewolf-$version/usr/share/librewolf/browser/chrome/icons/default/default64.png librewolf-$version/usr/share/icons/librewolf.png
|
||||||
|
sed "s/MYDIR/\/usr\/share\/librewolf/g" < librewolf-$version/usr/share/librewolf/start-librewolf.desktop.in > librewolf-$version/usr/share/applications/librewolf.desktop
|
||||||
|
|
||||||
|
|
||||||
|
tar cvfz lw.tar.gz librewolf-$version
|
||||||
|
# todo perhaps: rm -rf librwolf-$version
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
rm -rf $HOME/rpmbuild
|
||||||
|
cp -rv rpmbuild $HOME
|
||||||
|
|
||||||
|
# Build the package!
|
||||||
|
echo '---'
|
||||||
|
echo "[debug] Running rpmbuild.."
|
||||||
|
echo '---'
|
||||||
|
|
||||||
|
rpmbuild -v -ba $(pwd)/rpmbuild/SPECS/librewolf.spec
|
||||||
|
echo '--- [debug] Copying output files to /artifacts'
|
||||||
|
cp -v ~/rpmbuild/RPMS/x86_64/librewolf-*.rpm /artifacts
|
||||||
|
cp -v ~/rpmbuild/SRPMS/librewolf-*.rpm /artifacts
|
||||||
68
docker/librewolf/fedora34/rpm/librewolf.spec
Normal file
68
docker/librewolf/fedora34/rpm/librewolf.spec
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
Name: librewolf
|
||||||
|
Version: __VERSION__
|
||||||
|
Release: 1%{?dist}
|
||||||
|
BuildArch: x86_64
|
||||||
|
Summary: The LibreWolf browser
|
||||||
|
License: MPL
|
||||||
|
URL: https://librewolf-community.gitlab.io/
|
||||||
|
Source0: lw.tar.gz
|
||||||
|
#BuildRequires:
|
||||||
|
#Requires:
|
||||||
|
%description
|
||||||
|
The LibreWolf browser for privacy, with uBlock and tweaked settings.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p "$RPM_BUILD_ROOT"
|
||||||
|
cp -rv * "$RPM_BUILD_ROOT"
|
||||||
|
|
||||||
|
%files
|
||||||
|
/usr/share/librewolf/application.ini
|
||||||
|
/usr/share/librewolf/browser/chrome/icons/default/default128.png
|
||||||
|
/usr/share/librewolf/browser/chrome/icons/default/default16.png
|
||||||
|
/usr/share/librewolf/browser/chrome/icons/default/default32.png
|
||||||
|
/usr/share/librewolf/browser/chrome/icons/default/default48.png
|
||||||
|
/usr/share/librewolf/browser/chrome/icons/default/default64.png
|
||||||
|
/usr/share/librewolf/browser/features/formautofill@mozilla.org.xpi
|
||||||
|
/usr/share/librewolf/browser/features/pictureinpicture@mozilla.org.xpi
|
||||||
|
/usr/share/librewolf/browser/features/screenshots@mozilla.org.xpi
|
||||||
|
/usr/share/librewolf/browser/omni.ja
|
||||||
|
/usr/share/librewolf/defaults/pref/channel-prefs.js
|
||||||
|
/usr/share/librewolf/dependentlibs.list
|
||||||
|
/usr/share/librewolf/distribution/policies.json
|
||||||
|
/usr/share/librewolf/fonts/TwemojiMozilla.ttf
|
||||||
|
/usr/share/librewolf/gmp-clearkey/0.1/libclearkey.so
|
||||||
|
/usr/share/librewolf/gmp-clearkey/0.1/manifest.json
|
||||||
|
/usr/share/librewolf/libfreeblpriv3.so
|
||||||
|
/usr/share/librewolf/liblgpllibs.so
|
||||||
|
/usr/share/librewolf/libmozavcodec.so
|
||||||
|
/usr/share/librewolf/libmozavutil.so
|
||||||
|
/usr/share/librewolf/libmozgtk.so
|
||||||
|
/usr/share/librewolf/libmozsandbox.so
|
||||||
|
/usr/share/librewolf/libmozsqlite3.so
|
||||||
|
/usr/share/librewolf/libmozwayland.so
|
||||||
|
/usr/share/librewolf/libnspr4.so
|
||||||
|
/usr/share/librewolf/libnss3.so
|
||||||
|
/usr/share/librewolf/libnssckbi.so
|
||||||
|
/usr/share/librewolf/libnssutil3.so
|
||||||
|
/usr/share/librewolf/libplc4.so
|
||||||
|
/usr/share/librewolf/libplds4.so
|
||||||
|
/usr/share/librewolf/librewolf
|
||||||
|
/usr/share/librewolf/librewolf-bin
|
||||||
|
/usr/share/librewolf/librewolf.cfg
|
||||||
|
/usr/share/librewolf/librewolf.ico
|
||||||
|
/usr/share/librewolf/libsmime3.so
|
||||||
|
/usr/share/librewolf/libsoftokn3.so
|
||||||
|
/usr/share/librewolf/libssl3.so
|
||||||
|
/usr/share/librewolf/libxul.so
|
||||||
|
/usr/share/librewolf/omni.ja
|
||||||
|
/usr/share/librewolf/platform.ini
|
||||||
|
/usr/share/librewolf/plugin-container
|
||||||
|
/usr/share/librewolf/register-librewolf
|
||||||
|
/usr/share/librewolf/start-librewolf
|
||||||
|
/usr/share/librewolf/start-librewolf.desktop.in
|
||||||
|
/usr/bin/librewolf
|
||||||
|
/usr/share/applications/librewolf.desktop
|
||||||
|
/usr/share/icons/librewolf.png
|
||||||
5
docker/librewolf/macos/Makefile
Normal file
5
docker/librewolf/macos/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
@echo Todo...
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
@echo Todo...
|
||||||
1
docker/librewolf/mint20/.gitignore
vendored
Normal file
1
docker/librewolf/mint20/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
18
docker/librewolf/mint20/Dockerfile
Normal file
18
docker/librewolf/mint20/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from mozilla/buildenv-mint20
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run apt-get install -y git
|
||||||
|
run ## [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --version $(cat /version) build
|
||||||
|
run ./build.py --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --version $(cat /version) package
|
||||||
10
docker/librewolf/mint20/Makefile
Normal file
10
docker/librewolf/mint20/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t librewolf/release-mint20 .
|
||||||
|
make -C deb all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/release-mint20 .
|
||||||
|
make -C deb no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
make -C deb clean
|
||||||
8
docker/librewolf/mint20/deb/Dockerfile
Normal file
8
docker/librewolf/mint20/deb/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
from librewolf/release-mint20
|
||||||
|
run ./build.py --version $(cat /version) lw_artifacts
|
||||||
|
run mkdir /artifacts
|
||||||
|
run cp librewolf-$(cat /version).en-US.deb.zip /artifacts
|
||||||
|
workdir /
|
||||||
|
copy build-deb.sh /
|
||||||
|
run ./build-deb.sh
|
||||||
|
run rm -f artifacts/build_tag && date > artifacts/build_tag
|
||||||
35
docker/librewolf/mint20/deb/Makefile
Normal file
35
docker/librewolf/mint20/deb/Makefile
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
distro = mint20
|
||||||
|
extractor = extract7
|
||||||
|
docker_stage = deb-$(distro)
|
||||||
|
version = `cat ../version`
|
||||||
|
|
||||||
|
|
||||||
|
all : cache
|
||||||
|
|
||||||
|
cache :
|
||||||
|
sudo docker build -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
clean :
|
||||||
|
sudo rm -f build_tag artifacts/build_tag
|
||||||
|
|
||||||
|
get_zip : build_tag
|
||||||
|
|
||||||
|
build_tag : artifacts/build_tag
|
||||||
|
cp -v artifacts/build_tag build_tag
|
||||||
|
|
||||||
|
artifacts/build_tag :
|
||||||
|
sudo docker create --name $(extractor) librewolf/$(docker_stage)
|
||||||
|
sudo rm -rf artifacts
|
||||||
|
sudo docker cp $(extractor):/artifacts .
|
||||||
|
sudo docker rm $(extractor)
|
||||||
|
sudo mv -v artifacts/librewolf-$(version).en-US.deb.zip artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo mv -v artifacts/librewolf.deb artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
scp artifacts/*.deb vps:pub/pub/librewolf
|
||||||
|
|
||||||
44
docker/librewolf/mint20/deb/build-deb.sh
Executable file
44
docker/librewolf/mint20/deb/build-deb.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
||||||
|
version=$(cat /version)
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p librewolf/DEBIAN
|
||||||
|
cd librewolf/DEBIAN
|
||||||
|
|
||||||
|
cat <<EOF > control
|
||||||
|
Architecture: all
|
||||||
|
Build-Depends: inkscape, librsvg2-bin
|
||||||
|
Depends: libc6, libgcc1, libstdc++6, wget
|
||||||
|
Description: The Librewolf browser.
|
||||||
|
Download-Size: 56.0 MB
|
||||||
|
Essential: no
|
||||||
|
Installed-Size: 204 MB
|
||||||
|
Maintainer: Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
Package: librewolf
|
||||||
|
Priority: optional
|
||||||
|
Provides: gnome-www-browser, www-browser, x-www-browser
|
||||||
|
Section: web
|
||||||
|
Version: $version
|
||||||
|
EOF
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Fill /usr/share/librewolf
|
||||||
|
mkdir -p usr/share/librewolf
|
||||||
|
unzip /artifacts/librewolf-*.zip
|
||||||
|
mv -v librewolf/* usr/share/librewolf
|
||||||
|
rmdir librewolf
|
||||||
|
|
||||||
|
# Symlink
|
||||||
|
mkdir -p usr/bin
|
||||||
|
cd usr/bin
|
||||||
|
ln -s ../share/librewolf/librewolf
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Application icon
|
||||||
|
mkdir -p usr/share/applications
|
||||||
|
mkdir -p usr/share/icons
|
||||||
|
cp -v usr/share/librewolf/browser/chrome/icons/default/default64.png usr/share/icons/librewolf.png
|
||||||
|
sed "s/MYDIR/\/usr\/share\/librewolf/g" < usr/share/librewolf/start-librewolf.desktop.in > usr/share/applications/librewolf.desktop
|
||||||
|
# Build .deb file
|
||||||
|
cd ..
|
||||||
|
dpkg-deb --build librewolf
|
||||||
|
cp *.deb artifacts
|
||||||
20
docker/librewolf/portable-linux/Makefile
Normal file
20
docker/librewolf/portable-linux/Makefile
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
.phony : all clean debian fedora mint ubuntu arch macos windows
|
||||||
|
|
||||||
|
all :
|
||||||
|
|
||||||
|
cp version appimage/version && cp version flatpak/version && cp version snapd/version
|
||||||
|
|
||||||
|
make -C appimage
|
||||||
|
make -C flatpak
|
||||||
|
make -C snapd
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f version appimage/version flatpak/version snapd/version
|
||||||
|
|
||||||
|
|
||||||
|
build.appimage :
|
||||||
|
make -C appimage
|
||||||
|
build.flatpak :
|
||||||
|
make -C flatpak
|
||||||
|
build.snapd :
|
||||||
|
make -C snapd
|
||||||
5
docker/librewolf/portable-linux/appimage/Makefile
Normal file
5
docker/librewolf/portable-linux/appimage/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
@echo Todo...
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
@echo Todo...
|
||||||
5
docker/librewolf/portable-linux/flatpak/Makefile
Normal file
5
docker/librewolf/portable-linux/flatpak/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
@echo Todo...
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
@echo Todo...
|
||||||
5
docker/librewolf/portable-linux/snapd/Makefile
Normal file
5
docker/librewolf/portable-linux/snapd/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
@echo Todo...
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
@echo Todo...
|
||||||
1
docker/librewolf/ubuntu20/.gitignore
vendored
Normal file
1
docker/librewolf/ubuntu20/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
18
docker/librewolf/ubuntu20/Dockerfile
Normal file
18
docker/librewolf/ubuntu20/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from mozilla/buildenv-ubuntu20
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run apt-get install -y git
|
||||||
|
run ## [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --version $(cat /version) build
|
||||||
|
run ./build.py --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --version $(cat /version) package
|
||||||
10
docker/librewolf/ubuntu20/Makefile
Normal file
10
docker/librewolf/ubuntu20/Makefile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t librewolf/release-ubuntu20 .
|
||||||
|
make -C deb all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/release-ubuntu20 .
|
||||||
|
make -C deb no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
make -C deb clean
|
||||||
8
docker/librewolf/ubuntu20/deb/Dockerfile
Normal file
8
docker/librewolf/ubuntu20/deb/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
from librewolf/release-ubuntu20
|
||||||
|
run ./build.py --version $(cat /version) lw_artifacts
|
||||||
|
run mkdir /artifacts
|
||||||
|
run cp librewolf-$(cat /version).en-US.deb.zip /artifacts
|
||||||
|
workdir /
|
||||||
|
copy build-deb.sh /
|
||||||
|
run ./build-deb.sh
|
||||||
|
run rm -f artifacts/build_tag && date > artifacts/build_tag
|
||||||
36
docker/librewolf/ubuntu20/deb/Makefile
Normal file
36
docker/librewolf/ubuntu20/deb/Makefile
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
distro = ubuntu20
|
||||||
|
extractor = extract4
|
||||||
|
docker_stage = deb-$(distro)
|
||||||
|
version = `cat ../version`
|
||||||
|
|
||||||
|
|
||||||
|
all : cache
|
||||||
|
|
||||||
|
cache :
|
||||||
|
sudo docker build -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
sudo docker build --no-cache -t librewolf/$(docker_stage) .
|
||||||
|
make get_zip
|
||||||
|
|
||||||
|
clean :
|
||||||
|
sudo rm -f build_tag artifacts/build_tag
|
||||||
|
|
||||||
|
|
||||||
|
get_zip : build_tag
|
||||||
|
|
||||||
|
build_tag : artifacts/build_tag
|
||||||
|
cp -v artifacts/build_tag build_tag
|
||||||
|
|
||||||
|
artifacts/build_tag :
|
||||||
|
sudo docker create --name $(extractor) librewolf/$(docker_stage)
|
||||||
|
sudo rm -rf artifacts
|
||||||
|
sudo docker cp $(extractor):/artifacts .
|
||||||
|
sudo docker rm $(extractor)
|
||||||
|
sudo mv -v artifacts/librewolf-$(version).en-US.deb.zip artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo mv -v artifacts/librewolf.deb artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).zip
|
||||||
|
sudo chown user:user artifacts/librewolf-$(version).en-US.$(distro).deb
|
||||||
|
scp artifacts/*.deb vps:pub/pub/librewolf
|
||||||
|
|
||||||
44
docker/librewolf/ubuntu20/deb/build-deb.sh
Executable file
44
docker/librewolf/ubuntu20/deb/build-deb.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
||||||
|
version=$(cat /version)
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p librewolf/DEBIAN
|
||||||
|
cd librewolf/DEBIAN
|
||||||
|
|
||||||
|
cat <<EOF > control
|
||||||
|
Architecture: all
|
||||||
|
Build-Depends: inkscape, librsvg2-bin
|
||||||
|
Depends: libc6, libgcc1, libstdc++6, wget
|
||||||
|
Description: The Librewolf browser.
|
||||||
|
Download-Size: 56.0 MB
|
||||||
|
Essential: no
|
||||||
|
Installed-Size: 204 MB
|
||||||
|
Maintainer: Bert van der Weerd <bert@stanzabird.nl>
|
||||||
|
Package: librewolf
|
||||||
|
Priority: optional
|
||||||
|
Provides: gnome-www-browser, www-browser, x-www-browser
|
||||||
|
Section: web
|
||||||
|
Version: $version
|
||||||
|
EOF
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Fill /usr/share/librewolf
|
||||||
|
mkdir -p usr/share/librewolf
|
||||||
|
unzip /artifacts/librewolf-*.zip
|
||||||
|
mv -v librewolf/* usr/share/librewolf
|
||||||
|
rmdir librewolf
|
||||||
|
|
||||||
|
# Symlink
|
||||||
|
mkdir -p usr/bin
|
||||||
|
cd usr/bin
|
||||||
|
ln -s ../share/librewolf/librewolf
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Application icon
|
||||||
|
mkdir -p usr/share/applications
|
||||||
|
mkdir -p usr/share/icons
|
||||||
|
cp -v usr/share/librewolf/browser/chrome/icons/default/default64.png usr/share/icons/librewolf.png
|
||||||
|
sed "s/MYDIR/\/usr\/share\/librewolf/g" < usr/share/librewolf/start-librewolf.desktop.in > usr/share/applications/librewolf.desktop
|
||||||
|
# Build .deb file
|
||||||
|
cd ..
|
||||||
|
dpkg-deb --build librewolf
|
||||||
|
cp *.deb artifacts
|
||||||
18
docker/librewolf/windows/Dockerfile
Normal file
18
docker/librewolf/windows/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from mozilla/buildenv-debian11
|
||||||
|
run rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
# dependencies, tools, distro build tools,...
|
||||||
|
run apt-get install -y git
|
||||||
|
run ## [build trigger] (add or remove a few hashes in front to trigger build from here)
|
||||||
|
run git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||||
|
workdir windows
|
||||||
|
run tar xf /firefox-$(cat /version).source.tar.xz
|
||||||
|
|
||||||
|
run ./build.py --cross --version $(cat /version) lw_do_patches
|
||||||
|
run ./build.py --cross --version $(cat /version) build
|
||||||
|
run ./build.py --cross --version $(cat /version) lw_post_build
|
||||||
|
run ./build.py --cross --version $(cat /version) package
|
||||||
13
docker/librewolf/windows/Makefile
Normal file
13
docker/librewolf/windows/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
all :
|
||||||
|
cp ../version .
|
||||||
|
sudo docker build -t librewolf/release-windows .
|
||||||
|
# make -C deb all
|
||||||
|
|
||||||
|
no-cache :
|
||||||
|
cp ../version .
|
||||||
|
sudo docker build --no-cache -t librewolf/release-windows .
|
||||||
|
# make -C deb no-cache
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f version
|
||||||
|
# make -C deb clean
|
||||||
8
docker/nightly/Dockerfile.apiserver
Normal file
8
docker/nightly/Dockerfile.apiserver
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
RUN dnf -y install g++ gcc make automake autoconf libtool libcurl-devel
|
||||||
|
COPY apiserver-0.1.1.tar.gz /
|
||||||
|
WORKDIR /
|
||||||
|
RUN tar xvf apiserver-0.1.1.tar.gz
|
||||||
|
WORKDIR apiserver-0.1.1
|
||||||
|
RUN zsh ./configure --prefix=/usr --disable-dependency-tracking
|
||||||
|
RUN ["make", "install"]
|
||||||
|
RUN ["make", "dist"]
|
||||||
5
docker/nightly/Makefile
Normal file
5
docker/nightly/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
all :
|
||||||
|
make -C debian
|
||||||
|
make -C fedora
|
||||||
|
make -C ubuntu
|
||||||
|
make -C mint
|
||||||
7
docker/nightly/debian/Dockerfile
Normal file
7
docker/nightly/debian/Dockerfile
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM mozilla/buildenv-debian
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
workdir mozilla-unified
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
|
|
||||||
2
docker/nightly/debian/Makefile
Normal file
2
docker/nightly/debian/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/nightly-debian .
|
||||||
6
docker/nightly/fedora/Dockerfile
Normal file
6
docker/nightly/fedora/Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM mozilla/buildenv-fedora
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
workdir mozilla-unified
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/nightly/fedora/Makefile
Normal file
2
docker/nightly/fedora/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/nightly-fedora .
|
||||||
6
docker/nightly/mint/Dockerfile
Normal file
6
docker/nightly/mint/Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM mozilla/buildenv-mint
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
workdir mozilla-unified
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/nightly/mint/Makefile
Normal file
2
docker/nightly/mint/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/nightly-mint .
|
||||||
6
docker/nightly/ubuntu/Dockerfile
Normal file
6
docker/nightly/ubuntu/Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM mozilla/buildenv-ubuntu
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
workdir mozilla-unified
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/nightly/ubuntu/Makefile
Normal file
2
docker/nightly/ubuntu/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/nightly-ubuntu .
|
||||||
13
docker/release/Makefile
Normal file
13
docker/release/Makefile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
all :
|
||||||
|
|
||||||
|
cp version debian/version && cp version fedora/version && cp version ubuntu/version && cp version mint/version
|
||||||
|
|
||||||
|
make -C debian
|
||||||
|
make -C fedora
|
||||||
|
make -C ubuntu
|
||||||
|
make -C mint
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f version debian/version fedora/version ubuntu/version mint/version
|
||||||
1
docker/release/debian/.gitignore
vendored
Normal file
1
docker/release/debian/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
4
docker/release/debian/Dockerfile
Normal file
4
docker/release/debian/Dockerfile
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
from librewolf/fetched-image
|
||||||
|
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/release/debian/Makefile
Normal file
2
docker/release/debian/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/release-debian .
|
||||||
1
docker/release/fedora/.gitignore
vendored
Normal file
1
docker/release/fedora/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
14
docker/release/fedora/Dockerfile
Normal file
14
docker/release/fedora/Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM mozilla/buildenv-fedora
|
||||||
|
RUN rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
run tar xf firefox-$(cat /version).source.tar.xz
|
||||||
|
run ln -s firefox-$(cat /version) work
|
||||||
|
|
||||||
|
workdir work
|
||||||
|
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/release/fedora/Makefile
Normal file
2
docker/release/fedora/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/release-fedora .
|
||||||
1
docker/release/mint/.gitignore
vendored
Normal file
1
docker/release/mint/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
14
docker/release/mint/Dockerfile
Normal file
14
docker/release/mint/Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM mozilla/buildenv-mint
|
||||||
|
RUN rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
run tar xf firefox-$(cat /version).source.tar.xz
|
||||||
|
run ln -s firefox-$(cat /version) work
|
||||||
|
|
||||||
|
workdir work
|
||||||
|
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/release/mint/Makefile
Normal file
2
docker/release/mint/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/release-mint .
|
||||||
1
docker/release/ubuntu/.gitignore
vendored
Normal file
1
docker/release/ubuntu/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
version
|
||||||
14
docker/release/ubuntu/Dockerfile
Normal file
14
docker/release/ubuntu/Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM mozilla/buildenv-ubuntu
|
||||||
|
RUN rm -rf mozilla-unified
|
||||||
|
|
||||||
|
# Build it..
|
||||||
|
copy version /
|
||||||
|
|
||||||
|
run wget -q https://archive.mozilla.org/pub/firefox/releases/$(cat /version)/source/firefox-$(cat /version).source.tar.xz
|
||||||
|
run tar xf firefox-$(cat /version).source.tar.xz
|
||||||
|
run ln -s firefox-$(cat /version) work
|
||||||
|
|
||||||
|
workdir work
|
||||||
|
|
||||||
|
run ./mach build
|
||||||
|
run ./mach package
|
||||||
2
docker/release/ubuntu/Makefile
Normal file
2
docker/release/ubuntu/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
all :
|
||||||
|
sudo docker build -t mozilla/release-ubuntu .
|
||||||
1
docker/version
Normal file
1
docker/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
94.0.1
|
||||||
137
files/attic/artifacts_all.sh
Normal file
137
files/attic/artifacts_all.sh
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
function artifacts_win_details() {
|
||||||
|
|
||||||
|
exe=.exe
|
||||||
|
objdir=obj-x86_64-pc-mingw32/dist/firefox
|
||||||
|
ospkg=win64
|
||||||
|
|
||||||
|
# sanity checks
|
||||||
|
if [ ! -d $objdir ]; then
|
||||||
|
echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ../firefox ../librewolf
|
||||||
|
cp -r $objdir ..
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
|
||||||
|
mv firefox librewolf
|
||||||
|
# apply the LibreWolf settings
|
||||||
|
cp -rv settings/* librewolf
|
||||||
|
# rename the executable manually
|
||||||
|
pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
|
||||||
|
# clean garbage files
|
||||||
|
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files uninstall ; cd ..
|
||||||
|
# copy the windows icon
|
||||||
|
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
||||||
|
|
||||||
|
# create the final zip/exe artifacts
|
||||||
|
|
||||||
|
rm -f librewolf-$pkgver.en-US.$ospkg.zip
|
||||||
|
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# now to try to make the installer
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-setup.exe tmp.nsi
|
||||||
|
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
|
||||||
|
makensis-3.01.exe -V1 tmp.nsi
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function artifacts_deb_details() {
|
||||||
|
|
||||||
|
exe=
|
||||||
|
objdir=obj-x86_64-pc-linux-gnu/dist/firefox
|
||||||
|
ospkg=deb
|
||||||
|
|
||||||
|
# sanity checks
|
||||||
|
if [ ! -d $objdir ]; then
|
||||||
|
echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ../firefox ../librewolf
|
||||||
|
cp -r $objdir ..
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
|
||||||
|
mv firefox librewolf
|
||||||
|
# apply the LibreWolf settings
|
||||||
|
cp -rv settings/* librewolf
|
||||||
|
# rename the executable manually
|
||||||
|
pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
|
||||||
|
# clean garbage files
|
||||||
|
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files uninstall ; cd ..
|
||||||
|
# copy the windows icon
|
||||||
|
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
||||||
|
|
||||||
|
# create the final zip artifact
|
||||||
|
rm -f librewolf-$pkgver.en-US.$ospkg.zip
|
||||||
|
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# now to try to make the installer
|
||||||
|
# (create a .deb here)
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function artifacts_rpm_details(){
|
||||||
|
exe=
|
||||||
|
objdir=obj-x86_64-pc-linux-gnu/dist/firefox
|
||||||
|
ospkg=rpm
|
||||||
|
|
||||||
|
# sanity checks
|
||||||
|
if [ ! -d $objdir ]; then
|
||||||
|
echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ../firefox ../librewolf
|
||||||
|
cp -r $objdir ..
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
|
||||||
|
mv firefox librewolf
|
||||||
|
# apply the LibreWolf settings
|
||||||
|
cp -rv settings/* librewolf
|
||||||
|
# rename the executable manually
|
||||||
|
pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
|
||||||
|
# clean garbage files
|
||||||
|
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd ..
|
||||||
|
|
||||||
|
# linux: copy app icon stuff
|
||||||
|
cp files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf
|
||||||
|
|
||||||
|
# create the final zip artifact
|
||||||
|
rm -f librewolf-$pkgver.en-US.$ospkg.zip
|
||||||
|
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# now to try to make the installer
|
||||||
|
# (create a .rpm here)
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
600
files/attic/build.sh
Executable file
600
files/attic/build.sh
Executable file
|
|
@ -0,0 +1,600 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# build.sh - build librewolf on windows
|
||||||
|
# derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD
|
||||||
|
#
|
||||||
|
# This script is set up like a Makefile, it's a list of functions that perform a
|
||||||
|
# certain sub-task, that function can be called as a commandline argument to the script.
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ./version.sh
|
||||||
|
|
||||||
|
srcdir=firefox-$pkgver
|
||||||
|
|
||||||
|
#
|
||||||
|
# Basic functionality
|
||||||
|
#
|
||||||
|
|
||||||
|
fetch() {
|
||||||
|
echo "fetch: begin."
|
||||||
|
|
||||||
|
# fetch the firefox source.
|
||||||
|
rm -f 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
|
||||||
|
|
||||||
|
echo "fetch: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extract() {
|
||||||
|
echo "extract: begin."
|
||||||
|
|
||||||
|
echo "Deleting previous firefox-$pkgver ..."
|
||||||
|
rm -rf firefox-$pkgver
|
||||||
|
|
||||||
|
echo "Extracting firefox-$pkgver.source.tar.xz ..."
|
||||||
|
tar xf firefox-$pkgver.source.tar.xz
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
|
|
||||||
|
echo "extract: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
. ./mozconfigs.sh
|
||||||
|
|
||||||
|
do_patches() {
|
||||||
|
echo "do_patches: begin. (srcdir=$srcdir)"
|
||||||
|
|
||||||
|
if [ "$srcdir" == "tor-browser" ]; then
|
||||||
|
echo "do_patches: warning: not running do_patches on tor-browser. done."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
echo 'Creating mozconfig...'
|
||||||
|
|
||||||
|
if [ "$mozconfig_mode" == "xcompile" ]; then
|
||||||
|
create_mozconfig_xcompile
|
||||||
|
cp -v ../mozconfig .
|
||||||
|
elif [ "$strict" == "strict" ]; then
|
||||||
|
create_mozconfig_strict
|
||||||
|
cp -v ../mozconfig .
|
||||||
|
elif [ "$android" == "android" ]; then
|
||||||
|
create_mozconfig_android
|
||||||
|
cp -v ../mozconfig .
|
||||||
|
else
|
||||||
|
create_mozconfig_default
|
||||||
|
cp -v ../mozconfig .
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo 'Copy librewolf branding files...'
|
||||||
|
|
||||||
|
cp -vr ../common/source_files/* ./
|
||||||
|
# new branding stuff
|
||||||
|
cp -v ../files/configure.sh browser/branding/librewolf
|
||||||
|
|
||||||
|
echo 'Applying patches...'
|
||||||
|
|
||||||
|
echo "patch -p1 -i ../common/patches/nightly/context-menu2.patch"
|
||||||
|
patch -p1 -i ../common/patches/nightly/context-menu2.patch
|
||||||
|
echo "patch -p1 -i ../common/patches/remove_addons.patch"
|
||||||
|
patch -p1 -i ../common/patches/remove_addons.patch
|
||||||
|
echo 'patch -p1 -i ../common/patches/nightly/megabar2.patch'
|
||||||
|
patch -p1 -i ../common/patches/nightly/megabar3.patch
|
||||||
|
echo "patch -p1 -i ../patches/mozilla-vpn-ad-proton.patch"
|
||||||
|
patch -p1 -i ../patches/mozilla-vpn-ad-proton.patch
|
||||||
|
|
||||||
|
echo 'GNU sed patches...'
|
||||||
|
|
||||||
|
echo 'patch -p1 -i ../common/patches/sed-patches/allow-searchengines-non-esr.patch'
|
||||||
|
patch -p1 -i ../common/patches/sed-patches/allow-searchengines-non-esr.patch
|
||||||
|
echo 'patch -p1 -i ../common/patches/sed-patches/disable-pocket.patch'
|
||||||
|
patch -p1 -i ../common/patches/sed-patches/disable-pocket.patch
|
||||||
|
echo 'patch -p1 -i ../common/patches/sed-patches/remove-internal-plugin-certs.patch'
|
||||||
|
patch -p1 -i ../common/patches/sed-patches/remove-internal-plugin-certs.patch
|
||||||
|
echo 'patch -p1 -i ../common/patches/sed-patches/stop-undesired-requests.patch'
|
||||||
|
patch -p1 -i ../common/patches/sed-patches/stop-undesired-requests.patch
|
||||||
|
|
||||||
|
echo 'Local patches...'
|
||||||
|
|
||||||
|
# local win10 patches
|
||||||
|
echo 'patch -p1 -i ../patches/browser-confvars.patch'
|
||||||
|
patch -p1 -i ../patches/browser-confvars.patch # not sure about this one yet!
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "do_patches: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
build() {
|
||||||
|
echo "build: begin."
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
./mach build
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "build: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
. ./artifacts_all.sh
|
||||||
|
|
||||||
|
artifacts_win() {
|
||||||
|
echo "artifacts_win: begin."
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
./mach package
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "artifacts_win: Creating final artifacts."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
artifacts_win_details
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "artifacts_win: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts_deb()
|
||||||
|
{
|
||||||
|
echo "artifacts_deb: begin."
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
./mach package
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "artifacts_deb: Creating final artifacts."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
artifacts_deb_details
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "artifacts_deb: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
artifacts_rpm()
|
||||||
|
{
|
||||||
|
echo "artifacts_rpm: begin."
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
./mach package
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "artifacts_rpm: Creating final artifacts."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
artifacts_rpm_details
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "artifacts_rpm: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Dependencies for linux/freebsd.
|
||||||
|
deps_deb() {
|
||||||
|
echo "deps_deb: begin."
|
||||||
|
deps1="python python-dev python3 python3-dev python3-distutils clang pkg-config libpulse-dev gcc"
|
||||||
|
deps2="curl wget nodejs libpango1.0-dev nasm yasm zip m4 libgtk-3-dev libgtk2.0-dev libdbus-glib-1-dev"
|
||||||
|
deps3="libxt-dev python3-pip mercurial automake autoconf libtool m4"
|
||||||
|
apt install -y $deps1
|
||||||
|
apt install -y $deps2
|
||||||
|
apt install -y $deps3
|
||||||
|
echo "deps_deb: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
deps_rpm() {
|
||||||
|
echo "deps_rpm: begin."
|
||||||
|
deps="python3 python3-distutils-extra clang pkg-config gcc curl wget nodejs nasm yasm zip m4 python3-zstandard python-zstandard python-devel python3-devel gtk3-devel llvm gtk2-devel dbus-glib-devel libXt-devel pulseaudio-libs-devel"
|
||||||
|
dnf -y install $deps
|
||||||
|
echo "deps_rpm: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
deps_pkg() {
|
||||||
|
echo "deps_pkg: begin."
|
||||||
|
deps="wget gmake m4 python3 py37-sqlite3 pkgconf llvm node nasm zip unzip yasm"
|
||||||
|
pkg install $deps
|
||||||
|
echo "deps_pkg: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
# these utilities should work everywhere
|
||||||
|
clean() {
|
||||||
|
echo "clean: begin."
|
||||||
|
|
||||||
|
echo "Deleting firefox-${pkgver} ..."
|
||||||
|
rm -rf firefox-$pkgver
|
||||||
|
|
||||||
|
echo "Deleting other cruft ..."
|
||||||
|
rm -rf librewolf
|
||||||
|
rm -f firefox-$pkgver.source.tar.xz
|
||||||
|
rm -f mozconfig
|
||||||
|
rm -f bootstrap.py
|
||||||
|
|
||||||
|
# windows
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-setup.exe
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-permissive.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-permissive-setup.exe
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-strict.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-strict-setup.exe
|
||||||
|
rm -f tmp.nsi tmp-permissive.nsi tmp-strict.nsi
|
||||||
|
|
||||||
|
# linux
|
||||||
|
rm -f librewolf-$pkgver.en-US.deb.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.deb-permissive.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.deb-strict.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.rpm.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.rpm-permissive.zip
|
||||||
|
rm -f librewolf-$pkgver.en-US.rpm-strict.zip
|
||||||
|
|
||||||
|
echo "clean: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rustup() {
|
||||||
|
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
|
||||||
|
echo "rustup: begin."
|
||||||
|
curl https://sh.rustup.rs -sSf | sh
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
cargo install cbindgen
|
||||||
|
echo "rustup: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
mach_env() {
|
||||||
|
echo "mach_env: begin."
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
./mach create-mach-environment
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
cd ..
|
||||||
|
echo "mach_env: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
git_subs() {
|
||||||
|
echo "git_subs: begin."
|
||||||
|
git submodule update --recursive
|
||||||
|
git submodule foreach git pull origin master
|
||||||
|
git submodule foreach git merge origin master
|
||||||
|
echo "git_subs: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
git_init() {
|
||||||
|
echo "git_init: begin."
|
||||||
|
echo "srcdir = $srcdir"
|
||||||
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
|
cd $srcdir
|
||||||
|
|
||||||
|
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."
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Nightly builds, alternative builds.
|
||||||
|
#
|
||||||
|
|
||||||
|
init_mozilla_unified() {
|
||||||
|
rm -f bootstrap.py
|
||||||
|
wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
python3 bootstrap.py
|
||||||
|
}
|
||||||
|
set_mozilla_unified() {
|
||||||
|
srcdir=mozilla-unified
|
||||||
|
}
|
||||||
|
reset_mozilla_unified() {
|
||||||
|
echo "reset_mozilla_unified: begin."
|
||||||
|
if [ ! -d mozilla-unified ]; then
|
||||||
|
echo "Error: mozilla-unified folder not found. use init_mozilla_unified() to create one"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
cd mozilla-unified
|
||||||
|
|
||||||
|
echo "Resetting mozilla-unified..."
|
||||||
|
hg up -C
|
||||||
|
hg purge
|
||||||
|
echo "Mercurial pull..."
|
||||||
|
hg pull -u
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "reset_mozilla_unified: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
# tor-browser.. (experimental)
|
||||||
|
init_tor_browser() {
|
||||||
|
git clone --no-checkout https://git.torproject.org/tor-browser.git
|
||||||
|
|
||||||
|
cd tor-browser
|
||||||
|
git checkout tor-browser-78.8.0esr-10.0-1
|
||||||
|
git submodule update --recursive
|
||||||
|
patch -p1 -i ../patches/tb-mozconfig-win10.patch
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
set_tor_browser() {
|
||||||
|
srcdir=tor-browser
|
||||||
|
}
|
||||||
|
reset_tor_browser() {
|
||||||
|
echo "reset_tor_browser: begin."
|
||||||
|
if [ ! -d tor-browser ]; then
|
||||||
|
echo "Error: tor-browser folder not found. use init_tor_browser() to create one"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
cd tor-browser
|
||||||
|
|
||||||
|
echo "Resetting tor-browser..."
|
||||||
|
git reset --hard
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo "reset_tor_browser: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# cross-compile actions...
|
||||||
|
#
|
||||||
|
# linux_patches - the 'do_patches' for linux->win crosscompile.
|
||||||
|
# linux_artifacts - standard artifact zip file. perhaps a -setup.exe.
|
||||||
|
# setup_deb_root - setup compile environment (root stuff)
|
||||||
|
# setup_deb_user - setup compile environmnet (build user)
|
||||||
|
# setup_rpm_root - setup compile environment (root stuff)
|
||||||
|
# setup_rpm_user - setup compile environmnet (build user)
|
||||||
|
|
||||||
|
. ./linux_xcompile.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# process commandline arguments and do something
|
||||||
|
#
|
||||||
|
|
||||||
|
done_something=0
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$*" == *linux_patches* ]]; then
|
||||||
|
linux_patches
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *linux_artifacts* ]]; then
|
||||||
|
linux_artifacts
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *setup_deb_root* ]]; then
|
||||||
|
setup_deb_root
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *setup_deb_user* ]]; then
|
||||||
|
setup_deb_user
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *setup_rpm_root* ]]; then
|
||||||
|
setup_rpm_root
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *setup_rpm_user* ]]; then
|
||||||
|
setup_rpm_user
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# android
|
||||||
|
if [[ "$*" == *set_android* ]]; then
|
||||||
|
android=android
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# various administrative actions...
|
||||||
|
|
||||||
|
if [[ "$*" == *init_mozilla_unified* ]]; then
|
||||||
|
init_mozilla_unified
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *set_mozilla_unified* ]]; then
|
||||||
|
set_mozilla_unified
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *reset_mozilla_unified* ]]; then
|
||||||
|
reset_mozilla_unified
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *init_tor_browser* ]]; then
|
||||||
|
init_tor_browser
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *set_tor_browser* ]]; then
|
||||||
|
set_tor_browser
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *reset_tor_browser* ]]; then
|
||||||
|
reset_tor_browser
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$*" == *clean* ]]; then
|
||||||
|
clean
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *all* ]]; then
|
||||||
|
fetch
|
||||||
|
extract
|
||||||
|
do_patches
|
||||||
|
build
|
||||||
|
artifacts_win
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$*" == *git_subs* ]]; then
|
||||||
|
git_subs
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *deps_rpm* ]]; then
|
||||||
|
deps_rpm
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *deps_pkg* ]]; then
|
||||||
|
deps_pkg
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# main building actions...
|
||||||
|
|
||||||
|
if [[ "$*" == *fetch* ]]; then
|
||||||
|
fetch
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *extract* ]]; then
|
||||||
|
extract
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *do_patches* ]]; then
|
||||||
|
do_patches
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *git_init* ]]; then
|
||||||
|
git_init
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *build* ]]; then
|
||||||
|
build
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# creating the artifacts...
|
||||||
|
|
||||||
|
if [[ "$*" == *artifacts_win* ]]; then
|
||||||
|
artifacts_win
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *artifacts_deb* ]]; then
|
||||||
|
artifacts_deb
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *artifacts_rpm* ]]; then
|
||||||
|
artifacts_rpm
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# by default, give help..
|
||||||
|
if (( done_something == 0 )); then
|
||||||
|
cat << EOF
|
||||||
|
Use: ./build.sh clean | all | [other stuff...]
|
||||||
|
|
||||||
|
fetch - fetch the tarball.
|
||||||
|
extract - extract the tarball.
|
||||||
|
do_patches - create a mozconfig, and patch the source.
|
||||||
|
build - the actual build.
|
||||||
|
|
||||||
|
artifacts_win - apply .cfg, build the zip file and NSIS setup.exe installer.
|
||||||
|
|
||||||
|
# Basic functionality:
|
||||||
|
|
||||||
|
all - build all (fetch extract do_patches build artifacts_win)
|
||||||
|
clean - remove generated cruft.
|
||||||
|
|
||||||
|
# Linux related functions:
|
||||||
|
|
||||||
|
deps_deb - install dependencies with apt.
|
||||||
|
deps_rpm - install dependencies with dnf.
|
||||||
|
deps_pkg - install dependencies with pkg. (experimental)
|
||||||
|
|
||||||
|
artifacts_deb - apply .cfg, create a dist zip file (for debian10).
|
||||||
|
artifacts_rpm - apply .cfg, create a dist zip file (for fedora33).
|
||||||
|
|
||||||
|
# Generic utility functionality:
|
||||||
|
|
||||||
|
mach_env - create mach build environment.
|
||||||
|
rustup - perform a rustup for this user.
|
||||||
|
git_subs - update git submodules.
|
||||||
|
git_init - create .git folder in firefox-$pkgver for creating patches.
|
||||||
|
|
||||||
|
# Cross-compile from linux: (in development)
|
||||||
|
|
||||||
|
linux_patches - the 'do_patches' for linux->win crosscompile.
|
||||||
|
linux_artifacts - standard artifact zip file. perhaps a -setup.exe.
|
||||||
|
setup_deb_root - setup compile environment (root stuff)
|
||||||
|
setup_deb_user - setup compile environmnet (build user)
|
||||||
|
setup_rpm_root - setup compile environment (root stuff)
|
||||||
|
setup_rpm_user - setup compile environmnet (build user)
|
||||||
|
|
||||||
|
# Nightly etc.:
|
||||||
|
|
||||||
|
init_mozilla_unified - use bootstrap.py to grab the latest mozilla-unified.
|
||||||
|
set_mozilla_unified - use mozilla-unified instead of firefox-87.0 source.
|
||||||
|
reset_mozilla_unified - clean mozilla-unified and pull latest git changes.
|
||||||
|
s set_android - attempt andorid build (experimental).
|
||||||
|
|
||||||
|
You can use init_tor_browser, set_tor_browser as above, but it attempts a Tor
|
||||||
|
Browser build instead (esr releases). (experimental) or use set_strict to get
|
||||||
|
a more restricted version (experimental).
|
||||||
|
|
||||||
|
# Installation from linux zip file:
|
||||||
|
|
||||||
|
Copy the zip file in your $HOME folder, then:
|
||||||
|
|
||||||
|
unzip librewolf-*.zip
|
||||||
|
cd librewolf
|
||||||
|
./register-librewolf
|
||||||
|
|
||||||
|
That should give an app icon. You can unzip it elsewhere and it will work.
|
||||||
|
|
||||||
|
# Examples:
|
||||||
|
|
||||||
|
For windows, use:
|
||||||
|
./build.sh fetch extract do_patches build artifacts_win
|
||||||
|
./build.sh all
|
||||||
|
|
||||||
|
For debian, use:
|
||||||
|
sudo ./build.sh deps_deb
|
||||||
|
./build.sh rustup mach_env
|
||||||
|
./build.sh fetch extract do_patches build artifacts_deb
|
||||||
|
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
144
files/attic/linux_xcompile.sh
Normal file
144
files/attic/linux_xcompile.sh
Normal file
|
|
@ -0,0 +1,144 @@
|
||||||
|
# Crosscompile on linux (debian,fedora)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Creating the crosscompile environment on linux
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setup_deb_root() {
|
||||||
|
echo "setup_deb_root: begin."
|
||||||
|
|
||||||
|
# (implementation...)
|
||||||
|
|
||||||
|
echo "setup_deb_root: done."
|
||||||
|
}
|
||||||
|
setup_deb_user() {
|
||||||
|
echo "setup_deb_user: begin."
|
||||||
|
|
||||||
|
# (implementation...)
|
||||||
|
|
||||||
|
echo "setup_deb_user: done."
|
||||||
|
}
|
||||||
|
setup_rpm_root() {
|
||||||
|
echo "setup_rpm_root: begin."
|
||||||
|
|
||||||
|
# (implementation...)
|
||||||
|
|
||||||
|
echo "setup_rpm_root: done."
|
||||||
|
}
|
||||||
|
setup_rpm_user() {
|
||||||
|
echo "setup_rpm_user: begin."
|
||||||
|
|
||||||
|
# (implementation...)
|
||||||
|
|
||||||
|
echo "setup_rpm_user: done."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# linux_patches() and linux_artifacts()
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
linux_patches() {
|
||||||
|
mozconfig_mode=xcompile
|
||||||
|
do_patches
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
linux_artifacts_details() {
|
||||||
|
exe=.exe
|
||||||
|
objdir=obj-x86_64-pc-mingw32/dist/firefox
|
||||||
|
ospkg=win64
|
||||||
|
|
||||||
|
# sanity checks
|
||||||
|
if [ ! -d $objdir ]; then
|
||||||
|
echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ../firefox ../librewolf
|
||||||
|
cp -r $objdir ..
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
|
||||||
|
mv firefox librewolf
|
||||||
|
# apply the LibreWolf settings
|
||||||
|
cp -rv settings/* librewolf
|
||||||
|
# rename the executable manually
|
||||||
|
pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
|
||||||
|
# clean garbage files
|
||||||
|
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd ..
|
||||||
|
|
||||||
|
# windows: copy the windows icon
|
||||||
|
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
||||||
|
|
||||||
|
# create the final zip artifact
|
||||||
|
rm -f librewolf-$pkgver.en-US.$ospkg.zip
|
||||||
|
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# now to try to make the installer
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-setup.exe tmp.nsi
|
||||||
|
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
|
||||||
|
makensis-3.01.exe -V1 tmp.nsi
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# patch to permissive config
|
||||||
|
if [ ! -z $permissive ]; then
|
||||||
|
pushd librewolf
|
||||||
|
echo "Applying permissive patches..."
|
||||||
|
patch -p1 -i ../patches/permissive/librewolf-config.patch
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
patch -p1 -i ../patches/permissive/librewolf-policies.patch
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
popd
|
||||||
|
|
||||||
|
# create the final zip artifact
|
||||||
|
rm -f librewolf-$pkgver.en-US.$ospkg-permissive.zip
|
||||||
|
zip -qr9 librewolf-$pkgver.en-US.$ospkg-permissive.zip librewolf
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
# now to try to make the installer
|
||||||
|
rm -f librewolf-$pkgver.en-US.win64-permissive-setup.exe tmp-permissive.nsi
|
||||||
|
sed "s/win64-setup/win64-permissive-setup/g" < tmp.nsi > tmp-permissive.nsi
|
||||||
|
makensis-3.01.exe -V1 tmp-permissive.nsi
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
linux_artifacts() {
|
||||||
|
echo "linux_artifacts: begin."
|
||||||
|
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
|
cd firefox-$pkgver
|
||||||
|
|
||||||
|
./mach package
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "artifacts_win: Creating final artifacts."
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
linux_artifacts_details
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo "linux_artifacts: done."
|
||||||
|
}
|
||||||
236
files/attic/mozconfigs.sh
Normal file
236
files/attic/mozconfigs.sh
Normal file
|
|
@ -0,0 +1,236 @@
|
||||||
|
create_mozconfig_default() {
|
||||||
|
cat >../mozconfig <<END
|
||||||
|
ac_add_options --enable-application=browser
|
||||||
|
|
||||||
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
ac_add_options --enable-update-channel=release
|
||||||
|
# theming bugs: ac_add_options --with-app-name=librewolf
|
||||||
|
# theming bugs: ac_add_options --with-app-basename=LibreWolf
|
||||||
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
|
#export MOZ_REQUIRE_SIGNING=0
|
||||||
|
|
||||||
|
# Features
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
|
||||||
|
# Disables crash reporting, telemetry and other data gathering tools
|
||||||
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
mk_add_options MOZ_DATA_REPORTING=0
|
||||||
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
|
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
|
|
||||||
|
# first attempt to fix the win32 vcredist issue results in build errors..
|
||||||
|
#WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC141.CRT
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
create_mozconfig_xcompile() {
|
||||||
|
cat >../mozconfig <<END
|
||||||
|
# Crosscompile to windows..
|
||||||
|
|
||||||
|
ac_add_options --enable-application=browser
|
||||||
|
|
||||||
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
ac_add_options --enable-update-channel=release
|
||||||
|
# theming bugs: ac_add_options --with-app-name=librewolf
|
||||||
|
# theming bugs: ac_add_options --with-app-basename=LibreWolf
|
||||||
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
|
export MOZ_REQUIRE_SIGNING=0
|
||||||
|
|
||||||
|
# Features
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
|
||||||
|
# Disables crash reporting, telemetry and other data gathering tools
|
||||||
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
mk_add_options MOZ_DATA_REPORTING=0
|
||||||
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
|
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
|
|
||||||
|
# first attempt to fix the win32 vcredist issue results in build errors..
|
||||||
|
#WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC141.CRT
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
create_mozconfig_strict() {
|
||||||
|
cat >../mozconfig <<END
|
||||||
|
# Balls to the wall edition..
|
||||||
|
ac_add_options --disable-webrtc
|
||||||
|
|
||||||
|
|
||||||
|
ac_add_options --enable-application=browser
|
||||||
|
|
||||||
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
ac_add_options --enable-update-channel=release
|
||||||
|
# theming bugs: ac_add_options --with-app-name=librewolf
|
||||||
|
# theming bugs: ac_add_options --with-app-basename=LibreWolf
|
||||||
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
|
export MOZ_REQUIRE_SIGNING=0
|
||||||
|
|
||||||
|
# Features
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
|
||||||
|
# Disables crash reporting, telemetry and other data gathering tools
|
||||||
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
mk_add_options MOZ_DATA_REPORTING=0
|
||||||
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
|
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
|
|
||||||
|
# first attempt to fix the win32 vcredist issue results in build errors..
|
||||||
|
#WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC141.CRT
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create_mozconfig_android() {
|
||||||
|
cat >../mozconfig <<END
|
||||||
|
# Original file is from:
|
||||||
|
# https://raw.githubusercontent.com/Divested-Mobile/Mull/master/MOZCONFIG
|
||||||
|
#
|
||||||
|
# Reference
|
||||||
|
# https://gitweb.torproject.org/user/sysrqb/tor-browser.git/tree/.mozconfig-android
|
||||||
|
# https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/org.mozilla.fennec_fdroid.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Build for Android
|
||||||
|
ac_add_options --with-android-min-sdk=16
|
||||||
|
ac_add_options --enable-application=mobile/android
|
||||||
|
ac_add_options --target=arm-linux-androideabi
|
||||||
|
#ac_add_options --target=aarch64-linux-android
|
||||||
|
#ac_add_options --target=x86_64-linux-android
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Specify paths
|
||||||
|
ac_add_options --with-android-sdk="/home/emy/.mozbuild/android-sdk-linux"
|
||||||
|
ac_add_options --with-android-ndk="/home/emy/.mozbuild/android-ndk-r17b"
|
||||||
|
CC="/home/emy/.mozbuild/clang/bin/clang"
|
||||||
|
CXX="/home/emy/.mozbuild/clang/bin/clang++"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set branding
|
||||||
|
#ac_add_options --with-branding=mobile/android/branding/divestos
|
||||||
|
|
||||||
|
|
||||||
|
# Build tweaks
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
|
||||||
|
|
||||||
|
# Disable malware
|
||||||
|
#ac_add_options --disable-eme
|
||||||
|
ac_add_options --without-google-play-services
|
||||||
|
|
||||||
|
# Disable unneeded extras
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
|
||||||
|
|
||||||
|
# Hardening
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
|
||||||
|
# Optimize
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
ac_add_options --disable-profiling
|
||||||
|
ac_add_options --disable-rust-debug
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-strip
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
|
||||||
|
export BUILDING_RELEASE=1
|
||||||
|
export MOZ_DEBUG=
|
||||||
|
export NIGHTLY_BUILD=
|
||||||
|
|
||||||
|
|
||||||
|
#The following options are the only way to fully disable debugging
|
||||||
|
export MOZILLA_OFFICIAL=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### ORIGINAL MOZCONFIG #####
|
||||||
|
#ac_add_options --enable-application=browser
|
||||||
|
|
||||||
|
# This supposedly speeds up compilation (We test through dogfooding anyway)
|
||||||
|
ac_add_options --disable-tests
|
||||||
|
ac_add_options --disable-debug
|
||||||
|
|
||||||
|
ac_add_options --enable-release
|
||||||
|
ac_add_options --enable-hardening
|
||||||
|
ac_add_options --enable-rust-simd
|
||||||
|
ac_add_options --enable-optimize
|
||||||
|
|
||||||
|
|
||||||
|
# Branding
|
||||||
|
ac_add_options --enable-update-channel=release
|
||||||
|
# theming bugs: ac_add_options --with-app-name=librewolf
|
||||||
|
# theming bugs: ac_add_options --with-app-basename=LibreWolf
|
||||||
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
ac_add_options --allow-addon-sideload
|
||||||
|
export MOZ_REQUIRE_SIGNING=0
|
||||||
|
|
||||||
|
# Features
|
||||||
|
ac_add_options --disable-crashreporter
|
||||||
|
ac_add_options --disable-updater
|
||||||
|
|
||||||
|
# Disables crash reporting, telemetry and other data gathering tools
|
||||||
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
mk_add_options MOZ_DATA_REPORTING=0
|
||||||
|
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||||
|
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
|
|
||||||
|
END
|
||||||
|
}
|
||||||
24
files/attic/upload-distfiles.sh
Normal file
24
files/attic/upload-distfiles.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pkgver=88.0.1
|
||||||
|
private_token=$1
|
||||||
|
if [ -z $private_token ]; then
|
||||||
|
echo "Please specify the Gitlab PRIVATE TOKEN on the commandline."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
curl --request POST --header "PRIVATE-TOKEN: ${private_token}" --form "file=@librewolf-${pkgver}.en-US.win64-setup.exe" "https://gitlab.com/api/v4/projects/13852981/uploads"
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
curl --request POST --header "PRIVATE-TOKEN: ${private_token}" --form "file=@librewolf-${pkgver}.en-US.win64.zip" "https://gitlab.com/api/v4/projects/13852981/uploads"
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
curl --request POST --header "PRIVATE-TOKEN: ${private_token}" --form "file=@librewolf-${pkgver}.en-US.win64-permissive-nightly-setup.exe" "https://gitlab.com/api/v4/projects/13852981/uploads"
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
1
files/attic/version.sh
Normal file
1
files/attic/version.sh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
pkgver=89.0
|
||||||
16
files/configure.sh
Normal file
16
files/configure.sh
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 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_NAME=librewolf
|
||||||
|
MOZ_APP_BASENAME=LibreWolf
|
||||||
|
MOZ_APP_PROFILE=LibreWolf
|
||||||
|
MOZ_APP_VENDOR="LibreWolf Community"
|
||||||
|
MOZ_APP_DISPLAYNAME=LibreWolf
|
||||||
|
MOZ_APP_REMOTINGNAME=librewolf
|
||||||
|
MOZ_DEV_EDITION=1
|
||||||
|
MOZ_TELEMETRY_REPORTING=
|
||||||
|
MOZ_SERVICES_HEALTHREPORT=
|
||||||
|
MOZ_NORMANDY=
|
||||||
|
MOZ_REQUIRE_SIGNING=
|
||||||
|
MOZ_DEFAULT_BROWSER_AGENT=0
|
||||||
7
files/register-librewolf
Executable file
7
files/register-librewolf
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sed "s,MYDIR,$(pwd),g" < start-librewolf.desktop.in > start-librewolf.desktop
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.local/share/applications/"
|
||||||
|
cp -v ./start-librewolf.desktop "$HOME/.local/share/applications/"
|
||||||
|
update-desktop-database "$HOME/.local/share/applications/"
|
||||||
22
files/start-librewolf
Executable file
22
files/start-librewolf
Executable file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Do not (try to) connect to the session manager
|
||||||
|
unset SESSION_MANAGER
|
||||||
|
|
||||||
|
# If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority
|
||||||
|
# before we change HOME below. (See xauth(1) and #1945.) XDM and KDM rely
|
||||||
|
# on applications using this default value.
|
||||||
|
if [ -z "$XAUTHORITY" ]; then
|
||||||
|
XAUTHORITY=~/.Xauthority
|
||||||
|
export XAUTHORITY
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Try to be agnostic to where we're being started from, chdir to where
|
||||||
|
# the script is.
|
||||||
|
mydir="`dirname "$0"`"
|
||||||
|
test -d "$mydir" && cd "$mydir"
|
||||||
|
|
||||||
|
#./librewolf --class "LibreWolf" -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null &
|
||||||
|
./librewolf --detach --class "LibreWolf" > /dev/null 2>&1 </dev/null &
|
||||||
|
|
||||||
|
exit $?
|
||||||
10
files/start-librewolf.desktop.in
Normal file
10
files/start-librewolf.desktop.in
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=LibreWolf
|
||||||
|
GenericName=Web Browser
|
||||||
|
Comment=LibreWolf Browser
|
||||||
|
Categories=Network;WebBrowser;Security;
|
||||||
|
Exec=MYDIR/./start-librewolf
|
||||||
|
X-TorBrowser-ExecShell=MYDIR/./start-librewolf
|
||||||
|
Icon=MYDIR/./browser/chrome/icons/default/default64.png
|
||||||
|
StartupWMClass=LibreWolf
|
||||||
4
files/start-tor.bat
Normal file
4
files/start-tor.bat
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
@rem Windows Expert Bundle:
|
||||||
|
@rem https://www.torproject.org/download/tor/
|
||||||
|
|
||||||
|
Tor\tor.exe
|
||||||
3
librewolf-portable/.gitignore
vendored
Normal file
3
librewolf-portable/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
librewolf-portable.aps
|
||||||
|
.vs
|
||||||
|
x64
|
||||||
3
librewolf-portable/README.md
Normal file
3
librewolf-portable/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# librewolf-portable
|
||||||
|
|
||||||
|
Execute librewolf.exe -profile Profiles\Default
|
||||||
30
librewolf-portable/Resource.h
Normal file
30
librewolf-portable/Resource.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by librewolf-portable.rc
|
||||||
|
|
||||||
|
#define IDS_APP_TITLE 103
|
||||||
|
|
||||||
|
#define IDR_MAINFRAME 128
|
||||||
|
#define IDD_LIBREWOLFPORTABLE_DIALOG 102
|
||||||
|
#define IDD_ABOUTBOX 103
|
||||||
|
#define IDM_ABOUT 104
|
||||||
|
#define IDM_EXIT 105
|
||||||
|
#define IDI_LIBREWOLFPORTABLE 107
|
||||||
|
#define IDI_SMALL 108
|
||||||
|
#define IDC_LIBREWOLFPORTABLE 109
|
||||||
|
#define IDC_MYICON 2
|
||||||
|
#ifndef IDC_STATIC
|
||||||
|
#define IDC_STATIC -1
|
||||||
|
#endif
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
#define _APS_NO_MFC 130
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 110
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
1
librewolf-portable/build.bat
Normal file
1
librewolf-portable/build.bat
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
msbuild /t:Clean,Build /p:Configuration=Release
|
||||||
BIN
librewolf-portable/librewolf-portable.aps
Normal file
BIN
librewolf-portable/librewolf-portable.aps
Normal file
Binary file not shown.
69
librewolf-portable/librewolf-portable.cpp
Normal file
69
librewolf-portable/librewolf-portable.cpp
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
// librewolf-portable.cpp : Run librewolf.exe with -profile parameter.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
|
int fileExists(TCHAR* file)
|
||||||
|
{
|
||||||
|
WIN32_FIND_DATA FindFileData;
|
||||||
|
HANDLE handle = FindFirstFile(file, &FindFileData);
|
||||||
|
int found = handle != INVALID_HANDLE_VALUE;
|
||||||
|
if (found)
|
||||||
|
{
|
||||||
|
//FindClose(&handle); this will crash
|
||||||
|
FindClose(handle);
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||||
|
_In_opt_ HINSTANCE hPrevInstance,
|
||||||
|
_In_ LPWSTR lpCmdLine,
|
||||||
|
_In_ int nCmdShow)
|
||||||
|
{
|
||||||
|
//https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
|
||||||
|
//constexpr int max_path = _MAX_PATH+1;
|
||||||
|
constexpr int max_path = 32767+1;
|
||||||
|
static wchar_t path[max_path], dir[max_path], exe[max_path], cmdline[max_path];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GetModuleFileName(NULL, path, _MAX_PATH);
|
||||||
|
*wcsrchr(path,L'\\') = L'\0';
|
||||||
|
|
||||||
|
wcscpy(dir, path);
|
||||||
|
wcscat(dir, L"\\Profiles\\Default");
|
||||||
|
|
||||||
|
wcscpy(exe, path);
|
||||||
|
wcscat(exe, L"\\librewolf.exe");
|
||||||
|
if (!fileExists(exe)) {
|
||||||
|
wcscpy(exe, path);
|
||||||
|
wcscat(exe, L"\\LibreWolf\\librewolf.exe");
|
||||||
|
if (!fileExists(exe)) {
|
||||||
|
MessageBox(NULL, L"Can\'t find librewolf.exe in . or LibreWolf", path, MB_OK);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wsprintf(cmdline, L"\"%s\" -profile \"%s\"", exe, dir);
|
||||||
|
|
||||||
|
STARTUPINFOW siStartupInfo;
|
||||||
|
PROCESS_INFORMATION piProcessInfo;
|
||||||
|
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
|
||||||
|
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
|
||||||
|
siStartupInfo.cb = sizeof(siStartupInfo);
|
||||||
|
|
||||||
|
if (!CreateProcess(exe, cmdline, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &siStartupInfo, &piProcessInfo))
|
||||||
|
{
|
||||||
|
DWORD i = GetLastError();
|
||||||
|
wsprintf(dir, L"CreateProcess() failed with error %i", i);
|
||||||
|
MessageBox(NULL, dir, L"librewolf-portable", MB_OK);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue