This commit is contained in:
Bert van der Weerd 2022-05-06 09:17:45 +02:00
parent 38061dd0bf
commit 2ea06c6718
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
2 changed files with 16 additions and 22 deletions

22
mk.py
View file

@ -1,8 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os,sys,subprocess,os.path import os,sys,subprocess,os.path
import assets.tools
from assets.tools import exec, patch from assets.tools import exec, patch
# #
@ -13,9 +11,6 @@ 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 serve_mar():
pass
def full_mar(): def full_mar():
with open('version','r') as file: with open('version','r') as file:
version = file.read().rstrip() version = file.read().rstrip()
@ -28,7 +23,7 @@ def full_mar():
objdir = 'obj-x86_64-pc-mingw32' objdir = 'obj-x86_64-pc-mingw32'
mar_output_path = 'MAR' mar_output_path = 'MAR'
# version already set # version already set
channel = 'DeFauLT' channel = 'default'
exec('mkdir -p MAR') # output folder exec('mkdir -p MAR') # output folder
exec('touch {}/dist/firefox/precomplete'.format(objdir)) exec('touch {}/dist/firefox/precomplete'.format(objdir))
@ -105,13 +100,12 @@ def build(debug=False):
patch('../assets/disable-verify-mar.patch') patch('../assets/disable-verify-mar.patch')
patch('../assets/tryfix-reslink-fail.patch') patch('../assets/tryfix-reslink-fail.patch')
# perform the build and package # perform the build and package.
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build') exec('MACH_USE_SYSTEM_PYTHON=1 ./mach build')
exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package') exec('MACH_USE_SYSTEM_PYTHON=1 ./mach package')
os.chdir('..') os.chdir('..')
def artifacts(): def artifacts():
# Trying to fix issue #146 -> https://gitlab.com/librewolf-community/browser/windows/-/issues/146 # Trying to fix issue #146 -> https://gitlab.com/librewolf-community/browser/windows/-/issues/146
@ -142,10 +136,13 @@ def artifacts():
# let's get 'release'. # let's get 'release'.
with open('release','r') as file2: with open('release','r') as file2:
release = file2.read().rstrip() release = file2.read().rstrip()
if release == '0' : source_release = ''
full_version = '{}'.format(version) with open('source_release','r') as file5:
source_release = file5.read().rstrip()
if release == '1' :
full_version = '{}-{}'.format(version,source_release)
else: else:
full_version = '{}.{}'.format(version,release) full_version = '{}-{}-{}'.format(version,source_release,release)
# let's copy in the .ico icon. # let's copy in the .ico icon.
exec('cp -v assets/librewolf.ico work/librewolf') exec('cp -v assets/librewolf.ico work/librewolf')
@ -278,9 +275,6 @@ for arg in sys.argv:
elif arg == 'full-mar': elif arg == 'full-mar':
full_mar() full_mar()
done_something = True done_something = True
elif arg == 'serve-mar':
serve_mar()
done_something = True
elif arg == 'upload': elif arg == 'upload':
in_upload = True in_upload = True
else: else:

View file

@ -1 +1 @@
2 3