Skip to content

Commit

Permalink
[Web] Fix Web Editor plugin being added to SCons multiple times
Browse files Browse the repository at this point in the history
Move the Web Editor plugin files to an editor sub-folder inside the
platform folder.
  • Loading branch information
Faless committed Nov 11, 2024
1 parent e65a237 commit ce1cf84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 3 additions & 1 deletion platform/web/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ web_files = [
"javascript_bridge_singleton.cpp",
"web_main.cpp",
"os_web.cpp",
"api/web_tools_editor_plugin.cpp",
]

if env["target"] == "editor":
env.add_source_files(web_files, "editor/*.cpp")

sys_env = env.Clone()
sys_env.AddJSLibraries(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "web_tools_editor_plugin.h"

#if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)

#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
Expand Down Expand Up @@ -155,5 +153,3 @@ void WebToolsEditorPlugin::_zip_recursive(String p_path, String p_base_path, zip
cur = dir->get_next();
}
}

#endif // TOOLS_ENABLED && WEB_ENABLED
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#ifndef WEB_TOOLS_EDITOR_PLUGIN_H
#define WEB_TOOLS_EDITOR_PLUGIN_H

#if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)

#include "core/io/zip_io.h"
#include "editor/plugins/editor_plugin.h"

Expand All @@ -57,6 +55,4 @@ class WebToolsEditorPlugin {
static void initialize() {}
};

#endif // TOOLS_ENABLED && WEB_ENABLED

#endif // WEB_TOOLS_EDITOR_PLUGIN_H

0 comments on commit ce1cf84

Please sign in to comment.