diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-11-28 23:42:37 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-11-29 00:36:05 +0100 |
| commit | 66de28eda8239e006c5d53debdea75f131b32f77 (patch) | |
| tree | 2a2049727d84c173e7e0a924350ce2cdd15e01ee /modules/mono/godotsharp_dirs.cpp | |
| parent | 7735af7e768e16efb4b3b6de1c72c3dfb50c9412 (diff) | |
| download | redot-engine-66de28eda8239e006c5d53debdea75f131b32f77.tar.gz | |
Mono/C#: Add option to export assemblies outside of PCK
When using this options, assemblies will be saved in the Assemblies folder of the data directory: 'data_AppName/Assemblies/'.
Diffstat (limited to 'modules/mono/godotsharp_dirs.cpp')
| -rw-r--r-- | modules/mono/godotsharp_dirs.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index cb0ac9431e..ef30a52b72 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -108,6 +108,10 @@ public: 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. + String data_game_assemblies_dir; #endif String data_mono_etc_dir; @@ -205,6 +209,7 @@ private: data_mono_lib_dir = GDMonoAndroid::get_app_native_lib_dir(); #else data_mono_lib_dir = data_mono_root_dir.plus_file("lib"); + data_game_assemblies_dir = data_dir_root.plus_file("Assemblies"); #endif #ifdef WINDOWS_ENABLED @@ -216,6 +221,10 @@ private: data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc"); data_mono_lib_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Mono/lib"); } + + if (!DirAccess::exists(data_game_assemblies_dir)) { + data_game_assemblies_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Assemblies"); + } #endif #endif @@ -295,6 +304,10 @@ String get_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; +} #endif String get_data_mono_etc_dir() { |
