exporting_for_uwp.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. 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. You also need to trust this certificate to be able to actually install the
  28. apps. Open the Command Prompt as Administrator and run the following command::
  29. Certutil -addStore TrustedPeople MyKey.cer
  30. Signing the package
  31. -------------------
  32. Using the ``SignTool.exe`` this requires a single command::
  33. SignTool sign /fd SHA256 /a /f MyKey.pfx /p pfxPassword package.appx
  34. Installing the package
  35. ----------------------
  36. After Windows 10 Anniversary Update you can install packages by just double
  37. clicking the ``.appx`` file from the Windows Explorer.
  38. It's also possible to install using the ``Add-AppxPackage`` PowerShell cmdlet.
  39. Note that if you don't update the version number, you'll have to uninstall the
  40. previous installed package before reinstalling it.