godot/modules
Andrii Doroshenko (Xrayez) 133997654c Add custom_modules build option to compile external user modules
This patch adds ability to include external, user-defined C++ modules
to be compiled as part of Godot via `custom_modules` build option
which can be passed to `scons`.

```
scons platform=x11 tools=yes custom_modules="../project/modules"
```

Features:

- detects all available modules under `custom_modules` directory the
same way as it does for built-in modules (not recursive);
- works with both relative and absolute paths on the filesystem;
- multiple search paths can be specified as a comma-separated list.

Module custom documentation and editor icons collection and generation
process is adapted to work with absolute paths needed by such modules.
Also fixed doctool bug mixing absolute and relative paths respectively.

Implementation details:

- `env.module_list` is a dictionary now, which holds both module name as
  key and either a relative or absolute path to a module as a value.
- `methods.detect_modules` is run twice: once for built-in modules, and
  second for external modules, all combined later.
- `methods.detect_modules` was not doing what it says on the tin. It is
  split into `detect_modules` which collects a list of available modules
  and `write_modules` which generates `register_types` sources for each.
- whether a module is built-in or external is distinguished by relative
  or absolute paths respectively. `custom_modules` scons converter
  ensures that the path is absolute even if relative path is supplied,
  including expanding user paths and symbolic links.
- treats the parent directory as if it was Godot's base directory, so
  that there's no need to change include paths in cases where custom
  modules are included as dependencies in other modules.

(cherry picked from commit a96f0e98d7)
2020-05-25 17:08:38 +03:00
..
arkit Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
assimp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
bmp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
bullet Make softbody completelly stiff to attachment point 2020-05-01 10:56:57 +02:00
camera Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
csg Fix 'physicsw' may be used uninitialized warning in csg_shape.cpp 2020-05-11 13:33:20 +01:00
cvtt Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
dds Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
enet Merge pull request #35091 from Faless/dtls/enet 2020-05-05 13:40:59 +02:00
etc Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
freetype Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
gdnative Fix GDNative Variant type size on 32-bit platforms, add size checking static asserts. [3.2] 2020-05-17 16:11:49 +03:00
gdscript Fix too eager GDScriptFunctionState stack cleanup 2020-05-20 11:40:45 +02:00
gridmap Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
hdr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
jpg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
jsonrpc Improve jsonrpc error reporting 2020-05-15 16:42:24 -04:00
mbedtls Changed default for p_validate_certs to true. 2020-05-05 13:41:40 +02:00
mobile_vr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
mono Add SCons option to not build C# solutions 2020-05-22 03:12:54 +02:00
ogg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
opensimplex NoiseTexture: prevent race condition because of Ref::unref() 2020-04-16 12:47:18 +02:00
opus Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
pvr Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
recast Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
regex Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
squish Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
stb_vorbis Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
svg Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
tga Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
theora Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
tinyexr tinyexr: Enable C++11 threaded loading 2020-05-01 11:10:16 +02:00
upnp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
vhacd Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
visual_script Change round return type to float 2020-04-16 12:57:21 +02:00
vorbis Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webm Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webp Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
webrtc Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
websocket Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
xatlas_unwrap Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
register_module_types.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
SCsub Add custom_modules build option to compile external user modules 2020-05-25 17:08:38 +03:00