WebAssembly: Convert to new plugin setup scheme

Change-Id: I7d5def6084a0cc2cf164a4d72b693b44f8be7005
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-11-24 15:33:31 +01:00
parent 0afd50aa33
commit e729c37d95
10 changed files with 163 additions and 191 deletions

View File

@@ -13,6 +13,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runcontrol.h>
#include <projectexplorer/target.h>
@@ -221,17 +222,31 @@ public:
// Factories
EmrunRunConfigurationFactory::EmrunRunConfigurationFactory()
class EmrunRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
{
registerRunConfiguration<EmrunRunConfiguration>(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE);
}
public:
EmrunRunConfigurationFactory()
{
registerRunConfiguration<EmrunRunConfiguration>(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
addSupportedTargetDeviceType(Constants::WEBASSEMBLY_DEVICE_TYPE);
}
};
EmrunRunWorkerFactory::EmrunRunWorkerFactory()
class EmrunRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
{
setProduct<EmrunRunWorker>();
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
addSupportedRunConfig(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
public:
EmrunRunWorkerFactory()
{
setProduct<EmrunRunWorker>();
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
addSupportedRunConfig(Constants::WEBASSEMBLY_RUNCONFIGURATION_EMRUN);
}
};
void setupEmrunRunSupport()
{
static EmrunRunConfigurationFactory theEmrunRunConfigurationFactory;
static EmrunRunWorkerFactory theEmrunRunWorkerFactory;
}
} // Webassembly::Internal