* Most of the main entry points that can fail with relevant reasons now has a
way of specifying a message to return with it. This message can be displayed
to the user to give more information or context about an error.
* This prevents unnecessary conversions back and forth between rdcstr and const
char * when going through interfaces. In the OS specific layer this is rarely
an issue because most of the implementations don't convert to rdcstr, but it
is convenient to be able to pass in an rdcstr directly. The few cases where
there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
function, so can't return an rdcstr due to C ABI, so they still return a const
char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
and because that's one place where unnecessary conversions/constructions may
be impactful.
* If the last refcount on a python lambda/temp function is released when a
wrapping std::function is destroyed in a C++ invoke, we can't destroy it
safely. Instead we queue up that decref and process it the next chance we're
able (which is either when the current execution finishes for a python shell
execution, or on the next function call which handles extensions).
* This by no means replaces PySide2, but it allows python extensions to write
simple UIs without needing to rely on PySide2, which might not be available
(generally all windows builds have it as well as recent binary linux builds,
but local windows builds may not and most linux builds probably won't).
* When the pyside2 we ship was built it accidentally included a small dependency
on Qt5Qml, which we don't distribute so the pyside2 libraries wouldn't load.
* We can generate a tiny stub with the right exports and load it manually from
the PySide2 folder on 32-bit qrenderdoc builds to allow pyside2 to load
subsequently. The stub source is tiny, and added alongside.
* Putting it in the PySide2 folder means that even if someone puts RenderDoc's
build folder in their PATH, our stub Qt5Qml won't break anything because it
won't be loaded. If they put PySide2 in the PATH it might, but then it's their
fault!
* When calling the register() function there is no frame or globals, so we need
to set an internal handle external to that.
* This means functions that get wrapped know that there's a global handler for
exceptions, which just prints to the log. Otherwise they think they're running
synchronously and write to an invalid exception handling object.
* The GUIInvoke object takes a QObject, and uses QPointer to check that
it hasn't been deleted when the callback fires. This prevents delayed
callbacks from executing after the object has been deleted and
crashing.
* In most cases the pointer is just 'this'.
* It's already optional on linux due to distributions not necessarily
carrying packages for it yet. We also make it optional on windows
since by the same measure it's not a huge problem if it's missing, and
official builds will include it. This means we don't have to ship the
binary dependencies
* The main addition here apart from some extra stubs is a new rdc type
for date time objects.
* Although the module doesn't do anything and is only used for docs
reflection it is desirable to not have to link against Qt as this
can cause problems when linking the module without unresolved symbols.
* These .py wrappers are relevant for the non-builtin path, but since we
use -builtin they serve no purpose except to make things more complex.
* So instead we make the module directly exported as 'module' instead of
'_module'.
* On windows there's no conflict because we have renderdoc.dll vs
renderdoc.pyd. On linux it's librenderdoc.so vs renderdoc.so.
* To prevent supporting files like .lib / .pdb from conflicting on
windows we build the python modules into a subdirectory. They're not
ever used by the UI (it links in the bindings directly).