From 2c6eef99603b41583f3b286472f8ae98422857ea Mon Sep 17 00:00:00 2001 From: ShrBox Date: Wed, 24 Jul 2024 09:31:14 +0800 Subject: [PATCH] fix: fix nodejs and python compile --- src/lse/PluginManager.cpp | 4 ++-- src/lse/PluginMigration.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lse/PluginManager.cpp b/src/lse/PluginManager.cpp index 2a7461c1..c3fca5d5 100644 --- a/src/lse/PluginManager.cpp +++ b/src/lse/PluginManager.cpp @@ -64,7 +64,7 @@ PluginManager::PluginManager() : ll::mod::ModManager(PluginManagerName) {} ll::Expected<> PluginManager::load(ll::mod::Manifest manifest) { auto& logger = getSelfPluginInstance().getLogger(); #ifdef LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON - std::filesystem::path dirPath = ll::plugin::getPluginsRoot() / manifest.name; // Plugin path + std::filesystem::path dirPath = ll::mod::getModsRoot() / manifest.name; // Plugin path std::string entryPath = PythonHelper::findEntryScript(ll::string_utils::u8str2str(dirPath.u8string())); // Plugin entry // if (entryPath.empty()) return false; @@ -99,7 +99,7 @@ ll::Expected<> PluginManager::load(ll::mod::Manifest manifest) { } #endif #ifdef LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS - std::filesystem::path dirPath = ll::plugin::getPluginsRoot() / manifest.name; // Plugin path + std::filesystem::path dirPath = ll::mod::getModsRoot() / manifest.name; // Plugin path // std::string entryPath = NodeJsHelper::findEntryScript(dirPath.string()); // Plugin entry // if (entryPath.empty()) return false; // std::string pluginName = NodeJsHelper::getPluginPackageName(dirPath.string()); // Plugin name diff --git a/src/lse/PluginMigration.cpp b/src/lse/PluginMigration.cpp index e3fb358b..1008752f 100644 --- a/src/lse/PluginMigration.cpp +++ b/src/lse/PluginMigration.cpp @@ -91,13 +91,13 @@ auto migratePlugin(const PluginManager& pluginManager, const std::filesystem::pa ll::string_utils::u8str2str(pluginDir.u8string()), 30000 ); - ll::plugin::Manifest manifest{ + ll::mod::Manifest manifest{ .entry = NodeJsHelper::findEntryScript(ll::string_utils::u8str2str(path.u8string())), .name = ll::string_utils::u8str2str(pluginFileBaseName.u8string()), .type = pluginType, .dependencies = - std::unordered_set{ - ll::plugin::Dependency{ + std::unordered_set{ + ll::mod::Dependency{ .name = self.getManifest().name, }, }, };