feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -28,17 +28,17 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#include "macos_utils.h"
|
||||
|
||||
#ifdef MACOS_ENABLED
|
||||
|
||||
#import "macos_utils.h"
|
||||
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
#import <CoreServices/CoreServices.h>
|
||||
|
||||
bool macos_is_app_bundle_installed(const String &p_bundle_id) {
|
||||
CFStringRef bundle_id = CFStringCreateWithCString(nullptr, p_bundle_id.utf8(), kCFStringEncodingUTF8);
|
||||
CFStringRef bundle_id = CFStringCreateWithCString(nullptr, p_bundle_id.utf8().get_data(), kCFStringEncodingUTF8);
|
||||
CFArrayRef result = LSCopyApplicationURLsForBundleIdentifier(bundle_id, nullptr);
|
||||
CFRelease(bundle_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MONO_MACOS_UTILS_H
|
||||
#define MONO_MACOS_UTILS_H
|
||||
#pragma once
|
||||
|
||||
#ifdef MACOS_ENABLED
|
||||
|
||||
|
|
@ -38,5 +37,3 @@
|
|||
bool macos_is_app_bundle_installed(const String &p_bundle_id);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MONO_MACOS_UTILS_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MONO_MACROS_H
|
||||
#define MONO_MACROS_H
|
||||
#pragma once
|
||||
|
||||
#define _GD_VARNAME_CONCAT_B_(m_ignore, m_name) m_name
|
||||
#define _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_B_(hello there, m_a##m_b##m_c)
|
||||
|
|
@ -68,5 +67,3 @@ public:
|
|||
|
||||
#define SCOPE_EXIT \
|
||||
auto GD_UNIQUE_NAME(gd_scope_exit) = gdmono::ScopeExitAux() + [=]() -> void
|
||||
|
||||
#endif // MONO_MACROS_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MONO_NAMING_UTILS_H
|
||||
#define MONO_NAMING_UTILS_H
|
||||
#pragma once
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
|
|
@ -38,5 +37,3 @@ String pascal_to_pascal_case(const String &p_identifier);
|
|||
String snake_to_pascal_case(const String &p_identifier, bool p_input_is_upper = false);
|
||||
|
||||
String snake_to_camel_case(const String &p_identifier, bool p_input_is_upper = false);
|
||||
|
||||
#endif // MONO_NAMING_UTILS_H
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
#define ENV_PATH_SEP ":"
|
||||
#endif
|
||||
|
||||
namespace path {
|
||||
namespace Path {
|
||||
|
||||
String find_executable(const String &p_name) {
|
||||
#ifdef WINDOWS_ENABLED
|
||||
|
|
@ -62,7 +62,7 @@ String find_executable(const String &p_name) {
|
|||
}
|
||||
|
||||
for (int i = 0; i < env_path.size(); i++) {
|
||||
String p = path::join(env_path[i], p_name);
|
||||
String p = Path::join(env_path[i], p_name);
|
||||
|
||||
#ifdef WINDOWS_ENABLED
|
||||
for (int j = 0; j < exts.size(); j++) {
|
||||
|
|
@ -92,8 +92,7 @@ String cwd() {
|
|||
return ".";
|
||||
}
|
||||
|
||||
String result;
|
||||
result.parse_utf16(buffer.ptr());
|
||||
String result = String::utf16(buffer.ptr());
|
||||
if (result.is_empty()) {
|
||||
return ".";
|
||||
}
|
||||
|
|
@ -105,7 +104,7 @@ String cwd() {
|
|||
}
|
||||
|
||||
String result;
|
||||
if (result.parse_utf8(buffer) != OK) {
|
||||
if (result.append_utf8(buffer) != OK) {
|
||||
return ".";
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +116,7 @@ String abspath(const String &p_path) {
|
|||
if (p_path.is_absolute_path()) {
|
||||
return p_path.simplify_path();
|
||||
} else {
|
||||
return path::join(path::cwd(), p_path).simplify_path();
|
||||
return Path::join(Path::cwd(), p_path).simplify_path();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,8 +144,7 @@ String realpath(const String &p_path) {
|
|||
|
||||
::CloseHandle(hFile);
|
||||
|
||||
String result;
|
||||
result.parse_utf16(buffer.ptr());
|
||||
String result = String::utf16(buffer.ptr());
|
||||
if (result.is_empty()) {
|
||||
return p_path;
|
||||
}
|
||||
|
|
@ -160,7 +158,7 @@ String realpath(const String &p_path) {
|
|||
}
|
||||
|
||||
String result;
|
||||
Error parse_ok = result.parse_utf8(resolved_path);
|
||||
Error parse_ok = result.append_utf8(resolved_path);
|
||||
::free(resolved_path);
|
||||
|
||||
if (parse_ok != OK) {
|
||||
|
|
@ -186,11 +184,11 @@ String join(const String &p_a, const String &p_b) {
|
|||
}
|
||||
|
||||
String join(const String &p_a, const String &p_b, const String &p_c) {
|
||||
return path::join(path::join(p_a, p_b), p_c);
|
||||
return Path::join(Path::join(p_a, p_b), p_c);
|
||||
}
|
||||
|
||||
String join(const String &p_a, const String &p_b, const String &p_c, const String &p_d) {
|
||||
return path::join(path::join(path::join(p_a, p_b), p_c), p_d);
|
||||
return Path::join(Path::join(Path::join(p_a, p_b), p_c), p_d);
|
||||
}
|
||||
|
||||
String relative_to_impl(const String &p_path, const String &p_relative_to) {
|
||||
|
|
@ -263,4 +261,4 @@ String get_csharp_project_name() {
|
|||
return name;
|
||||
}
|
||||
|
||||
} // namespace path
|
||||
} // namespace Path
|
||||
|
|
|
|||
|
|
@ -28,12 +28,11 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MONO_PATH_UTILS_H
|
||||
#define MONO_PATH_UTILS_H
|
||||
#pragma once
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
namespace path {
|
||||
namespace Path {
|
||||
|
||||
String find_executable(const String &p_name);
|
||||
|
||||
|
|
@ -59,6 +58,4 @@ String realpath(const String &p_path);
|
|||
String relative_to(const String &p_path, const String &p_relative_to);
|
||||
|
||||
String get_csharp_project_name();
|
||||
} // namespace path
|
||||
|
||||
#endif // MONO_PATH_UTILS_H
|
||||
} // namespace Path
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ String sformat(const String &p_text, const String &p1, const String &p2,
|
|||
search_from = result + 2;
|
||||
}
|
||||
|
||||
new_string += p_text.substr(search_from, p_text.length() - search_from);
|
||||
new_string += p_text.substr(search_from);
|
||||
|
||||
return new_string;
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ Error read_all_file_utf8(const String &p_path, String &r_content) {
|
|||
w[len] = 0;
|
||||
|
||||
String source;
|
||||
if (source.parse_utf8((const char *)w, len) != OK) {
|
||||
if (source.append_utf8((const char *)w, len) != OK) {
|
||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MONO_STRING_UTILS_H
|
||||
#define MONO_STRING_UTILS_H
|
||||
#pragma once
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
#include "core/variant/variant.h"
|
||||
|
|
@ -59,5 +58,3 @@ String str_format(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_1_2;
|
|||
String str_format(const char *p_format, va_list p_list) _PRINTF_FORMAT_ATTRIBUTE_1_0;
|
||||
char *str_format_new(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_1_2;
|
||||
char *str_format_new(const char *p_format, va_list p_list) _PRINTF_FORMAT_ATTRIBUTE_1_0;
|
||||
|
||||
#endif // MONO_STRING_UTILS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue