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 | #ifndef EDITOR_EXPORT_PLATFORM_PC_H |
32 | #define EDITOR_EXPORT_PLATFORM_PC_H |
33 | |
34 | #include "editor_export_platform.h" |
35 | |
36 | class EditorExportPlatformPC : public EditorExportPlatform { |
37 | GDCLASS(EditorExportPlatformPC, EditorExportPlatform); |
38 | |
39 | private: |
40 | Ref<ImageTexture> logo; |
41 | String name; |
42 | String os_name; |
43 | |
44 | int chmod_flags = -1; |
45 | |
46 | public: |
47 | virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override; |
48 | |
49 | virtual void get_export_options(List<ExportOption> *r_options) const override; |
50 | |
51 | virtual String get_name() const override; |
52 | virtual String get_os_name() const override; |
53 | virtual Ref<Texture2D> get_logo() const override; |
54 | |
55 | virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; |
56 | virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; |
57 | virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; |
58 | virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path); |
59 | virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0; |
60 | |
61 | virtual Error prepare_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); |
62 | virtual Error modify_template(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { return OK; }; |
63 | virtual Error export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags); |
64 | |
65 | void set_name(const String &p_name); |
66 | void set_os_name(const String &p_name); |
67 | |
68 | void set_logo(const Ref<Texture2D> &p_logo); |
69 | |
70 | void add_platform_feature(const String &p_feature); |
71 | virtual void get_platform_features(List<String> *r_features) const override; |
72 | virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override; |
73 | |
74 | int get_chmod_flags() const; |
75 | void set_chmod_flags(int p_flags); |
76 | |
77 | virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) { |
78 | return Error::OK; |
79 | } |
80 | }; |
81 | |
82 | #endif // EDITOR_EXPORT_PLATFORM_PC_H |
83 | |