安装助手从配置文件读取星尘服务器地址,在StarAgent安装时使用大石头 authored at 2024-03-20 19:37:47
diff --git a/Doc/build.bat b/Doc/build.bat
index ac80cb8..1c56a4c 100644
--- a/Doc/build.bat
+++ b/Doc/build.bat
@@ -8,5 +8,13 @@ copy %base%\clover\x64\clover.exe %dest%\clover64.exe /y
copy %base%\net20\clover.exe %dest%\clover20.exe /y
copy %base%\net40\clover.exe %dest%\clover40.exe /y
copy %base%\net45\clover.exe %dest%\clover45.exe /y
-copy %base%\publish-windows\clover.exe %dest%\clover70.exe /y
+copy %base%\publish-windows\clover.exe %dest%\clover80.exe /y
copy %base%\publish-linux64\clover %dest%\clover /y
+
+del %dest%\LuckyClover45.zip /f
+del %dest%\LuckyClover.zip /f
+del %dest%\LuckyClover2.zip /f
+
+%base%\net8.0\clover.exe zip %dest%\LuckyClover45.zip %base%\Installer45\*.exe %base%\Installer45\*.exe.config %base%\Installer45\*.dll
+%base%\net8.0\clover.exe zip %dest%\LuckyClover.zip %base%\Installer4\*.exe %base%\Installer4\*.exe.config %base%\Installer4\*.dll
+%base%\net8.0\clover.exe zip %dest%\LuckyClover2.zip %base%\Installer\*.exe %base%\Installer\*.exe.config %base%\Installer\*.dll
diff --git a/Installer/FrmMain.cs b/Installer/FrmMain.cs
index 3e325c5..bf8d52c 100644
--- a/Installer/FrmMain.cs
+++ b/Installer/FrmMain.cs
@@ -415,10 +415,14 @@ public partial class FrmMain : Form
File.WriteAllText(txt, url);
}
+ var args = "-install";
+ var set = Setting.Current;
+ if (!set.Server.IsNullOrEmpty()) args += " -server " + set.Server;
+
var si = new ProcessStartInfo
{
FileName = file,
- Arguments = "-install",
+ Arguments = args,
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
diff --git a/Installer/Installer.csproj b/Installer/Installer.csproj
index 7545bd1..d4128f0 100644
--- a/Installer/Installer.csproj
+++ b/Installer/Installer.csproj
@@ -65,6 +65,7 @@
<Compile Include="NetRuntime.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Setting.cs" />
<Compile Include="VerInfo.cs" />
<Compile Include="WindowsService.cs" />
<EmbeddedResource Include="FrmMain.resx">
diff --git a/Installer4/Setting.cs b/Installer/Setting.cs
similarity index 94%
rename from Installer4/Setting.cs
rename to Installer/Setting.cs
index 31da6c5..9e7887c 100644
--- a/Installer4/Setting.cs
+++ b/Installer/Setting.cs
@@ -1,4 +1,5 @@
-using System.ComponentModel;
+using System;
+using System.ComponentModel;
using NewLife;
using NewLife.Configuration;
diff --git a/Installer4/Installer4.csproj b/Installer4/Installer4.csproj
index 54e2f85..31913d1 100644
--- a/Installer4/Installer4.csproj
+++ b/Installer4/Installer4.csproj
@@ -32,6 +32,7 @@
<Compile Include="..\Installer\FrmMain.Designer.cs" Link="FrmMain.Designer.cs" />
<Compile Include="..\Installer\Helper.cs" Link="Helper.cs" />
<Compile Include="..\Installer\NetRuntime.cs" Link="NetRuntime.cs" />
+ <Compile Include="..\Installer\Setting.cs" Link="Setting.cs" />
<Compile Include="..\Installer\VerInfo.cs" Link="VerInfo.cs" />
<Compile Include="..\Installer\WindowsService.cs" Link="WindowsService.cs" />
</ItemGroup>
diff --git a/Installer45/Installer45.csproj b/Installer45/Installer45.csproj
index 0e3411c..429ca1f 100644
--- a/Installer45/Installer45.csproj
+++ b/Installer45/Installer45.csproj
@@ -27,13 +27,13 @@
<ItemGroup>
<Compile Include="..\Installer4\Program.cs" Link="Program.cs" />
- <Compile Include="..\Installer4\Setting.cs" Link="Setting.cs" />
<Compile Include="..\Installer\Advapi32.cs" Link="Advapi32.cs" />
<Compile Include="..\Installer\DownloadHelper.cs" Link="DownloadHelper.cs" />
<Compile Include="..\Installer\FrmMain.cs" Link="FrmMain.cs" />
<Compile Include="..\Installer\FrmMain.Designer.cs" Link="FrmMain.Designer.cs" />
<Compile Include="..\Installer\Helper.cs" Link="Helper.cs" />
<Compile Include="..\Installer\NetRuntime.cs" Link="NetRuntime.cs" />
+ <Compile Include="..\Installer\Setting.cs" Link="Setting.cs" />
<Compile Include="..\Installer\VerInfo.cs" Link="VerInfo.cs" />
<Compile Include="..\Installer\WindowsService.cs" Link="WindowsService.cs" />
</ItemGroup>
diff --git a/LuckyClover/Program.cs b/LuckyClover/Program.cs
index 1fcf94e..5315548 100644
--- a/LuckyClover/Program.cs
+++ b/LuckyClover/Program.cs
@@ -188,6 +188,7 @@ internal class Program
Console.WriteLine("Zip压缩多个文件到 {0}", dst);
+ // 外部脚本决定是否删除
//if (File.Exists(dst)) File.Delete(dst);
var compressionLevel = CompressionLevel.SmallestSize;