commit due to artifacts now having priority.
This commit is contained in:
parent
d9a155ccba
commit
1bfed68322
4 changed files with 63 additions and 13 deletions
2
Makefile
2
Makefile
|
|
@ -12,7 +12,7 @@ help :
|
||||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
@echo " artifacts - Create the setup.exe and the portable.zip."
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
all : fetch build artifact
|
all : fetch build artifacts
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -rf librewolf-$(shell cat version)
|
rm -rf librewolf-$(shell cat version)
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,13 @@ ac_add_options --enable-optimize
|
||||||
ac_add_options --enable-release
|
ac_add_options --enable-release
|
||||||
ac_add_options --enable-rust-simd
|
ac_add_options --enable-rust-simd
|
||||||
|
|
||||||
ac_add_options --with-app-name=librewolf
|
#ac_add_options --with-app-name=librewolf
|
||||||
ac_add_options --with-branding=browser/branding/librewolf
|
ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
#ac_add_options --with-distribution-id=io.gitlab.librewolf-community
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
|
||||||
|
# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49
|
||||||
export MOZ_REQUIRE_SIGNING=
|
export MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
mk_add_options MOZ_CRASHREPORTER=0
|
mk_add_options MOZ_CRASHREPORTER=0
|
||||||
|
|
|
||||||
15
assets/package-manifest.patch
Normal file
15
assets/package-manifest.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||||
|
index 4daacdb..8edd77f 100644
|
||||||
|
--- a/browser/installer/package-manifest.in
|
||||||
|
+++ b/browser/installer/package-manifest.in
|
||||||
|
@@ -397,8 +397,8 @@ bin/libfreebl_64int_3.so
|
||||||
|
; [MaintenanceService]
|
||||||
|
;
|
||||||
|
#ifdef MOZ_MAINTENANCE_SERVICE
|
||||||
|
-@BINPATH@/maintenanceservice.exe
|
||||||
|
-@BINPATH@/maintenanceservice_installer.exe
|
||||||
|
+;@BINPATH@/maintenanceservice.exe
|
||||||
|
+;@BINPATH@/maintenanceservice_installer.exe
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; [Crash Reporter]
|
||||||
55
mk.py
55
mk.py
|
|
@ -2,65 +2,98 @@
|
||||||
|
|
||||||
import os,sys,subprocess
|
import os,sys,subprocess
|
||||||
|
|
||||||
# note: change this to True when *not* on windows
|
|
||||||
_native = False
|
|
||||||
|
|
||||||
# native()/bash()/exec() utility functions
|
# native()/bash()/exec() utility functions
|
||||||
def native(cmd):
|
def native(cmd):
|
||||||
|
sys.stdout.flush()
|
||||||
print(cmd)
|
print(cmd)
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
retval = os.system(cmd)
|
retval = os.system(cmd)
|
||||||
if retval != 0:
|
if retval != 0:
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
|
_no_exit = False
|
||||||
def bash(cmd):
|
def bash(cmd):
|
||||||
tmp = []
|
tmp = []
|
||||||
tmp += ['c:/mozilla-build/msys/bin/bash.exe', '-c', cmd]
|
tmp += ['c:/mozilla-build/msys/bin/bash.exe', '-c', cmd]
|
||||||
|
sys.stdout.flush()
|
||||||
print(cmd)
|
print(cmd)
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
retval = subprocess.run(tmp).returncode
|
retval = subprocess.run(tmp).returncode
|
||||||
|
if _no_exit:
|
||||||
|
return
|
||||||
if retval != 0:
|
if retval != 0:
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
|
_native = False
|
||||||
|
_no_exit = False
|
||||||
def exec(cmd):
|
def exec(cmd):
|
||||||
if _native:
|
if _native:
|
||||||
return native(cmd)
|
return native(cmd)
|
||||||
return bash(cmd)
|
return bash(cmd)
|
||||||
|
|
||||||
#
|
def patch(patchfile):
|
||||||
# windows specific actions
|
cmd = "patch -p1 -i {}".format(patchfile)
|
||||||
#
|
sys.stdout.flush()
|
||||||
|
print("\n*** -> {}".format(cmd))
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
retval = os.system(cmd)
|
||||||
|
if retval != 0:
|
||||||
|
sys.stdout.flush()
|
||||||
|
print("fatal error: patch '{}' failed".format(patchfile))
|
||||||
|
sys.stdout.flush()
|
||||||
|
sys.exit(retval)
|
||||||
|
|
||||||
|
|
||||||
def win_before_build():
|
|
||||||
exec('cp -v assets/mozconfig.windows librewolf-$(cat version)/mozconfig')
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# main functions
|
# main functions
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
def fetch():
|
def fetch():
|
||||||
|
print('mk.py: fetch(): Disabled due to "artifacts" now has priority.')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
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-job')
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
|
print('mk.py: build(): Disabled due to "artifacts" now has priority.')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
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')
|
||||||
|
|
||||||
win_before_build()
|
|
||||||
|
|
||||||
with open('version','r') as file:
|
with open('version','r') as file:
|
||||||
version = file.read().rstrip()
|
version = file.read().rstrip()
|
||||||
os.chdir('librewolf-{}'.format(version))
|
os.chdir('librewolf-{}'.format(version))
|
||||||
|
|
||||||
|
# patches
|
||||||
|
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
||||||
|
patch('../assets/package-manifest.patch')
|
||||||
|
|
||||||
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build')
|
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build')
|
||||||
|
_no_exit = True
|
||||||
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package')
|
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package')
|
||||||
|
_no_exit = False
|
||||||
|
exec('cp -v obj-x86_64-pc-mingw32/dist/firefox-{}.en-US.win64.zip ..'.format(version))
|
||||||
|
os.chdir('..')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def artifacts():
|
def artifacts():
|
||||||
bash('# you gotta figure that out from the previous ./build.py')
|
bash('# guide - you gotta figure this out from the previous ./build.py')
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
with open('version','r') as file:
|
||||||
|
version = file.read().rstrip()
|
||||||
|
exec('cp -v librewolf-{}/obj-x86_64-pc-mingw32/dist/firefox-{}.en-US.win64.zip .'.format(version,version))
|
||||||
|
|
||||||
|
print('mk.py:artifacts(): done.')
|
||||||
|
|
||||||
#
|
#
|
||||||
# parse commandline for commands
|
# parse commandline for commands
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue