diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-03 21:26:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 21:26:12 +0200 |
commit | e1478b7a87c1eec7bcf3438d0894cf4fe0135db2 (patch) | |
tree | af3611d72ff8ec0a6328af6b22e691ab854cb27e /modules/mono/editor/godotsharp_editor.cpp | |
parent | 2832c5aa94009c757ca9ba94489e158886205f5b (diff) | |
parent | 9f1a8ce6a296868103b84c178375d3f82d9aa963 (diff) | |
download | redot-engine-e1478b7a87c1eec7bcf3438d0894cf4fe0135db2.tar.gz |
Merge pull request #30292 from neikeq/android_fixes
Mono: Android build and shared libraries fixes
Diffstat (limited to 'modules/mono/editor/godotsharp_editor.cpp')
-rw-r--r-- | modules/mono/editor/godotsharp_editor.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp index 9d42528927..8dc5ced29f 100644 --- a/modules/mono/editor/godotsharp_editor.cpp +++ b/modules/mono/editor/godotsharp_editor.cpp @@ -63,16 +63,17 @@ bool GodotSharpEditor::_create_project_solution() { pr.step(TTR("Generating C# project...")); String path = OS::get_singleton()->get_resource_dir(); - String name = ProjectSettings::get_singleton()->get("application/config/name"); - if (name.empty()) { - name = "UnnamedProject"; + String appname = ProjectSettings::get_singleton()->get("application/config/name"); + String appname_safe = OS::get_singleton()->get_safe_dir_name(appname); + if (appname_safe.empty()) { + appname_safe = "UnnamedProject"; } - String guid = CSharpProject::generate_game_project(path, name); + String guid = CSharpProject::generate_game_project(path, appname_safe); if (guid.length()) { - DotNetSolution solution(name); + DotNetSolution solution(appname_safe); if (!solution.set_path(path)) { show_error_dialog(TTR("Failed to create solution.")); @@ -81,12 +82,12 @@ bool GodotSharpEditor::_create_project_solution() { DotNetSolution::ProjectInfo proj_info; proj_info.guid = guid; - proj_info.relpath = name + ".csproj"; + proj_info.relpath = appname_safe + ".csproj"; proj_info.configs.push_back("Debug"); proj_info.configs.push_back("Release"); proj_info.configs.push_back("Tools"); - solution.add_new_project(name, proj_info); + solution.add_new_project(appname_safe, proj_info); Error sln_error = solution.save(); |