mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
add the backup logic to make sure plugin install success
Change-Id: Id9da725ffe2e6d604c2771abf89cf445824793db
This commit is contained in:
parent
a9e3bb59a0
commit
49fc813383
4 changed files with 37 additions and 5 deletions
|
@ -107,12 +107,16 @@ NetworkAgent::~NetworkAgent()
|
|||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", this %1%, network_agent=%2%, destroy_agent_ptr=%3%, ret %4%")%this %network_agent %destroy_agent_ptr %ret;
|
||||
}
|
||||
|
||||
int NetworkAgent::initialize_network_module()
|
||||
int NetworkAgent::initialize_network_module(bool using_backup)
|
||||
{
|
||||
//int ret = -1;
|
||||
std::string library;
|
||||
auto plugin_folder = boost::filesystem::path(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()) / "plugins";
|
||||
|
||||
if (using_backup) {
|
||||
plugin_folder = plugin_folder/"backup";
|
||||
}
|
||||
|
||||
//first load the library
|
||||
#if defined(_MSC_VER) || defined(_WIN32)
|
||||
library = plugin_folder.string() + "/" + std::string(BAMBU_NETWORK_LIBRARY) + ".dll";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue