Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Browse files Browse the repository at this point in the history
… Add CI artifacts and nightly build for UWP.
  • Loading branch information
jdm committed Sep 12, 2019
1 parent 6ce186b commit db0f49b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
35 changes: 15 additions & 20 deletions python/servo/package_commands.py
Expand Up @@ -750,24 +750,19 @@ def build_uwp(platforms, dev, msbuild_dir):
else:
Configuration = "Release"

# execute msbuild
# Note: /m implies to use as many CPU cores as possible while building.
# msbuild /m /p:project=ServoApp .\support\hololens\servoapp.sln
# /p:Configuration="Debug" /p:Platform="x64" /property:AppxBundle=Always;AppxBundlePlatforms="x64"
msbuild = path.join(msbuild_dir, "msbuild.exe")
project = path.join('.', 'support', 'hololens', 'ServoApp.sln')
args = [
msbuild,
"/m",
"/p:project=ServoApp",
project,
"/p:Configuration=" + Configuration,
"/p:AppxBundle=Always",
"/p:AppxBundlePlatforms=%s" % '|'.join(platforms),
]

if len(platforms) == 1:
args += ["/p:Platform=%s" % platforms[0]]

# Generate an appxbundle.
subprocess.check_call(args)
build_file_template = path.join('support', 'hololens', 'package.msbuild')
with open(build_file_template) as f:
template_contents = f.read()
build_file = tempfile.NamedTemporaryFile(delete=False)
build_file.write(
template_contents
.replace("%%BUILD_PLATFORMS%%", ';'.join(platforms))
.replace("%%PACKAGE_PLATFORMS%%", '|'.join(platforms))
.replace("%%CONFIGURATION%%", Configuration)
.replace("%%SOLUTION%%", path.join(os.getcwd(), 'support', 'hololens', 'ServoApp.sln'))
)
build_file.close()
# Generate an appxbundle.
subprocess.check_call([msbuild, "/m", build_file.name])
os.unlink(build_file.name)
6 changes: 3 additions & 3 deletions support/hololens/ServoApp.sln
Expand Up @@ -19,9 +19,9 @@ Global
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Debug|x64.ActiveCfg = Debug|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Debug|x64.Build.0 = Debug|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Debug|x64.Deploy.0 = Debug|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.ActiveCfg = Release|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.Build.0 = Release|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.Deploy.0 = Release|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.ActiveCfg = Release|ARM64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.Build.0 = Release|ARM64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|ARM64.Deploy.0 = Release|ARM64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|x64.ActiveCfg = Release|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|x64.Build.0 = Release|x64
{0EAB7D8B-97FD-4C92-8BB2-D5691B3D5ABD}.Release|x64.Deploy.0 = Release|x64
Expand Down
14 changes: 14 additions & 0 deletions support/hololens/package.msbuild
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="FullRebuild">
<Target Name="FullRebuild">
<ItemGroup>
<Configurations Include="%%CONFIGURATION%%"/>
<Platforms Include="%%BUILD_PLATFORMS%%"/>
<ConfigAndPlatform Include="@(Configurations)">
<Platform>%(Platforms.Identity)</Platform>
</ConfigAndPlatform>
</ItemGroup>
<MSBuild Projects="%%SOLUTION%%" Targets="Build"
Properties="Configuration=%(ConfigAndPlatform.Identity);Platform=%(ConfigAndPlatform.Platform);AppxBundle=Always;AppxBundlePlatforms=%%PACKAGE_PLATFORMS%%;UseSubFolderForOutputDirDuringMultiPlatformBuild=false"/>
</Target>
</Project>

0 comments on commit db0f49b

Please sign in to comment.