Commit Graph

58 Commits (9e7cec9f421fd3adc61f934a3bfe3ba04f6ece2f)

Author SHA1 Message Date
Dragos Daian 9e7cec9f42 Generate godot compat for dual build
generate compat

generate compat

Update ci.yml

Update binding_generator.py

generate compat

generate compat

lint python files

Update compat_generator.py

update docs

Update binding_generator.py

Update module_converter.py

also collect defines

Add module converter file that converts module based projects to godot_compat

Update ci.yml

update docs

Update compat_generator.py

lint python files

generate compat

generate compat

generate compat

generate compat

Update ci.yml

fix path issue when caling from outside

Update binding_generator.py

update to also take missing classes/structs

Update binding_generator.py

Generate godot compat for dual build

generate compat

generate compat

Update ci.yml

Update binding_generator.py

generate compat

generate compat

lint python files

Update compat_generator.py

update docs

Update binding_generator.py

Update module_converter.py

also collect defines

Add module converter file that converts module based projects to godot_compat

Update ci.yml

update docs

Update compat_generator.py

lint python files

generate compat

generate compat

generate compat

generate compat

Update ci.yml

fix path issue when caling from outside

Add support for build profiles.

Allow enabling or disabling specific classes (which will not be built).

Allow forwarding from `ClassDB` to `ClassDBSingleton` to support enumerations

update to also take missing classes/structs

Update binding_generator.py

update

update naming of files

add godot mappings.

update and run output_header_mapping.json

Update README.md

make godot_compat work without a file generated

fix the test

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

use files from include too

Update README.md

lint

lint

lint

Update CMakeLists.txt

update to use all. fix linting a bit

update wip

fix posix path

Update CMakeLists.txt

Update binding_generator.py

add using namespace godot; everywhere to includes

fix includes

Try fixes.

generate new include files 123

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

Update binding_generator.py

update

fix GODOT_MODULE_COMPAT

fix manual includes to match.

Update godot.hpp

Update color_names.inc.hpp
2024-10-31 12:03:34 +01:00
Thaddeus Crews bf26191ead SCons: Don't cache librarys
(cherry picked from commit 83c0f15ab9)
2024-10-28 16:32:02 -05:00
Fabio Alessandrelli af78f2778f [SCons] Enable WASM_BIGINT in web builds
Required since Godot 4.3, which is also the first Godot version with
wide WASM gdnative support (previous versions were Chrome-only, and very
brittle).

(cherry picked from commit 78498da7c3)
2024-10-28 16:31:51 -05:00
Fabio Alessandrelli 30a395bf43 [SCons] Remove use_clang_cl windows flag in favor of generic use_llvm
This is consistent with Godot upstream.

(cherry picked from commit 4717a78144)
2024-10-28 16:31:40 -05:00
bruvzg 20459da676 Add support for LLVM/MinGW and ARM64 Windows builds.
(cherry picked from commit f2353da5a3)
2024-10-28 16:30:12 -05:00
Fabio Alessandrelli 37d255af6c [Web/SCons] Use CCFLAGS for SIDE_MODULE option
Was using CPPFLAGS, but should use the explicit scons CCFLAGS which
makes it clear they are applied to both the C and C++ compiler.

CPPFLAGS was also fine (they are preprocessor flags, also applied to
both C and C++), but we should try to stay consistent with what we do
in Godot.

(cherry picked from commit f36acd8e31)
2024-09-03 16:35:21 -05:00
Rémi Verschelde 958776dfc3
SCons: Remove old Python 2 compat code 2024-07-18 10:37:47 +02:00
David Snopek 53b546e1df
Merge pull request #1507 from Repiteo/silence-msvc
SCons: Add `silence_msvc` option for Windows
2024-06-25 17:45:33 -05:00
Thaddeus Crews 1989b1bf57
SCons: Add `silence_msvc` option 2024-06-25 09:38:00 -05:00
Thaddeus Crews e0d363aad8
Integrate `.pre-commit-config.yaml` 2024-06-24 15:43:55 -05:00
David Snopek 89831ff333
Merge pull request #1489 from Faless/web/longjmp
[Web] Force emcc to use "wasm" longjmp mode
2024-06-17 11:53:05 -05:00
Fabio Alessandrelli 1186c488bd Add support for build profiles.
Allow enabling or disabling specific classes (which will not be built).
2024-06-15 16:19:41 +02:00
Fabio Alessandrelli 1bb543b6f4 [Web] Force emcc to use "wasm" longjmp mode
SUPPORT_LONGJMP have changed since emscripten 3.1.32 to default to
"wasm" mode when exceptions are enabled, and "emscripten" mode when
disabled.

While we generally doesn't use exception in core, linked libraries may
need them, and emscripten don't plan to support WASM EH + Emscripten
SjLj in the long term.
2024-06-14 01:46:04 +02:00
David Snopek 340dde31a2
Merge pull request #1451 from Faless/build/to_threads_or_not_to_threads
[SCons] Add option to build without threads
2024-05-16 10:39:57 -05:00
David Snopek a434850069 Allow submitting documentation to the Godot editor 2024-05-07 11:08:18 -05:00
Fabio Alessandrelli b0296bb562 [SCons] Add option to build without threads
This is relevant for the Web platform, where builds with and without
threads are incompatible.
2024-04-30 19:19:36 +02:00
Thaddeus Crews b05c21bb1d
Implement `verbose` toggle from godot repo 2024-04-09 21:13:02 -05:00
Fabio Alessandrelli 16df4bff30 [SCons] Split `targets.py`, apply flags from tools
Split `targets` tool logic, moving all the compiler-specific flags to a
new `common_compiler_flags.py` file, and everything else (CPPDEFINES,
optimize option logic, dev build logic, etc) to the `godotcpp` tool.

The default tools now apply the common compiler flags by importing the
file and explicitly calling `configure`.
2024-02-16 23:08:06 +01:00
Fabio Alessandrelli baaad7ada2 [SCons] Add support for custom build tools and platforms
Use with:

`scons platform=os2 custom_tools=/path/to/tools`

(assuming you have an `os2.py` inside `/path/to/tools/`)
2024-02-14 21:20:38 +01:00
David Snopek b1769a70f0
Merge pull request #1344 from ArchLinus/ndk-error
Add an error message if android NDK is not installed
2024-01-04 08:35:18 -06:00
ArchLinus 718d0baea3 Add an error message if android NDK is not installed 2023-12-30 13:56:46 -05:00
Aaron Franke e17c7bf530
Allow detecting when building as a GDExtension 2023-12-18 09:13:20 -06:00
David Snopek 588d869a3b
Merge pull request #1313 from DmitriySalnikov/visibility_hidden
[Scons] Added the ability to change the visibility of symbols
2023-11-24 07:15:52 -06:00
DmitriySalnikov 79d2a9c456 [Scons] Set the minimum Android API level to 21 2023-11-23 00:28:03 +03:00
DmitriySalnikov f5e4f95cde [Scons] Added the ability to change the visibility of symbols 2023-11-21 18:55:02 +03:00
bruvzg e854e0b592
[iOS] Bump default version to 12 to match engine. 2023-11-21 09:39:53 +02:00
Thaddeus Crews 648b8c4489
fix is_msvc and use_hot_reload variables 2023-11-06 10:50:19 -06:00
Fredia Huya-Kouadio 86dbd5fa0d Update the environment variables used to access the Android NDK toolchain 2023-11-01 12:14:55 -07:00
Rémi Verschelde bf1c03ab5f
SCons: Disable C++ exception handling by default
Counterpart to https://github.com/godotengine/godot/pull/80612.
2023-10-22 12:45:46 +02:00
Adam Scott 2d5024ac8e
Refactor compiledb implementation
This comment enables the possibility to build the "compile_commands.json"
file by only using `scons -Q compiledb`. No need to use the argument
`compiledb=yes`.

And when using the `compiledb=yes`, it will create a
"compiled_commands.json" automatically.
2023-10-19 10:51:31 -04:00
Thaddeus Crews 7a5cbcac21
Let gdextension_dir function as only argument 2023-10-18 11:32:51 -05:00
Fabio Alessandrelli 18bfa133ab [SCons] Rename javascript tool to web
And clean it up a bit.
2023-10-15 13:12:49 +02:00
David Snopek 96bec613a0
Merge pull request #1247 from nicholas-maltbie/nickmaltbie/javascript-wasm-fix
Javascript Web WASM Fix
2023-10-04 09:58:01 -05:00
Nick Maltbie 2b4bcbb0ce
Added fix for javascript build for godot 4.x
Added changes to tools/javascript.py to add PFlags to fix SharedArrayBuffer memory error.
Corrected some small errors in tools/javascript.py to support new target names.
Also updated ci to include validation for web build.
2023-10-01 13:43:19 -07:00
David Snopek df849651d9 Changes necessary for hot reload to work 2023-09-25 22:13:33 -05:00
DmitriySalnikov 0e5975dd26 [SCons] Fixed crashes in several scripts 2023-09-09 12:44:14 +03:00
Fabio Alessandrelli f8b4f60cb9 [SCons] Move the GodotCPP build to its own tool. 2023-08-29 18:14:42 +02:00
Rémi Verschelde 600e749d9b
SCons: Sync `targets.py` fully with upstream Godot
- Reorders existing code to match Godot.
- Adds `NDEBUG` for non-dev builds.
- Adds `-gdwarf-4` for Clang debug symbols.
- Adds strip link flag for GCC/Clang builds without debug symbols.
2023-08-10 09:23:32 +02:00
Feiyun Wang a745c2ac47 Statically link mingw/msvc runtime libraries on Windows
Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-08-09 13:38:38 -05:00
David Snopek 845226d66a
Merge pull request #1191 from Faless/build/unify_osxcross
[SCons] Merge OSXCross tools into platform ones
2023-07-31 15:40:27 -05:00
Adam Scott 9d9f4279ed
Add platform macros 2023-07-23 19:23:01 -04:00
Fabio Alessandrelli 6d195137fe [SCons] Merge OSXCross tools into platofrm ones 2023-07-23 22:54:07 +02:00
bruvzg d1aeba771a
[MSVC] Force UTF-8 encoding. 2023-07-11 16:11:51 +03:00
Fabio Alessandrelli 8d6982be3b [SCons] Platform agnostic default toolchain (GNU).
Create the SCons Environment with an empty PLATFORM variable to force
the default tools to use the GNU toolchain.

Platform specific toolchains are then setup in our custom tools.
2022-12-20 17:41:34 +01:00
Fabio Alessandrelli edf02f8319 [SCons] Link MSVC debug runtime for optimize=none|debug only.
Select windows runtime in "targets" tool, use "/MDd" flag only when
building with optimize="none" and optimize="debug".
2022-11-21 11:04:10 +01:00
bruvzg 6e7a24d390
Fix Android build on macOS. 2022-11-10 15:20:15 +02:00
Fabio Alessandrelli 35ec1403dc [SCons] Remove bogus CCFLAGS from windows toolchain.
The c++ standard is added as part of the main SConstruct
2022-11-02 16:45:38 +01:00
Fabio Alessandrelli 64b2c9be0b [SCons] Refactor targets, symbols, optimizations.
Now matches Godot `master` target names and supports the same flags with
the following notable exceptions:
- The default target is "template_debug", since it's compatible with
  editor builds (and TOOLS_ENABLED is never used internally).
- separate_debug_symbols is still not supported, and will be done in a
  separate commit.
2022-10-04 16:05:40 +02:00
Fabio Alessandrelli 2bf983e638 [SCons] Add "optimize" and "debug_symbols" options
optimize = auto|none|debug|speed|size|0|1|2|3
debug_symbol = True|False

optimize == "auto" will produce:
- "debug" for "debug" builds
- "speed" for "release" builds
2022-09-12 16:52:05 +02:00
Fabio Alessandrelli 081d425277 [MSVC] Add NOMINMAX flag to scons and cmake.
Ensures user inclusion of windows.h do not define "min" and "max"
macros.
2022-09-12 13:12:55 +02:00