feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -561,13 +561,13 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
|
|||
|
||||
{
|
||||
String hint;
|
||||
for (uint64_t i = 0; i < sizeof(data_collect_purpose_info) / sizeof(data_collect_purpose_info[0]); ++i) {
|
||||
for (uint64_t i = 0; i < std::size(data_collect_purpose_info); ++i) {
|
||||
if (i != 0) {
|
||||
hint += ",";
|
||||
}
|
||||
hint += vformat("%s:%d", data_collect_purpose_info[i].prop_name, (1 << i));
|
||||
}
|
||||
for (uint64_t i = 0; i < sizeof(data_collect_type_info) / sizeof(data_collect_type_info[0]); ++i) {
|
||||
for (uint64_t i = 0; i < std::size(data_collect_type_info); ++i) {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("privacy/collected_data/%s/collected", data_collect_type_info[i].prop_name)), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("privacy/collected_data/%s/linked_to_user", data_collect_type_info[i].prop_name)), false));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, vformat("privacy/collected_data/%s/used_for_tracking", data_collect_type_info[i].prop_name)), false));
|
||||
|
|
@ -671,7 +671,7 @@ void EditorExportPlatformMacOS::_make_icon(const Ref<EditorExportPreset> &p_pres
|
|||
{ "is32", "s8mk", false, 16 } //16×16 24-bit RLE + 8-bit uncompressed mask
|
||||
};
|
||||
|
||||
for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
|
||||
for (uint64_t i = 0; i < std::size(icon_infos); ++i) {
|
||||
Ref<Image> copy = p_icon->duplicate();
|
||||
copy->convert(Image::FORMAT_RGBA8);
|
||||
copy->resize(icon_infos[i].size, icon_infos[i].size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
|
||||
|
|
@ -736,14 +736,13 @@ void EditorExportPlatformMacOS::_make_icon(const Ref<EditorExportPreset> &p_pres
|
|||
}
|
||||
|
||||
void EditorExportPlatformMacOS::_fix_privacy_manifest(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist) {
|
||||
String str;
|
||||
String str = String::utf8((const char *)plist.ptr(), plist.size());
|
||||
String strnew;
|
||||
str.parse_utf8((const char *)plist.ptr(), plist.size());
|
||||
Vector<String> lines = str.split("\n");
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
if (lines[i].find("$priv_collection") != -1) {
|
||||
bool section_opened = false;
|
||||
for (uint64_t j = 0; j < sizeof(data_collect_type_info) / sizeof(data_collect_type_info[0]); ++j) {
|
||||
for (uint64_t j = 0; j < std::size(data_collect_type_info); ++j) {
|
||||
bool data_collected = p_preset->get(vformat("privacy/collected_data/%s/collected", data_collect_type_info[j].prop_name));
|
||||
bool linked = p_preset->get(vformat("privacy/collected_data/%s/linked_to_user", data_collect_type_info[j].prop_name));
|
||||
bool tracking = p_preset->get(vformat("privacy/collected_data/%s/used_for_tracking", data_collect_type_info[j].prop_name));
|
||||
|
|
@ -772,7 +771,7 @@ void EditorExportPlatformMacOS::_fix_privacy_manifest(const Ref<EditorExportPres
|
|||
if (purposes != 0) {
|
||||
strnew += "\t\t\t\t<key>NSPrivacyCollectedDataTypePurposes</key>\n";
|
||||
strnew += "\t\t\t\t<array>\n";
|
||||
for (uint64_t k = 0; k < sizeof(data_collect_purpose_info) / sizeof(data_collect_purpose_info[0]); ++k) {
|
||||
for (uint64_t k = 0; k < std::size(data_collect_purpose_info); ++k) {
|
||||
if (purposes & (1 << k)) {
|
||||
strnew += vformat("\t\t\t\t\t<string>%s</string>\n", data_collect_purpose_info[k].type_name);
|
||||
}
|
||||
|
|
@ -815,15 +814,14 @@ void EditorExportPlatformMacOS::_fix_privacy_manifest(const Ref<EditorExportPres
|
|||
}
|
||||
|
||||
void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist, const String &p_binary) {
|
||||
String str;
|
||||
String str = String::utf8((const char *)plist.ptr(), plist.size());
|
||||
String strnew;
|
||||
str.parse_utf8((const char *)plist.ptr(), plist.size());
|
||||
Vector<String> lines = str.split("\n");
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
if (lines[i].contains("$binary")) {
|
||||
strnew += lines[i].replace("$binary", p_binary) + "\n";
|
||||
} else if (lines[i].contains("$name")) {
|
||||
strnew += lines[i].replace("$name", GLOBAL_GET("application/config/name")) + "\n";
|
||||
strnew += lines[i].replace("$name", get_project_setting(p_preset, "application/config/name")) + "\n";
|
||||
} else if (lines[i].contains("$bundle_identifier")) {
|
||||
strnew += lines[i].replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n";
|
||||
} else if (lines[i].contains("$short_version")) {
|
||||
|
|
@ -982,7 +980,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
|
|||
} else {
|
||||
print_verbose("rcodesign (" + p_path + "):\n" + str);
|
||||
int next_nl = str.find_char('\n', rq_offset);
|
||||
String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 23, -1) : str.substr(rq_offset + 23, next_nl - rq_offset - 23);
|
||||
String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 23) : str.substr(rq_offset + 23, next_nl - rq_offset - 23);
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), vformat(TTR("Notarization request UUID: \"%s\""), request_uuid));
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), TTR("The notarization process generally takes less than an hour."));
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("You can check progress manually by opening a Terminal and running the following command:"));
|
||||
|
|
@ -1066,7 +1064,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
|
|||
} else {
|
||||
print_verbose("notarytool (" + p_path + "):\n" + str);
|
||||
int next_nl = str.find_char('\n', rq_offset);
|
||||
String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 4, -1) : str.substr(rq_offset + 4, next_nl - rq_offset - 4);
|
||||
String request_uuid = (next_nl == -1) ? str.substr(rq_offset + 4) : str.substr(rq_offset + 4, next_nl - rq_offset - 4);
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), vformat(TTR("Notarization request UUID: \"%s\""), request_uuid));
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), TTR("The notarization process generally takes less than an hour."));
|
||||
add_message(EXPORT_MESSAGE_INFO, TTR("Notarization"), "\t" + TTR("You can check progress manually by opening a Terminal and running the following command:"));
|
||||
|
|
@ -1500,7 +1498,7 @@ Error EditorExportPlatformMacOS::_export_debug_script(const Ref<EditorExportPres
|
|||
}
|
||||
|
||||
f->store_line("#!/bin/sh");
|
||||
f->store_line("echo -ne '\\033c\\033]0;" + p_app_name + "\\a'");
|
||||
f->store_line("printf '\\033c\\033]0;%s\\a' " + p_app_name);
|
||||
f->store_line("");
|
||||
f->store_line("function app_realpath() {");
|
||||
f->store_line(" SOURCE=$1");
|
||||
|
|
@ -1566,8 +1564,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
|
||||
|
||||
String pkg_name;
|
||||
if (String(GLOBAL_GET("application/config/name")) != "") {
|
||||
pkg_name = String(GLOBAL_GET("application/config/name"));
|
||||
if (String(get_project_setting(p_preset, "application/config/name")) != "") {
|
||||
pkg_name = String(get_project_setting(p_preset, "application/config/name"));
|
||||
} else {
|
||||
pkg_name = "Unnamed";
|
||||
}
|
||||
|
|
@ -1660,7 +1658,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
}
|
||||
}
|
||||
|
||||
Dictionary appnames = GLOBAL_GET("application/config/name_localized");
|
||||
Dictionary appnames = get_project_setting(p_preset, "application/config/name_localized");
|
||||
Dictionary microphone_usage_descriptions = p_preset->get("privacy/microphone_usage_description_localized");
|
||||
Dictionary camera_usage_descriptions = p_preset->get("privacy/camera_usage_description_localized");
|
||||
Dictionary location_usage_descriptions = p_preset->get("privacy/location_usage_description_localized");
|
||||
|
|
@ -1674,7 +1672,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
Dictionary removable_volumes_usage_descriptions = p_preset->get("privacy/removable_volumes_usage_description_localized");
|
||||
Dictionary copyrights = p_preset->get("application/copyright_localized");
|
||||
|
||||
Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
|
||||
Vector<String> translations = get_project_setting(p_preset, "internationalization/locale/translations");
|
||||
if (translations.size() > 0) {
|
||||
{
|
||||
String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
|
||||
|
|
@ -1682,7 +1680,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
Ref<FileAccess> f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
|
||||
f->store_line("/* Localized versions of Info.plist keys */");
|
||||
f->store_line("");
|
||||
f->store_line("CFBundleDisplayName = \"" + GLOBAL_GET("application/config/name").operator String() + "\";");
|
||||
f->store_line("CFBundleDisplayName = \"" + get_project_setting(p_preset, "application/config/name").operator String() + "\";");
|
||||
if (!((String)p_preset->get("privacy/microphone_usage_description")).is_empty()) {
|
||||
f->store_line("NSMicrophoneUsageDescription = \"" + p_preset->get("privacy/microphone_usage_description").operator String() + "\";");
|
||||
}
|
||||
|
|
@ -1781,7 +1779,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
int export_angle = p_preset->get("application/export_angle");
|
||||
bool include_angle_libs = false;
|
||||
if (export_angle == 0) {
|
||||
include_angle_libs = String(GLOBAL_GET("rendering/gl_compatibility/driver.macos")) == "opengl3_angle";
|
||||
include_angle_libs = String(get_project_setting(p_preset, "rendering/gl_compatibility/driver.macos")) == "opengl3_angle";
|
||||
} else if (export_angle == 1) {
|
||||
include_angle_libs = true;
|
||||
}
|
||||
|
|
@ -1869,10 +1867,10 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
String icon_path;
|
||||
if (p_preset->get("application/icon") != "") {
|
||||
icon_path = p_preset->get("application/icon");
|
||||
} else if (GLOBAL_GET("application/config/macos_native_icon") != "") {
|
||||
icon_path = GLOBAL_GET("application/config/macos_native_icon");
|
||||
} else if (get_project_setting(p_preset, "application/config/macos_native_icon") != "") {
|
||||
icon_path = get_project_setting(p_preset, "application/config/macos_native_icon");
|
||||
} else {
|
||||
icon_path = GLOBAL_GET("application/config/icon");
|
||||
icon_path = get_project_setting(p_preset, "application/config/icon");
|
||||
}
|
||||
|
||||
if (!icon_path.is_empty()) {
|
||||
|
|
@ -2570,8 +2568,8 @@ Error EditorExportPlatformMacOS::run(const Ref<EditorExportPreset> &p_preset, in
|
|||
}
|
||||
|
||||
String pkg_name;
|
||||
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
|
||||
pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
|
||||
if (String(get_project_setting(p_preset, "application/config/name")) != "") {
|
||||
pkg_name = String(get_project_setting(p_preset, "application/config/name"));
|
||||
} else {
|
||||
pkg_name = "Unnamed";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue