Skip to content

Commit

Permalink
Add auto clean CrashLogger.dll
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamguxiang committed Sep 24, 2022
1 parent b1b95ad commit 3e4bbe7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion LiteLoader/src/liteloader/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ inline void cleanOldScriptEngine() {
filesystem::remove("plugins/LiteXLoader.Lua.dll", ec);
}

inline void cleanCrashLoggerDll() {
std::error_code ec;
if (filesystem::exists("plugins/LiteLoader/CrashLogger.dll", ec))
filesystem::remove("plugins/LiteLoader/CrashLogger.dll", ec);
}

constexpr auto DEFAULT_ROOT_PACKAGE_JSON =
R"({
"name": "llse-nodejs-root",
Expand Down Expand Up @@ -201,7 +207,7 @@ inline void loadParticleApi() {
void ll::LoadMain() {
ll::logger.info(tr("ll.loader.loadMain.start"));
cleanOldScriptEngine();

cleanCrashLoggerDll();
// Load plugins
int pluginCount = 0;
vector<std::string> preloadList = getPreloadList();
Expand Down
1 change: 0 additions & 1 deletion LiteLoader/src/llapi/EventAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ DECLARE_EVENT_DATA(PlayerStartDestroyBlockEvent);
DECLARE_EVENT_DATA(PlayerOpenContainerEvent);
DECLARE_EVENT_DATA(PlayerCloseContainerEvent);
DECLARE_EVENT_DATA(PlayerInventoryChangeEvent);
DECLARE_EVENT_DATA(PlayerMoveEvent);
DECLARE_EVENT_DATA(PlayerSprintEvent);
DECLARE_EVENT_DATA(PlayerSetArmorEvent);
DECLARE_EVENT_DATA(PlayerUseRespawnAnchorEvent);
Expand Down

0 comments on commit 3e4bbe7

Please sign in to comment.