Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign UWP packages by default. #25661

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Sign UWP packages by default.

  • Loading branch information
jdm committed Feb 14, 2020
commit c109ae78b8d74632430af5fb924c0a4bba5cb55b
@@ -209,8 +209,11 @@ class PackageCommands(CommandBase):
default=None,
action='append',
help='Create an APPX package')
@CommandArgument('--ms-app-store',
default=None,
action='store_true')
def package(self, release=False, dev=False, android=None, magicleap=None, debug=False,
debugger=None, target=None, flavor=None, maven=False, uwp=None):
debugger=None, target=None, flavor=None, maven=False, uwp=None, ms_app_store=False):
if android is None:
android = self.config["build"]["android"]
if target and android:
@@ -234,7 +237,7 @@ def package(self, release=False, dev=False, android=None, magicleap=None, debug=
target_dir = path.dirname(binary_path)
if uwp:
vs_info = self.vs_dirs()
build_uwp(uwp, dev, vs_info['msbuild'])
build_uwp(uwp, dev, vs_info['msbuild'], not ms_app_store)
elif magicleap:
if platform.system() not in ["Darwin"]:
raise Exception("Magic Leap builds are only supported on macOS.")
@@ -739,7 +742,7 @@ def call_git(cmd, **kwargs):
return 0


def build_uwp(platforms, dev, msbuild_dir):
def build_uwp(platforms, dev, msbuild_dir, sign_package):
if any(map(lambda p: p not in ['x64', 'x86', 'arm64'], platforms)):
raise Exception("Unsupported appx platforms: " + str(platforms))
if dev and len(platforms) > 1:
@@ -764,7 +767,8 @@ def build_uwp(platforms, dev, msbuild_dir):
)
build_file.close()
# Generate an appxbundle.
subprocess.check_call([msbuild, "/m", build_file.name])
sign_package_value = "true" if sign_package else "false"
subprocess.check_call([msbuild, "/m", build_file.name, "/p:AppxPackageSigningEnabled=" + sign_package_value])
os.unlink(build_file.name)

print("Creating ZIP")
@@ -62,14 +62,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>ServoApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
<PackageCertificateThumbprint>45A22CA001C9C6BE412BF449FBE70FEDE635831F</PackageCertificateThumbprint>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
Binary file not shown.
@@ -9,6 +9,6 @@
</ConfigAndPlatform>
</ItemGroup>
<MSBuild Projects="%%SOLUTION%%" Targets="Build"
Properties="Configuration=%(ConfigAndPlatform.Identity);Platform=%(ConfigAndPlatform.Platform);AppxBundle=Always;AppxBundlePlatforms=%%PACKAGE_PLATFORMS%%;UseSubFolderForOutputDirDuringMultiPlatformBuild=false;AppxPackageSigningEnabled=false"/>
Properties="Configuration=%(ConfigAndPlatform.Identity);Platform=%(ConfigAndPlatform.Platform);AppxBundle=Always;AppxBundlePlatforms=%%PACKAGE_PLATFORMS%%;UseSubFolderForOutputDirDuringMultiPlatformBuild=false"/>
</Target>
</Project>
</Project>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.