mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Check loading of blacklisted dlls and show warning dialog at startup. Also show these dlls in sysinfo dialog.
This commit is contained in:
parent
4f161607c7
commit
fa2568a5e3
11 changed files with 172 additions and 5 deletions
45
src/libslic3r/LibraryCheck.hpp
Normal file
45
src/libslic3r/LibraryCheck.hpp
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef slic3r_LibraryCheck_hpp_
|
||||
#define slic3r_LibraryCheck_hpp_
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#endif //WIN32
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
#ifdef WIN32
|
||||
class LibraryCheck
|
||||
{
|
||||
public:
|
||||
static LibraryCheck& get_instance()
|
||||
{
|
||||
static LibraryCheck instance;
|
||||
|
||||
return instance;
|
||||
}
|
||||
private:
|
||||
LibraryCheck() {}
|
||||
|
||||
std::vector<std::wstring> m_found;
|
||||
public:
|
||||
LibraryCheck(LibraryCheck const&) = delete;
|
||||
void operator=(LibraryCheck const&) = delete;
|
||||
// returns all found blacklisted dlls
|
||||
bool get_blacklisted(std::vector<std::wstring>& names);
|
||||
std::wstring get_blacklisted_string();
|
||||
// returns true if enumerating found blacklisted dll
|
||||
bool perform_check();
|
||||
|
||||
static bool is_blacklisted(std::string dllpath);
|
||||
static bool is_blacklisted(std::wstring dllpath);
|
||||
private:
|
||||
static const std::vector<std::wstring> blacklist;
|
||||
};
|
||||
|
||||
#endif //WIN32
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif //slic3r_LibraryCheck_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue