created mozconfig.windows

This commit is contained in:
Bert van der Weerd 2022-01-08 20:35:09 +01:00
parent aeeaa1bcba
commit 99090a20f0
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
6 changed files with 58 additions and 8 deletions

2
.gitignore vendored
View file

@ -20,4 +20,4 @@ build_tag
/docker/librewolf/mint20/deb/artifacts /docker/librewolf/mint20/deb/artifacts
/docker/librewolf/ubuntu20/deb/artifacts /docker/librewolf/ubuntu20/deb/artifacts
/docker/*.log /docker/*.log
version /source_release

View file

@ -1,4 +1,4 @@
.PHONY : help all clean veryclean fetch build artifact .PHONY : help all clean veryclean fetch build artifacts
help : help :
@echo "Use: make [all] [clean] [veryclean]" @echo "Use: make [all] [clean] [veryclean]"
@ -9,15 +9,16 @@ help :
@echo "" @echo ""
@echo " fetch - Fetch the latest librewolf source." @echo " fetch - Fetch the latest librewolf source."
@echo " build - Perform './mach build && ./mach package' on it." @echo " build - Perform './mach build && ./mach package' on it."
@echo " artifact - Create the setup.exe and the portable.zip." @echo " artifacts - Create the setup.exe and the portable.zip."
@echo "" @echo ""
all : fetch build artifact all : fetch build artifact
clean : clean :
rm -rf librewolf-$(shell cat version)
veryclean : veryclean :
rm -f librewolf-*.source.tar.gz rm -f source_release librewolf-$(shell cat version)-*.source.tar.gz
fetch : fetch :
python3 mk.py fetch python3 mk.py fetch
@ -25,6 +26,6 @@ fetch :
build : build :
python3 mk.py build python3 mk.py build
artifact : artifacts :
python3 mk.py artifact python3 mk.py artifacts

31
assets/mozconfig.windows Normal file
View file

@ -0,0 +1,31 @@
ac_add_options --enable-application=browser
ac_add_options --allow-addon-sideload
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-default-browser-agent
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-release
ac_add_options --enable-rust-simd
ac_add_options --with-app-name=librewolf
ac_add_options --with-branding=browser/branding/librewolf
ac_add_options --with-unsigned-addon-scopes=app,system
export MOZ_REQUIRE_SIGNING=
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
#
# windows specific.
#
# - no need to specify wasi sdk folder
#

19
mk.py
View file

@ -22,9 +22,16 @@ def exec(cmd):
return native(cmd) return native(cmd)
return bash(cmd) return bash(cmd)
#
# windows specific actions
#
def win_before_build():
exec('cp -v assets/mozconfig.windows librewolf-$(cat version)/mozconfig')
#
# main functions # main functions
#
def fetch(): def fetch():
exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version') exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version')
@ -32,19 +39,29 @@ def fetch():
exec('wget -O librewolf-$(cat version)-$(cat source_release).source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(cat version)-$(cat source_release).source.tar.gz?job=build-job') exec('wget -O librewolf-$(cat version)-$(cat source_release).source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(cat version)-$(cat source_release).source.tar.gz?job=build-job')
def build(): def build():
exec('rm -rf librewolf-$(cat version)') exec('rm -rf librewolf-$(cat version)')
exec('tar xf librewolf-$(cat version)-$(cat release).source.tar.gz') exec('tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz')
win_before_build()
with open('version','r') as file: with open('version','r') as file:
version = file.read().rstrip() version = file.read().rstrip()
os.chdir('librewolf-{}'.format(version)) os.chdir('librewolf-{}'.format(version))
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build') exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build')
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package') exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package')
def artifacts(): def artifacts():
bash('# you gotta figure that out from the previous ./build.py') bash('# you gotta figure that out from the previous ./build.py')
pass pass
#
# parse commandline for commands # parse commandline for commands
#
help_msg = ''' help_msg = '''
Use: ./mk.py <command> ... Use: ./mk.py <command> ...

View file

@ -1 +1 @@
4 2

1
version Normal file
View file

@ -0,0 +1 @@
95.0.2