Skip to content

Commit 221b4ef

Browse files
author
Ben Hillis
authoredMay 9, 2018
Add ARM64 target and introduce ARM64 package creation script (WhitewaterFoundry#43)
1 parent 28be2cb commit 221b4ef

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed
 

‎DistroLauncher-Appx/DistroLauncher-Appx.vcxproj

+9-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<PropertyGroup>
7878
<PackageCertificateKeyFile>DistroLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
7979
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
80+
<AppxBundle>Never</AppxBundle>
8081
</PropertyGroup>
8182
<ItemDefinitionGroup>
8283
<Link>
@@ -89,7 +90,14 @@
8990
<SubType>Designer</SubType>
9091
</AppxManifest>
9192
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
92-
<None Include="..\install.tar.gz">
93+
</ItemGroup>
94+
<ItemGroup Condition="'$(Platform)'=='x64'">
95+
<None Include="..\x64\install.tar.gz">
96+
<DeploymentContent>true</DeploymentContent>
97+
</None>
98+
</ItemGroup>
99+
<ItemGroup Condition="'$(Platform)'=='ARM64'">
100+
<None Include="..\ARM64\install.tar.gz">
93101
<DeploymentContent>true</DeploymentContent>
94102
</None>
95103
</ItemGroup>

‎DistroLauncher-Appx/DistroLauncher-Appx.vcxproj.filters

+5-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@
151151
</ItemGroup>
152152
<ItemGroup>
153153
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
154-
<None Include="..\install.tar.gz" />
154+
<None Include="..\ARM64\install.tar.gz" />
155+
<None Include="..\x64\install.tar.gz" />
156+
</ItemGroup>
157+
<ItemGroup>
158+
<CustomBuild Include="$(targetname)" />
155159
</ItemGroup>
156160
</Project>

‎DistroLauncher.sln

+12
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,29 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DistroLauncher-Appx", "Dist
1212
EndProject
1313
Global
1414
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|ARM64 = Debug|ARM64
1516
Debug|x64 = Debug|x64
17+
Release|ARM64 = Release|ARM64
1618
Release|x64 = Release|x64
1719
EndGlobalSection
1820
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.ActiveCfg = Debug|ARM64
22+
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.Build.0 = Debug|ARM64
1923
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.ActiveCfg = Debug|x64
2024
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.Build.0 = Debug|x64
25+
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.ActiveCfg = Release|ARM64
26+
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.Build.0 = Release|ARM64
2127
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.ActiveCfg = Release|x64
2228
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.Build.0 = Release|x64
29+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.ActiveCfg = Debug|ARM64
30+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Build.0 = Debug|ARM64
31+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Deploy.0 = Debug|ARM64
2332
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.ActiveCfg = Debug|x64
2433
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Build.0 = Debug|x64
2534
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Deploy.0 = Debug|x64
35+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.ActiveCfg = Release|ARM64
36+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Build.0 = Release|ARM64
37+
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Deploy.0 = Release|ARM64
2638
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.ActiveCfg = Release|x64
2739
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Build.0 = Release|x64
2840
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Deploy.0 = Release|x64

‎README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,16 @@ You'll also need to change a few small things in your project to prepare your di
163163

164164
> **NOTE**: Visual Studio can update this for you! You can do that by right-clicking on "DistroLauncher-Appx (Universal Windows)" in the solution explorer and clicking on "Store... Associate App with the Store..." and following the wizard.
165165
166-
2. You will either need to run `build rel` from the command line to generate the Release version of your appx or use Visual Studio directly to upload your package to the store. You can do this by right-clicking on "DistroLauncher-Appx (Universal Windows)" in the solution explorer and clicking on "Store... Create App Packages..." and following the wizard.
166+
2. You will either need to run `build rel` from the command line to generate the Release version of your appx or use Visual Studio directly to upload your package to the store. You can do this by right-clicking on "DistroLauncher-Appx (Universal Windows)" in the solution explorer and clicking on "Store... Create App Packages..." and following the wizard.
167+
168+
3. How to publish ARM64 appx:
169+
1. In Visual Studio Project > Store > Create App Packages
170+
2. Select No for "Do you want to build packages to upload to the Window Store?" and click Next.
171+
3. Ensure only the ARM64 Architecture is selected with "Release (ARM64)" as the Solution Configuration and click Next.
172+
4. Launch "Developer Command Prompt for VS 2017" and navigate to the root of your solution.
173+
5. Run "PowerShell.exe .\createARM64Package.ps1". You will need to update the appxPath and pfxFile variables at the top of the PowerShell script.
174+
6. In Visual Studio Project > Store > Upload App Packages
175+
7. Sign in with your developer.microsoft.com account and select the appx file that was created in step 5.
167176

168177
Also, make sure to check out the [Notes for uploading to the Store](https://github.com/Microsoft/WSL-DistroLauncher/wiki/Notes-for-uploading-to-the-Store) page on our wiki for more information.
169178

‎createARM64Package.ps1

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Update these variables with the paths to the ARM64 appx and pfx used to sign the app.
2+
param (
3+
[string]$appxPath = "ARM64\Release\DistroLauncher-Appx\DistroLauncher-Appx_1.0.0.0_ARM64.appx",
4+
[string]$pfxFile = "DistroLauncher-Appx\DistroLauncher-Appx_TemporaryKey.pfx"
5+
)
6+
7+
# Modify the appxmanifest to replace arm64 processor architecture with arm to work around Microsoft Store ingestion issues.
8+
$tempArchive = ".\archive.zip"
9+
$tempFolder = ".\extracted"
10+
Copy-Item $appxPath -Destination $tempArchive
11+
Expand-Archive $tempArchive -DestinationPath $tempFolder -Force
12+
(Get-Content $tempFolder\AppxManifest.xml).replace('ProcessorArchitecture="arm64"', 'ProcessorArchitecture="arm"') | Set-Content $tempFolder\AppxManifest.xml
13+
14+
# Create and sign the appx.
15+
makeappx.exe pack /o /m $tempFolder\AppxManifest.xml /f "DistroLauncher-Appx\ARM64\Release\filemap.map.txt" /p $appxPath
16+
signtool.exe sign /v /f $pfxFile /fd SHA256 $appxPath
17+
18+
# Remove intermediate files.
19+
Remove-Item $tempArchive
20+
Remove-Item $tempFolder -Force -Recurse

0 commit comments

Comments
 (0)
Please sign in to comment.