diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 968fe6bdc11..cd4ca9b7fa8 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -301,15 +301,14 @@ def with_rust_nightly(): ) -def appx_artifact(debug): - return '/'.join([ - 'repo', - 'support', - 'hololens', - 'AppPackages', - 'ServoApp', - 'ServoApp_1.0.0.0_%sTest.zip' % ('Debug_' if debug else ''), - ]) +appx_artifact = '/'.join([ + 'repo', + 'support', + 'hololens', + 'AppPackages', + 'ServoApp', + 'FirefoxReality.zip', +]) def windows_arm64(rdp=False): @@ -322,7 +321,7 @@ def windows_arm64(rdp=False): "python mach build --dev --target=aarch64-uwp-windows-msvc", "python mach package --dev --target aarch64-uwp-windows-msvc --uwp=arm64", ) - .with_artifacts(appx_artifact(debug=True)) + .with_artifacts(appx_artifact) .find_or_create("build.windows_uwp_arm64_dev." + CONFIG.tree_hash()) ) @@ -338,7 +337,7 @@ def windows_uwp_x64(rdp=False): "python mach package --dev --target=x86_64-uwp-windows-msvc --uwp=x64", "python mach test-tidy --force-cpp --no-wpt", ) - .with_artifacts(appx_artifact(debug=True)) + .with_artifacts(appx_artifact) .find_or_create("build.windows_uwp_x64_dev." + CONFIG.tree_hash()) ) @@ -358,7 +357,7 @@ def uwp_nightly(rdp=False): "mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64 --uwp=arm64", "mach upload-nightly uwp --secret-from-taskcluster", ) - .with_artifacts(appx_artifact(debug=False)) + .with_artifacts(appx_artifact) .with_max_run_time_minutes(3 * 60) .find_or_create("build.windows_uwp_nightlies." + CONFIG.tree_hash()) ) diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 8df106e2a9e..5f27a6a6391 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', ], } @@ -627,8 +627,8 @@ class PackageCommands(CommandBase): nightly_dir = 'nightly/{}'.format(platform) filename = nightly_filename(package, timestamp) package_upload_key = '{}/{}'.format(nightly_dir, filename) - extension = path.basename(package).partition('.')[2] - latest_upload_key = '{}/servo-latest.{}'.format(nightly_dir, extension) + extension = path.splitext(path.basename(package))[1] + latest_upload_key = '{}/servo-latest{}'.format(nightly_dir, extension) s3.upload_file(package, BUCKET, package_upload_key) copy_source = { @@ -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,16 @@ 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 '') - artifacts_dir = path.join(out_dir, name) - zip_path = path.join(out_dir, name + ".zip") - archive_deterministically(artifacts_dir, zip_path, prepend_path='servo/') - print("Packaged Servo into " + zip_path) + # Don't bother creating an archive that contains unsigned app packages. + if not ms_app_store: + print("Creating ZIP") + out_dir = path.join(os.getcwd(), 'support', 'hololens', 'AppPackages', 'ServoApp') + name = 'ServoApp_%s_%sTest' % (version, 'Debug_' if dev else '') + artifacts_dir = path.join(out_dir, name) + zip_path = path.join(out_dir, "FirefoxReality.zip") + archive_deterministically(artifacts_dir, zip_path, prepend_path='servo/') + print("Packaged Servo into " + zip_path) diff --git a/support/hololens/ServoApp/Package.appxmanifest b/support/hololens/ServoApp/Package.appxmanifest index 26091d47f0a..84814494b6e 100644 --- a/support/hololens/ServoApp/Package.appxmanifest +++ b/support/hololens/ServoApp/Package.appxmanifest @@ -1,6 +1,6 @@  - + Firefox Reality