exporting_for_uwp.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. :article_outdated: True
  2. .. _doc_exporting_for_uwp:
  3. Exporting for Universal Windows Platform
  4. ========================================
  5. .. seealso::
  6. This page describes how to export a Godot project to UWP.
  7. If you're looking to compile export template binaries from source instead,
  8. read :ref:`doc_compiling_for_uwp`.
  9. There's no extra requirement to export an ``.appx`` package that can be
  10. installed as a Windows App or submitted to the Windows Store. Exporting UWP
  11. packages also works from any platform, not only from Windows.
  12. However, if you want to install and run the app, you need to sign it with a
  13. trusted signature. Godot supports automatic signing of packages with
  14. external tools.
  15. Also, make sure the Publisher Name you set when exporting the package matches
  16. the name used on the certificate.
  17. Limitations on Xbox One
  18. -----------------------
  19. As described in the `UWP documentation <https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/system-resource-allocation>`__:
  20. - Submitted as an "App"
  21. - available memory is 1GB
  22. - share of 2-4 CPU cores
  23. - shared access of GPU power (45%)
  24. - Submitted as a "Game" (through `Xbox Live Creators Program <https://www.xbox.com/en-US/developers/creators-program>`__)
  25. - available memory is 5GB
  26. - 4 exclusive CPU cores and 2 shared CPU cores
  27. - exclusive access to GPU power (100%)
  28. - Exceeding these memory limitations will cause allocation failures and the application will crash.
  29. Creating a signing certificate
  30. ------------------------------
  31. This requires the ``MakeCert.exe`` and ``Pvk2Pfx.exe`` tools, which come with
  32. the Windows SDK. If you use Visual Studio, you can open one of its Developer
  33. Prompts, since it comes with these tools and they can be located in the path.
  34. You can get more detailed instructions from `Microsoft's documentation
  35. <https://msdn.microsoft.com/en-us/library/windows/desktop/jj835832(v=vs.85).aspx>`__.
  36. First, run ``MakeCert`` to create a private key::
  37. 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
  38. Where ``publisherName`` matches the Publisher Name of your package and
  39. ``expirationDate`` is in the ``mm/dd/yyyy`` format.
  40. Next, create a Personal Information Exchange (.pfx) file using ``Pvk2Pfx.exe``::
  41. Pvk2Pfx /pvk MyKey.pvk /pi pvkPassword /spc MyKey.cer /pfx MyKey.pfx [/po pfxPassword]
  42. If you don't specify a password with ``/po`` argument, the PFX will have the
  43. same password as the private key.
  44. You will also need to trust this certificate in order to be able to install your
  45. app. Open the Command Prompt as Administrator and run the following command::
  46. Certutil -addStore TrustedPeople MyKey.cer
  47. Setting up automatic signing
  48. ----------------------------
  49. To setup automatic signing on export you need to go to Editor Settings > Export > Uwp.
  50. From there you need to click on the folder for ``Signtool``, and navigate to
  51. the ``SignTool.exe`` file on your computer.
  52. .. image:: img/UWP_sign_tool.png
  53. After setting that up close the editor settings, go to Project > Export,
  54. and select the UWP preset. Under the ``Signing`` options click on the folder
  55. next to ``Certificate`` and go to the certificate file. Then enter the
  56. pfxPassword in the password field.
  57. .. image:: img/UWP_export_signing.png
  58. Your project will now be automatically signed on export.
  59. If you want to sign an exported app manually run ``SignTool.exe`` and use the
  60. following command.
  61. SignTool sign /fd SHA256 /a /f MyKey.pfx /p pfxPassword package.appx
  62. Installing the package
  63. ----------------------
  64. As of the Windows 10 Anniversary Update, you are able to install packages simply by
  65. double clicking the ``.appx`` file from Windows Explorer.
  66. It's also possible to install by using the ``Add-AppxPackage`` PowerShell cmdlet.
  67. .. note:: If you want to update your already installed app, you must
  68. update the version number on the new package or first uninstall
  69. the previous package.