diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs b/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs index 2c1e4403ff2258c3a9bfcdf59a78120eec3fdc23..4e4560e718bfc1f3a421dfd210b129445c96feb9 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs +++ b/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs @@ -1,4 +1,5 @@ using System; +using System.IO; namespace GeneralUpdate.Core.Domain.Entity { @@ -15,7 +16,7 @@ namespace GeneralUpdate.Core.Domain.Entity ClientVersion = clientVersion ?? throw new ArgumentNullException(nameof(clientVersion)); UpdateUrl = updateUrl ?? throw new ArgumentNullException(nameof(updateUrl)); UpdateLogUrl = updateLogUrl ?? throw new ArgumentNullException(nameof(updateLogUrl)); - InstallPath = installPath ?? throw new ArgumentNullException(nameof(installPath)); + InstallPath = installPath ?? Directory.GetCurrentDirectory(); MainUpdateUrl = mainUpdateUrl ?? throw new ArgumentNullException(nameof(mainUpdateUrl)); MainAppName = mainAppName ?? throw new ArgumentNullException(nameof(mainAppName)); } diff --git a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs index 33b9e64265d045029bb2da717cbae4d9dc50628f..39fd014cadd8e4f5ad19c3d7d47abb176ed7bbd7 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs @@ -44,7 +44,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows { var patchPath = FileUtil.GetTempDirectory(PATCHS); var zipFilePath = Path.Combine(Packet.TempPath, $"{version.Name}{Packet.Format}"); - + var context = new BaseContext.Builder() .SetVersion(version) .SetZipfilePath(zipFilePath) @@ -81,7 +81,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows { try { - if (!string.IsNullOrEmpty(Packet.UpdateLogUrl)) Process.Start("explorer.exe", Packet.UpdateLogUrl); + //if (!string.IsNullOrEmpty(Packet.UpdateLogUrl)) Process.Start("explorer.exe", Packet.UpdateLogUrl); var path = Path.Combine(Packet.InstallPath, appName); switch (appType) { @@ -109,7 +109,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows public override string GetPlatform() => PlatformType.Windows; -#endregion Public Methods + #endregion Public Methods #region Private Methods