Table of Contents

Class EditorExportPlatform

Identifies a supported export platform, and internally provides the functionality of exporting to that platform.

Inheritance
EditorExportPlatform
Derived

Remarks

Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting.

Used in scripting by EditorExportPlugin to configure platform-specific customization of scenes and resources. See EditorExportPlugin._begin_customize_scenes and EditorExportPlugin._begin_customize_resources for more details.

See Also

Methods

add_message(int, String, String)

Adds a message to the export log that will be displayed when exporting ends.

void add_message(int type, String category, String message)

Parameters

type int
category String
message String

clear_messages

Clears the export log.

void clear_messages

create_preset

Create a new preset for this platform.

EditorExportPreset create_preset

export_pack(EditorExportPreset, bool, String, int)

Creates a PCK archive at path for the specified preset.

int export_pack(EditorExportPreset preset, bool debug, String path, int flags)

Parameters

preset EditorExportPreset
debug bool
path String
flags int

export_pack_patch(EditorExportPreset, bool, String, PackedStringArray, int)

Creates a patch PCK archive at path for the specified preset, containing only the files that have changed since the last patch.

Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.

int export_pack_patch(EditorExportPreset preset, bool debug, String path, PackedStringArray patches, int flags)

Parameters

preset EditorExportPreset
debug bool
path String
patches PackedStringArray
flags int

export_project(EditorExportPreset, bool, String, int)

Creates a full project at path for the specified preset.

int export_project(EditorExportPreset preset, bool debug, String path, int flags)

Parameters

preset EditorExportPreset
debug bool
path String
flags int

export_project_files(EditorExportPreset, bool, Callable, Callable)

Exports project files for the specified preset. This method can be used to implement custom export format, other than PCK and ZIP. One of the callbacks is called for each exported file.

save_cb is called for all exported files and have the following arguments: file_path: String, file_data: PackedByteArray, file_index: int, file_count: int, encryption_include_filters: PackedStringArray, encryption_exclude_filters: PackedStringArray, encryption_key: PackedByteArray.

shared_cb is called for exported native shared/static libraries and have the following arguments: file_path: String, tags: PackedStringArray, target_folder: String.

Note: file_index and file_count are intended for progress tracking only and aren't necessarily unique and precise.

int export_project_files(EditorExportPreset preset, bool debug, Callable save_cb, Callable shared_cb)

Parameters

preset EditorExportPreset
debug bool
save_cb Callable
shared_cb Callable

export_zip(EditorExportPreset, bool, String, int)

Create a ZIP archive at path for the specified preset.

int export_zip(EditorExportPreset preset, bool debug, String path, int flags)

Parameters

preset EditorExportPreset
debug bool
path String
flags int

export_zip_patch(EditorExportPreset, bool, String, PackedStringArray, int)

Create a patch ZIP archive at path for the specified preset, containing only the files that have changed since the last patch.

Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.

int export_zip_patch(EditorExportPreset preset, bool debug, String path, PackedStringArray patches, int flags)

Parameters

preset EditorExportPreset
debug bool
path String
patches PackedStringArray
flags int

find_export_template(String)

Qualifiers: const

Locates export template for the platform, and returns Dictionary with the following keys: path: String and error: String. This method is provided for convenience and custom export platforms aren't required to use it or keep export templates stored in the same way official templates are.

Dictionary find_export_template(String template_file_name)

Parameters

template_file_name String

gen_export_flags(int)

Generates array of command line arguments for the default export templates for the debug flags and editor settings.

PackedStringArray gen_export_flags(int flags)

Parameters

flags int

get_current_presets

Qualifiers: const

Returns array of EditorExportPresets for this platform.

Array get_current_presets

get_forced_export_files

Qualifiers: static

Returns array of core file names that always should be exported regardless of preset config.

PackedStringArray get_forced_export_files

get_internal_export_files(EditorExportPreset, bool)

Returns additional files that should always be exported regardless of preset configuration, and are not part of the project source. The returned Dictionary contains filename keys (String) and their corresponding raw data (PackedByteArray).

Dictionary get_internal_export_files(EditorExportPreset preset, bool debug)

Parameters

preset EditorExportPreset
debug bool

get_message_category(int)

Qualifiers: const

Returns message category, for the message with index.

String get_message_category(int index)

Parameters

index int

get_message_count

Qualifiers: const

Returns number of messages in the export log.

int get_message_count

get_message_text(int)

Qualifiers: const

Returns message text, for the message with index.

String get_message_text(int index)

Parameters

index int

get_message_type(int)

Qualifiers: const

Returns message type, for the message with index.

int get_message_type(int index)

Parameters

index int

get_os_name

Qualifiers: const

Returns the name of the export operating system handled by this EditorExportPlatform class, as a friendly string. Possible return values are Windows, Linux, macOS, Android, iOS, and Web.

String get_os_name

get_worst_message_type

Qualifiers: const

Returns most severe message type currently present in the export log.

int get_worst_message_type

save_pack(EditorExportPreset, bool, String, bool)

Saves PCK archive and returns Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

If embed is true, PCK content is appended to the end of path file and return Dictionary additionally include following keys: embedded_start: int (embedded PCK offset) and embedded_size: int (embedded PCK size).

Dictionary save_pack(EditorExportPreset preset, bool debug, String path, bool embed)

Parameters

preset EditorExportPreset
debug bool
path String
embed bool

save_pack_patch(EditorExportPreset, bool, String)

Saves patch PCK archive and returns Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

Dictionary save_pack_patch(EditorExportPreset preset, bool debug, String path)

Parameters

preset EditorExportPreset
debug bool
path String

save_zip(EditorExportPreset, bool, String)

Saves ZIP archive and returns Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

Dictionary save_zip(EditorExportPreset preset, bool debug, String path)

Parameters

preset EditorExportPreset
debug bool
path String

save_zip_patch(EditorExportPreset, bool, String)

Saves patch ZIP archive and returns Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

Dictionary save_zip_patch(EditorExportPreset preset, bool debug, String path)

Parameters

preset EditorExportPreset
debug bool
path String

ssh_push_to_remote(String, String, PackedStringArray, String, String)

Qualifiers: const

Uploads specified file over SCP protocol to the remote host.

int ssh_push_to_remote(String host, String port, PackedStringArray scp_args, String src_file, String dst_file)

Parameters

host String
port String
scp_args PackedStringArray
src_file String
dst_file String

ssh_run_on_remote(String, String, PackedStringArray, String, Array, int)

Qualifiers: const

Executes specified command on the remote host via SSH protocol and returns command output in the output.

int ssh_run_on_remote(String host, String port, PackedStringArray ssh_arg, String cmd_args, Array output, int port_fwd)

Parameters

host String
port String
ssh_arg PackedStringArray
cmd_args String
output Array
port_fwd int

ssh_run_on_remote_no_wait(String, String, PackedStringArray, String, int)

Qualifiers: const

Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish.

int ssh_run_on_remote_no_wait(String host, String port, PackedStringArray ssh_args, String cmd_args, int port_fwd)

Parameters

host String
port String
ssh_args PackedStringArray
cmd_args String
port_fwd int