Browse Source

Add note about register_types file locations (#3702)

Andy Maloney 5 years ago
parent
commit
bd4d9f4cd6

+ 9 - 5
development/cpp/binding_to_external_libraries.rst

@@ -75,7 +75,11 @@ need to be created:
     register_types.h
     register_types.h
     register_types.cpp
     register_types.cpp
 
 
-With the following contents:
+.. important::
+    These files must be in the top-level folder of your module (next to your
+    ``SCsub`` and ``config.py`` files) for the module to be registered properly.
+
+These files should contain the following:
 
 
 .. code-block:: cpp
 .. code-block:: cpp
 
 
@@ -124,8 +128,8 @@ installation commands for Linux below, for reference.
     apt-cache search festvox-* <-- Displays list of voice packages
     apt-cache search festvox-* <-- Displays list of voice packages
     sudo apt-get install festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k <-- Installs voices
     sudo apt-get install festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k <-- Installs voices
 
 
-.. note::
-    **Important:** The voices that Festival uses (and any other potential external/3rd-party
+.. important::
+    The voices that Festival uses (and any other potential external/3rd-party
     resource) all have varying licenses and terms of use; some (if not most) of them may be
     resource) all have varying licenses and terms of use; some (if not most) of them may be
     be problematic with Godot, even if the Festival Library itself is MIT License compatible.
     be problematic with Godot, even if the Festival Library itself is MIT License compatible.
     Please be sure to check the licenses and terms of use.
     Please be sure to check the licenses and terms of use.
@@ -148,8 +152,8 @@ can link to them instead by adding them as submodules (from within the modules/t
     git submodule add https://github.com/festvox/festival
     git submodule add https://github.com/festvox/festival
     git submodule add https://github.com/festvox/speech_tools
     git submodule add https://github.com/festvox/speech_tools
 
 
-.. note::
-    **Important:** Please note that Git submodules are not used in the Godot repository.  If
+.. important::
+    Please note that Git submodules are not used in the Godot repository.  If
     you are developing a module to be merged into the main Godot repository, you should not
     you are developing a module to be merged into the main Godot repository, you should not
     use submodules.  If your module doesn't get merged in, you can always try to implement
     use submodules.  If your module doesn't get merged in, you can always try to implement
     the external library as a GDNative C++ plugin.
     the external library as a GDNative C++ plugin.

+ 9 - 4
development/cpp/custom_modules_in_cpp.rst

@@ -119,7 +119,11 @@ need to be created:
     register_types.h
     register_types.h
     register_types.cpp
     register_types.cpp
 
 
-With the following contents:
+.. important::
+    These files must be in the top-level folder of your module (next to your
+    ``SCsub`` and ``config.py`` files) for the module to be registered properly.
+
+These files should contain the following:
 
 
 .. code-block:: cpp
 .. code-block:: cpp
 
 
@@ -423,7 +427,7 @@ library that will be dynamically loaded when starting our game's binary.
     # next to the Godot binary.
     # next to the Godot binary.
     shared_lib = module_env.SharedLibrary(target='#bin/summator', source=sources)
     shared_lib = module_env.SharedLibrary(target='#bin/summator', source=sources)
 
 
-    # Finally, notify the main env it has our shared lirary as a new dependency.
+    # Finally, notify the main env it has our shared library as a new dependency.
     # To do so, SCons wants the name of the lib with it custom suffixes
     # To do so, SCons wants the name of the lib with it custom suffixes
     # (e.g. ".linuxbsd.tools.64") but without the final ".so".
     # (e.g. ".linuxbsd.tools.64") but without the final ".so".
     # We pass this along with the directory of our library to the main env.
     # We pass this along with the directory of our library to the main env.
@@ -441,8 +445,9 @@ during runtime with the ``LD_LIBRARY_PATH`` environment variable:
     export LD_LIBRARY_PATH="$PWD/bin/"
     export LD_LIBRARY_PATH="$PWD/bin/"
     ./bin/godot*
     ./bin/godot*
 
 
-**note**: Pay attention you have to ``export`` the environ variable otherwise
-you won't be able to play your project from within the editor.
+.. note::
+  You have to ``export`` the environment variable otherwise
+  you won't be able to play your project from within the editor.
 
 
 On top of that, it would be nice to be able to select whether to compile our
 On top of that, it would be nice to be able to select whether to compile our
 module as shared library (for development) or as a part of the Godot binary
 module as shared library (for development) or as a part of the Godot binary