зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1434365: Allow repackaging thunderbird installer with mach; r=nalexander via IRC - DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D515 --HG-- extra : source : 9f602face4f8b7e8f0f56476159cfcd90e861ecd extra : amend_source : dfd1af2a87e3864ad1204710f673bfed92da222c
This commit is contained in:
Родитель
c6da5f8b76
Коммит
667424786a
|
@ -2169,9 +2169,21 @@ class Repackage(MachCommandBase):
|
|||
help='Optional package .zip for building a full installer')
|
||||
@CommandArgument('--output', '-o', type=str, required=True,
|
||||
help='Output filename')
|
||||
def repackage_installer(self, tag, setupexe, package, output):
|
||||
@CommandArgument('--package-name', type=str, required=False,
|
||||
help='Name of the package being rebuilt')
|
||||
@CommandArgument('--sfx-stub', type=str, required=True,
|
||||
help='Path to the self-extraction stub.')
|
||||
def repackage_installer(self, tag, setupexe, package, output, package_name, sfx_stub):
|
||||
from mozbuild.repackaging.installer import repackage_installer
|
||||
repackage_installer(self.topsrcdir, tag, setupexe, package, output)
|
||||
repackage_installer(
|
||||
topsrcdir=self.topsrcdir,
|
||||
tag=tag,
|
||||
setupexe=setupexe,
|
||||
package=package,
|
||||
output=output,
|
||||
package_name=package_name,
|
||||
sfx_stub=sfx_stub,
|
||||
)
|
||||
|
||||
@SubCommand('repackage', 'mar',
|
||||
description='Repackage into complete MAR file')
|
||||
|
|
|
@ -10,9 +10,14 @@ import mozpack.path as mozpath
|
|||
from mozbuild.action.exe_7z_archive import archive_exe
|
||||
from mozbuild.util import ensureParentDir
|
||||
|
||||
def repackage_installer(topsrcdir, tag, setupexe, package, output):
|
||||
|
||||
def repackage_installer(topsrcdir, tag, setupexe, package, output, package_name, sfx_stub):
|
||||
if package and not zipfile.is_zipfile(package):
|
||||
raise Exception("Package file %s is not a valid .zip file." % package)
|
||||
if package is not None and package_name is None:
|
||||
raise Exception("Package name must be provided, if a package is provided.")
|
||||
if package is None and package_name is not None:
|
||||
raise Exception("Package name must not be provided, if a package is not provided.")
|
||||
|
||||
# We need the full path for the tag and output, since we chdir later.
|
||||
tag = mozpath.realpath(tag)
|
||||
|
@ -35,9 +40,8 @@ def repackage_installer(topsrcdir, tag, setupexe, package, output):
|
|||
# unpacked (the tmpdir)
|
||||
os.chdir(tmpdir)
|
||||
|
||||
sfx_package = mozpath.join(topsrcdir, 'other-licenses/7zstub/firefox/7zSD.sfx')
|
||||
sfx_package = mozpath.join(topsrcdir, sfx_stub)
|
||||
|
||||
package_name = 'firefox' if package else None
|
||||
archive_exe(package_name, tag, sfx_package, output)
|
||||
|
||||
finally:
|
||||
|
|
|
@ -12,20 +12,23 @@ download_config = {
|
|||
|
||||
repackage_config = [[
|
||||
"installer",
|
||||
"--package-name", "firefox",
|
||||
"--package", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe"
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
], [
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--mar", "{abs_work_dir}\\inputs\\mar.exe",
|
||||
"-o", "{output_home}\\target.complete.mar"
|
||||
"-o", "{output_home}\\target.complete.mar",
|
||||
], [
|
||||
"installer",
|
||||
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\stub.tag",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup-stub.exe",
|
||||
"-o", "{output_home}\\target.stub-installer.exe"
|
||||
"-o", "{output_home}\\target.stub-installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
]]
|
||||
|
||||
config = {
|
||||
|
|
|
@ -10,15 +10,17 @@ download_config = {
|
|||
|
||||
repackage_config = [[
|
||||
"installer",
|
||||
"--package-name", "firefox",
|
||||
"--package", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe"
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
], [
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--mar", "{abs_work_dir}\\inputs\\mar.exe",
|
||||
"-o", "{output_home}\\target.complete.mar"
|
||||
"-o", "{output_home}\\target.complete.mar",
|
||||
]]
|
||||
|
||||
config = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче