Path: blob/master/platform/linuxbsd/export/export_plugin.h
10278 views
/**************************************************************************/1/* export_plugin.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "core/io/file_access.h"33#include "editor/export/editor_export_platform_pc.h"34#include "editor/settings/editor_settings.h"35#include "scene/resources/image_texture.h"3637class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC {38GDCLASS(EditorExportPlatformLinuxBSD, EditorExportPlatformPC);3940HashMap<String, String> extensions;4142struct SSHCleanupCommand {43String host;44String port;45Vector<String> ssh_args;46String cmd_args;47bool wait = false;4849SSHCleanupCommand() {}50SSHCleanupCommand(const String &p_host, const String &p_port, const Vector<String> &p_ssh_arg, const String &p_cmd_args, bool p_wait = false) {51host = p_host;52port = p_port;53ssh_args = p_ssh_arg;54cmd_args = p_cmd_args;55wait = p_wait;56}57};5859Ref<ImageTexture> run_icon;60Ref<ImageTexture> stop_icon;6162Vector<SSHCleanupCommand> cleanup_commands;63OS::ProcessID ssh_pid = 0;64int menu_options = 0;6566bool is_elf(const String &p_path) const;67bool is_shebang(const String &p_path) const;6869Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);70String _get_exe_arch(const String &p_path) const;7172public:73virtual void get_export_options(List<ExportOption> *r_options) const override;74virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override;75virtual bool get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const override;76virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override;77virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags = 0) override;78virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;79virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) override;80virtual bool is_executable(const String &p_path) const override;8182virtual Ref<Texture2D> get_run_icon() const override;83virtual bool poll_export() override;84virtual Ref<Texture2D> get_option_icon(int p_index) const override;85virtual int get_options_count() const override;86virtual String get_option_label(int p_index) const override;87virtual String get_option_tooltip(int p_index) const override;88virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_device, BitField<EditorExportPlatform::DebugFlags> p_debug_flags) override;89virtual void cleanup() override;9091EditorExportPlatformLinuxBSD();92};939495