Commit Graph

50 Commits

Author SHA1 Message Date
Fabio Alessandrelli
b45d3a3f46 Merge pull request #164 from Faless/feat/mbedtls
[TLS] Move from OpenSSL to mbedTLS
2025-05-21 20:59:16 +02:00
Fabio Alessandrelli
a77bf9bdb0 fix: Add iOS min SDK version link flag 2025-05-21 16:32:00 +02:00
Fabio Alessandrelli
b1ee39e6c4 [TLS] Move from OpenSSL to mbedTLS
Update libdatachannel to 0.22.6
2025-05-15 11:24:51 +02:00
Fabio Alessandrelli
cf038b2788 [Build] Fix gdextension file after dropping 4.0
Renaming the godot version to "4" resulted in the GDExtension file
incorrectly setting "compatibility_minimum = 4" (instead of "4.1")
2025-01-07 11:13:44 +01:00
Fabio Alessandrelli
9afa5c3a48 Drop Godot 4.0 support
It's been unsupported by upstream for a while now, everyone should
upgrade to a newer version (4.1/4.2/4.3).
2024-10-26 18:57:38 +02:00
Fabio Alessandrelli
ea8b37fe29 [CI] Update macos runners to macos-latest 2024-10-25 17:03:29 +02:00
Fabio Alessandrelli
1443d02c8d Allow building using a custom godot-cpp verison
You can use it with:

scons godot_cpp=/path/to/godot-cpp

This commit also forces the new "disable_exceptions" godot cpp option to
false since exceptions are needed by libdatachannel, and makes sure to
always compile/link with dynamic runtime when using MSVC.
2024-04-13 13:36:22 +02:00
Fabio Alessandrelli
34ef1043ee [Linux] Add arm32/arm64 linux builds support
Fix arch detection in GDNative builds (3.x) and add a small patch to
avoid warnings spam on ARM.

Make CMake march flags explicit for Linux arm32/arm64.

Add new platforms to CI.
2024-02-15 22:57:03 +01:00
Fabio Alessandrelli
1831677f63 [Windows/MinGW] Only export extension init symbol
When building for Windows using MinGW GCC we need to apply the same
workaround we use on Linux to only export the necessary symbols so we
can safely statically link libstdc++
2023-12-22 12:12:01 +01:00
Fabio Alessandrelli
b0efc17d3b [Linux] Only export extension init symbol
Since we link with static libstdc++ we need to tell gcc to only export
the necessary symbols.
Using "-fvisibility=hidden" will not work, since libstdc++ explicitly
exports its symbols.
2023-12-22 01:30:01 +01:00
Fabio Alessandrelli
7a4e27e5f0 [MacOS] Use framekwork to package GDExtension
This allows it to be code-signed as a bundle so gatekeeper won't
complain when loaded by the editor.
2023-12-20 12:55:43 +01:00
Fabio Alessandrelli
cb2be8723a Support building for Godot 4.1 (new default). 2023-06-30 16:52:36 +02:00
Fabio Alessandrelli
1de32aa9ea Statically link libgcc and libstdc++ on Linux.
More compatibility at the cost of bigger binaries.
2023-06-29 14:57:55 +02:00
Fabio Alessandrelli
ac3bdb3613 Better normalize the GDNative build environment.
The "ios_min_version" is missing from godot-cpp-3.x, and the macos CC
variable is not explicitely set to "clang".

Since the values are passed to cmake, they used to cause unnecessary
rebuilds of libdatchannel when compiling both version 3 and 4.
2023-06-29 14:15:48 +02:00
Fabio Alessandrelli
85efdfd6ce Linux ARM32/ARM64, better toolchains support.
Needs updated godot-cpp to build library with custom toolchains.

Make the OpenSSL and CMake tools more customizable letting the user
override the default platform flags via build options.

Improve dependency handling.
2023-06-21 03:54:39 +02:00
Fabio Alessandrelli
61299ca4b7 [SCons] Refactor build system.
Update ssl tool (now renamed openssl).

Move universal library "lipo" action to openssl tool, and add universal
builds support to cmake tool.

Add support for MSVC builds (requires nasm and perl in PATH, tested with
Strawberry Perl, VS 2019 and VS 2022).

Add support for building "macos" via OSXCross.
2023-06-17 19:46:54 +02:00
Fabio Alessandrelli
45549e020f [SCons] Move platform configuration to cmake tool. 2023-05-25 06:07:03 +02:00
Fabio Alessandrelli
e8de07dbb1 [CI] Fix python black formatting. 2023-05-25 02:42:26 +02:00
Fabio Alessandrelli
f0af5f9982 [macOS] Add support for universal builds.
Since the OpenSSL build system does not support macOS universal
binaries, we first need to build the two libraries separately, then we
join them together using lipo.
2023-05-24 00:53:28 +02:00
Fabio Alessandrelli
c9a1efc7a0 Workaround incorrect CC for 3.x mingw builds. 2023-02-06 19:08:45 +01:00
Fabio Alessandrelli
7176344056 Update to Godot 4.0-beta11, libdatachannel v0.18.1
Also update godot-cpp-3.x for better cache support.
2023-01-12 15:59:48 +01:00
Fabio Alessandrelli
bdd9d50745 [SCons] Refactor build tools.
Split dependency builders into separate tools, optimize OpenSSL builds.
2022-12-30 14:34:15 +01:00
Fabio Alessandrelli
dfaad6f5ba Bump godot-cpp to beta8, libdatachannel to v0.18.0
libdatachannel and libjuice are now released under MPL 2.0.

Dependencies has been refactored under a `thirdparty` folder similar to
what we have in Godot, with a dedicated `thirdparty/README.md`
containing details information on dependencies upstreams, versions, and
licenses.
2022-12-10 17:13:59 +01:00
Fabio Alessandrelli
2e9a25bb39 [SCons] Fix caching and path detection.
Add version file depenencies to SSL and RTC targets.

Disable OpenSSL caching since it causes issues as it doesn't properly
cache generated header files.

Add hack to prepend PATH and few other vars (should probably be added
to upstream godot-cpp), and clone scons envs when building ssl/rtc (so
that PATHs are properly setup).
2022-11-28 03:10:20 +01:00
Fabio Alessandrelli
690b31e7dd [Upstream] Update to Godot beta 3.
Update build targets.
Move release script out of CI yaml.
Disable debug CI builds for Godot 3.x since they are mostly used for
debugging the extension itself.
2022-10-17 20:59:33 +02:00
Fabio Alessandrelli
9b0a5d8b46 [CI] Update actions, add cache for faster builds. 2022-10-16 16:15:42 +02:00
Fabio Alessandrelli
6e52fce986 Update sources to alpha16 2022-09-11 15:34:08 +02:00
Fabio Alessandrelli
e683c79938 Bump godot-cpp to alpha11. 2022-07-06 11:45:03 +02:00
Fabio Alessandrelli
f315912d85 [Windows] Fix windows build with mingw.
Forces ".dll" extension for library when building with mingw.

Override GDN_EXPORT which is incorrectly defined in the upstream
gdnative headers (3.x) and godot-cpp include (4.0) when building for
windows with mingw.
2022-06-18 14:35:51 +02:00
Fabio Alessandrelli
e19b370126 Use libdatachannel library, add Godot 4 support. 2022-06-15 21:38:12 +02:00
Fabio Alessandrelli
7cb6d6c846 Add OSX arm64 build.
Needs a more recent revision of godot-cpp, but can still use
godot-headers from 3.2 . See CI script update for details.
2021-07-11 10:01:55 +02:00
Fabio Alessandrelli
68a892d9f3 run black -l 120 on SConstruct. 2021-07-09 18:55:32 +02:00
Fabio Alessandrelli
cf98eb2e7a Fix osx, android optimization flags.
Will need to be also fixed in upstream godot-cpp.
2021-07-02 21:58:44 +02:00
Fabio Alessandrelli
3711ad23f6 Bump webrtc to branch-heads/4472. 2021-07-02 15:12:41 +02:00
Fabio Alessandrelli
3014c3099f Update godot-cpp to tip of 3.2 branch. 2021-07-02 00:26:10 +02:00
Fabio Alessandrelli
9e287f7cee Add mac and ios platforms. Fix GDNLibrary. 2021-07-01 23:58:01 +02:00
Fabio Alessandrelli
a374cf4510 Merge pull request #24 from rondao/add_android_build_support
Add build support for Android
2021-07-01 07:34:03 +02:00
Fabio Alessandrelli
f26a1d8e83 Fix gdns generation with python3.
Python2 has reached end-of-life.
2021-05-05 16:40:22 +02:00
Rafael Rondao
7a62fe467b Add build support for Android
To build for Android, use platform=android.
ANDROID_NDK_ROOT env variable needs to be defined.

By default, it builds for armv7 with Api 18.
To build for arm64v8 (or x86, x86_64), use android_arch=arm64v8.
64 bits requires at least Api level 21.

If needed, you can change it with android_api_level=XX.

Signed-off-by: Rafael Rondao <rafael.rondao@gmail.com>
2020-11-07 23:01:34 -03:00
Fabio Alessandrelli
54cbe83c56 Simplify webrtc lib folder structure 2020-01-03 19:41:21 +01:00
Fabio Alessandrelli
20f8f89c2c Use submodule for godot-cpp 2020-01-03 19:41:21 +01:00
Fabio Alessandrelli
4b22741255 Build script also create gdnlib 2020-01-03 19:41:07 +01:00
Fabio Alessandrelli
599ed98f6c Small build system improvement 2019-05-16 12:08:39 +02:00
Fabio Alessandrelli
1763d278e0 Better flags 2019-04-17 16:41:45 +02:00
Fabio Alessandrelli
6c0831b6c6 Refactor SCons build script 2019-04-17 15:47:51 +02:00
Fabio Alessandrelli
c2028103f1 Better output library name 2019-04-09 20:38:11 +02:00
Fabio Alessandrelli
f2799fdbb2 Fix name collision, scons file, final touches 2019-03-08 15:11:34 +01:00
Brandon Makin
34fd1f8caa Import GSoC work to WebRTC GDNative implementation 2019-03-08 15:10:08 +01:00
Fabio Alessandrelli
022689bd6b Fix mingw cross-build 2018-08-12 16:59:59 +02:00
Fabio Alessandrelli
93c5cd4431 Add scons build file 2018-08-12 04:50:28 +02:00