added debugging mozconfig and targets
This commit is contained in:
parent
798d5300f9
commit
e5758b64da
3 changed files with 22 additions and 4 deletions
4
Makefile
4
Makefile
|
|
@ -10,6 +10,7 @@ help :
|
|||
@echo ""
|
||||
@echo " fetch - Fetch the latest librewolf source."
|
||||
@echo " build - Perform './mach build && ./mach package' on it."
|
||||
@echo " debug - Perform a debug build with different 'mozconfig'."
|
||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
||||
@echo ""
|
||||
@echo "Note: to upload, after artifacts, into the windows repo, use:"
|
||||
|
|
@ -33,6 +34,9 @@ fetch :
|
|||
build :
|
||||
python3 mk.py build
|
||||
|
||||
debug :
|
||||
python3 mk.py build-debug
|
||||
|
||||
artifacts :
|
||||
python3 mk.py artifacts
|
||||
|
||||
|
|
|
|||
6
assets/mozconfig.windows.debug
Normal file
6
assets/mozconfig.windows.debug
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ac_add_options --enable-application=browser
|
||||
|
||||
ac_add_options --enable-debug
|
||||
|
||||
#ac_add_options --with-app-name=librewolf
|
||||
ac_add_options --with-branding=browser/branding/librewolf
|
||||
16
mk.py
16
mk.py
|
|
@ -57,11 +57,11 @@ def fetch():
|
|||
|
||||
exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version')
|
||||
exec('wget -q -O source_release https://gitlab.com/librewolf-community/browser/source/-/raw/main/release')
|
||||
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')
|
||||
|
||||
|
||||
|
||||
def build():
|
||||
def build(debug=False):
|
||||
|
||||
exec('rm -rf librewolf-$(cat version)')
|
||||
exec('tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz')
|
||||
|
|
@ -71,7 +71,11 @@ def build():
|
|||
os.chdir('librewolf-{}'.format(version))
|
||||
|
||||
# patches
|
||||
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
||||
if debug:
|
||||
exec('cp -v ../assets/mozconfig.windows.debug mozconfig')
|
||||
else:
|
||||
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
||||
|
||||
patch('../assets/package-manifest.patch')
|
||||
|
||||
# perform the build and package
|
||||
|
|
@ -142,7 +146,7 @@ def artifacts():
|
|||
|
||||
|
||||
|
||||
# utility function
|
||||
# Utility function to upload() function.
|
||||
def do_upload(filename,token):
|
||||
exec('echo _ >> upload.txt')
|
||||
exec('curl --request POST --header \"PRIVATE-TOKEN: {}\" --form \"file=@{}\" \"https://gitlab.com/api/v4/projects/13852981/uploads\" >> upload.txt'.format(token,filename),False)
|
||||
|
|
@ -180,6 +184,7 @@ Use: ./mk.py <command> ...
|
|||
commands:
|
||||
fetch
|
||||
build
|
||||
build-debug
|
||||
artifacts
|
||||
upload <token>
|
||||
|
||||
|
|
@ -198,6 +203,9 @@ for arg in sys.argv:
|
|||
elif arg == 'build':
|
||||
build()
|
||||
done_something = True
|
||||
elif arg == 'build-debug':
|
||||
build(True)
|
||||
done_something = True
|
||||
elif arg == 'artifacts':
|
||||
artifacts()
|
||||
done_something = True
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue