NewLife/LuckyClover

完善zip安装,星尘代理自动安装测试通过
大石头 authored at 2024-03-13 22:11:49
68c1ef2
Tree
1 Parent(s) ac9b463
Summary: 3 changed files with 27 additions and 16 deletions.
Modified +15 -15
Modified +11 -0
Modified +1 -1
Modified +15 -15
diff --git a/Installer/FrmMain.cs b/Installer/FrmMain.cs
index 37ef690..3e325c5 100644
--- a/Installer/FrmMain.cs
+++ b/Installer/FrmMain.cs
@@ -671,21 +671,21 @@ public partial class FrmMain : Form
 
     void PostLog(String server, String action)
     {
-        // 上传客户端日志
-        var di = _installPath.CombinePath("Log").AsDirectory();
-        if (di.Exists)
-        {
-            var fi = di.GetFiles("*.log").OrderByDescending(e => e.LastWriteTime).FirstOrDefault();
-            if (fi != null) PostLog(server, fi, action);
-        }
-
-        // 上传自己的日志
-        di = @".\Log".AsDirectory();
-        if (di.Exists)
-        {
-            var fi = di.GetFiles("*.log").OrderByDescending(e => e.LastWriteTime).FirstOrDefault();
-            if (fi != null) PostLog(server, fi, action);
-        }
+        //// 上传客户端日志
+        //var di = _installPath.CombinePath("Log").AsDirectory();
+        //if (di.Exists)
+        //{
+        //    var fi = di.GetFiles("*.log").OrderByDescending(e => e.LastWriteTime).FirstOrDefault();
+        //    if (fi != null) PostLog(server, fi, action);
+        //}
+
+        //// 上传自己的日志
+        //di = @".\Log".AsDirectory();
+        //if (di.Exists)
+        //{
+        //    var fi = di.GetFiles("*.log").OrderByDescending(e => e.LastWriteTime).FirstOrDefault();
+        //    if (fi != null) PostLog(server, fi, action);
+        //}
     }
 
     void PostLog(String server, FileInfo fi, String action)
Modified +11 -0
diff --git a/Installer/NetRuntime.cs b/Installer/NetRuntime.cs
index bb4f619..77d72d3 100644
--- a/Installer/NetRuntime.cs
+++ b/Installer/NetRuntime.cs
@@ -70,6 +70,17 @@ public class NetRuntime
             XTrace.WriteLine("MD5: {0}", GetMD5(fullFile));
         }
 
+        // 解压缩
+        if (fileName.EndsWithIgnoreCase(".zip"))
+        {
+            XTrace.WriteLine("正在解压缩到:{0}", InstallPath);
+
+            fullFile.AsFile().Extract(InstallPath.EnsureDirectory(false), true);
+
+            return true;
+        }
+
+        // 执行安装包
         if (String.IsNullOrEmpty(arg)) arg = "/passive /promptrestart";
         if (!Silent) arg = null;
 
Modified +1 -1
diff --git a/Installer/Properties/AssemblyInfo.cs b/Installer/Properties/AssemblyInfo.cs
index cc9cd51..60fe625 100644
--- a/Installer/Properties/AssemblyInfo.cs
+++ b/Installer/Properties/AssemblyInfo.cs
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.2.*")]
-[assembly: AssemblyFileVersion("1.2.2024.0121")]
+[assembly: AssemblyFileVersion("1.2.2024.0313")]