Debian Codegraph @

editor/export/editor_export_platform_pc.h

raw symbols SCIP
1 /**************************************************************************/
2 /* editor_export_platform_pc.h */
3 /**************************************************************************/
4 /* This file is part of: */
5 /* GODOT ENGINE */
6 /* https://godotengine.org */
7 /**************************************************************************/
8 /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9 /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
10 /* */
11 /* Permission is hereby granted, free of charge, to any person obtaining */
12 /* a copy of this software and associated documentation files (the */
13 /* "Software"), to deal in the Software without restriction, including */
14 /* without limitation the rights to use, copy, modify, merge, publish, */
15 /* distribute, sublicense, and/or sell copies of the Software, and to */
16 /* permit persons to whom the Software is furnished to do so, subject to */
17 /* the following conditions: */
18 /* */
19 /* The above copyright notice and this permission notice shall be */
20 /* included in all copies or substantial portions of the Software. */
21 /* */
22 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
25 /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26 /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29 /**************************************************************************/
30
31 #pragma once
32
33 #include "editor_export_platform.h"
34
35 class ImageTexture;
36
37 class EditorExportPlatformPC : public EditorExportPlatform {
38 GDCLASS(EditorExportPlatformPC, EditorExportPlatform);
39
40 private:
41 Ref<ImageTexture> logo;
42 String name;
43 String os_name;
44
45 int chmod_flags = -1;
46
47 public:
48 virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
49 virtual void get_export_options(List<ExportOption> *r_options) const override;
50 virtual String get_export_option_warning(const EditorExportPreset *p_preset, const StringName &p_name) const override;
51
52 virtual String get_name() const override;
53 virtual String get_os_name() const override;
54 virtual Ref<Texture2D> get_logo() const override;
55
56 virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override;
57 virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override;
58 virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags = 0) override;
59 virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
60 virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0;
61
62 virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags);
63 virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags) { return OK; }
64 virtual Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, BitField<EditorExportPlatform::DebugFlags> p_flags);
65
66 void set_name(const String &p_name);
67 void set_os_name(const String &p_name);
68
69 void set_logo(const Ref<Texture2D> &p_logo);
70
71 void add_platform_feature(const String &p_feature);
72 virtual void get_platform_features(List<String> *r_features) const override;
73 virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
74
75 int get_chmod_flags() const;
76 void set_chmod_flags(int p_flags);
77
78 virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) {
79 return Error::OK;
80 }
81 };