[Export] Use project settings overrides with the target preset features instead of current platform features.
This commit is contained in:
parent
4248411baf
commit
c6739f64df
22 changed files with 251 additions and 123 deletions
|
|
@ -60,6 +60,29 @@ bool EditorExportPreset::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
Variant EditorExportPreset::get_project_setting(const StringName &p_name) {
|
||||
List<String> ftr_list;
|
||||
platform->get_platform_features(&ftr_list);
|
||||
platform->get_preset_features(this, &ftr_list);
|
||||
|
||||
Vector<String> features;
|
||||
for (const String &E : ftr_list) {
|
||||
features.push_back(E);
|
||||
}
|
||||
|
||||
if (!get_custom_features().is_empty()) {
|
||||
Vector<String> tmp_custom_list = get_custom_features().split(",");
|
||||
|
||||
for (int i = 0; i < tmp_custom_list.size(); i++) {
|
||||
String f = tmp_custom_list[i].strip_edges();
|
||||
if (!f.is_empty()) {
|
||||
features.push_back(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ProjectSettings::get_singleton()->get_setting_with_override_and_custom_features(p_name, features);
|
||||
}
|
||||
|
||||
void EditorExportPreset::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_get_property_warning", "name"), &EditorExportPreset::_get_property_warning);
|
||||
|
||||
|
|
@ -70,6 +93,7 @@ void EditorExportPreset::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_customized_files_count"), &EditorExportPreset::get_customized_files_count);
|
||||
ClassDB::bind_method(D_METHOD("has_export_file", "path"), &EditorExportPreset::has_export_file);
|
||||
ClassDB::bind_method(D_METHOD("get_file_export_mode", "path", "default"), &EditorExportPreset::get_file_export_mode, DEFVAL(MODE_FILE_NOT_CUSTOMIZED));
|
||||
ClassDB::bind_method(D_METHOD("get_project_setting", "name"), &EditorExportPreset::get_project_setting);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_preset_name"), &EditorExportPreset::get_name);
|
||||
ClassDB::bind_method(D_METHOD("is_runnable"), &EditorExportPreset::is_runnable);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue