### 2021-09-02更新
------ #### SuperDesign V2.0.2105.1701 - *.[改进]新增对新版公用库的支持,将RyWeb等合并到一个库里。
This commit is contained in:
1 parent
2d3bb192f9
commit
d402952ed5
27 files changed
+10567
-366
No files matched your search
@@ -69,10 +69,19 @@ namespace 开发辅助工具.Manager
|
||||
/// <summary>
|
||||
/// 通过dll名称来寻找dll路径
|
||||
/// </summary>
|
||||
/// <param name="_ReferenceDllPath"></param>
|
||||
/// <param name="dll_name"></param>
|
||||
/// <returns></returns>
|
||||
public string GetDllPath(string dll_name)
|
||||
{
|
||||
return GetDllPath("", dll_name);
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过dll名称来寻找dll路径
|
||||
/// </summary>
|
||||
/// <param name="dll_foldername">为空则表示根目录下查找,否则查找子目录</param>
|
||||
/// <param name="dll_name"></param>
|
||||
/// <returns></returns>
|
||||
public string GetDllPath(string dll_foldername,string dll_name)
|
||||
{
|
||||
var path_list = ReferenceDllPath.Replace("\r", "").Split('\n');
|
||||
var find = false;
|
||||
@@ -80,9 +89,11 @@ namespace 开发辅助工具.Manager
|
||||
#region 在引用文件夹查找是否有该dll,有则使用引用文件夹里的dll
|
||||
for (int m = 0; m < path_list.Length; m++)
|
||||
{
|
||||
if (path_list[m].Trim() == "") { continue; }
|
||||
if (!System.IO.Directory.Exists(path_list[m])) { continue; }
|
||||
var files = System.IO.Directory.GetFiles(path_list[m]);
|
||||
if (path_list[m].Trim().Length==0) { continue; }
|
||||
var path = path_list[m].Trim('\\');
|
||||
if (dll_foldername.Length > 0) { path += "\\" + dll_foldername; }
|
||||
if (!System.IO.Directory.Exists(path)) { continue; }
|
||||
var files = System.IO.Directory.GetFiles(path);
|
||||
for (int z = 0; z < files.Length; z++)
|
||||
{
|
||||
if (System.IO.Path.GetFileName(files[z]).ToLower() == dll_name.ToLower())
|
||||
@@ -152,19 +163,31 @@ namespace 开发辅助工具.Manager
|
||||
/// </summary>
|
||||
public int UpdateDlls(string folder,out string error_str)
|
||||
{
|
||||
error_str = "";
|
||||
var _error_str = "";
|
||||
int error = 0;
|
||||
Updates(folder);
|
||||
void Updates(string _path)
|
||||
Updates("",folder);
|
||||
Updates("x86", folder+"\\x86");
|
||||
Updates("x64", folder + "\\x64");
|
||||
void Updates(string foldername,string _path)
|
||||
{
|
||||
if (!System.IO.Directory.Exists(_path)) { return; }
|
||||
var files = System.IO.Directory.GetFiles(_path, "*.dll");
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
string filename = System.IO.Path.GetFileName(files[i]);
|
||||
var dllpath = GetDllPath(filename);
|
||||
if (dllpath != "")
|
||||
var dllpath = GetDllPath(foldername,filename);
|
||||
if (dllpath.Length>0)
|
||||
{
|
||||
if (filename.ToLower() == "System.Data.SQLite.dll".ToLower())
|
||||
{
|
||||
RyFiles.CreateDirectory(_path + "\\x86");
|
||||
RyFiles.CreateDirectory(_path + "\\x64");
|
||||
var sourch_folder = System.IO.Path.GetDirectoryName(dllpath);
|
||||
if (RyFiles.CopyFile(sourch_folder + "\\x86\\*", _path + "\\x86\\") != 0)
|
||||
{ _error_str += sourch_folder + "\\x86\\*\r\n"; error++; }
|
||||
if (RyFiles.CopyFile(sourch_folder + "\\x64\\*", _path + "\\x64\\") != 0)
|
||||
{ _error_str += sourch_folder + "\\x64\\*\r\n"; error++; }
|
||||
}
|
||||
if (RyFiles.CopyFile(dllpath, files[i]) != 0)
|
||||
{ _error_str += files[i]+ "\r\n"; error++; }
|
||||
var dll_xml_path = System.IO.Path.GetDirectoryName(dllpath) +"\\"+ System.IO.Path.GetFileNameWithoutExtension(dllpath) + ".xml";
|
||||
@@ -178,7 +201,7 @@ namespace 开发辅助工具.Manager
|
||||
var dirs = System.IO.Directory.GetDirectories(_path);
|
||||
for (int i = 0; i < dirs.Length; i++)
|
||||
{
|
||||
Updates(dirs[i]);
|
||||
Updates(foldername,dirs[i]);
|
||||
}
|
||||
}
|
||||
error_str = _error_str;
|
||||
@@ -239,7 +262,7 @@ namespace 开发辅助工具.Manager
|
||||
{
|
||||
var Reference_Name = HintPath.Substring(iPos + 1);//引用的dll名称
|
||||
var dll_path = GetDllPath(Reference_Name);
|
||||
if (dll_path != "")
|
||||
if (dll_path.Length>0)
|
||||
{
|
||||
if (CopyDllToBin)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user