# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os import shutil import subprocess import sys import tempfile
import buildconfig import mozpack.path as mozpath
from mozbuild.base import BuildEnvironmentNotFoundException
try:
sevenz = buildconfig.config.substs["7Z"] except BuildEnvironmentNotFoundException: # configure hasn't been run, just use the default
sevenz = "7z"
subprocess.check_call(
[
sevenz, "a", "-r", "-t7z",
mozpath.join(tmpdir, "app.7z"), "-mx", "-m0=BCJ2", "-m1=LZMA:d25", "-m2=LZMA:d19", "-m3=LZMA:d19", "-mb0:1", "-mb0s1:2", "-mb0s2:3",
]
)
with open(package, "wb") as o: for i in [final_sfx, tagfile, mozpath.join(tmpdir, "app.7z")]:
shutil.copyfileobj(open(i, "rb"), o)
os.chmod(package, 0o0755) finally: if pkg_dir:
shutil.move("core", pkg_dir)
shutil.rmtree(tmpdir)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.