Thursday, February 23, 2012

Packaging a JavaScript Metro Style App in Windows 8

The Metro Apps documentation uses a C# as an example. Just so we all know, we can compile a deliverable of our Metro Style JavaScript application by right-licking the *project* and picking "Store", "Create an App Package".

We can now configure a few settings for the application, as the version number.
Remember to set the solution to deploy as "Release" instead of "Debug" so the final files don't have "_debug" names.
Also, make sure you customized the "PackageName" field on the manifest, under the "Packaging" tab, or the id will be used later by validation tools, and it would be harder to figure out which is our app.

There will be typically four files:
- Batchfile with PowerShell install script
- Actual .appx solution
- .cer certificate base on the compiled machine name
- There will also be a .appxupload file we can later submit over to the app store.

The "Add-AppxDevPackage.bat" script can now be ran on any Windows 8 machine in order to install the application. Remember to right-click, "Run as administrator" or you'll get

Now its time to run the "Windows App Certification Kit" to check the app for possible issues.
In my case, wslkui.exe was available at C:\Program Files (x86)\Windows Kits\8.0\Software Logo Toolkit

My app showed "Passed with Warnings" due to eventual performance issues. Better luck to you!

No comments:

Post a Comment