creating mar files
This commit is contained in:
parent
e95da84da6
commit
44773d461d
4 changed files with 31 additions and 8 deletions
6
Makefile
6
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 :
|
help :
|
||||||
@echo "Use: make [all] [clean] [veryclean] [check] ..."
|
@echo "Use: make [all] [clean] [veryclean] [check] ..."
|
||||||
|
|
@ -7,6 +7,7 @@ help :
|
||||||
@echo " clean - Remove output files and temporary files."
|
@echo " clean - Remove output files and temporary files."
|
||||||
@echo " veryclean - Like 'clean', but also remove all downloaded files."
|
@echo " veryclean - Like 'clean', but also remove all downloaded files."
|
||||||
@echo " update - update 'version' and 'source_release' files."
|
@echo " update - update 'version' and 'source_release' files."
|
||||||
|
@echo " full-mar - create mar setup file."
|
||||||
@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."
|
||||||
|
|
@ -47,3 +48,6 @@ debug :
|
||||||
|
|
||||||
artifacts :
|
artifacts :
|
||||||
python3 mk.py artifacts
|
python3 mk.py artifacts
|
||||||
|
|
||||||
|
full-mar :
|
||||||
|
python3 mk.py full-mar
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ ac_add_options --disable-crashreporter
|
||||||
ac_add_options --disable-debug
|
ac_add_options --disable-debug
|
||||||
ac_add_options --disable-default-browser-agent
|
ac_add_options --disable-default-browser-agent
|
||||||
ac_add_options --disable-tests
|
ac_add_options --disable-tests
|
||||||
ac_add_options --disable-updater
|
|
||||||
ac_add_options --enable-hardening
|
ac_add_options --enable-hardening
|
||||||
ac_add_options --enable-optimize
|
ac_add_options --enable-optimize
|
||||||
ac_add_options --enable-release
|
ac_add_options --enable-release
|
||||||
|
|
@ -31,14 +30,9 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0
|
||||||
# - no need to specify wasi sdk folder
|
# - no need to specify wasi sdk folder
|
||||||
#
|
#
|
||||||
|
|
||||||
ac_add_options --disable-updater
|
|
||||||
ac_add_options --disable-maintenance-service
|
|
||||||
ac_add_options --enable-strip
|
ac_add_options --enable-strip
|
||||||
|
|
||||||
# needed for windows/mac auto update ONLY. it's a security risk so other OSses don't need it
|
# 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
|
# https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html
|
||||||
|
|
||||||
ac_add_options --disable-verify-mar
|
ac_add_options --disable-verify-mar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
25
mk.py
25
mk.py
|
|
@ -13,6 +13,28 @@ from assets.tools import exec, patch
|
||||||
def deps_win32():
|
def deps_win32():
|
||||||
exec('rustup target add i686-pc-windows-msvc')
|
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():
|
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')
|
||||||
|
|
@ -215,6 +237,9 @@ for arg in sys.argv:
|
||||||
elif arg == 'artifacts':
|
elif arg == 'artifacts':
|
||||||
artifacts()
|
artifacts()
|
||||||
done_something = True
|
done_something = True
|
||||||
|
elif arg == 'full-mar':
|
||||||
|
full_mar()
|
||||||
|
done_something = True
|
||||||
elif arg == 'upload':
|
elif arg == 'upload':
|
||||||
in_upload = True
|
in_upload = True
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
2
release
2
release
|
|
@ -1 +1 @@
|
||||||
0
|
1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue