exporting_for_windows.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .. _doc_exporting_for_windows:
  2. Exporting for Windows
  3. =====================
  4. The simplest way to distribute a game for PC is to copy the executable
  5. (``godot.exe``), compress the folder and send it to someone else. However, this
  6. is often not desired.
  7. Godot offers a more elegant approach for PC distribution when using the export
  8. system. When exporting for Windows, the exporter takes all the project files and
  9. creates a ``data.pck`` file. This file is bundled with a specially optimized
  10. binary that is smaller, faster and does not contain the editor and debugger.
  11. Code signing
  12. ------------
  13. Godot is capable of automatic code signing on export. To do this you must have the
  14. ``Windows SDK`` (on Windows) or `osslsigncode <https://github.com/mtrojnar/osslsigncode>`__
  15. (on any other OS) installed. You will also need a package signing certificate,
  16. information on creating one can be found `here <https://docs.microsoft.com/en-us/windows/win32/appxpkg/how-to-create-a-package-signing-certificate?redirectedfrom=MSDN>`__.
  17. .. warning::
  18. If you export for Windows with embedded PCK files, you will not be able to
  19. sign the program as it will break.
  20. On Windows, PCK embedding is also known to cause false positives in
  21. antivirus programs. Therefore, it's recommended to avoid using it unless
  22. you're distributing your project via Steam as it bypasses code signing and
  23. antivirus checks.
  24. Setup
  25. ~~~~~
  26. Settings need to be changed in two places. First, in the editor settings, under
  27. **Export > Windows**. Click on the folder next to the ``Sign Tool`` setting, if
  28. you're using Windows navigate to and select ``SignTool.exe``, if you're on a different
  29. OS select ``osslsigncode``.
  30. .. image:: img/windows_editor_settings.png
  31. The second location is the Windows export preset, which can be found in
  32. **Project > Export...**. Add a windows desktop preset if you haven't already.
  33. Under options there is a code signing category.
  34. .. image:: img/windows_export_codesign.png
  35. ``Enabled`` must be set to true, and ``Identity`` must be set to the signing
  36. certificate. The other settings can be adjusted as needed. Once this is Done
  37. Godot will sign your project on export.