diff --git a/Makefile b/Makefile index 2a243de..ebf187a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY : help all clean veryclean fetch build artifacts update +.PHONY : help all clean veryclean fetch build artifacts update full-mar help : @echo "Use: make [all] [clean] [veryclean] [check] ..." @@ -7,6 +7,7 @@ help : @echo " clean - Remove output files and temporary files." @echo " veryclean - Like 'clean', but also remove all downloaded files." @echo " update - update 'version' and 'source_release' files." + @echo " full-mar - create mar setup file." @echo "" @echo " fetch - Fetch the latest librewolf source." @echo " build - Perform './mach build && ./mach package' on it." @@ -47,3 +48,6 @@ debug : artifacts : python3 mk.py artifacts + +full-mar : + python3 mk.py full-mar diff --git a/assets/mozconfig.windows b/assets/mozconfig.windows index 7b00a00..9450987 100644 --- a/assets/mozconfig.windows +++ b/assets/mozconfig.windows @@ -5,7 +5,6 @@ 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 @@ -31,14 +30,9 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0 # - no need to specify wasi sdk folder # -ac_add_options --disable-updater -ac_add_options --disable-maintenance-service ac_add_options --enable-strip # needed for windows/mac auto update ONLY. it's a security risk so other OSses don't need it # https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html ac_add_options --disable-verify-mar - - - diff --git a/mk.py b/mk.py index 1a4e1cc..cc1a0cd 100644 --- a/mk.py +++ b/mk.py @@ -13,6 +13,28 @@ from assets.tools import exec, patch def deps_win32(): exec('rustup target add i686-pc-windows-msvc') +def full_mar(): + with open('version','r') as file: + version = file.read().rstrip() + with open('source_release','r') as file: + source_release = file.read().rstrip() + os.chdir('librewolf-{}-{}'.format(version,source_release)) + + # see https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html + + objdir = 'obj-x86_64-pc-mingw32' + mar_output_path = 'MAR' + # version already set + channel = 'default' + + exec('mkdir -p MAR') # output folder + + exec('touch {}/dist/firefox/precomplete'.format(objdir)) + exec('MAR={}/dist/host/bin/mar.exe MOZ_PRODUCT_VERSION={}-{} MAR_CHANNEL_ID={} ./tools/update-packaging/make_full_update.sh {} {}/dist/firefox'.format(objdir,version,source_release,channel,mar_output_path,objdir)) + + # restore state + os.chdir('..') + pass def fetch(): exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version') @@ -215,6 +237,9 @@ for arg in sys.argv: elif arg == 'artifacts': artifacts() done_something = True + elif arg == 'full-mar': + full_mar() + done_something = True elif arg == 'upload': in_upload = True else: diff --git a/release b/release index 573541a..d00491f 100644 --- a/release +++ b/release @@ -1 +1 @@ -0 +1