Commit graph

48 commits

Author SHA1 Message Date
bruvzg
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Fabio Alessandrelli
ead6d10715 [Net/GDNative] Remove GDNative network bits. 2021-09-24 21:23:43 +02:00
Hugo Locurcio
828f9c6c29
Fix missing SConscript warning when building using SCons 2021-09-02 15:14:28 +02:00
bruvzg
07d14f5bb8
[Complex Text Layouts] Implement GDNative interface for TextServer. 2020-11-26 13:55:29 +02:00
Rémi Verschelde
d76806d322
Core: Always enable ptrcall, remove PTRCALL_ENABLED define
ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.

It no longer makes sense to make it optional.
2020-11-25 14:08:17 +01:00
Andrii Doroshenko (Xrayez)
d86de6c98e SCons: Refactor running commands through builders
A new `env.Run` method is added which allows to control the verbosity
of builders output automatically depending on whether the "verbose"
option is set. It also allows to optionally run any SCons commands in a
subprocess using the existing `run_in_subprocess` method, unifying
the interface. `Action` objects wrap all builder functions to include a
short build message associated with any action.

Notably, this removes quite verbose output generated by `make_doc_header`
and `make_editor_icons_action` builders.
2020-07-28 00:09:21 +03:00
Bastiaan Olij
afc8c6391c Renaming all ARVR nodes to XR 2020-04-09 15:33:01 +10:00
Rémi Verschelde
cd4e46ee65 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.
2020-03-30 09:05:53 +02:00
Emmanuel Leblond
4c5205b550
Remove deprecated GDNative wrapper code 2020-01-31 11:20:25 +01:00
Rémi Verschelde
d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Anish
7199b7b5dd Added interface for GDNative Videodecoder.
Interface and callback api added for Videodecoder support.
Should be able to construct any format videodecoder using
only the given interface.

GSoC 2018 project.
2018-12-13 15:19:09 +01:00
Rémi Verschelde
3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Viktor Ferenczi
c5bd0c37ce Running builder (content generator) functions in subprocesses on Windows
- Refactored all builder (make_*) functions into separate Python modules along to the build tree
- Introduced utility function to wrap all invocations on Windows, but does not change it elsewhere
- Introduced stub to use the builders module as a stand alone script and invoke a selected function

There is a problem with file handles related to writing generated content (*.gen.h and *.gen.cpp)
on Windows, which randomly causes a SHARING VIOLATION error to the compiler resulting in flaky
builds. Running all such content generators in a new subprocess instead of directly inside the
build script works around the issue.

Yes, I tried the multiprocessing module. It did not work due to conflict with SCons on cPickle.
Suggested workaround did not fully work either.

Using the run_in_subprocess wrapper on osx and x11 platforms as well for consistency. In case of
running a cross-compilation on Windows they would still be used, but likely it will not happen
in practice. What counts is that the build itself is running on which platform, not the target
platform.

Some generated files are written directly in an SConstruct or SCsub file, before the parallel build starts. They don't need to be written in a subprocess, apparently, so I left them as is.
2018-07-27 21:37:55 +02:00
Thomas Herzog
22dac831bc
Merge pull request #19757 from Faless/gdnet_pr
Network bindings for GDNative
2018-06-29 19:32:22 +02:00
Fabio Alessandrelli
15451479e5 Add [Packet/Stream/Multiplayer]PeerGDNative
They provide an interface to implement PacketPeer, StreamPeer, and
NetworkedMultiplayerPeer via GDNative.
2018-06-27 19:07:30 +02:00
Rhody Lugo
920224a535 add NoCache wrapper to Command 2018-06-21 03:00:33 -04:00
Bastiaan Olij
1697cbb4bb Add access for GDNative modules to some platform dependent internals on Android 2018-06-19 17:49:23 +10:00
karroffel
70866bbafd changed GDNative API json format 2018-05-10 22:03:06 +02:00
Hein-Pieter van Braam
cee5117d3b Fix lto builds on clang compilers
The --no-lto option only works on GCC compilers. This breaks LTO builds
on MacOS and iPhone when building the gdnative wrappers.

-fno-lto works on both brands of compilers.
2018-04-30 12:59:08 +02:00
Thomas Herzog
31dd21a8d9
Merge pull request #16539 from eska014/gdnative-macwarn
Fix GDNATIVE_API_INIT() warning about sign mismatch
2018-02-10 17:36:57 +01:00
Leon Krause
8e39cdd5d5 Fix GDNATIVE_API_INIT() warning about sign mismatch 2018-02-10 17:19:16 +01:00
karroffel
2fb66df669 generate proper API structs for GDNative extension extensions
The GDNative C API gets passed to libraries in a struct of function
pointers. To provide stable binary compatibility, each extension not
part of the core API is separated into its own sub-struct.

These structs aren't meant to be changed in order to keep binary
compatibility.

In case of an API extension, the structs include a `next` pointer
which can point to a new struct with additional function pointers.

Godot's build system generates the API structs automatically at
build time, but so far there has no support for the mentioned `next`
pointers.

This commit changes the API struct generation in such a way that code
that used previous headers will compile without problem with the new
headers.

The new extension-extensions (weird name, but that's what it is) get
generated recursively and include the version in the struct-name.
2018-02-09 11:44:54 +01:00
Emmanuel Leblond
c1eba93cae
Disable lto for gdnative wrapper 2018-01-04 20:29:47 +01:00
geequlim
13bd5c22c6 Add plugin to edit GDNativeLibrary
Rename GDNativeLibraryEditor to GDNativeLibrarySingletonEditor
2017-12-18 23:23:29 +08:00
Rhody Lugo
a65c0939fd disable caching for targets using helper functions 2017-11-28 23:24:12 -04:00
Rhody Lugo
a4a222d62d use the same cache for all branches for appveyor 2017-11-28 03:23:33 -04:00
Emmanuel Leblond
6e3d78c94c
[GDNative] disable -fPIC flag with msvc compiler 2017-11-25 20:26:42 +01:00
Emmanuel Leblond
b075f13988
Fix&prettify gdnative_api_struct.gen.h GDNATIVE_API_INIT macro generation 2017-11-21 20:09:08 +01:00
Karroffel
0865365e21 [GDNative] loading error and version error procs 2017-11-20 11:09:55 +01:00
Karroffel
b13bfac9e3 [GDNative] fix wrapper code generation 2017-11-16 22:05:47 +01:00
Evrey
af6f096427 fix auto-generated GDN API header for C compilers (#12891)
* fix auto-generated GDN API header for C compilers
2017-11-13 23:35:03 +01:00
Karroffel
79285b084d [GDNative] rename nativearvr extension to arvr 2017-11-10 12:36:50 +01:00
Karroffel
7ae2de8997 [GDNative] better API struct versioning 2017-11-10 12:08:09 +01:00
Karroffel
983404e0ce [GDNative] refactored API struct into core and extensions 2017-11-09 18:39:28 +01:00
Emmanuel Leblond
e715be0f0a
[GDnative] add pluginscript \o/ 2017-10-17 10:50:13 +02:00
BastiaanOlij
cc37d43f86 Redoing the ARVR GDNative interface as module and tighter implementation 2017-10-14 09:10:18 +11:00
Emmanuel Leblond
ce197990bc
[GDnatvie] improve wrapper code generation 2017-10-08 20:51:18 +02:00
sheepandshepherd
39584f3312 Store GDNative API in array instead of dictionary 2017-10-07 20:17:12 +02:00
Thomas Herzog
454dec2f2f Merge pull request #11806 from touilleMan/gdnative-version-field
[GDnative] add api version field to godot_gdnative_api_struct
2017-10-04 11:57:53 +02:00
Emmanuel Leblond
3e29cb806c
[GDnative] add future-proof next field to godot_gdnative_api_struct (a la Vulkan) 2017-10-04 03:11:41 +02:00
Karroffel
2a4e2b5378 [GDNative] added API struct wrapper generator
Previously functions of the GDNative API were accessed by letting
the loader at load-time resolve the symbols. This causes troubles on
Windows (...sigh...), so now the GDNative API isn't exported anymore.

This means, that a library that wants to call a GDNative function
needs to access it via a struct of pointers that's passed to it at
right after the library was loaded. To make the usage easier, those
function pointers in the struct can be wrapped in actual function in
the global scope. This commit adds a generator for that wrapper code.
2017-10-03 23:26:39 +02:00
Emmanuel Leblond
0d41be3790
[GDnative] add api version field to godot_gdnative_api_struct 2017-10-03 18:08:34 +02:00
Emmanuel Leblond
cdc29926af
[GDnative] replace gdnative_api_struct.h by a json-based autogenerated system 2017-10-03 09:48:52 +02:00
Ruslan Mustakov
f5b3b24c22 Enhance iOS export
- The export process now builds complete .ipa on macOS, instead of just
   creating XCode project.

 - The project includes Capabilities games usually require: Game Center,
   Push Notifications, In-App Purchase.

 - Icons and launch screens can be specified in export preset.
2017-09-26 00:18:08 +07:00
Karroffel
7878329e6f merged gdnative and nativescript module 2017-09-03 15:28:43 +02:00
Karroffel
c143f86968 [GDNative/NativeScript] fix -rdynamic and removed _init call
The _init call was buggy anyway and in the end shouldn't be a
thing that's called via ClassDB, it should be something that's
language specific, so we leave this out for the bindings.

In the commit 66a7763 the SCsub file for GDNative was changed to
use a cloned environment, that bricked -rdynamic which needs to be
passed down to the linker, which didn't happen with the new env.
2017-08-02 14:21:12 +02:00
Karroffel
880048377d [GDNative] better header include paths
The old include paths caused some problems on some compilers, for
example including "string.h" was ambiguous.
2017-08-02 03:50:33 +02:00
Karroffel
c7f8b22ba0 renamed dlscript module to gdnative 2017-04-09 21:07:53 +02:00
Renamed from modules/dlscript/SCsub (Browse further)