EditorExportPlatform

package
v0.0.0-...-59761c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package EditorExportPlatform provides methods for working with EditorExportPlatform object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetForcedExportFiles

func GetForcedExportFiles() []string

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

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorExportPlatform() Instance
}

type DebugFlags

type DebugFlags = gdclass.EditorExportPlatformDebugFlags //gd:EditorExportPlatform.DebugFlags
const (
	/*Flag is set if remotely debugged project is expected to use remote file system. If set, [method gen_export_flags] will add [code]--remote-fs[/code] and [code]--remote-fs-password[/code] (if password is set in the editor settings) command line arguments to the list.*/
	DebugFlagDumbClient DebugFlags = 1
	/*Flag is set if remote debug is enabled. If set, [method gen_export_flags] will add [code]--remote-debug[/code] and [code]--breakpoints[/code] (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list.*/
	DebugFlagRemoteDebug DebugFlags = 2
	/*Flag is set if remotely debugged project is running on the localhost. If set, [method gen_export_flags] will use [code]localhost[/code] instead of [member EditorSettings.network/debug/remote_host] as remote debugger host.*/
	DebugFlagRemoteDebugLocalhost DebugFlags = 4
	/*Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, [method gen_export_flags] will add [code]--debug-collisions[/code] command line arguments to the list.*/
	DebugFlagViewCollisions DebugFlags = 8
	/*Flag is set if Visible Navigation" remote debug option is enabled. If set, [method gen_export_flags] will add [code]--debug-navigation[/code] command line arguments to the list.*/
	DebugFlagViewNavigation DebugFlags = 16
)

type ExportMessageType

type ExportMessageType = gdclass.EditorExportPlatformExportMessageType //gd:EditorExportPlatform.ExportMessageType
const (
	/*Invalid message type used as the default value when no type is specified.*/
	ExportMessageNone ExportMessageType = 0
	/*Message type for informational messages that have no effect on the export.*/
	ExportMessageInfo ExportMessageType = 1
	/*Message type for warning messages that should be addressed but still allow to complete the export.*/
	ExportMessageWarning ExportMessageType = 2
	/*Message type for error messages that must be addressed and fail the export.*/
	ExportMessageError ExportMessageType = 3
)

type File

type File struct {
	Path         string   `gd:"path"`
	Tags         []string `gd:"tags"`
	TargetFolder string   `gd:"target_folder"`
}

type Instance

type Instance [1]gdclass.EditorExportPlatform

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 [method EditorExportPlugin._begin_customize_scenes] and [method EditorExportPlugin._begin_customize_resources] for more details.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddMessage

func (self Instance) AddMessage(atype gdclass.EditorExportPlatformExportMessageType, category string, message string)

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

func (Instance) AsEditorExportPlatform

func (self Instance) AsEditorExportPlatform() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) ClearMessages

func (self Instance) ClearMessages()

Clears the export log.

func (Instance) CreatePreset

func (self Instance) CreatePreset() [1]gdclass.EditorExportPreset

Create a new preset for this platform.

func (Instance) ExportPack

func (self Instance) ExportPack(preset [1]gdclass.EditorExportPreset, debug bool, path string) error

Creates a PCK archive at [param path] for the specified [param preset].

func (Instance) ExportPackPatch

func (self Instance) ExportPackPatch(preset [1]gdclass.EditorExportPreset, debug bool, path string) error

Creates a patch PCK archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. [b]Note:[/b] [param 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.

func (Instance) ExportProject

func (self Instance) ExportProject(preset [1]gdclass.EditorExportPreset, debug bool, path string) error

Creates a full project at [param path] for the specified [param preset].

func (Instance) ExportProjectFiles

func (self Instance) ExportProjectFiles(preset [1]gdclass.EditorExportPreset, debug bool, save_cb func(file_path string, file_data []byte, file_index int, file_count int, encryption_include_filters []string, encryption_exclude_filters []string, encryption_key []byte)) error

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. [param save_cb] is called for all exported files and have the following arguments: [code]file_path: String[/code], [code]file_data: PackedByteArray[/code], [code]file_index: int[/code], [code]file_count: int[/code], [code]encryption_include_filters: PackedStringArray[/code], [code]encryption_exclude_filters: PackedStringArray[/code], [code]encryption_key: PackedByteArray[/code]. [param shared_cb] is called for exported native shared/static libraries and have the following arguments: [code]file_path: String[/code], [code]tags: PackedStringArray[/code], [code]target_folder: String[/code]. [b]Note:[/b] [code]file_index[/code] and [code]file_count[/code] are intended for progress tracking only and aren't necessarily unique and precise.

func (Instance) ExportZip

func (self Instance) ExportZip(preset [1]gdclass.EditorExportPreset, debug bool, path string) error

Create a ZIP archive at [param path] for the specified [param preset].

func (Instance) ExportZipPatch

func (self Instance) ExportZipPatch(preset [1]gdclass.EditorExportPreset, debug bool, path string) error

Create a patch ZIP archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. [b]Note:[/b] [param 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.

func (Instance) FindExportTemplate

func (self Instance) FindExportTemplate(template_file_name string) Template

Locates export template for the platform, and returns [Dictionary] with the following keys: [code]path: String[/code] and [code]error: String[/code]. 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.

func (Instance) GenExportFlags

func (self Instance) GenExportFlags(flags gdclass.EditorExportPlatformDebugFlags) []string

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

func (Instance) GetCurrentPresets

func (self Instance) GetCurrentPresets() []any

Returns array of [EditorExportPreset]s for this platform.

func (Instance) GetInternalExportFiles

func (self Instance) GetInternalExportFiles(preset [1]gdclass.EditorExportPreset, debug bool) map[string][]uint8

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]).

func (Instance) GetMessageCategory

func (self Instance) GetMessageCategory(index int) string

Returns message category, for the message with [param index].

func (Instance) GetMessageCount

func (self Instance) GetMessageCount() int

Returns number of messages in the export log.

func (Instance) GetMessageText

func (self Instance) GetMessageText(index int) string

Returns message text, for the message with [param index].

func (Instance) GetMessageType

func (self Instance) GetMessageType(index int) gdclass.EditorExportPlatformExportMessageType

Returns message type, for the message with [param index].

func (Instance) GetOsName

func (self Instance) GetOsName() string

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

func (Instance) GetWorstMessageType

func (self Instance) GetWorstMessageType() gdclass.EditorExportPlatformExportMessageType

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

func (Instance) SavePack

func (self Instance) SavePack(preset [1]gdclass.EditorExportPreset, debug bool, path string) Report

Saves PCK archive and returns [Dictionary] with the following keys: [code]result: Error[/code], [code]so_files: Array[/code] (array of the shared/static objects which contains dictionaries with the following keys: [code]path: String[/code], [code]tags: PackedStringArray[/code], and [code]target_folder: String[/code]). If [param embed] is [code]true[/code], PCK content is appended to the end of [param path] file and return [Dictionary] additionally include following keys: [code]embedded_start: int[/code] (embedded PCK offset) and [code]embedded_size: int[/code] (embedded PCK size).

func (Instance) SavePackPatch

func (self Instance) SavePackPatch(preset [1]gdclass.EditorExportPreset, debug bool, path string) Report

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

func (Instance) SaveZip

func (self Instance) SaveZip(preset [1]gdclass.EditorExportPreset, debug bool, path string) Report

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

func (Instance) SaveZipPatch

func (self Instance) SaveZipPatch(preset [1]gdclass.EditorExportPreset, debug bool, path string) Report

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

func (Instance) SshPushToRemote

func (self Instance) SshPushToRemote(host string, port string, scp_args []string, src_file string, dst_file string) error

Uploads specified file over SCP protocol to the remote host.

func (Instance) SshRunOnRemote

func (self Instance) SshRunOnRemote(host string, port string, ssh_arg []string, cmd_args string) error

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

func (Instance) SshRunOnRemoteNoWait

func (self Instance) SshRunOnRemoteNoWait(host string, port string, ssh_args []string, cmd_args string) int

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

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Report

type Report struct {
	Error         Error.Code `gd:"result"`
	Files         []File     `gd:"so_files"`
	EmbeddedStart int        `gd:"embedded_start"`
	EmbeddedSize  int        `gd:"embedded_size"`
}

type Template

type Template struct {
	Path  string `gd:"path"`
	Error string `gd:"error"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL