exporting_for_uwp.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. .. _doc_exporting_for_uwp:
  2. Exporting for Universal Windows Platform
  3. ========================================
  4. There's no extra requirement to export an ``.appx`` package that can be
  5. installed as a Windows App or submited to the Windows Store. Exporting
  6. packages also works from any platform, not only on Windows.
  7. However, if you want to install and run the app, you need to sign it with a
  8. trusted signature. Currently, Godot supports no signing of packages and you
  9. need to use externals to tools to do so.
  10. Also, make sure the Publisher name you set when export the package matches
  11. the name on the certificate.
  12. Limitations on Xbox One
  13. ------------
  14. As described in `UWP documentation <https://msdn.microsoft.com/en-us/windows/uwp/xbox-apps/system-resource-allocation>`__:
  15. - available RAM is 1GB (after exceeding it, application will encounter memory allocation failures and will crash)
  16. - share of 2-4 CPU cores
  17. - share of 45% of GPU power
  18. Creating a signing certificate
  19. ------------------------------
  20. This requires the tools ``MakeCert.exe`` and ``Pvk2Pfx.exe`` which comes
  21. with the Windows SDK. If you use Visual Studio, open one of its Developer
  22. Prompts since they come with those tools available and in the path.
  23. You can get more detailed instructions from `Microsoft documentation
  24. <https://msdn.microsoft.com/en-us/library/windows/desktop/jj835832(v=vs.85).aspx>`__.
  25. First, run ``MakeCert`` to create a private key::
  26. MakeCert /n publisherName /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e expirationDate /sv MyKey.pvk MyKey.cer
  27. Where ``publisherName`` matches the Publisher Name of your package and
  28. ``expirationDate`` is in the ``mm/dd/yyyy`` format.
  29. Next, create a Personal Information Exchange (.pfx) file using ``Pvk2Pfx.exe``::
  30. Pvk2Pfx /pvk MyKey.pvk /pi pvkPassword /spc MyKey.cer /pfx MyKey.pfx [/po pfxPassword]
  31. If you don't specify a password with ``/po`` argument, the PFX will have the
  32. same password as the private key.
  33. You also need to trust this certificate to be able to actually install the
  34. apps. Open the Command Prompt as Administrator and run the following command::
  35. Certutil -addStore TrustedPeople MyKey.cer
  36. Signing the package
  37. -------------------
  38. Using the ``SignTool.exe`` this requires a single command::
  39. SignTool sign /fd SHA256 /a /f MyKey.pfx /p pfxPassword package.appx
  40. Installing the package
  41. ----------------------
  42. After Windows 10 Anniversary Update you can install packages by just double
  43. clicking the ``.appx`` file from the Windows Explorer.
  44. It's also possible to install using the ``Add-AppxPackage`` PowerShell cmdlet.
  45. Note that if you don't update the version number, you'll have to uninstall the
  46. previous installed package before reinstalling it.