Skip to content

Commit

Permalink
!61 Dev
Browse files Browse the repository at this point in the history
Merge pull request !61 from Juster Zhu/dev
  • Loading branch information
JusterZhu authored and gitee-org committed Dec 1, 2024
2 parents 9a60bb5 + cc167c7 commit fc2d323
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 36 deletions.
24 changes: 7 additions & 17 deletions src/c#/GeneralUpdate.Bowl/GeneralUpdate.Bowl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,17 @@
<Title>GeneralUpdate.Bowl</Title>
<Authors>JusterZhu</Authors>
<RepositoryType>public</RepositoryType>
<PackageTags>upgrade</PackageTags>
<PackageTags>upgrade,update</PackageTags>
<PackageReleaseNotes>Bowl is used to monitor whether the main program can start normally after an upgrade. If it detects that the main program crashes on startup, it will restore the backup.</PackageReleaseNotes>
<PackageIcon>bowl.jpeg</PackageIcon>
<Version>1.0.4</Version>
<Version>9.0.0</Version>
</PropertyGroup>

<ItemGroup>
<None Update="bowl.jpeg">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Update="Applications\Linux\procdump-3.3.0-0.cm2.x86_64.rpm">
<Pack>True</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Applications\Linux\procdump-3.3.0-0.el8.x86_64.rpm">
<Pack>True</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Applications\Linux\procdump_3.3.0_amd64.deb">
<Pack>True</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
Expand All @@ -45,10 +33,12 @@
<ItemGroup>
<ProjectReference Include="..\GeneralUpdate.Common\GeneralUpdate.Common.csproj" />
</ItemGroup>



<ItemGroup>
<EmbeddedResource Include="Applications\**\*">
<Content Include="Applications\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/c#/GeneralUpdate.Bowl/Strategys/WindowStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public override void Launch()
_parameter.InnerApp = Path.Combine(_applicationsDirectory, GetAppName());
var dmpFullName = Path.Combine(_parameter.FailDirectory, _parameter.DumpFileName);
_parameter.InnerArguments = $"-e -ma {_parameter.ProcessNameOrId} {dmpFullName}";
//This method is used to launch scripts in applications.
base.Launch();
ExecuteFinalTreatment();
}
Expand Down
4 changes: 2 additions & 2 deletions src/c#/GeneralUpdate.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class Program
{
static async Task Main(string[] args)
{
/*try
try
{
Console.WriteLine($"主程序初始化,{DateTime.Now}!");
Console.WriteLine("当前运行目录:" + Thread.GetDomain().BaseDirectory);
Expand Down Expand Up @@ -57,7 +57,7 @@ static async Task Main(string[] args)
catch (Exception e)
{
Console.WriteLine(e.Message + "\n" + e.StackTrace);
}*/
}

/*var paramsOSS = new GlobalConfigInfoOSS();
paramsOSS.Url = "http://192.168.50.203/versions.json";
Expand Down
13 changes: 10 additions & 3 deletions src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.12.10</Version>
<Version>9.0.0</Version>
<Authors>JusterZhu</Authors>
<Description>Provides functions related to upgrade and update programs.</Description>
<ApplicationIcon>GeneralUpdate.ico</ApplicationIcon>
<PackageIcon>GeneralUpdate.ico</PackageIcon>
<PackageIcon>GeneralUpdate.png</PackageIcon>
<SignAssembly>False</SignAssembly>
<RepositoryUrl>https://github.com/GeneralLibrary/GeneralUpdate</RepositoryUrl>
<Copyright>Copyright © 2024 JusterZhu. All rights reserved.</Copyright>
Expand All @@ -17,7 +17,7 @@
<Title>GeneralUpdate.ClientCore</Title>
<PackageLicenseUrl>https://github.com/GeneralLibrary/GeneralUpdate?tab=MIT-1-ov-file#readme</PackageLicenseUrl>
<RepositoryType>public</RepositoryType>
<PackageTags>upgrade</PackageTags>
<PackageTags>upgrade,update</PackageTags>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>

Expand All @@ -40,4 +40,11 @@
</None>
</ItemGroup>

<ItemGroup>
<None Update="GeneralUpdate.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
Binary file added src/c#/GeneralUpdate.ClientCore/GeneralUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/c#/GeneralUpdate.Common/GeneralUpdate.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<PackageIcon>GeneralUpdate128.png</PackageIcon>
<RepositoryUrl>https://github.com/GeneralLibrary/GeneralUpdate</RepositoryUrl>
<RepositoryType>public</RepositoryType>
<PackageTags>upgrade</PackageTags>
<PackageTags>upgrade,update</PackageTags>
<PackageReleaseNotes>The infrastructure required to support all components is necessary, and this nuget package is essential.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>2.0.0</Version>
<Version>9.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 9 additions & 3 deletions src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<PackageId>$(AssemblyName)</PackageId>
<Version>4.14.21</Version>
<Version>9.0.0</Version>
<Authors>JusterZhu</Authors>
<Company>juster.zhu</Company>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ApplicationIcon>GeneralUpdate.ico</ApplicationIcon>
<PackageIcon>GeneralUpdate.ico</PackageIcon>
<PackageIcon>GeneralUpdate.png</PackageIcon>
<Copyright>Copyright © 2024 JusterZhu. All rights reserved.</Copyright>
<Description>This section describes how to upgrade client applications.</Description>
<PackageReleaseNotes>Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features.</PackageReleaseNotes>
Expand All @@ -21,7 +21,7 @@
<Title>GeneralUpdate.Core</Title>
<PackageLicenseUrl>https://github.com/GeneralLibrary/GeneralUpdate?tab=MIT-1-ov-file#readme</PackageLicenseUrl>
<RepositoryType>public</RepositoryType>
<PackageTags>upgrade</PackageTags>
<PackageTags>upgrade,update</PackageTags>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>
<ItemGroup>
Expand All @@ -33,4 +33,10 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Update="GeneralUpdate.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
Binary file added src/c#/GeneralUpdate.Core/GeneralUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions src/c#/GeneralUpdate.Core/Strategys/WindowsStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,18 @@ public override void StartApp()
{
try
{
var appBowlPath = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? null : CheckPath(_configinfo.InstallPath, _configinfo.Bowl);
var appPath = string.IsNullOrWhiteSpace(appBowlPath) ? CheckPath(_configinfo.InstallPath, _configinfo.MainAppName) : appBowlPath;
if(string.IsNullOrEmpty(appPath))
throw new Exception($"Can't find the app {appPath}!");
var mainAppPath = CheckPath(_configinfo.InstallPath, _configinfo.MainAppName);
if (string.IsNullOrEmpty(mainAppPath))
throw new Exception($"Can't find the app {mainAppPath}!");

Process.Start(appPath);
Process.Start(mainAppPath);

if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
var bowlAppPath = CheckPath(_configinfo.InstallPath, _configinfo.Bowl);
if (!string.IsNullOrEmpty(bowlAppPath))
Process.Start(bowlAppPath);
}
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ApplicationIcon>GeneralUpdate.ico</ApplicationIcon>
<PackageIcon>GeneralUpdate.ico</PackageIcon>
<PackageIcon>GeneralUpdate.png</PackageIcon>
<RepositoryUrl>https://github.com/JusterZhu/GeneralUpdate</RepositoryUrl>
<Description>The binary differential update function is provided, but the configuration file update function is reserved.</Description>
<Authors>JusterZhu</Authors>
<Version>1.4.3</Version>
<Version>9.0.0</Version>
<PackageProjectUrl>https://github.com/GeneralLibrary/GeneralUpdate</PackageProjectUrl>
<Copyright>Copyright © 2024 JusterZhu. All rights reserved.</Copyright>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<Title>GeneralUpdate.Differential</Title>
<PackageLicenseUrl>https://github.com/GeneralLibrary/GeneralUpdate?tab=MIT-1-ov-file#readme</PackageLicenseUrl>
<RepositoryType>public</RepositoryType>
<PackageTags>upgrade</PackageTags>
<PackageTags>upgrade,update</PackageTags>
<PackageReleaseNotes>The binary differential update function is provided, but the configuration file update function is reserved.</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>
Expand All @@ -31,4 +31,11 @@
</None>
</ItemGroup>

<ItemGroup>
<None Update="GeneralUpdate.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/c#/Generalupdate.CatBowl/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text;
using System.Reflection;
using System.Text;
using GeneralUpdate.Bowl;
using GeneralUpdate.Bowl.Strategys;

Expand Down

0 comments on commit fc2d323

Please sign in to comment.