From 99090a20f03949caf61340c32f0bdfa3b793e267 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 8 Jan 2022 20:35:09 +0100 Subject: [PATCH] created mozconfig.windows --- .gitignore | 2 +- Makefile | 11 ++++++----- assets/mozconfig.windows | 31 +++++++++++++++++++++++++++++++ mk.py | 19 ++++++++++++++++++- release | 2 +- version | 1 + 6 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 assets/mozconfig.windows create mode 100644 version diff --git a/.gitignore b/.gitignore index 679c5a9..bf473ee 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ build_tag /docker/librewolf/mint20/deb/artifacts /docker/librewolf/ubuntu20/deb/artifacts /docker/*.log -version +/source_release diff --git a/Makefile b/Makefile index 0013343..04e9730 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY : help all clean veryclean fetch build artifact +.PHONY : help all clean veryclean fetch build artifacts help : @echo "Use: make [all] [clean] [veryclean]" @@ -9,15 +9,16 @@ help : @echo "" @echo " fetch - Fetch the latest librewolf source." @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 "" all : fetch build artifact clean : + rm -rf librewolf-$(shell cat version) veryclean : - rm -f librewolf-*.source.tar.gz + rm -f source_release librewolf-$(shell cat version)-*.source.tar.gz fetch : python3 mk.py fetch @@ -25,6 +26,6 @@ fetch : build : python3 mk.py build -artifact : - python3 mk.py artifact +artifacts : + python3 mk.py artifacts diff --git a/assets/mozconfig.windows b/assets/mozconfig.windows new file mode 100644 index 0000000..cbc6871 --- /dev/null +++ b/assets/mozconfig.windows @@ -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 +# + diff --git a/mk.py b/mk.py index 1192f78..bd0fa55 100755 --- a/mk.py +++ b/mk.py @@ -22,9 +22,16 @@ def exec(cmd): return native(cmd) return bash(cmd) +# +# windows specific actions +# +def win_before_build(): + exec('cp -v assets/mozconfig.windows librewolf-$(cat version)/mozconfig') +# # main functions +# def fetch(): 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') def build(): + 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: version = file.read().rstrip() os.chdir('librewolf-{}'.format(version)) + exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build') exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package') + + def artifacts(): bash('# you gotta figure that out from the previous ./build.py') pass + +# # parse commandline for commands +# help_msg = ''' Use: ./mk.py ... diff --git a/release b/release index b8626c4..0cfbf08 100644 --- a/release +++ b/release @@ -1 +1 @@ -4 +2 diff --git a/version b/version new file mode 100644 index 0000000..c8cd6d2 --- /dev/null +++ b/version @@ -0,0 +1 @@ +95.0.2 \ No newline at end of file