Add ARM64 target and introduce ARM64 package creation script (#43)

This commit is contained in:
Ben Hillis 2018-05-09 14:54:38 -07:00 коммит произвёл GitHub
Родитель 28be2cbd4b
Коммит 221b4ef881
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 56 добавлений и 3 удалений

Просмотреть файл

@ -77,6 +77,7 @@
<PropertyGroup>
<PackageCertificateKeyFile>DistroLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Never</AppxBundle>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
@ -89,7 +90,14 @@
<SubType>Designer</SubType>
</AppxManifest>
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="..\install.tar.gz">
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='x64'">
<None Include="..\x64\install.tar.gz">
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='ARM64'">
<None Include="..\ARM64\install.tar.gz">
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>

Просмотреть файл

@ -151,6 +151,10 @@
</ItemGroup>
<ItemGroup>
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="..\install.tar.gz" />
<None Include="..\ARM64\install.tar.gz" />
<None Include="..\x64\install.tar.gz" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="$(targetname)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -12,17 +12,29 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DistroLauncher-Appx", "Dist
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.Build.0 = Debug|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.ActiveCfg = Debug|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.Build.0 = Debug|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.ActiveCfg = Release|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.Build.0 = Release|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.ActiveCfg = Release|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.Build.0 = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Build.0 = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Deploy.0 = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.ActiveCfg = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Build.0 = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Deploy.0 = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.ActiveCfg = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Build.0 = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Deploy.0 = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.ActiveCfg = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Build.0 = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Deploy.0 = Release|x64

Просмотреть файл

@ -163,7 +163,16 @@ You'll also need to change a few small things in your project to prepare your di
> **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.
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.
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.
3. How to publish ARM64 appx:
1. In Visual Studio Project > Store > Create App Packages
2. Select No for "Do you want to build packages to upload to the Window Store?" and click Next.
3. Ensure only the ARM64 Architecture is selected with "Release (ARM64)" as the Solution Configuration and click Next.
4. Launch "Developer Command Prompt for VS 2017" and navigate to the root of your solution.
5. Run "PowerShell.exe .\createARM64Package.ps1". You will need to update the appxPath and pfxFile variables at the top of the PowerShell script.
6. In Visual Studio Project > Store > Upload App Packages
7. Sign in with your developer.microsoft.com account and select the appx file that was created in step 5.
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.

20
createARM64Package.ps1 Normal file
Просмотреть файл

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