summaryrefslogtreecommitdiff
path: root/modules/mono/godotsharp_dirs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/godotsharp_dirs.cpp')
-rw-r--r--modules/mono/godotsharp_dirs.cpp62
1 files changed, 22 insertions, 40 deletions
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index f17b24e399..71576c2f80 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -96,8 +96,6 @@ class _GodotSharpDirs {
public:
String res_data_dir;
String res_metadata_dir;
- String res_assemblies_base_dir;
- String res_assemblies_dir;
String res_config_dir;
String res_temp_dir;
String res_temp_assemblies_base_dir;
@@ -105,15 +103,14 @@ public:
String mono_user_dir;
String mono_logs_dir;
+ String api_assemblies_base_dir;
+ String api_assemblies_dir;
+
#ifdef TOOLS_ENABLED
String mono_solutions_dir;
String build_logs_dir;
- String sln_filepath;
- String csproj_filepath;
-
String data_editor_tools_dir;
- String data_editor_prebuilt_api_dir;
#else
// Equivalent of res_assemblies_dir, but in the data directory rather than in 'res://'.
// Only defined on export templates. Used when exporting assemblies outside of PCKs.
@@ -131,8 +128,6 @@ private:
_GodotSharpDirs() {
res_data_dir = ProjectSettings::get_singleton()->get_project_data_path().plus_file("mono");
res_metadata_dir = res_data_dir.plus_file("metadata");
- res_assemblies_base_dir = res_data_dir.plus_file("assemblies");
- res_assemblies_dir = res_assemblies_base_dir.plus_file(GDMono::get_expected_api_build_config());
res_config_dir = res_data_dir.plus_file("etc").plus_file("mono");
// TODO use paths from csproj
@@ -140,6 +135,8 @@ private:
res_temp_assemblies_base_dir = res_temp_dir.plus_file("bin");
res_temp_assemblies_dir = res_temp_assemblies_base_dir.plus_file(_get_expected_build_config());
+ api_assemblies_base_dir = res_data_dir.plus_file("assemblies");
+
#ifdef JAVASCRIPT_ENABLED
mono_user_dir = "user://";
#else
@@ -151,16 +148,7 @@ private:
mono_solutions_dir = mono_user_dir.plus_file("solutions");
build_logs_dir = mono_user_dir.plus_file("build_logs");
- String appname = ProjectSettings::get_singleton()->get("application/config/name");
- String appname_safe = OS::get_singleton()->get_safe_dir_name(appname);
- if (appname_safe.is_empty()) {
- appname_safe = "UnnamedProject";
- }
-
String base_path = ProjectSettings::get_singleton()->globalize_path("res://");
-
- sln_filepath = base_path.plus_file(appname_safe + ".sln");
- csproj_filepath = base_path.plus_file(appname_safe + ".csproj");
#endif
String exe_dir = OS::get_singleton()->get_executable_path().get_base_dir();
@@ -169,7 +157,7 @@ private:
String data_dir_root = exe_dir.plus_file("GodotSharp");
data_editor_tools_dir = data_dir_root.plus_file("Tools");
- data_editor_prebuilt_api_dir = data_dir_root.plus_file("Api");
+ api_assemblies_base_dir = data_dir_root.plus_file("Api");
String data_mono_root_dir = data_dir_root.plus_file("Mono");
data_mono_etc_dir = data_mono_root_dir.plus_file("etc");
@@ -189,8 +177,8 @@ private:
data_editor_tools_dir = exe_dir.plus_file("../Resources/GodotSharp/Tools");
}
- if (!DirAccess::exists(data_editor_prebuilt_api_dir)) {
- data_editor_prebuilt_api_dir = exe_dir.plus_file("../Resources/GodotSharp/Api");
+ if (!DirAccess::exists(api_assemblies_base_dir)) {
+ api_assemblies_base_dir = exe_dir.plus_file("../Resources/GodotSharp/Api");
}
if (!DirAccess::exists(data_mono_root_dir)) {
@@ -234,6 +222,12 @@ private:
#endif
#endif
+
+#ifdef TOOLS_ENABLED
+ api_assemblies_dir = api_assemblies_base_dir.plus_file(GDMono::get_expected_api_build_config());
+#else
+ api_assemblies_dir = data_dir_root;
+#endif
}
public:
@@ -251,14 +245,6 @@ String get_res_metadata_dir() {
return _GodotSharpDirs::get_singleton().res_metadata_dir;
}
-String get_res_assemblies_base_dir() {
- return _GodotSharpDirs::get_singleton().res_assemblies_base_dir;
-}
-
-String get_res_assemblies_dir() {
- return _GodotSharpDirs::get_singleton().res_assemblies_dir;
-}
-
String get_res_config_dir() {
return _GodotSharpDirs::get_singleton().res_config_dir;
}
@@ -275,6 +261,14 @@ String get_res_temp_assemblies_dir() {
return _GodotSharpDirs::get_singleton().res_temp_assemblies_dir;
}
+String get_api_assemblies_dir() {
+ return _GodotSharpDirs::get_singleton().api_assemblies_dir;
+}
+
+String get_api_assemblies_base_dir() {
+ return _GodotSharpDirs::get_singleton().api_assemblies_base_dir;
+}
+
String get_mono_user_dir() {
return _GodotSharpDirs::get_singleton().mono_user_dir;
}
@@ -292,21 +286,9 @@ String get_build_logs_dir() {
return _GodotSharpDirs::get_singleton().build_logs_dir;
}
-String get_project_sln_path() {
- return _GodotSharpDirs::get_singleton().sln_filepath;
-}
-
-String get_project_csproj_path() {
- return _GodotSharpDirs::get_singleton().csproj_filepath;
-}
-
String get_data_editor_tools_dir() {
return _GodotSharpDirs::get_singleton().data_editor_tools_dir;
}
-
-String get_data_editor_prebuilt_api_dir() {
- return _GodotSharpDirs::get_singleton().data_editor_prebuilt_api_dir;
-}
#else
String get_data_game_assemblies_dir() {
return _GodotSharpDirs::get_singleton().data_game_assemblies_dir;