exporting_for_uwp.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 an 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. Creating a signing certificate
  13. ------------------------------
  14. This requires the tools ``MakeCert.exe`` and ``Pvk2Pfx.exe`` which comes
  15. with the Windows SDK. If you use Visual Studio, open one of its Developer
  16. Prompts since they come with those tools available and in the path.
  17. You can get more detailed instructions from `Microsof documentation
  18. <https://msdn.microsoft.com/en-us/library/windows/desktop/jj835832(v=vs.85).aspx>`__.
  19. First, run ``MakeCert`` to create a private key::
  20. 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
  21. Where ``publisherName`` matches the Publisher Name of your package and
  22. ``expirationDate`` is in the ``mm/dd/yyyy`` format.
  23. Next, create a Personal Information Exchange (.pfx) file using ``Pvk2Pfx.exe``::
  24. Pvk2Pfx /pvk MyKey.pvk /pi pvkPassword /spc MyKey.cer /pfx MyKey.pfx [/po pfxPassword]
  25. If you don't specify a password with ``/po`` argument, the PFX will have the
  26. same password as the private key.
  27. Signing the package
  28. -------------------
  29. Using the ``SignTool.exe`` this requires a single command:;
  30. SignTool sign /fd SHA256 /a /f MyKey.pfx /p pfxPassword package.appx
  31. Installing the package
  32. ----------------------
  33. After Windows 10 Anniversary Update you can install packages by just double
  34. clicking the ``.appx`` file from the Windows Explorer.
  35. It's also possible to install using the ``Add-AppxPackage`` PowerShell cmdlet.
  36. Note that if you don't update the version number, you'll have to uninstall the
  37. previous installed package before reinstalling it.