packaging_godot.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .. _doc_packaging_godot:
  2. Packaging Godot
  3. ===============
  4. Godot has features to make it easier to distribute and to package it for application repositories.
  5. Default behaviour
  6. -----------------
  7. By default, Godot stores all settings and installed templates in a per-user directory.
  8. First Godot checks the ``APPDATA`` environment variable. If it exists, the per-user directory
  9. is the ``Godot`` subdirectory of ``APPDATA``.
  10. If ``APPDATA`` doesn't exist, Godot checks the ``HOME`` environment variable. The per-user
  11. directory is then the ".godot" subdir of ``HOME``.
  12. This meets common operating system standards.
  13. Global template path (Unix only)
  14. --------------------------------
  15. The ``unix_global_settings_path`` build variable is meant for Unix/Linux distro packagers
  16. who want to package export templates together with godot. It allows to put the export
  17. templates on a hardcoded path.
  18. To use it, pass the desired path via the scons ``unix_global_settings_path`` build variable
  19. when building the editor. The export templates then live at the "templates" subdirectory
  20. of the path specified.
  21. Templates installed at the per-user location still override the system wide templates.
  22. This option is only available on unix based platforms.
  23. Self contained mode
  24. -------------------
  25. The self contained mode can be used to package Godot for distribution systems where it
  26. doesn't live at a fixed location. If the editor finds a ``._sc_`` file in the directory
  27. the executable is located in, Godot will continue in "self contained mode".
  28. On Windows, the file name to use is ``_sc_`` (without the preceding dot).
  29. In self contained mode, all config files are located next to the executable in a directory
  30. called ``editor_data``. Godot doesn't read or write to the per-user location anymore.
  31. The contents of the ``._sc_`` file (when not empty) are read with the ConfigFile api (same
  32. format as ``project.godot``, etc). So far it can contain a list of pre-loaded project in this
  33. format:
  34. ::
  35. [init_projects]
  36. list=["demos/2d/platformer", "demos/2d/isometric"]
  37. The paths are relative to the executable location, and will be added to the file ``editor_settings.xml``
  38. when this is created for the first time.