Converting an app for Windows Store without Desktop Converter

Since the Desktop Converter has been deprecated I will try to give a super brief overview how we proceeded to convert apps for Microsoft Store manually.

This is based on part 1 of the series. We are using the folder _assets-winstore which contains the subfolders Assets and Strings that were created in part 1, as well as the resources.pri file and the AppManifest.xml. The app manifest was originally created with the Desktop Converter but we extended and modified it manually from there. It looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:rescap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:wincap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/windowscapabilities/3" IgnorableNamespaces="uap4 wincap3 rescap3 desktop2 desktop3 com">
  <Identity Name="[UWP_PACKAGE_NAME]" ProcessorArchitecture="x86" Publisher="CN=545F4CB0-739D-4B07-A9DA-C97C94EFE557" Version="[UWP_VERSION].0" />
  <Properties>
    <DisplayName>ms-resource:Resources/PackageDisplayName</DisplayName>
    <PublisherDisplayName>ms-resource:Resources/PublisherDisplayName</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Resources>
    [UWP_LANGUAGES]
    <Resource uap:Scale="100" />
    <Resource uap:Scale="125" />
    <Resource uap:Scale="150" />
    <Resource uap:Scale="200" />
    <Resource uap:Scale="400" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="[WINSDK_VERSION]" />
  </Dependencies>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <Capability Name="internetClient" />
  </Capabilities>
  <Applications>
    <Application Id="[UWP_APP_ID]" Executable="[PROJECT_NAME].exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="ms-resource:Resources/ApplicationDisplayName" Description="ms-resource:Resources/ApplicationDescription" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
        <uap:DefaultTile ShortName="ms-resource:Resources/TileShortName" Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png">
          <uap:ShowNameOnTiles>
            <uap:ShowOn Tile="square150x150Logo" />
            <uap:ShowOn Tile="wide310x150Logo" />
            <uap:ShowOn Tile="square310x310Logo" />
          </uap:ShowNameOnTiles>
        </uap:DefaultTile>
      </uap:VisualElements>
      <Extensions>
        <!-- This part should be optional as we were using URI handlers to open our app from a URL -->
        <uap3:Extension Category="windows.appUriHandler">
          <uap3:AppUriHandler>
            <uap3:Host Name="[DOMAIN]" />
          </uap3:AppUriHandler>
        </uap3:Extension>
        <uap:Extension Category="windows.protocol">
          <uap:Protocol Name="[PROJECT_NAME">
            <uap:Logo>Assets\Square310x310Logo.png</uap:Logo>
            <uap:DisplayName>ms-resource:Resources/ApplicationDisplayName</uap:DisplayName>
          </uap:Protocol>
        </uap:Extension>
      </Extensions>
    </Application>
  </Applications>
</Package>

From there we pack the compiled swf project into an appx file like so. This is Ant, but you should be able to convert this back to a regular cmd.

<property name="targetWinstore" value="folder/to/compiled/swf" />
<property name="targetAppx" value="output/appname.appx" />

<target name="bundle-appx">
		
	<!-- copy assets into project -->
	<copy todir="${targetWinstore}" overwrite="true">
		<fileset dir="_assets-winstore"/>
	</copy>
		
	<echo message="Packaging appx for ${gamedir} ..." />
		
	<exec executable="cmd" failonerror="true">			
		<arg value="/c"/>
		<arg value="${WINSDK_BIN}/makeappx.exe"/>
		<arg value="pack"/>
		<arg value="/o"/>
		<arg value="/d"/>
		<arg value="${targetWinstore}"/>
		<arg value="/p"/>
		<arg value="${targetAppx}"/>
	</exec>
		
	<echo message="Signing appx for ${gamedir} ..." />
		
	<exec executable="cmd" failonerror="true">			
		<arg value="/c"/>
		<arg value="${WINSDK_BIN}/signtool.exe"/>
		<arg value="sign"/>
		<arg value="/fd"/>
		<arg value="SHA256"/>
		<arg value="/a"/>
		<arg value="/f"/>
		<arg value="../_cert/desktop-winstore.pfx"/>
		<arg value="/p"/>
		<arg value="XXX"/>
		<arg value="${targetAppx}"/>
	</exec>
		
</target>

That’s it basically. I hope it will be enough to follow along. Let me know if there are issues or info is missing.

Leave a Reply

Your email address will not be published.