mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 07:32:55 +00:00
Release .build_version file handle in Android custom build export
This commit is contained in:
parent
b67ccf1a6f
commit
b271315bac
@ -2297,15 +2297,18 @@ public:
|
||||
|
||||
if (use_custom_build) {
|
||||
//test that installed build version is alright
|
||||
FileAccessRef f = FileAccess::open("res://android/.build_version", FileAccess::READ);
|
||||
if (!f) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Trying to build from a custom built template, but no version info for it exists. Please reinstall from the 'Project' menu."));
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
String version = f->get_line().strip_edges();
|
||||
if (version != VERSION_FULL_CONFIG) {
|
||||
EditorNode::get_singleton()->show_warning(vformat(TTR("Android build version mismatch:\n Template installed: %s\n Godot Version: %s\nPlease reinstall Android build template from 'Project' menu."), version, VERSION_FULL_CONFIG));
|
||||
return ERR_UNCONFIGURED;
|
||||
{
|
||||
FileAccessRef f = FileAccess::open("res://android/.build_version", FileAccess::READ);
|
||||
if (!f) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Trying to build from a custom built template, but no version info for it exists. Please reinstall from the 'Project' menu."));
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
String version = f->get_line().strip_edges();
|
||||
f->close();
|
||||
if (version != VERSION_FULL_CONFIG) {
|
||||
EditorNode::get_singleton()->show_warning(vformat(TTR("Android build version mismatch:\n Template installed: %s\n Godot Version: %s\nPlease reinstall Android build template from 'Project' menu."), version, VERSION_FULL_CONFIG));
|
||||
return ERR_UNCONFIGURED;
|
||||
}
|
||||
}
|
||||
String sdk_path = EDITOR_GET("export/android/custom_build_sdk_path");
|
||||
ERR_FAIL_COND_V_MSG(sdk_path == "", ERR_UNCONFIGURED, "Android SDK path must be configured in Editor Settings at 'export/android/custom_build_sdk_path'.");
|
||||
|
Loading…
Reference in New Issue
Block a user