mozbuild.repackaging package


mozbuild.repackaging.application_ini module

mozbuild.repackaging.application_ini.get_application_ini_value(finder_or_application_directory, section, value, fallback=None)

Find string with given section and value in any application.ini under given directory or finder.

If string is not found and fallback is given, find string with given section and fallback instead.

Raises an Exception if no string is found.

mozbuild.repackaging.application_ini.get_application_ini_values(finder_or_application_directory, *args)

Find multiple strings for given section and value pairs. Additional args should be dictionaries with keys section, value, and optional fallback. Returns an iterable of strings, one for each dictionary provided.

fallback is treated as with get_application_ini_value.

Raises an Exception if any string is not found.

mozbuild.repackaging.dmg module

mozbuild.repackaging.dmg.repackage_dmg(infile, output)

mozbuild.repackaging.installer module

mozbuild.repackaging.installer.repackage_installer(topsrcdir, tag, setupexe, package, output, package_name, sfx_stub, use_upx)

mozbuild.repackaging.mar module

mozbuild.repackaging.mar.repackage_mar(topsrcdir, package, mar, output, arch=None, mar_channel_id=None)

mozbuild.repackaging.msi module

mozbuild.repackaging.msi.repackage_msi(topsrcdir, wsx, version, locale, arch, setupexe, candle, light, output)
mozbuild.repackaging.msi.update_wsx(wfile, pvalues)

mozbuild.repackaging.msix module

Repackage ZIP archives (or directories) into MSIX App Packages.

# Known issues

  • The icons in the Start Menu have a solid colour tile behind them. I think this is an issue with plating.

mozbuild.repackaging.msix.find_sdk_tool(binary, log=None)
mozbuild.repackaging.msix.get_appconstants_jsm_values(finder, *args)

Extract values, such as the display version like MOZ_APP_VERSION_DISPLAY: “…”;, from the omnijar. This allows to determine the beta number, like X.YbW, where the regular beta version is only X.Y. Takes a list of names and returns an iterator of the unique such value found for each name. Raises an exception if a name is not found or if multiple values are found.

mozbuild.repackaging.msix.get_embedded_version(version, buildid)

Turn a display version into “dotted quad” notation.

N.b.: some parts of the MSIX packaging ecosystem require the final part of the dotted quad to be identically 0, so we enforce that here.

mozbuild.repackaging.msix.log_copy_result(log, elapsed, destdir, result)
mozbuild.repackaging.msix.repackage_msix(dir_or_package, channel=None, branding=None, template=None, distribution_dirs=[], locale_allowlist={}, version=None, vendor=None, displayname=None, app_name='firefox', identity=None, publisher=None, publisher_display_name='Mozilla Corporation', arch=None, output=None, force=False, log=None, verbose=False, makeappx=None)
mozbuild.repackaging.msix.sign_msix(output, force=False, log=None, verbose=False)

Sign an MSIX with a locally generated self-signed certificate.

mozbuild.repackaging.msix.unpack_msix(input_msix, output, log=None, verbose=False)

Unpack the given MSIX to the given output directory.

MSIX packages are ZIP files, but they are Zip64/version 4.5 ZIP files, so doesn’t yet handle. Unpack using unzip{.exe} for simplicity.

In addition, file names inside the MSIX package are URL quoted. URL unquote here.

Module contents