aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/package_commands.py
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2020-04-17 11:32:36 -0400
committerJosh Matthews <josh@joshmatthews.net>2020-04-17 11:32:36 -0400
commit699cf5b29b4501d05834f67a7a724d9a49e166ba (patch)
tree048a1d6fb00df92613d31f0613d0570c87196053 /python/servo/package_commands.py
parent0491933fb0d317f3b4fbea2bab928ac5e5ec857d (diff)
downloadservo-699cf5b29b4501d05834f67a7a724d9a49e166ba.tar.gz
servo-699cf5b29b4501d05834f67a7a724d9a49e166ba.zip
Remove version number from generated UWP archive.
Diffstat (limited to 'python/servo/package_commands.py')
-rw-r--r--python/servo/package_commands.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py
index f9024abfec8..85b2a32b37c 100644
--- a/python/servo/package_commands.py
+++ b/python/servo/package_commands.py
@@ -70,7 +70,7 @@ PACKAGES = {
r'target\release\msi\Servo.zip',
],
'uwp': [
- r'support\hololens\AppPackages\ServoApp\ServoApp_1.0.0.0_Test.zip',
+ r'support\hololens\AppPackages\ServoApp\FirefoxReality.zip',
],
}
@@ -743,7 +743,7 @@ class PackageCommands(CommandBase):
return 0
-def setup_uwp_signing(ms_app_store):
+def setup_uwp_signing(ms_app_store, publisher):
# App package needs to be signed. If we find a certificate that has been installed
# already, we use it. Otherwise we create and install a temporary certificate.
@@ -766,11 +766,6 @@ def setup_uwp_signing(ms_app_store):
run_powershell_cmd('Import-PfxCertificate -FilePath .\servo.pfx -CertStoreLocation Cert:\CurrentUser\My')
os.remove("servo.pfx")
- # Parse appxmanifest to find the publisher name
- manifest_file = path.join(os.getcwd(), 'support', 'hololens', 'ServoApp', 'Package.appxmanifest')
- manifest = xml.etree.ElementTree.parse(manifest_file)
- namespace = "{http://schemas.microsoft.com/appx/manifest/foundation/windows10}"
- publisher = manifest.getroot().find(namespace + "Identity").attrib["Publisher"]
# Powershell command that lists all certificates for publisher
cmd = '(dir cert: -Recurse | Where-Object {$_.Issuer -eq "' + publisher + '"}).Thumbprint'
certs = list(set(run_powershell_cmd(cmd).splitlines()))
@@ -806,6 +801,14 @@ def build_uwp(platforms, dev, msbuild_dir, ms_app_store):
else:
Configuration = "Release"
+ # Parse appxmanifest to find the publisher name and version
+ manifest_file = path.join(os.getcwd(), 'support', 'hololens', 'ServoApp', 'Package.appxmanifest')
+ manifest = xml.etree.ElementTree.parse(manifest_file)
+ namespace = "{http://schemas.microsoft.com/appx/manifest/foundation/windows10}"
+ identity = manifest.getroot().find(namespace + "Identity")
+ publisher = identity.attrib["Publisher"]
+ version = identity.attrib["Version"]
+
msbuild = path.join(msbuild_dir, "msbuild.exe")
build_file_template = path.join('support', 'hololens', 'package.msbuild')
with open(build_file_template) as f:
@@ -820,14 +823,14 @@ def build_uwp(platforms, dev, msbuild_dir, ms_app_store):
)
build_file.close()
# Generate an appxbundle.
- msbuild_args = setup_uwp_signing(ms_app_store)
+ msbuild_args = setup_uwp_signing(ms_app_store, publisher)
subprocess.check_call([msbuild, "/m", build_file.name] + msbuild_args)
os.unlink(build_file.name)
print("Creating ZIP")
out_dir = path.join(os.getcwd(), 'support', 'hololens', 'AppPackages', 'ServoApp')
- name = 'ServoApp_1.0.0.0_%sTest' % ('Debug_' if dev else '')
+ name = 'ServoApp_%s_%sTest' % (version, 'Debug_' if dev else '')
artifacts_dir = path.join(out_dir, name)
- zip_path = path.join(out_dir, name + ".zip")
+ zip_path = path.join(out_dir, "FirefoxReality.zip")
archive_deterministically(artifacts_dir, zip_path, prepend_path='servo/')
print("Packaged Servo into " + zip_path)