forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port most of the Mono module build to Meson
Missing: - Test platform: macOS (Should work but I've not tested yet.) - Finish and test: Windows (Mostly done. Should require a few fixes, but I'm too lazy to reboot right now.) - Finish and test: All non-desktop platforms (Blocked until implemented for the rest of Godot.) - NOTE: For android we were copying shared libs to `#platform/android/java/lib/libs`. How will this work with Meson (out-of-source builds)? !!! Check TODOs and FIXMEs in 'modules/mono/meson.build'.
- Loading branch information
Showing
34 changed files
with
1,512 additions
and
1,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project> | ||
<Target Name="WriteMesonDepList" Condition=" '$(MesonDepListPath)' != '' "> | ||
<Message Importance="High" Text="Writing to depfile ($(ProjectName)): $(MesonDepListPath)" /> | ||
<WriteLinesToFile | ||
File="$(MesonDepListPath)" | ||
Lines="%(Compile.FullPath);%(ProjectReference.FullPath);%(MesonWatchImport.FullPath)" | ||
Overwrite="false" | ||
Encoding="utf-8" /> | ||
<WriteLinesToFile | ||
File="$(MesonDepListPath)" | ||
Lines="$(ProjectPath)" | ||
Overwrite="false" | ||
Encoding="utf-8" /> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/python3 | ||
|
||
import argparse | ||
from shutil import copy2 | ||
|
||
|
||
# Only needed for the stamp file | ||
def touch(path): | ||
import os | ||
with open(path, 'a'): | ||
os.utime(path, None) | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description='Prints the specified environment variable') | ||
parser.add_argument('src', type=str) | ||
parser.add_argument('dst', type=str) | ||
parser.add_argument('--stamp', type=str) | ||
|
||
args = parser.parse_args() | ||
|
||
# Only check if directory exists if copy fails | ||
|
||
try: | ||
copy2(args.src, args.dst) | ||
except (IOError, FileNotFoundError) as e: | ||
import errno | ||
if isinstance(e, IOError) and e.errno != errno.ENOENT: | ||
raise | ||
import os.path | ||
dst_dir = os.path.dirname(args.dst) | ||
if os.path.isdir(dst_dir): | ||
raise | ||
import os | ||
os.makedirs(dst_dir, exist_ok=True) | ||
copy2(args.src, args.dst) | ||
|
||
if args.stamp: | ||
touch(args.stamp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/python3 | ||
|
||
import argparse | ||
import sys | ||
|
||
# Whatever... | ||
try: | ||
import run_msbuild | ||
except: | ||
from . import run_msbuild | ||
|
||
|
||
def generate_header(version_header_dst: str, deplist: [str]): | ||
import os | ||
|
||
latest_mtime = 0 | ||
for filepath in deplist: | ||
mtime = os.path.getmtime(filepath) | ||
latest_mtime = mtime if mtime > latest_mtime else latest_mtime | ||
|
||
glue_version = int(latest_mtime) # The latest modified time will do for now | ||
|
||
with open(version_header_dst, "w") as version_header: | ||
version_header.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") | ||
version_header.write("#ifndef CS_GLUE_VERSION_H\n") | ||
version_header.write("#define CS_GLUE_VERSION_H\n\n") | ||
version_header.write("#define CS_GLUE_VERSION UINT32_C(" + str(glue_version) + ")\n") | ||
version_header.write("\n#endif // CS_GLUE_VERSION_H\n") | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description='Generate C# glue version header') | ||
|
||
run_msbuild.add_arguments_to_parser(parser) | ||
|
||
args = parser.parse_args() | ||
|
||
result = run_msbuild.run_msbuild_with_args(args) | ||
|
||
if result.exit_code != 0: | ||
sys.exit(result.exit_code) | ||
|
||
generate_header(args.stamp, result.deplist) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.