summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/resource_saver.cpp2
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/CharacterBody3D.xml4
-rw-r--r--doc/classes/CollisionObject2D.xml7
-rw-r--r--doc/classes/CollisionObject3D.xml7
-rw-r--r--doc/classes/EditorSettings.xml448
-rw-r--r--doc/classes/ImporterMesh.xml2
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--editor/doc_tools.cpp21
-rw-r--r--editor/export/editor_export_platform.cpp4
-rw-r--r--editor/export/editor_export_platform.h6
-rw-r--r--editor/export/editor_export_platform_pc.cpp25
-rw-r--r--editor/export/editor_export_platform_pc.h4
-rw-r--r--editor/plugins/font_config_plugin.cpp2
-rw-r--r--editor/project_converter_3_to_4.cpp4
-rw-r--r--platform/android/export/export_plugin.cpp6
-rw-r--r--platform/android/export/export_plugin.h4
-rw-r--r--platform/ios/export/export_plugin.cpp6
-rw-r--r--platform/ios/export/export_plugin.h8
-rw-r--r--platform/javascript/export/export_plugin.cpp2
-rw-r--r--platform/javascript/export/export_plugin.h4
-rw-r--r--platform/linuxbsd/export/export.cpp2
-rw-r--r--platform/linuxbsd/export/export_plugin.cpp22
-rw-r--r--platform/linuxbsd/export/export_plugin.h2
-rw-r--r--platform/macos/export/export_plugin.cpp17
-rw-r--r--platform/macos/export/export_plugin.h4
-rw-r--r--platform/uwp/export/export_plugin.cpp67
-rw-r--r--platform/uwp/export/export_plugin.h14
-rw-r--r--platform/windows/export/export_plugin.cpp9
-rw-r--r--tests/core/os/test_os.h158
-rw-r--r--tests/test_main.cpp1
31 files changed, 727 insertions, 139 deletions
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 41e2f0e116..274316f058 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -80,7 +80,7 @@ Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path,
if (path.is_empty()) {
path = p_resource->get_path();
}
- ERR_FAIL_COND_V_MSG(p_path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
+ ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
String extension = path.get_extension();
Error err = ERR_FILE_UNRECOGNIZED;
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 0f2dd6587a..f5c799d4de 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -67,7 +67,7 @@
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear_blend_shapes">
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 6c5cd62fe1..795bd7a429 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -159,10 +159,10 @@
Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
</member>
<member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
- Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity.
</member>
<member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
- Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 5d025985cc..95d99855f6 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -16,7 +16,8 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -218,17 +219,19 @@
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
- Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
+ Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_shape_entered">
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 2aac5528f4..7284a7e341 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -18,6 +18,7 @@
<argument index="4" name="shape_idx" type="int" />
<description>
Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
+ [b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
<method name="create_shape_owner">
@@ -199,12 +200,14 @@
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse pointer enters any of this object's shapes.
+ Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes.
+ Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 77abbf8625..687c3d70ca 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -194,6 +194,454 @@
</description>
</method>
</methods>
+ <members>
+ <member name="debugger/profiler_frame_history_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/always_show_folders" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/textfile_extensions" type="String" setter="" getter="">
+ </member>
+ <member name="docks/filesystem/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
+ </member>
+ <member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="docks/scene_tree/start_create_dialog_fully_expanded" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color1" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_color2" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_ik_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_outline_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/bone_width" type="int" setter="" getter="">
+ </member>
+ <member name="editors/2d/constrain_editor_view" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/2d/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/guides_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/smart_snapping_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/2d/viewport_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_fov" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_far" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/default_z_near" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_activation_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_base_speed" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/freelook/freelook_speed_zoom_link" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_bias" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_max" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_division_level_min" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_size" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/emulate_numpad" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_x_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/invert_y_axis" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/orbit_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/pan_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_modifier" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation/zoom_style" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_sensitivity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/translation_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/navigation_feel/zoom_inertia" type="float" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/primary_grid_steps" type="int" setter="" getter="">
+ </member>
+ <member name="editors/3d/secondary_grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/confirm_insert_track" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/animation/onion_layers_past_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/grid_map/pick_distance" type="float" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_pan_speed" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/2d_editor_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/animation_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/simple_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/panning/sub_editors_panning_scheme" type="int" setter="" getter="">
+ </member>
+ <member name="editors/panning/warped_mouse_panning" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/point_grab_radius" type="int" setter="" getter="">
+ </member>
+ <member name="editors/polygon_editor/show_previous_outline" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/display_grid" type="bool" setter="" getter="">
+ </member>
+ <member name="editors/tiles_editor/grid_color" type="Color" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/lines_curvature" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="editors/visual_editors/visualshader/port_preview_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/directories/default_project_path" type="String" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/display_mode" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/show_hidden_files" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/file_dialog/thumbnail_size" type="int" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/compress_binary_resources" type="bool" setter="" getter="">
+ </member>
+ <member name="filesystem/on_save/safe_save_on_backup_then_rename" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_contextual_ligatures" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_opentype_features" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_custom_variations" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/code_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/custom_display_scale" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/debug/enable_pseudolocalization" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/display_scale" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/editor_language" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_antialiased" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_hinting" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_bold" type="String" setter="" getter="">
+ </member>
+ <member name="interface/editor/main_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/mouse_extra_buttons_navigate_history" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/show_internal_errors_in_toast_notifications" type="int" setter="" getter="">
+ </member>
+ <member name="interface/editor/single_window_mode" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter="">
+ </member>
+ <member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
+ </member>
+ <member name="interface/inspector/show_low_level_opentype_features" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/display_close_button" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/maximum_width" type="int" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_script_button" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/scene_tabs/show_thumbnail_on_hover" type="bool" setter="" getter="">
+ </member>
+ <member name="interface/theme/accent_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/additional_spacing" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/base_color" type="Color" setter="" getter="">
+ </member>
+ <member name="interface/theme/border_size" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/contrast" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/corner_radius" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/custom_theme" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_and_font_color" type="int" setter="" getter="">
+ </member>
+ <member name="interface/theme/icon_saturation" type="float" setter="" getter="">
+ </member>
+ <member name="interface/theme/preset" type="String" setter="" getter="">
+ </member>
+ <member name="interface/theme/relationship_line_opacity" type="float" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_host" type="String" setter="" getter="">
+ </member>
+ <member name="network/debug/remote_port" type="int" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/host" type="String" setter="" getter="">
+ </member>
+ <member name="network/http_proxy/port" type="int" setter="" getter="">
+ </member>
+ <member name="network/ssl/editor_ssl_certificates" type="String" setter="" getter="">
+ </member>
+ <member name="project_manager/sorting_order" type="int" setter="" getter="">
+ </member>
+ <member name="run/auto_save/save_before_running" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_clear_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_close_output_on_stop" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/always_open_output_on_play" type="bool" setter="" getter="">
+ </member>
+ <member name="run/output/font_size" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect" type="int" setter="" getter="">
+ </member>
+ <member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
+ </member>
+ <member name="run/window_placement/screen" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink_speed" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_all_occurrences" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/highlight_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_soft_column" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/guidelines/show_line_length_guidelines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/highlight_type_safe_lines" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/line_numbers_zero_padded" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_bookmark_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_info_gutter" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/gutters/show_line_numbers" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/code_folding" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/lines/word_wrap" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/minimap_width" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/minimap/show_minimap" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_spaces" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_tabs" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/appearance/whitespace/line_spacing" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/autosave_interval_secs" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/convert_indent_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/restore_scripts_on_load" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/indent/type" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/move_caret_on_right_click" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/smooth_scrolling" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/stay_in_script_editor_on_node_selected" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/behavior/navigation/v_scroll_speed" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/code_complete_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/complete_file_paths" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/idle_parse_delay" type="float" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/put_callhint_tooltip_below_current_line" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/help/class_reference_examples" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_source_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/help_title_font_size" type="int" setter="" getter="">
+ </member>
+ <member name="text_editor/help/show_help_index" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/show_members_overview" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/script_list/sort_members_outline_alphabetically" type="bool" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/color_theme" type="String" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/base_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/brace_mismatch_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/breakpoint_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/caret_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/code_folding_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/comment_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_background_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_existing_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_font_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_hovered_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/completion_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/control_flow_keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/current_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/engine_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/executing_line_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/function_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/mark_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/member_variable_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/safe_line_number_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_border_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/selection_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/string_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/symbol_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/text_selected_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
+ </member>
+ <member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
+ </member>
+ </members>
<signals>
<signal name="settings_changed">
<description>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 00601cec75..201c0ddd38 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -30,7 +30,7 @@
<description>
Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays].
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear">
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index f368190a29..24f1f9918b 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reusing geometry, which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 773fcc5017..a819458417 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -39,6 +39,7 @@
#include "core/object/script_language.h"
#include "core/string/translation.h"
#include "core/version.h"
+#include "editor/editor_settings.h"
#include "scene/resources/theme.h"
// Used for a hack preserving Mono properties on non-Mono builds.
@@ -363,8 +364,15 @@ void DocTools::generate(bool p_basic_types) {
List<PropertyInfo> properties;
List<PropertyInfo> own_properties;
- if (name == "ProjectSettings") {
- // Special case for project settings, so settings can be documented.
+
+ // Special case for editor and project settings, so they can be documented.
+ if (name == "EditorSettings") {
+ // We don't create the full blown EditorSettings (+ config file) with `create()`,
+ // instead we just make a local instance to get default values.
+ Ref<EditorSettings> edset = memnew(EditorSettings);
+ edset->get_property_list(&properties);
+ own_properties = properties;
+ } else if (name == "ProjectSettings") {
ProjectSettings::get_singleton()->get_property_list(&properties);
own_properties = properties;
} else {
@@ -402,6 +410,13 @@ void DocTools::generate(bool p_basic_types) {
bool default_value_valid = false;
Variant default_value;
+ if (name == "EditorSettings") {
+ if (E.name == "resource_local_to_scene" || E.name == "resource_name" || E.name == "resource_path" || E.name == "script") {
+ // Don't include spurious properties in the generated EditorSettings class reference.
+ continue;
+ }
+ }
+
if (name == "ProjectSettings") {
// Special case for project settings, so that settings are not taken from the current project's settings
if (E.name == "script" || !ProjectSettings::get_singleton()->is_builtin_setting(E.name)) {
@@ -424,8 +439,6 @@ void DocTools::generate(bool p_basic_types) {
}
}
- //used to track uninitialized values using valgrind
- //print_line("getting default value for " + String(name) + "." + String(E.name));
if (default_value_valid && default_value.get_type() != Variant::OBJECT) {
prop.default_value = default_value.get_construct_string().replace("\n", " ");
}
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp
index 8bc41ee8f8..57ae83aeee 100644
--- a/editor/export/editor_export_platform.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -70,7 +70,7 @@ bool EditorExportPlatform::fill_log_messages(RichTextLabel *p_log, Error p_err)
if (get_worst_message_type() >= EditorExportPlatform::EXPORT_MESSAGE_WARNING) {
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
p_log->add_text(" ");
- p_log->add_text(TTR("Completed with errors."));
+ p_log->add_text(TTR("Completed with warnings."));
has_messages = true;
} else {
p_log->add_image(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("StatusSuccess"), SNAME("EditorIcons")), 16 * EDSCALE, 16 * EDSCALE, Color(1.0, 1.0, 1.0), INLINE_ALIGNMENT_CENTER);
@@ -428,7 +428,7 @@ void EditorExportPlatform::_edit_filter_list(HashSet<String> &r_list, const Stri
_edit_files_with_filter(da, filters, r_list, exclude);
}
-EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) {
+EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const {
Ref<EditorExportPlatform> platform = p_preset->get_platform();
List<String> feature_list;
platform->get_platform_features(&feature_list);
diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h
index 2778a217b0..832a0cf846 100644
--- a/editor/export/editor_export_platform.h
+++ b/editor/export/editor_export_platform.h
@@ -110,14 +110,14 @@ protected:
~ExportNotifier();
};
- FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug);
+ FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const;
bool exists_export_template(String template_file_name, String *err) const;
String find_export_template(String template_file_name, String *err = nullptr) const;
void gen_export_flags(Vector<String> &r_flags, int p_flags);
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) = 0;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const = 0;
struct ExportOption {
PropertyInfo option;
@@ -211,7 +211,7 @@ public:
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) = 0;
virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
- virtual void get_platform_features(List<String> *r_features) = 0;
+ virtual void get_platform_features(List<String> *r_features) const = 0;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) = 0;
virtual String get_debug_protocol() const { return "tcp://"; }
diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp
index 9d3146d9e8..5e0044f2ae 100644
--- a/editor/export/editor_export_platform_pc.cpp
+++ b/editor/export/editor_export_platform_pc.cpp
@@ -32,7 +32,7 @@
#include "core/config/project_settings.h"
-void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -42,12 +42,9 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
if (p_preset->get("texture_format/etc2")) {
r_features->push_back("etc2");
}
-
- if (p_preset->get("binary_format/64_bits")) {
- r_features->push_back("64");
- } else {
- r_features->push_back("32");
- }
+ // PC platforms only have one architecture per export, since
+ // we export a single executable instead of a bundle.
+ r_features->push_back(p_preset->get("binary_format/architecture"));
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
@@ -57,7 +54,6 @@ void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/64_bits"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "binary_format/embed_pck"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/bptc"), false));
@@ -84,10 +80,9 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset,
bool valid = false;
// Look for export templates (first official, and if defined custom templates).
-
- bool use64 = p_preset->get("binary_format/64_bits");
- bool dvalid = exists_export_template(get_template_file_name("debug", use64 ? "x86_64" : "x86_32"), &err);
- bool rvalid = exists_export_template(get_template_file_name("release", use64 ? "x86_64" : "x86_32"), &err);
+ String arch = p_preset->get("binary_format/architecture");
+ bool dvalid = exists_export_template(get_template_file_name("debug", arch), &err);
+ bool rvalid = exists_export_template(get_template_file_name("release", arch), &err);
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -139,7 +134,7 @@ Error EditorExportPlatformPC::prepare_template(const Ref<EditorExportPreset> &p_
template_path = template_path.strip_edges();
if (template_path.is_empty()) {
- template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", p_preset->get("binary_format/64_bits") ? "x86_64" : "x86_32"));
+ template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", p_preset->get("binary_format/architecture")));
}
if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
@@ -171,7 +166,7 @@ Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset>
int64_t embedded_size;
Error err = save_pack(p_preset, p_debug, pck_path, &so_files, p_preset->get("binary_format/embed_pck"), &embedded_pos, &embedded_size);
if (err == OK && p_preset->get("binary_format/embed_pck")) {
- if (embedded_size >= 0x100000000 && !p_preset->get("binary_format/64_bits")) {
+ if (embedded_size >= 0x100000000 && String(p_preset->get("binary_format/architecture")).contains("32")) {
add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), TTR("On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."));
return ERR_INVALID_PARAMETER;
}
@@ -224,7 +219,7 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
logo = p_logo;
}
-void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
+void EditorExportPlatformPC::get_platform_features(List<String> *r_features) const {
r_features->push_back("pc"); //all pcs support "pc"
r_features->push_back("s3tc"); //all pcs support "s3tc" compression
r_features->push_back(get_os_name().to_lower()); //OS name is a feature
diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h
index ae7d6f1082..bdb86e924a 100644
--- a/editor/export/editor_export_platform_pc.h
+++ b/editor/export/editor_export_platform_pc.h
@@ -44,7 +44,7 @@ private:
int chmod_flags = -1;
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -68,7 +68,7 @@ public:
void set_logo(const Ref<Texture2D> &p_logo);
void add_platform_feature(const String &p_feature);
- virtual void get_platform_features(List<String> *r_features) override;
+ virtual void get_platform_features(List<String> *r_features) const override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
int get_chmod_flags() const;
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 383921f06a..cadb974345 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -926,7 +926,7 @@ void FontPreview::_notification(int p_what) {
if (sample.is_empty()) {
prev_ok = false;
} else {
- prev_font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + prev_font->get_height(50)), sample, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, 50, text_color);
+ prev_font->draw_string(get_canvas_item(), Point2(0, font->get_height(font_size) + prev_font->get_height(25 * EDSCALE)), sample, HORIZONTAL_ALIGNMENT_CENTER, get_size().x, 25 * EDSCALE, text_color);
}
}
}
diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp
index 97013da05e..658258d98b 100644
--- a/editor/project_converter_3_to_4.cpp
+++ b/editor/project_converter_3_to_4.cpp
@@ -1898,14 +1898,14 @@ Vector<String> ProjectConverter3To4::check_for_files() {
continue;
}
if (dir.current_is_dir()) {
- directories_to_check.append(current_dir + file_name + "/");
+ directories_to_check.append(current_dir.plus_file(file_name) + "/");
} else {
bool proper_extension = false;
if (file_name.ends_with(".gd") || file_name.ends_with(".shader") || file_name.ends_with(".tscn") || file_name.ends_with(".tres") || file_name.ends_with(".godot") || file_name.ends_with(".cs") || file_name.ends_with(".csproj"))
proper_extension = true;
if (proper_extension) {
- collected_files.append(current_dir + file_name);
+ collected_files.append(current_dir.plus_file(file_name));
}
}
file_name = dir.get_next();
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 2cfb152804..6f1b4bde40 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -1671,7 +1671,7 @@ Vector<String> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExp
return enabled_abis;
}
-void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
if (driver == "opengl3") {
r_features->push_back("etc");
@@ -1705,6 +1705,8 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
}
plugins_changed.clear();
+ // Android supports multiple architectures in an app bundle, so
+ // we expose each option as a checkbox in the export dialog.
const Vector<String> abis = get_abis();
for (int i = 0; i < abis.size(); ++i) {
const String abi = abis[i];
@@ -3109,7 +3111,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
CLEANUP_AND_RETURN(OK);
}
-void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) {
+void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) const {
r_features->push_back("mobile");
r_features->push_back("android");
}
diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h
index 8fd2f0680d..1da3f68f9a 100644
--- a/platform/android/export/export_plugin.h
+++ b/platform/android/export/export_plugin.h
@@ -156,7 +156,7 @@ public:
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -231,7 +231,7 @@ public:
Error export_project_helper(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int export_format, bool should_sign, int p_flags);
- virtual void get_platform_features(List<String> *r_features) override;
+ virtual void get_platform_features(List<String> *r_features) const override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index a2e80d33fd..85e8621aa0 100644
--- a/platform/ios/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_node.h"
-void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
// Vulkan and OpenGL ES 3.0 both mandate ETC2 support.
r_features->push_back("etc2");
@@ -43,7 +43,7 @@ void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset>
}
}
-Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() {
+Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() const {
Vector<ExportArchitecture> archs;
archs.push_back(ExportArchitecture("arm64", true));
return archs;
@@ -1155,7 +1155,7 @@ Error EditorExportPlatformIOS::_export_additional_assets(const String &p_out_dir
return OK;
}
-Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) {
+Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const {
Vector<ExportArchitecture> all_archs = _get_supported_architectures();
Vector<String> enabled_archs;
for (int i = 0; i < all_archs.size(); ++i) {
diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h
index ce470bba78..07e30c1d00 100644
--- a/platform/ios/export/export_plugin.h
+++ b/platform/ios/export/export_plugin.h
@@ -106,8 +106,8 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
Error _export_loading_screen_file(const Ref<EditorExportPreset> &p_preset, const String &p_dest_dir);
Error _export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir);
- Vector<ExportArchitecture> _get_supported_architectures();
- Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset);
+ Vector<ExportArchitecture> _get_supported_architectures() const;
+ Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const;
void _add_assets_to_project(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets);
Error _export_additional_assets(const String &p_out_dir, const Vector<String> &p_assets, bool p_is_framework, bool p_should_embed, Vector<IOSExportAsset> &r_exported_assets);
@@ -173,7 +173,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
}
protected:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
public:
@@ -199,7 +199,7 @@ public:
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("mobile");
r_features->push_back("ios");
}
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp
index e2ae45627e..a9912edef7 100644
--- a/platform/javascript/export/export_plugin.cpp
+++ b/platform/javascript/export/export_plugin.cpp
@@ -302,7 +302,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> &
return OK;
}
-void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc");
}
diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h
index e6ca5976df..fbaa3615cb 100644
--- a/platform/javascript/export/export_plugin.h
+++ b/platform/javascript/export/export_plugin.h
@@ -110,7 +110,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform {
static void _server_thread_poll(void *data);
public:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -130,7 +130,7 @@ public:
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_option, int p_debug_flags) override;
virtual Ref<Texture2D> get_run_icon() const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("web");
r_features->push_back(get_os_name().to_lower());
}
diff --git a/platform/linuxbsd/export/export.cpp b/platform/linuxbsd/export/export.cpp
index bc1235bcec..990351d13f 100644
--- a/platform/linuxbsd/export/export.cpp
+++ b/platform/linuxbsd/export/export.cpp
@@ -38,8 +38,6 @@ void register_linuxbsd_exporter() {
platform.instantiate();
platform->set_logo(ImageTexture::create_from_image(memnew(Image(_linuxbsd_logo))));
platform->set_name("Linux/X11");
- platform->set_extension("x86_32");
- platform->set_extension("x86_64", "binary_format/64_bits");
platform->set_os_name("Linux");
platform->set_chmod_flags(0755);
diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp
index d54e07d8a5..4d45d3ba12 100644
--- a/platform/linuxbsd/export/export_plugin.cpp
+++ b/platform/linuxbsd/export/export_plugin.cpp
@@ -79,31 +79,21 @@ Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset>
return err;
}
-void EditorExportPlatformLinuxBSD::set_extension(const String &p_extension, const String &p_feature_key) {
- extensions[p_feature_key] = p_extension;
-}
-
String EditorExportPlatformLinuxBSD::get_template_file_name(const String &p_target, const String &p_arch) const {
return "linux_" + p_target + "." + p_arch;
}
List<String> EditorExportPlatformLinuxBSD::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
- for (const KeyValue<String, String> &E : extensions) {
- if (p_preset->get(E.key)) {
- list.push_back(extensions[E.key]);
- return list;
- }
- }
-
- if (extensions.has("default")) {
- list.push_back(extensions["default"]);
- return list;
- }
-
+ list.push_back(p_preset->get("binary_format/architecture"));
return list;
}
+void EditorExportPlatformLinuxBSD::get_export_options(List<ExportOption> *r_options) {
+ EditorExportPlatformPC::get_export_options(r_options);
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32,arm64,arm32,rv64,ppc64,ppc32"), "x86_64"));
+}
+
Error EditorExportPlatformLinuxBSD::fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
// Patch the header of the "pck" section in the ELF file so that it corresponds to the embedded data
diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h
index 98e4616035..4d6737498b 100644
--- a/platform/linuxbsd/export/export_plugin.h
+++ b/platform/linuxbsd/export/export_plugin.h
@@ -38,12 +38,12 @@
#include "scene/resources/texture.h"
class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC {
- HashMap<String, String> extensions;
Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);
public:
void set_extension(const String &p_extension, const String &p_feature_key = "default");
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override;
+ virtual void get_export_options(List<ExportOption> *r_options) override;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;
virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) override;
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index ca979d071d..2ec2bb92d3 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -37,7 +37,7 @@
#include "modules/modules_enabled.gen.h" // For regex.
-void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -47,8 +47,7 @@ void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset
if (p_preset->get("texture_format/etc2")) {
r_features->push_back("etc2");
}
-
- r_features->push_back("64");
+ r_features->push_back(p_preset->get("binary_format/architecture"));
}
bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const {
@@ -69,6 +68,7 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_opt
}
void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options) {
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "universal,x86_64,arm64", PROPERTY_USAGE_STORAGE), "universal"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
@@ -766,7 +766,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
int ret = unzGoToFirstFile(src_pkg_zip);
- String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + ".universal";
+ String architecture = p_preset->get("binary_format/architecture");
+ String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
String pkg_name;
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
@@ -1064,19 +1065,19 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
}
if (data.size() > 0) {
- if (file.find("/data.mono.macos.release_debug.universal/") != -1) {
+ if (file.find("/data.mono.macos.release_debug." + architecture + "/") != -1) {
if (!p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.macos.release_debug.universal/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.release_debug." + architecture + "/", "/GodotSharp/");
}
- if (file.find("/data.mono.macos.release.universal/") != -1) {
+ if (file.find("/data.mono.macos.release." + architecture + "/") != -1) {
if (p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.macos.release.universal/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.release." + architecture + "/", "/GodotSharp/");
}
if (file.ends_with(".dylib")) {
diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h
index 4f4b17594c..21bc380d55 100644
--- a/platform/macos/export/export_plugin.h
+++ b/platform/macos/export/export_plugin.h
@@ -99,7 +99,7 @@ class EditorExportPlatformMacOS : public EditorExportPlatform {
}
protected:
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override;
@@ -121,7 +121,7 @@ public:
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
- virtual void get_platform_features(List<String> *r_features) override {
+ virtual void get_platform_features(List<String> *r_features) const override {
r_features->push_back("pc");
r_features->push_back("s3tc");
r_features->push_back("macos");
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index 19b43d50be..a99776497b 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -49,27 +49,17 @@ Ref<Texture2D> EditorExportPlatformUWP::get_logo() const {
return logo;
}
-void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
r_features->push_back("s3tc");
r_features->push_back("etc");
- switch ((int)p_preset->get("architecture/target")) {
- case EditorExportPlatformUWP::ARM: {
- r_features->push_back("arm");
- } break;
- case EditorExportPlatformUWP::X86: {
- r_features->push_back("32");
- } break;
- case EditorExportPlatformUWP::X64: {
- r_features->push_back("64");
- } break;
- }
+ r_features->push_back(p_preset->get("binary_format/architecture"));
}
void EditorExportPlatformUWP::get_export_options(List<ExportOption> *r_options) {
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "architecture/target", PROPERTY_HINT_ENUM, "arm,x86,x64"), 1));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32,arm32"), "x86_64"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "command_line/extra_args"), ""));
@@ -143,23 +133,18 @@ bool EditorExportPlatformUWP::can_export(const Ref<EditorExportPreset> &p_preset
bool valid = false;
// Look for export templates (first official, and if defined custom templates).
-
- Platform arch = (Platform)(int)(p_preset->get("architecture/target"));
- String platform_infix;
- switch (arch) {
- case EditorExportPlatformUWP::ARM: {
- platform_infix = "arm";
- } break;
- case EditorExportPlatformUWP::X86: {
- platform_infix = "x86";
- } break;
- case EditorExportPlatformUWP::X64: {
- platform_infix = "x64";
- } break;
+ String arch = p_preset->get("binary_format/architecture");
+ String arch_infix;
+ if (arch == "arm32") {
+ arch_infix = "arm";
+ } else if (arch == "x86_32") {
+ arch_infix = "x86";
+ } else if (arch == "x86_64") {
+ arch_infix = "x64";
}
- bool dvalid = exists_export_template("uwp_" + platform_infix + "_debug.zip", &err);
- bool rvalid = exists_export_template("uwp_" + platform_infix + "_release.zip", &err);
+ bool dvalid = exists_export_template("uwp_" + arch_infix + "_debug.zip", &err);
+ bool rvalid = exists_export_template("uwp_" + arch_infix + "_release.zip", &err);
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -263,25 +248,21 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
src_appx = src_appx.strip_edges();
- Platform arch = (Platform)(int)p_preset->get("architecture/target");
+ String arch = p_preset->get("binary_format/architecture");
if (src_appx.is_empty()) {
- String err, infix;
- switch (arch) {
- case ARM: {
- infix = "_arm_";
- } break;
- case X86: {
- infix = "_x86_";
- } break;
- case X64: {
- infix = "_x64_";
- } break;
+ String err, arch_infix;
+ if (arch == "arm32") {
+ arch_infix = "arm";
+ } else if (arch == "x86_32") {
+ arch_infix = "x86";
+ } else if (arch == "x86_64") {
+ arch_infix = "x64";
}
if (p_debug) {
- src_appx = find_export_template("uwp" + infix + "debug.zip", &err);
+ src_appx = find_export_template("uwp_" + arch_infix + "_debug.zip", &err);
} else {
- src_appx = find_export_template("uwp" + infix + "release.zip", &err);
+ src_appx = find_export_template("uwp_" + arch_infix + "_release.zip", &err);
}
if (src_appx.is_empty()) {
EditorNode::add_io_error(err);
@@ -494,7 +475,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
return OK;
}
-void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) {
+void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) const {
r_features->push_back("pc");
r_features->push_back("uwp");
}
diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h
index c1a1f8a935..4a3c5db377 100644
--- a/platform/uwp/export/export_plugin.h
+++ b/platform/uwp/export/export_plugin.h
@@ -90,12 +90,6 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
Ref<ImageTexture> logo;
- enum Platform {
- ARM,
- X86,
- X64
- };
-
bool _valid_resource_name(const String &p_name) const {
if (p_name.is_empty()) {
return false;
@@ -215,8 +209,8 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
String version = itos(p_preset->get("version/major")) + "." + itos(p_preset->get("version/minor")) + "." + itos(p_preset->get("version/build")) + "." + itos(p_preset->get("version/revision"));
result = result.replace("$version_string$", version);
- Platform arch = (Platform)(int)p_preset->get("architecture/target");
- String architecture = arch == ARM ? "arm" : (arch == X86 ? "x86" : "x64");
+ String arch = p_preset->get("binary_format/architecture");
+ String architecture = arch == "arm32" ? "arm" : (arch == "x86_32" ? "x86" : "x64");
result = result.replace("$architecture$", architecture);
result = result.replace("$display_name$", String(p_preset->get("package/display_name")).is_empty() ? (String)ProjectSettings::get_singleton()->get("application/config/name") : String(p_preset->get("package/display_name")));
@@ -431,7 +425,7 @@ public:
virtual Ref<Texture2D> get_logo() const override;
- virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
+ virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
virtual void get_export_options(List<ExportOption> *r_options) override;
@@ -439,7 +433,7 @@ public:
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
- virtual void get_platform_features(List<String> *r_features) override;
+ virtual void get_platform_features(List<String> *r_features) const override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index 45bfc761fe..febef5ad12 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -123,6 +123,7 @@ bool EditorExportPlatformWindows::get_export_option_visibility(const String &p_o
void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_options) {
EditorExportPlatformPC::get_export_options(r_options);
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "x86_64,x86_32"), "x86_64"));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/enable"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/identity_type", PROPERTY_HINT_ENUM, "Select automatically,Use PKCS12 file (specify *.PFX/*.P12 file),Use certificate store (specify SHA1 hash)"), 0));
@@ -230,13 +231,13 @@ Error EditorExportPlatformWindows::_rcedit_add_data(const Ref<EditorExportPreset
String str;
Error err = OS::get_singleton()->execute(rcedit_path, args, &str, nullptr, true);
if (err != OK || (str.find("not found") != -1) || (str.find("not recognized") != -1)) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), TTR("Could not start rcedit executable, configure rcedit path in the Editor Settings (Export > Windows > Rcedit)."));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), TTR("Could not start rcedit executable. Configure rcedit path in the Editor Settings (Export > Windows > Rcedit), or disable \"Application > Modify Resources\" in the export preset."));
return err;
}
print_line("rcedit (" + p_path + "): " + str);
if (str.find("Fatal error") != -1) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("rcedit failed to modify executable:\n%s"), str));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Resources Modification"), vformat(TTR("rcedit failed to modify executable: %s."), str));
return FAILED;
}
@@ -378,7 +379,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
String str;
Error err = OS::get_singleton()->execute(signtool_path, args, &str, nullptr, true);
if (err != OK || (str.find("not found") != -1) || (str.find("not recognized") != -1)) {
- add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), TTR("Could not start signtool executable, configure signtool path in the Editor Settings (Export > Windows > Signtool)."));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), TTR("Could not start signtool executable. Configure signtool path in the Editor Settings (Export > Windows > Signtool), or disable \"Codesign\" in the export preset."));
return err;
}
@@ -388,7 +389,7 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p
#else
if (str.find("Failed") != -1) {
#endif
- add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Signtool failed to sign executable:\n%s"), str));
+ add_message(EXPORT_MESSAGE_WARNING, TTR("Code Signing"), vformat(TTR("Signtool failed to sign executable: %s."), str));
return FAILED;
}
diff --git a/tests/core/os/test_os.h b/tests/core/os/test_os.h
new file mode 100644
index 0000000000..c46da5e156
--- /dev/null
+++ b/tests/core/os/test_os.h
@@ -0,0 +1,158 @@
+/*************************************************************************/
+/* test_os.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef TEST_OS_H
+#define TEST_OS_H
+
+#include "core/os/os.h"
+
+#include "thirdparty/doctest/doctest.h"
+
+namespace TestOS {
+
+TEST_CASE("[OS] Environment variables") {
+#ifdef WINDOWS_ENABLED
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_environment("USERPROFILE"),
+ "The USERPROFILE environment variable should be present.");
+#else
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_environment("HOME"),
+ "The HOME environment variable should be present.");
+#endif
+
+ OS::get_singleton()->set_environment("HELLO", "world");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_environment("HELLO") == "world",
+ "The previously-set HELLO environment variable should return the expected value.");
+}
+
+TEST_CASE("[OS] Command line arguments") {
+ List<String> arguments = OS::get_singleton()->get_cmdline_args();
+ bool found = false;
+ for (int i = 0; i < arguments.size(); i++) {
+ if (arguments[i] == "--test") {
+ found = true;
+ break;
+ }
+ }
+ CHECK_MESSAGE(
+ found,
+ "The `--test` option must be present in the list of command line arguments.");
+}
+
+TEST_CASE("[OS] Executable and data paths") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_executable_path().is_absolute_path(),
+ "The executable path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_data_path().is_absolute_path(),
+ "The user data path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_config_path().is_absolute_path(),
+ "The user configuration path returned should be an absolute path.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_cache_path().is_absolute_path(),
+ "The cache path returned should be an absolute path.");
+}
+
+TEST_CASE("[OS] Ticks") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_ticks_usec() > 1000,
+ "The returned ticks (in microseconds) must be greater than 1,000.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_ticks_msec() > 1,
+ "The returned ticks (in milliseconds) must be greater than 1.");
+}
+
+TEST_CASE("[OS] Feature tags") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_feature("editor"),
+ "The binary has the \"editor\" feature tag.");
+ CHECK_MESSAGE(
+ !OS::get_singleton()->has_feature("standalone"),
+ "The binary does not have the \"standalone\" feature tag.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->has_feature("debug"),
+ "The binary has the \"debug\" feature tag.");
+ CHECK_MESSAGE(
+ !OS::get_singleton()->has_feature("release"),
+ "The binary does not have the \"release\" feature tag.");
+}
+
+TEST_CASE("[OS] Process ID") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_process_id() >= 1,
+ "The returned process ID should be greater than zero.");
+}
+
+TEST_CASE("[OS] Processor count and memory information") {
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_processor_count() >= 1,
+ "The returned processor count should be greater than zero.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_static_memory_usage() >= 1,
+ "The returned static memory usage should be greater than zero.");
+ CHECK_MESSAGE(
+ OS::get_singleton()->get_static_memory_peak_usage() >= 1,
+ "The returned static memory peak usage should be greater than zero.");
+}
+
+TEST_CASE("[OS] Execute") {
+#ifdef WINDOWS_ENABLED
+ List<String> arguments;
+ arguments.push_back("/C");
+ arguments.push_back("dir > NUL");
+ int exit_code;
+ const Error err = OS::get_singleton()->execute("cmd", arguments, nullptr, &exit_code);
+ CHECK_MESSAGE(
+ err == OK,
+ "(Running the command `cmd /C \"dir > NUL\"` returns the expected Godot error code (OK).");
+ CHECK_MESSAGE(
+ exit_code == 0,
+ "Running the command `cmd /C \"dir > NUL\"` returns a zero (successful) exit code.");
+#else
+ List<String> arguments;
+ arguments.push_back("-c");
+ arguments.push_back("ls > /dev/null");
+ int exit_code;
+ const Error err = OS::get_singleton()->execute("sh", arguments, nullptr, &exit_code);
+ CHECK_MESSAGE(
+ err == OK,
+ "(Running the command `sh -c \"ls > /dev/null\"` returns the expected Godot error code (OK).");
+ CHECK_MESSAGE(
+ exit_code == 0,
+ "Running the command `sh -c \"ls > /dev/null\"` returns a zero (successful) exit code.");
+#endif
+}
+
+} // namespace TestOS
+
+#endif // TEST_OS_H
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 13cbc7f8aa..40fe562be1 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -56,6 +56,7 @@
#include "tests/core/object/test_class_db.h"
#include "tests/core/object/test_method_bind.h"
#include "tests/core/object/test_object.h"
+#include "tests/core/os/test_os.h"
#include "tests/core/string/test_node_path.h"
#include "tests/core/string/test_string.h"
#include "tests/core/string/test_translation.h"