Skip to content

Commit

Permalink
build: trying to fix libnode
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Jan 22, 2024
1 parent 060d2c7 commit a1c66b7
Show file tree
Hide file tree
Showing 4 changed files with 534 additions and 529 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
strategy:
matrix:
backend:
- libnode
# - libnode
- lua
- python310
# - python310
- quickjs
runs-on: windows-latest
steps:
Expand Down
26 changes: 13 additions & 13 deletions src/main/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void LoadMain() {
#ifdef LLSE_BACKEND_NODEJS
// NodeJs后端 - 主加载
void LoadMain_NodeJs() {
logger.info(tr("llse.loader.loadMain.start", fmt::arg("type", "Node.js")));
// logger.info(tr("llse.loader.loadMain.start", fmt::arg("type", "Node.js")));
int installCount = 0;
int count = 0;

Expand All @@ -131,7 +131,7 @@ void LoadMain_NodeJs() {
}
} catch (...) {}
} else {
logger.warn(tr("llse.loader.loadMain.nodejs.ignored", fmt::arg("path", targetDirStr)));
// logger.warn(tr("llse.loader.loadMain.nodejs.ignored", fmt::arg("path", targetDirStr)));
}
}
}
Expand All @@ -143,28 +143,28 @@ void LoadMain_NodeJs() {
std::filesystem::path pth = i.path();
std::string packFilePathStr = ll::string_utils::u8str2str(pth.make_preferred().u8string());
if (i.is_regular_file() && packFilePathStr.ends_with(LLSE_PLUGIN_PACKAGE_EXTENSION)) {
logger.info(tr("llse.loader.loadMain.nodejs.installPack.start", fmt::arg("path", packFilePathStr)));
// logger.info(tr("llse.loader.loadMain.nodejs.installPack.start", fmt::arg("path", packFilePathStr)));
try {
if (!PluginManager::loadPlugin(packFilePathStr, false, true)) {
logger.error(tr("llse.loader.loadMain.nodejs.installPack.fail", packFilePathStr));
// logger.error(tr("llse.loader.loadMain.nodejs.installPack.fail", packFilePathStr));
}
++count;
++installCount;
} catch (...) {
// not matched backend type
logger.warn(tr("llse.loader.loadMain.nodejs.ignored", fmt::arg("path", packFilePathStr)));
// logger.warn(tr("llse.loader.loadMain.nodejs.ignored", fmt::arg("path", packFilePathStr)));
}
}
}

logger.info(tr("llse.loader.loadMain.done", fmt::arg("count", count), fmt::arg("type", "Node.js")));
// logger.info(tr("llse.loader.loadMain.done", fmt::arg("count", count), fmt::arg("type", "Node.js")));
}
#endif

#ifdef LLSE_BACKEND_PYTHON
// Python后端 - 主加载
void LoadMain_Python() {
logger.info(tr("llse.loader.loadMain.start", fmt::arg("type", "Python")));
// logger.info(tr("llse.loader.loadMain.start", fmt::arg("type", "Python")));
int installCount = 0;
int count = 0;

Expand All @@ -181,7 +181,7 @@ void LoadMain_Python() {
}
} catch (...) {}
} else {
logger.warn(tr("llse.loader.loadMain.python.ignored", fmt::arg("path", targetDirStr)));
// logger.warn(tr("llse.loader.loadMain.python.ignored", fmt::arg("path", targetDirStr)));
}
}
}
Expand All @@ -193,16 +193,16 @@ void LoadMain_Python() {
std::filesystem::path pth = i.path();
std::string packFilePathStr = ll::string_utils::u8str2str(pth.make_preferred().u8string());
if (i.is_regular_file() && packFilePathStr.ends_with(LLSE_PLUGIN_PACKAGE_EXTENSION)) {
logger.info(tr("llse.loader.loadMain.python.installPack.start", fmt::arg("path", packFilePathStr)));
// logger.info(tr("llse.loader.loadMain.python.installPack.start", fmt::arg("path", packFilePathStr)));
try {
if (!PluginManager::loadPlugin(packFilePathStr, false, true)) {
logger.error(tr("llse.loader.loadMain.python.installPack.fail", packFilePathStr));
// logger.error(tr("llse.loader.loadMain.python.installPack.fail", packFilePathStr));
}
++count;
++installCount;
} catch (...) {
// not matched backend type
logger.warn(tr("llse.loader.loadMain.python.ignored", packFilePathStr));
// logger.warn(tr("llse.loader.loadMain.python.ignored", packFilePathStr));
}
}
}
Expand All @@ -218,7 +218,7 @@ void LoadMain_Python() {
}
}

logger.info(tr("llse.loader.loadMain.done", fmt::arg("count", count), fmt::arg("type", "Python")));
// logger.info(tr("llse.loader.loadMain.done", fmt::arg("count", count), fmt::arg("type", "Python")));
}
#endif

Expand All @@ -232,4 +232,4 @@ void LoadMain_Package() {
LoadMain_Python();
return;
#endif
}
}
Loading

0 comments on commit a1c66b7

Please sign in to comment.