Preparations in Eclipse
If we open the file index.html we can see that the JS files are included inside of a directory named *.GwtDefinition.

1. We make sure to delete all *. Cache.js files in that directory (if any).

Compiling the LibGDX HTML Version
2. Instead of using "SuperDevmode" through of Run_As .. Java Application & Run_As.. Web Application, we compile with GWT in final form.

3. In Output style you can choose between Obfuscated, Pretty or Detailed.
In the box "additional compiler arguments" we can use the -draftCompile option for a faster compilation (only for testing).

We will see the compile process and once completed the files are ready in the \war directory.

Preparations in Visual Studio 2013
4. Open a new project from Visual Studio 2013.

5. We are located in our work area and select Templates > Javascript > Store Apps > Universal Apps > Blank App (Universal Apps).

6. Copy the files previously generated by GWT in the step 3, in the \war folder, except the \war\WEB-INF directory.

7. Paste over the Shared node of our project.

Being as follows:

8. Open the package.appxmanifest file of the project "Windows 8.1" and in the "Start page" option replace default.html by index.html.
► IDEM for the project "Windows Phone 8.1".

Running on Windows Desktop / Tablet 8.1
9. Open the default.html file of the project "Windows 8.1" and copy the lines of the WinJS scripts.

10. Paste the lines in the index.html file, before of SoundManager scripts.

In this moment we can perform a test.

Windows App Certification Kit on Windows Desktop / Tablet 8.1
11. We completed the application assigning images in the "Visual Assets" tab.
► IDEM for the project "Windows Phone 8.1".




12. Again select the "Windows 8.1" project and open PROJECT > Store > Create App Packages..

13. Select "NO" on the question and hit on "Next".

14. We number our version and choose the type "Release (Any CPU)". Hit on "Create".

15. Once created the files in yourProject\yourProject.Windows\AppPackages, hit on "Launch Windows App Certification Kit" in "Local machine" mode.

16. Select all test and hit on "Next".

We let that perform the validation of the App.

Validating no are finish well.

We see that the cause of errors is the encoding of the files.


17. We solve by opening the reported files.

18. One by one we are doing "Save As." and save to "UTF-8 with signature".



Now should pass successfully the validation of the "Windows App Certification Kit", so we repeat from step 12.

Running on Windows Phone 8.1
19. Open the default.html file of the project "Windows Phone 8.1" and copy the lines of the WinJS scripts.

20. Paste the lines in the index.html file, before of SoundManager scripts (replace the scripts we use in step 10 to the project of "Windows 8.1").

In this moment we can perform a test if we have a phone with Windows Phone connected to PC or emulator (https://dev.windowsphone.com/en-us/downloadsdk).

At this moment the error that we get from IE 11 with a Windows Phone 8.1 phone is this:

From IE 11 on Windows Desktop 8.1 we not get this error.
Windows App Certification Kit on Windows Phone 8.1
21. Select the "Windows Phone 8.1" project and open PROJECT > Store > Create App Packages..

22. Select "NO" on the question and hit on "Next".

23. We number our version and choose the type "Release (Any CPU)". Hit on "Create".

24. Once created the files in yourProject\yourProject.WindowsPhone\AppPackages, hit on "Launch Windows App Certification Kit".

25. Select all test and hit on "Next".

We let that perform the validation of the App.

If we had done step 17 of encode the files to "UTF-8 with signature" everything should go smoothly.

After executing successfully the above steps, we have our game running over our "Windows" friend
