Documentation
¶
Overview ¶
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 graphics.gd/classdb/EditorExportPlugin to configure platform-specific customization of scenes and resources. See graphics.gd/classdb/EditorExportPlugin.Instance.BeginCustomizeScenes and graphics.gd/classdb/EditorExportPlugin.Instance.BeginCustomizeResources for more details.
Index ¶
- func GetForcedExportFiles(preset EditorExportPreset.Instance) []string
- func GetForcedExportFilesOptions(preset EditorExportPreset.Instance) []string
- type Advanced
- type Any
- type DebugFlags
- type Expanded
- func (self Expanded) ExportPack(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
- func (self Expanded) ExportPackPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, ...) error
- func (self Expanded) ExportProject(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
- func (self Expanded) ExportProjectFiles(preset EditorExportPreset.Instance, debug bool, ...) error
- func (self Expanded) ExportZip(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
- func (self Expanded) ExportZipPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, ...) error
- func (self Expanded) SavePack(preset EditorExportPreset.Instance, debug bool, path string, embed bool) Report
- func (self Expanded) SshRunOnRemote(host string, port string, ssh_arg []string, cmd_args string, output []string, ...) error
- func (self Expanded) SshRunOnRemoteNoWait(host string, port string, ssh_args []string, cmd_args string, port_fwd int) int
- type ExportMessageType
- type Extension
- type File
- type ID
- type Instance
- func (self Instance) AddMessage(atype ExportMessageType, category string, message string)
- func (self Instance) AsEditorExportPlatform() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) ClearMessages()
- func (self Instance) CreatePreset() EditorExportPreset.Instance
- func (self Instance) ExportPack(preset EditorExportPreset.Instance, debug bool, path string) error
- func (self Instance) ExportPackPatch(preset EditorExportPreset.Instance, debug bool, path string) error
- func (self Instance) ExportProject(preset EditorExportPreset.Instance, debug bool, path string) error
- func (self Instance) ExportProjectFiles(preset EditorExportPreset.Instance, debug bool, ...) error
- func (self Instance) ExportZip(preset EditorExportPreset.Instance, debug bool, path string) error
- func (self Instance) ExportZipPatch(preset EditorExportPreset.Instance, debug bool, path string) error
- func (self Instance) FindExportTemplate(template_file_name string) Template
- func (self Instance) GenExportFlags(flags DebugFlags) []string
- func (self Instance) GetCurrentPresets() []EditorExportPreset.Instance
- func (self Instance) GetInternalExportFiles(preset EditorExportPreset.Instance, debug bool) map[string][]uint8
- func (self Instance) GetMessageCategory(index int) string
- func (self Instance) GetMessageCount() int
- func (self Instance) GetMessageText(index int) string
- func (self Instance) GetMessageType(index int) ExportMessageType
- func (self Instance) GetOsName() string
- func (self Instance) GetWorstMessageType() ExportMessageType
- func (self Instance) ID() ID
- func (self Instance) SavePack(preset EditorExportPreset.Instance, debug bool, path string) Report
- func (self Instance) SavePackPatch(preset EditorExportPreset.Instance, debug bool, path string) Report
- func (self Instance) SaveZip(preset EditorExportPreset.Instance, debug bool, path string) Report
- func (self Instance) SaveZipPatch(preset EditorExportPreset.Instance, debug bool, path string) Report
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SshPushToRemote(host string, port string, scp_args []string, src_file string, dst_file string) error
- func (self Instance) SshRunOnRemote(host string, port string, ssh_arg []string, cmd_args string) error
- func (self Instance) SshRunOnRemoteNoWait(host string, port string, ssh_args []string, cmd_args string) int
- func (self Instance) Virtual(name string) reflect.Value
- type Report
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetForcedExportFiles ¶
func GetForcedExportFiles(preset EditorExportPreset.Instance) []string
Returns array of core file names that always should be exported regardless of preset config.
func GetForcedExportFilesOptions ¶
func GetForcedExportFilesOptions(preset EditorExportPreset.Instance) []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 DebugFlags ¶
type DebugFlags int //gd:EditorExportPlatform.DebugFlags
const ( // Flag is set if the remotely debugged project is expected to use the remote file system. If set, [Instance.GenExportFlags] will append --remote-fs and --remote-fs-password (if [graphics.gd/classdb/EditorSettings.Instance] "filesystem/file_server/password" is defined) command line arguments to the returned list. DebugFlagDumbClient DebugFlags = 1 // Flag is set if remote debug is enabled. If set, [Instance.GenExportFlags] will append --remote-debug and --breakpoints (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the returned list. DebugFlagRemoteDebug DebugFlags = 2 // Flag is set if remotely debugged project is running on the localhost. If set, [Instance.GenExportFlags] will use localhost instead of [graphics.gd/classdb/EditorSettings.Instance] "network/debug/remote_host" as remote debugger host. DebugFlagRemoteDebugLocalhost DebugFlags = 4 // Flag is set if the "Visible Collision Shapes" remote debug option is enabled. If set, [Instance.GenExportFlags] will append the --debug-collisions command line argument to the returned list. DebugFlagViewCollisions DebugFlags = 8 DebugFlagViewNavigation DebugFlags = 16 )
type Expanded ¶
type Expanded [1]gdclass.EditorExportPlatform
func (Expanded) ExportPack ¶
func (self Expanded) ExportPack(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
Creates a PCK archive at 'path' for the specified 'preset'.
func (Expanded) ExportPackPatch ¶
func (self Expanded) ExportPackPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, flags DebugFlags) error
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.
func (Expanded) ExportProject ¶
func (self Expanded) ExportProject(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
Creates a full project at 'path' for the specified 'preset'.
func (Expanded) ExportProjectFiles ¶
func (self Expanded) ExportProjectFiles(preset EditorExportPreset.Instance, 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), shared_cb func(file_path string, tags []string, target_folder string)) 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.
'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.
func (Expanded) ExportZip ¶
func (self Expanded) ExportZip(preset EditorExportPreset.Instance, debug bool, path string, flags DebugFlags) error
Create a ZIP archive at 'path' for the specified 'preset'.
func (Expanded) ExportZipPatch ¶
func (self Expanded) ExportZipPatch(preset EditorExportPreset.Instance, debug bool, path string, patches []string, flags DebugFlags) error
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.
func (Expanded) SavePack ¶
func (self Expanded) SavePack(preset EditorExportPreset.Instance, debug bool, path string, embed bool) Report
Saves PCK archive and returns data structure 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 data structure additionally include following keys: embedded_start: int (embedded PCK offset) and embedded_size: int (embedded PCK size).
func (Expanded) SshRunOnRemote ¶
func (self Expanded) SshRunOnRemote(host string, port string, ssh_arg []string, cmd_args string, output []string, port_fwd int) error
Executes specified command on the remote host via SSH protocol and returns command output in the 'output'.
func (Expanded) SshRunOnRemoteNoWait ¶
func (self Expanded) SshRunOnRemoteNoWait(host string, port string, ssh_args []string, cmd_args string, port_fwd int) 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.
type ExportMessageType ¶
type ExportMessageType int //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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsEditorExportPlatform ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.EditorExportPlatform
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddMessage ¶
func (self Instance) AddMessage(atype ExportMessageType, category string, message string)
Adds a message to the export log that will be displayed when exporting ends.
func (Instance) AsEditorExportPlatform ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) CreatePreset ¶
func (self Instance) CreatePreset() EditorExportPreset.Instance
Create a new preset for this platform.
func (Instance) ExportPack ¶
Creates a PCK archive at 'path' for the specified 'preset'.
func (Instance) ExportPackPatch ¶
func (self Instance) ExportPackPatch(preset EditorExportPreset.Instance, debug bool, path string) error
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.
func (Instance) ExportProject ¶
func (self Instance) ExportProject(preset EditorExportPreset.Instance, debug bool, path string) error
Creates a full project at 'path' for the specified 'preset'.
func (Instance) ExportProjectFiles ¶
func (self Instance) ExportProjectFiles(preset EditorExportPreset.Instance, 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.
'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.
func (Instance) ExportZipPatch ¶
func (self Instance) ExportZipPatch(preset EditorExportPreset.Instance, debug bool, path string) error
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.
func (Instance) FindExportTemplate ¶
Locates export template for the platform, and returns data structure 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.
func (Instance) GenExportFlags ¶
func (self Instance) GenExportFlags(flags DebugFlags) []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() []EditorExportPreset.Instance
Returns array of [graphics.gd/classdb/EditorExportPreset]s for this platform.
func (Instance) GetInternalExportFiles ¶
func (self Instance) GetInternalExportFiles(preset EditorExportPreset.Instance, 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 data structure contains filename keys (string) and their corresponding raw data ([]byte).
func (Instance) GetMessageCategory ¶
Returns message category, for the message with 'index'.
func (Instance) GetMessageCount ¶
Returns number of messages in the export log.
func (Instance) GetMessageText ¶
Returns message text, for the message with 'index'.
func (Instance) GetMessageType ¶
func (self Instance) GetMessageType(index int) ExportMessageType
Returns message type, for the message with 'index'.
func (Instance) GetOsName ¶
Returns the name of the export operating system handled by this graphics.gd/classdb/EditorExportPlatform class, as a friendly string. Possible return values are Windows, Linux, macOS, Android, iOS, and Web.
func (Instance) GetWorstMessageType ¶
func (self Instance) GetWorstMessageType() ExportMessageType
Returns most severe message type currently present in the export log.
func (Instance) SavePack ¶
Saves PCK archive and returns data structure 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 data structure additionally include following keys: embedded_start: int (embedded PCK offset) and embedded_size: int (embedded PCK size).
func (Instance) SavePackPatch ¶
func (self Instance) SavePackPatch(preset EditorExportPreset.Instance, debug bool, path string) Report
Saves patch PCK archive and returns data structure 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).
func (Instance) SaveZip ¶
Saves ZIP archive and returns data structure 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).
func (Instance) SaveZipPatch ¶
func (self Instance) SaveZipPatch(preset EditorExportPreset.Instance, debug bool, path string) Report
Saves patch ZIP archive and returns data structure 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).
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 'output'.