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 ""
|
||||||
@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 " debug - Perform a debug build with different 'mozconfig'."
|
||||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
@echo " artifacts - Create the setup.exe and the portable.zip."
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Note: to upload, after artifacts, into the windows repo, use:"
|
@echo "Note: to upload, after artifacts, into the windows repo, use:"
|
||||||
|
|
@ -33,6 +34,9 @@ fetch :
|
||||||
build :
|
build :
|
||||||
python3 mk.py build
|
python3 mk.py build
|
||||||
|
|
||||||
|
debug :
|
||||||
|
python3 mk.py build-debug
|
||||||
|
|
||||||
artifacts :
|
artifacts :
|
||||||
python3 mk.py 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
|
||||||
14
mk.py
14
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 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 -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('rm -rf librewolf-$(cat version)')
|
||||||
exec('tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz')
|
exec('tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz')
|
||||||
|
|
@ -71,7 +71,11 @@ def build():
|
||||||
os.chdir('librewolf-{}'.format(version))
|
os.chdir('librewolf-{}'.format(version))
|
||||||
|
|
||||||
# patches
|
# patches
|
||||||
|
if debug:
|
||||||
|
exec('cp -v ../assets/mozconfig.windows.debug mozconfig')
|
||||||
|
else:
|
||||||
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
||||||
|
|
||||||
patch('../assets/package-manifest.patch')
|
patch('../assets/package-manifest.patch')
|
||||||
|
|
||||||
# perform the build and package
|
# perform the build and package
|
||||||
|
|
@ -142,7 +146,7 @@ def artifacts():
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# utility function
|
# Utility function to upload() function.
|
||||||
def do_upload(filename,token):
|
def do_upload(filename,token):
|
||||||
exec('echo _ >> upload.txt')
|
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)
|
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:
|
commands:
|
||||||
fetch
|
fetch
|
||||||
build
|
build
|
||||||
|
build-debug
|
||||||
artifacts
|
artifacts
|
||||||
upload <token>
|
upload <token>
|
||||||
|
|
||||||
|
|
@ -198,6 +203,9 @@ for arg in sys.argv:
|
||||||
elif arg == 'build':
|
elif arg == 'build':
|
||||||
build()
|
build()
|
||||||
done_something = True
|
done_something = True
|
||||||
|
elif arg == 'build-debug':
|
||||||
|
build(True)
|
||||||
|
done_something = True
|
||||||
elif arg == 'artifacts':
|
elif arg == 'artifacts':
|
||||||
artifacts()
|
artifacts()
|
||||||
done_something = True
|
done_something = True
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue