Compare commits
4 Commits
2261a8d2da
...
0c4aa1c9e3
Author | SHA1 | Date |
---|---|---|
Thaddeus Crews | 0c4aa1c9e3 | |
David Snopek | 36847f6af0 | |
MJacred | 8a535d0ecc | |
Thaddeus Crews | eb9f037bd3 |
|
@ -134,22 +134,22 @@ jobs:
|
|||
|
||||
- name: Generate godot-cpp sources only
|
||||
run: |
|
||||
scons platform=${{ matrix.platform }} build_library=no ${{ matrix.flags }}
|
||||
scons platform=${{ matrix.platform }} verbose=yes build_library=no ${{ matrix.flags }}
|
||||
scons -c
|
||||
|
||||
- name: Build godot-cpp (debug)
|
||||
run: |
|
||||
scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }}
|
||||
scons platform=${{ matrix.platform }} verbose=yes target=template_debug ${{ matrix.flags }}
|
||||
|
||||
- name: Build test without rebuilding godot-cpp (debug)
|
||||
run: |
|
||||
cd test
|
||||
scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }} build_library=no
|
||||
scons platform=${{ matrix.platform }} verbose=yes target=template_debug ${{ matrix.flags }} build_library=no
|
||||
|
||||
- name: Build test and godot-cpp (release)
|
||||
run: |
|
||||
cd test
|
||||
scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }}
|
||||
scons platform=${{ matrix.platform }} verbose=yes target=template_release ${{ matrix.flags }}
|
||||
|
||||
- name: Download latest Godot artifacts
|
||||
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
|
||||
|
|
|
@ -58,7 +58,7 @@ first-party `godot-cpp` extension.
|
|||
Some compatibility breakage is to be expected as GDExtension and `godot-cpp`
|
||||
get more used, documented, and critical issues get resolved. See the
|
||||
[Godot issue tracker](https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension)
|
||||
and the [godot-cpp issue tracker](https://github.com/godotengine/godot/issues)
|
||||
and the [godot-cpp issue tracker](https://github.com/godotengine/godot-cpp/issues)
|
||||
for a list of known issues, and be sure to provide feedback on issues and PRs
|
||||
which affect your use of this extension.
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import os, sys, platform
|
|||
|
||||
from SCons.Variables import EnumVariable, PathVariable, BoolVariable
|
||||
from SCons.Tool import Tool
|
||||
from SCons.Action import Action
|
||||
from SCons.Builder import Builder
|
||||
from SCons.Errors import UserError
|
||||
|
||||
|
@ -198,6 +199,14 @@ def options(opts, env):
|
|||
)
|
||||
)
|
||||
|
||||
opts.Add(
|
||||
BoolVariable(
|
||||
key="verbose",
|
||||
help="Enable verbose output for the compilation",
|
||||
default=False,
|
||||
)
|
||||
)
|
||||
|
||||
# Add platform options
|
||||
for pl in platforms:
|
||||
tool = Tool(pl, toolpath=["tools"])
|
||||
|
@ -315,8 +324,31 @@ def generate(env):
|
|||
env.Tool("compilation_db")
|
||||
env.Alias("compiledb", env.CompilationDatabase(normalize_path(env["compiledb_file"], env)))
|
||||
|
||||
# Formatting
|
||||
if not env["verbose"] and sys.stdout.isatty():
|
||||
BLUE = "\033[0;94m"
|
||||
BOLD_BLUE = "\033[1;94m"
|
||||
RESET = "\033[0m"
|
||||
|
||||
env.Append(CCCOMSTR=f"{BLUE}Compiling {BOLD_BLUE}$SOURCE{BLUE} ...{RESET}")
|
||||
env.Append(CXXCOMSTR="$CCCOMSTR")
|
||||
env.Append(SHCCCOMSTR=f"{BLUE}Compiling Shared {BOLD_BLUE}$SOURCE{BLUE} ...{RESET}")
|
||||
env.Append(SHCXXCOMSTR="$SHCCCOMSTR")
|
||||
env.Append(LINKCOMSTR=f"{BLUE}Linking Static Library {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
env.Append(ARCOMSTR="$LINKCOMSTR")
|
||||
env.Append(RANLIBCOMSTR=f"{BLUE}RanLib Library {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
env.Append(SHLINKCOMSTR=f"{BLUE}Linking Shared Library {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
env.Append(JARCOMSTR=f"{BLUE}Creating Java Archive {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
env.Append(JAVACCOMSTR="$CCCOMSTR")
|
||||
env.Append(RCCOMSTR=f"{BLUE}Creating Compiled Resource {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
env.Append(GENCOMSTR=f"{BLUE}Generating {BOLD_BLUE}$TARGET{BLUE} ...{RESET}")
|
||||
|
||||
# Builders
|
||||
env.Append(BUILDERS={"GodotCPPBindings": Builder(action=scons_generate_bindings, emitter=scons_emit_files)})
|
||||
env.Append(
|
||||
BUILDERS={
|
||||
"GodotCPPBindings": Builder(action=Action(scons_generate_bindings, "$GENCOMSTR"), emitter=scons_emit_files)
|
||||
}
|
||||
)
|
||||
env.AddMethod(_godot_cpp, "GodotCPP")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue