#pragma once #include #include #include #include "cmd_opr.h" struct DllInfo { int index{}; std::string name{}; std::string full_path{}; }; class DllHandle { public: DllHandle() = default; ~DllHandle() = default; public: // 读取配置文件 bool read_ini(const std::string& purpose_dir); // 获取一个二进制文件的依赖(参数为全路径) std::list get_dependents(const std::string& binary); // 查找配置文件中配置的目录中指定名称的dll的信息 bool find_dll(const std::string& name, DllInfo& info); // 是否在容器中 static bool is_have(const std::list& vec, const std::string& name); // 处理dll复制 static void copy_dll(const std::string& purpose_dir, const std::list& tasks); // 手动筛选多个dll的情况 void handle_multi_dll(); private: std::list no_dlls_{}; std::list exe_dlls_{}; std::map> simple_dlls{}; };