You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Improve the C# API projects generation
- Now there is only one solution that contains both GodotSharp and GodotSharpEditor project. Previously we had one solution for each project - GodotSharpEditor reference GodotShatp with a 'ProjectReference'. Previously it was a 'Reference' to the assembly - This also simplifies the command line option to generate this solution: 'godot --generate-cs-api <OutputDir>'
This commit is contained in:
@@ -88,7 +88,7 @@ void fix_path(const String &p_path, String &r_out) {
|
||||
bool rel_path_to_abs(const String &p_existing_path, String &r_abs_path) {
|
||||
#ifdef WINDOWS_ENABLED
|
||||
CharType ret[_MAX_PATH];
|
||||
if (_wfullpath(ret, p_existing_path.c_str(), _MAX_PATH)) {
|
||||
if (::_wfullpath(ret, p_existing_path.c_str(), _MAX_PATH)) {
|
||||
String abspath = String(ret).replace("\\", "/");
|
||||
int pos = abspath.find(":/");
|
||||
if (pos != -1) {
|
||||
@@ -99,10 +99,12 @@ bool rel_path_to_abs(const String &p_existing_path, String &r_abs_path) {
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
char ret[PATH_MAX];
|
||||
if (realpath(p_existing_path.utf8().get_data(), ret)) {
|
||||
char *resolved_path = ::realpath(p_existing_path.utf8().get_data(), NULL);
|
||||
if (resolved_path) {
|
||||
String retstr;
|
||||
if (!retstr.parse_utf8(ret)) {
|
||||
bool success = !retstr.parse_utf8(resolved_path);
|
||||
::free(resolved_path);
|
||||
if (success) {
|
||||
r_abs_path = retstr;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user