Compare commits

..

5 Commits

Author SHA1 Message Date
Rémi Verschelde
dfee6f0ca4 headers: Track tag godot-3.3.2-stable 2021-05-25 15:01:57 +02:00
Rémi Verschelde
f298d36c86 Merge pull request #557 from godotengine/dependabot/github_actions/actions/upload-artifact-2.2.3
Bump actions/upload-artifact from 2.2.2 to 2.2.3
2021-05-25 15:00:35 +02:00
Hristo Stamenov
c629200b93 Update string(TOLOWER ...) to take string versions of CMake variables (#561)
On some generators (MSVC) there is the issue that this line produces cause by the variable being expanded and not being surrounded by quotes.
2021-05-20 14:47:20 +02:00
Hristo Stamenov
476a870d6c Fix CMake generation on Windows (#536) 2021-05-15 22:57:05 +02:00
dependabot[bot]
eb8ae9dd51 Bump actions/upload-artifact from 2.2.2 to 2.2.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.2...v2.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 05:48:34 +00:00
4 changed files with 38 additions and 35 deletions

View File

@@ -29,7 +29,7 @@ jobs:
scons target=release generate_bindings=yes -j $(nproc)
- name: Upload artifact
uses: actions/upload-artifact@v2.2.2
uses: actions/upload-artifact@v2.2.3
with:
name: godot-cpp-linux-glibc2.23-x86_64-release
path: bin/libgodot-cpp.linux.release.64.a
@@ -66,7 +66,7 @@ jobs:
scons target=release generate_bindings=yes -j $env:NUMBER_OF_PROCESSORS
- name: Upload artifact
uses: actions/upload-artifact@v2.2.2
uses: actions/upload-artifact@v2.2.3
with:
name: godot-cpp-windows-msvc2019-x86_64-release
path: bin/libgodot-cpp.windows.release.64.lib
@@ -100,7 +100,7 @@ jobs:
scons target=release generate_bindings=yes use_mingw=yes -j $env:NUMBER_OF_PROCESSORS
- name: Upload artifact
uses: actions/upload-artifact@v2.2.2
uses: actions/upload-artifact@v2.2.3
with:
name: godot-cpp-linux-mingw-x86_64-release
path: bin/libgodot-cpp.windows.release.64.a
@@ -131,7 +131,7 @@ jobs:
scons target=release generate_bindings=yes -j $(sysctl -n hw.logicalcpu)
- name: Upload artifact
uses: actions/upload-artifact@v2.2.2
uses: actions/upload-artifact@v2.2.3
with:
name: godot-cpp-macos-x86_64-release
path: bin/libgodot-cpp.osx.release.64.a

View File

@@ -199,8 +199,8 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(BITS 64)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME)
string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
string(TOLOWER "${CMAKE_SYSTEM_NAME}" SYSTEM_NAME)
string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if(ANDROID)
# Added the android abi after system name

View File

@@ -3,6 +3,7 @@ from __future__ import print_function
import json
import os
import errno
from pathlib import Path
# Convenience function for using template get_node
def correct_method_name(method_list):
@@ -19,23 +20,23 @@ def print_file_list(api_filepath, output_dir, headers=False, sources=False):
end = ';'
with open(api_filepath) as api_file:
classes = json.load(api_file)
include_gen_folder = os.path.join(output_dir, 'include', 'gen')
source_gen_folder = os.path.join(output_dir, 'src', 'gen')
include_gen_folder = Path(output_dir) / 'include' / 'gen'
source_gen_folder = Path(output_dir) / 'src' / 'gen'
for _class in classes:
header_filename = os.path.join(include_gen_folder, strip_name(_class["name"]) + ".hpp")
source_filename = os.path.join(source_gen_folder, strip_name(_class["name"]) + ".cpp")
header_filename = include_gen_folder / (strip_name(_class["name"]) + ".hpp")
source_filename = source_gen_folder / (strip_name(_class["name"]) + ".cpp")
if headers:
print(header_filename, end=end)
print(str(header_filename.as_posix()), end=end)
if sources:
print(source_filename, end=end)
icall_header_filename = os.path.join(include_gen_folder, '__icalls.hpp')
register_types_filename = os.path.join(source_gen_folder, '__register_types.cpp')
init_method_bindings_filename = os.path.join(source_gen_folder, '__init_method_bindings.cpp')
print(str(source_filename.as_posix()), end=end)
icall_header_filename = include_gen_folder / '__icalls.hpp'
register_types_filename = source_gen_folder / '__register_types.cpp'
init_method_bindings_filename = source_gen_folder / '__init_method_bindings.cpp'
if headers:
print(icall_header_filename, end=end)
print(str(icall_header_filename.as_posix()), end=end)
if sources:
print(register_types_filename, end=end)
print(init_method_bindings_filename, end=end)
print(str(register_types_filename.as_posix()), end=end)
print(str(init_method_bindings_filename.as_posix()), end=end)
def generate_bindings(api_filepath, use_template_get_node, output_dir="."):
@@ -44,20 +45,22 @@ def generate_bindings(api_filepath, use_template_get_node, output_dir="."):
classes = json.load(api_file)
icalls = set()
include_gen_folder = os.path.join(output_dir, 'include', 'gen')
source_gen_folder = os.path.join(output_dir, 'src', 'gen')
include_gen_folder = Path(output_dir) / 'include' / 'gen'
source_gen_folder = Path(output_dir) / 'src' / 'gen'
try:
os.makedirs(include_gen_folder)
include_gen_folder.mkdir(parents=True)
except os.error as e:
if e.errno == errno.EEXIST:
print(include_gen_folder + ": " + os.strerror(e.errno))
print(str(source_gen_folder) + ": " + os.strerror(e.errno))
else:
exit(1)
try:
os.makedirs(source_gen_folder)
source_gen_folder.mkdir(parents=True)
except os.error as e:
if e.errno == errno.EEXIST:
print(source_gen_folder + ": " + os.strerror(e.errno))
print(str(source_gen_folder) + ": " + os.strerror(e.errno))
else:
exit(1)
@@ -71,24 +74,24 @@ def generate_bindings(api_filepath, use_template_get_node, output_dir="."):
impl = generate_class_implementation(icalls, used_classes, c, use_template_get_node)
header_filename = os.path.join(include_gen_folder, strip_name(c["name"]) + ".hpp")
with open(header_filename, "w+") as header_file:
header_filename = include_gen_folder / (strip_name(c["name"]) + ".hpp")
with header_filename.open("w+") as header_file:
header_file.write(header)
source_filename = os.path.join(source_gen_folder, strip_name(c["name"]) + ".cpp")
with open(source_filename, "w+") as source_file:
source_filename = source_gen_folder / (strip_name(c["name"]) + ".cpp")
with source_filename.open("w+") as source_file:
source_file.write(impl)
icall_header_filename = os.path.join(include_gen_folder, '__icalls.hpp')
with open(icall_header_filename, "w+") as icall_header_file:
icall_header_filename = include_gen_folder / '__icalls.hpp'
with icall_header_filename.open("w+") as icall_header_file:
icall_header_file.write(generate_icall_header(icalls))
register_types_filename = os.path.join(source_gen_folder, '__register_types.cpp')
with open(register_types_filename, "w+") as register_types_file:
register_types_filename = source_gen_folder / '__register_types.cpp'
with register_types_filename.open("w+") as register_types_file:
register_types_file.write(generate_type_registry(classes))
init_method_bindings_filename = os.path.join(source_gen_folder, '__init_method_bindings.cpp')
with open(init_method_bindings_filename, "w+") as init_method_bindings_file:
init_method_bindings_filename = source_gen_folder / '__init_method_bindings.cpp'
with init_method_bindings_filename.open("w+") as init_method_bindings_file:
init_method_bindings_file.write(generate_init_method_bindings(classes))