Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Move marshaling logic and generated glue to C# #48409

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions modules/mono/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,13 @@ Import("env_modules")

env_mono = env_modules.Clone()

if env_mono["tools"]:
# NOTE: It is safe to generate this file here, since this is still executed serially
import build_scripts.gen_cs_glue_version as gen_cs_glue_version

gen_cs_glue_version.generate_header("glue/GodotSharp", "glue/cs_glue_version.gen.h")

# Glue sources
if env_mono["mono_glue"]:
env_mono.Append(CPPDEFINES=["MONO_GLUE_ENABLED"])

import os.path

if not os.path.isfile("glue/mono_glue.gen.cpp"):
raise RuntimeError("Mono glue sources not found. Did you forget to run '--generate-mono-glue'?")

if env_mono["tools"] or env_mono["target"] != "release":
env_mono.Append(CPPDEFINES=["GD_MONO_HOT_RELOAD"])

# Configure Mono

mono_configure.configure(env, env_mono)

if env_mono["tools"] and env_mono["mono_glue"] and env_mono["build_cil"]:
# Build Godot API solution
import build_scripts.api_solution_build as api_solution_build

api_sln_cmd = api_solution_build.build(env_mono)

# Build GodotTools
import build_scripts.godot_tools_build as godot_tools_build

godot_tools_build.build(env_mono, api_sln_cmd)

# Build Godot.NET.Sdk
import build_scripts.godot_net_sdk_build as godot_net_sdk_build

godot_net_sdk_build.build(env_mono)

# Add sources

env_mono.add_source_files(env.modules_sources, "*.cpp")
Expand All @@ -60,3 +29,5 @@ if env["platform"] in ["osx", "iphone"]:

if env["tools"]:
env_mono.add_source_files(env.modules_sources, "editor/*.cpp")

env_mono.Prepend(CPPPATH=["#modules/gdnative/include/"])
neikeq marked this conversation as resolved.
Show resolved Hide resolved
80 changes: 0 additions & 80 deletions modules/mono/build_scripts/api_solution_build.py

This file was deleted.

Loading