packaging_godot.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .. _doc_packaging_godot:
  2. Packaging Godot
  3. ===============
  4. Starting with 2.0, Godot has features to make it easier to package it for application repositories.
  5. Default behaviour
  6. -----------------
  7. Per 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 godot
  26. doesn't live at a fixed location. If the godot editor finds a ``._sc_`` file in the directory
  27. the executable is located, godot will continue in "self contained mode".
  28. In self contained mode, all config files are located next to the executable in a directory
  29. called ``editor_data``. Godot doesn't read or write to the per-user location anymore.
  30. The contents of the ``._sc_`` file (when not empty) are read with the ConfigFile api (same
  31. format as ``engine.cfg``, etc). So far it can contain a list of pre-loaded project in this
  32. format:
  33. ::
  34. [init_projects]
  35. list=["demos/2d/platformer", "demos/2d/isometric"]
  36. The paths are relative to the executable location, and will be added to the file ``editor_settings.xml``
  37. when this is created for the first time.