зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1728638 - Parameters to set MSIX `Package/Identity/{Name,Publisher}` and `Package/Properties/PublisherDisplayName`. r=bhearsum
This is just rearranging some deck chairs as we hammer out details in our MSIX package publication pipeline. Differential Revision: https://phabricator.services.mozilla.com/D124264
This commit is contained in:
Родитель
a918f3956d
Коммит
4f5281d096
|
@ -67,7 +67,7 @@ make testing the first-run experience challenging. What can be done is
|
|||
to install the MSIX package (perhaps using
|
||||
``Add-AppxPackage -Path ...``) and determine the profile directory
|
||||
(using ``about:support``). Uninstall the MSIX package (perhaps using
|
||||
``Get-AppxPackage | Where -Property Name -like "Mozilla.Firefox.*" | Remove-AppxPackage``).
|
||||
``Get-AppxPackage | Where -Property Name -like "Mozilla.*" | Remove-AppxPackage``).
|
||||
Delete the contents of the profile directory entirely, but add a file
|
||||
``user.js`` containing:
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<Identity Name="@APPX_IDENTITY@" Publisher="@APPX_PUBLISHER@" Version="@APPX_VERSION@" ProcessorArchitecture="@APPX_ARCH@" />
|
||||
<Properties>
|
||||
<DisplayName>@APPX_DISPLAYNAME@</DisplayName>
|
||||
<PublisherDisplayName>@MOZ_APP_VENDOR@</PublisherDisplayName>
|
||||
<PublisherDisplayName>@APPX_PUBLISHER_DISPLAY_NAME@</PublisherDisplayName>
|
||||
<Description>@APPX_DESCRIPTION@</Description>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
<uap10:PackageIntegrity>
|
||||
|
|
|
@ -2163,6 +2163,22 @@ class Repackage(MachCommandBase):
|
|||
required=True,
|
||||
help="The architecture you are building (Choices: 'x86', 'x86_64', 'aarch64').",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--vendor",
|
||||
type=str,
|
||||
default="Mozilla",
|
||||
required=False,
|
||||
help="The vendor to use in the Package/Identity/Name string to use in the App Manifest."
|
||||
+ " Defaults to 'Mozilla'.",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--identity-name",
|
||||
type=str,
|
||||
default=None,
|
||||
required=False,
|
||||
help="The Package/Identity/Name string to use in the App Manifest."
|
||||
+ " Defaults to '<vendor>.Firefox', '<vendor>.FirefoxBeta', etc.",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--publisher",
|
||||
type=str,
|
||||
|
@ -2170,8 +2186,16 @@ class Repackage(MachCommandBase):
|
|||
# not extract a constant.
|
||||
default="CN=Mozilla Corporation, OU=MSIX Packaging",
|
||||
required=False,
|
||||
help="The Publisher string to use in the App Manifest."
|
||||
+ " It must match the subject on the certificate used for signing",
|
||||
help="The Package/Identity/Publisher string to use in the App Manifest."
|
||||
+ " It must match the subject on the certificate used for signing.",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--publisher-display-name",
|
||||
type=str,
|
||||
default="Mozilla Corporation",
|
||||
required=False,
|
||||
help="The Package/Properties/PublisherDisplayName string to use in the App Manifest. "
|
||||
+ " Defaults to 'Mozilla Corporation'.",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--makeappx",
|
||||
|
@ -2203,7 +2227,10 @@ class Repackage(MachCommandBase):
|
|||
channel=None,
|
||||
distribution_dirs=[],
|
||||
arch=None,
|
||||
identity_name=None,
|
||||
vendor=None,
|
||||
publisher=None,
|
||||
publisher_display_name=None,
|
||||
verbose=False,
|
||||
output=None,
|
||||
makeappx=None,
|
||||
|
@ -2238,7 +2265,10 @@ class Repackage(MachCommandBase):
|
|||
template=template,
|
||||
branding=branding,
|
||||
arch=arch,
|
||||
displayname=identity_name,
|
||||
vendor=vendor,
|
||||
publisher=publisher,
|
||||
publisher_display_name=publisher_display_name,
|
||||
version=version,
|
||||
distribution_dirs=distribution_dirs,
|
||||
locale_allowlist=locale_allowlist,
|
||||
|
|
|
@ -164,12 +164,13 @@ def repackage_msix(
|
|||
distribution_dirs=[],
|
||||
locale_allowlist=set(),
|
||||
version=None,
|
||||
vendor="Mozilla",
|
||||
vendor=None,
|
||||
displayname=None,
|
||||
app_name="firefox",
|
||||
identity=None,
|
||||
arch=None,
|
||||
publisher=None,
|
||||
publisher_display_name="Mozilla Corporation",
|
||||
arch=None,
|
||||
output=None,
|
||||
force=False,
|
||||
log=None,
|
||||
|
@ -205,11 +206,14 @@ def repackage_msix(
|
|||
values = get_application_ini_values(
|
||||
finder,
|
||||
dict(section="App", value="CodeName", fallback="Name"),
|
||||
dict(section="App", value="Vendor"),
|
||||
dict(section="App", value="Version"),
|
||||
dict(section="App", value="BuildID"),
|
||||
)
|
||||
first = next(values)
|
||||
displayname = displayname or first
|
||||
displayname = displayname or "Mozilla {}".format(first)
|
||||
second = next(values)
|
||||
vendor = vendor or second
|
||||
if not version:
|
||||
version = next(values)
|
||||
buildid = next(values)
|
||||
|
@ -262,14 +266,12 @@ def repackage_msix(
|
|||
# and/or errors between regularly installed builds and App Package builds.
|
||||
instdir = "{} Package Root".format(displayname)
|
||||
|
||||
# Microsoft names its packages like "Microsoft.VCLibs.140.00.UWPDesktop".
|
||||
# Hyphenated (kebab) names seem to install correctly, but `Remove-AppPackage
|
||||
# kebab-name` seems to fail in some cases.
|
||||
identity = identity or "{}.{}".format(vendor, displayname.replace(" ", "."))
|
||||
# The standard package name is like "CompanyNoSpaces.ProductNoSpaces".
|
||||
identity = identity or "{}.{}".format(vendor, displayname).replace(" ", "")
|
||||
|
||||
# We might want to include the publisher ID hash here. I.e.,
|
||||
# "__{publisherID}". My locally produced MSIX was named like
|
||||
# `Mozilla.Firefox.Nightly_89.0.0.0_x64__4gf61r4q480j0`, suggesting also a
|
||||
# `Mozilla.MozillaFirefoxNightly_89.0.0.0_x64__4gf61r4q480j0`, suggesting also a
|
||||
# missing field, but it's necessary, since this is just an output file name.
|
||||
package_output_name = "{identity}_{version}_{arch}".format(
|
||||
identity=identity, version=version, arch=_MSIX_ARCH[arch]
|
||||
|
@ -403,11 +405,11 @@ def repackage_msix(
|
|||
# Like 'Firefox%20Package%20Root'.
|
||||
"APPX_INSTDIR_QUOTED": urllib.parse.quote(instdir),
|
||||
"APPX_PUBLISHER": publisher,
|
||||
"APPX_PUBLISHER_DISPLAY_NAME": publisher_display_name,
|
||||
"APPX_RESOURCE_LANGUAGE_LIST": resource_language_list,
|
||||
"APPX_VERSION": version,
|
||||
"MOZ_APP_DISPLAYNAME": displayname,
|
||||
"MOZ_APP_NAME": app_name,
|
||||
"MOZ_APP_VENDOR": vendor,
|
||||
"MOZ_IGECKOBACKCHANNEL_IID": MOZ_IGECKOBACKCHANNEL_IID,
|
||||
}
|
||||
|
||||
|
@ -686,7 +688,7 @@ powershell -c 'Get-AuthenticodeSignature -FilePath "{output}" | Format-List *'
|
|||
To install this MSIX:
|
||||
powershell -c 'Add-AppPackage -path "{output}"'
|
||||
To see details after installing:
|
||||
powershell -c 'Get-AppPackage -name Mozilla.Firefox(.Beta,...)'
|
||||
powershell -c 'Get-AppPackage -name Mozilla.MozillaFirefox(Beta,...)'
|
||||
""".strip(),
|
||||
)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче