feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -35,14 +35,17 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/io/dir_access.h"
|
||||
#include "core/io/zip_io.h"
|
||||
#include "core/os/os.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/export/editor_export.h"
|
||||
#include "editor/file_system/editor_paths.h"
|
||||
#include "editor/import/resource_importer_texture_settings.h"
|
||||
#include "editor/settings/editor_settings.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/resources/image_texture.h"
|
||||
|
||||
#include "modules/modules_enabled.gen.h" // For mono.
|
||||
#include "modules/modules_enabled.gen.h" // IWYU pragma: keep. For mono.
|
||||
#include "modules/svg/image_loader_svg.h"
|
||||
|
||||
Error EditorExportPlatformWeb::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) {
|
||||
|
|
@ -175,8 +178,8 @@ void EditorExportPlatformWeb::_fix_html(Vector<uint8_t> &p_html, const Ref<Edito
|
|||
|
||||
Vector<String> godot_splash_classes;
|
||||
godot_splash_classes.push_back("show-image--" + String(get_project_setting(p_preset, "application/boot_splash/show_image")));
|
||||
RenderingServer::SplashStretchMode boot_splash_stretch_mode = get_project_setting(p_preset, "application/boot_splash/stretch_mode");
|
||||
godot_splash_classes.push_back("fullsize--" + String(((boot_splash_stretch_mode != RenderingServer::SplashStretchMode::SPLASH_STRETCH_MODE_DISABLED) ? "true" : "false")));
|
||||
RSE::SplashStretchMode boot_splash_stretch_mode = get_project_setting(p_preset, "application/boot_splash/stretch_mode");
|
||||
godot_splash_classes.push_back("fullsize--" + String(((boot_splash_stretch_mode != RSE::SplashStretchMode::SPLASH_STRETCH_MODE_DISABLED) ? "true" : "false")));
|
||||
godot_splash_classes.push_back("use-filter--" + String(get_project_setting(p_preset, "application/boot_splash/use_filter")));
|
||||
replaces["$GODOT_SPLASH_CLASSES"] = String(" ").join(godot_splash_classes);
|
||||
replaces["$GODOT_SPLASH"] = p_name + ".png";
|
||||
|
|
@ -467,6 +470,9 @@ bool EditorExportPlatformWeb::has_valid_project_configuration(const Ref<EditorEx
|
|||
|
||||
if (p_preset->get("vram_texture_compression/for_mobile")) {
|
||||
if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {
|
||||
if (EditorNode::is_cmdline_mode()) {
|
||||
err += TTR("ETC2/ASTC texture compression is required for Web export. In the Project Settings, search for 'ETC2' in the search field, or enable 'Advanced Settings', and go to Rendering > Textures > VRAM Compression to enable 'Import ETC2 ASTC'.") + "\n";
|
||||
}
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -484,8 +490,8 @@ List<String> EditorExportPlatformWeb::get_binary_extensions(const Ref<EditorExpo
|
|||
return list;
|
||||
}
|
||||
|
||||
Error EditorExportPlatformWeb::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags) {
|
||||
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
|
||||
Error EditorExportPlatformWeb::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags, bool p_notify) {
|
||||
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags, p_notify);
|
||||
|
||||
const String custom_debug = p_preset->get("custom_template/debug");
|
||||
const String custom_release = p_preset->get("custom_template/release");
|
||||
|
|
@ -614,26 +620,21 @@ Error EditorExportPlatformWeb::export_project(const Ref<EditorExportPreset> &p_p
|
|||
}
|
||||
|
||||
bool EditorExportPlatformWeb::poll_export() {
|
||||
Ref<EditorExportPreset> preset;
|
||||
|
||||
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
|
||||
Ref<EditorExportPreset> ep = EditorExport::get_singleton()->get_export_preset(i);
|
||||
if (ep->is_runnable() && ep->get_platform() == this) {
|
||||
preset = ep;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_runnable_preset_for_platform(this);
|
||||
|
||||
RemoteDebugState prev_remote_debug_state = remote_debug_state;
|
||||
remote_debug_state = REMOTE_DEBUG_STATE_UNAVAILABLE;
|
||||
|
||||
if (preset.is_valid()) {
|
||||
const bool debug = true;
|
||||
// Throwaway variables to pass to `can_export`.
|
||||
// Throwaway variables to pass to validation functions.
|
||||
String err;
|
||||
bool missing_templates;
|
||||
|
||||
if (can_export(preset, err, missing_templates, debug)) {
|
||||
bool valid = has_valid_export_configuration(preset, err, missing_templates, debug) &&
|
||||
has_valid_project_configuration(preset, err);
|
||||
|
||||
if (valid) {
|
||||
if (server->is_listening()) {
|
||||
remote_debug_state = REMOTE_DEBUG_STATE_SERVING;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue