mirror of
https://github.com/Stone-Red-Code/DiscordCLI.git
synced 2026-09-08 23:39:41 +02:00
Added auto update
This commit is contained in:
Binary file not shown.
@@ -3,8 +3,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
<AssemblyVersion>0.0.3.1</AssemblyVersion>
|
<AssemblyVersion>0.0.4.0</AssemblyVersion>
|
||||||
<FileVersion>0.0.3.1</FileVersion>
|
<FileVersion>0.0.4.0</FileVersion>
|
||||||
|
<Version>0.0.4.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ namespace DiscordCLI
|
|||||||
private InputManager inputManager;
|
private InputManager inputManager;
|
||||||
private OutputManager outputManager;
|
private OutputManager outputManager;
|
||||||
|
|
||||||
private Updater updater = new Updater(new TimeSpan(0), "https://github.com/Stone-Red-Code/DiscordCLI/tree/develop/update/updateInfo.json", "./", true);
|
#if DEBUG
|
||||||
|
private Updater updater = new Updater(new TimeSpan(0), "https://raw.githubusercontent.com/Stone-Red-Code/DiscordCLI/develop/update/updateInfo.json", "./", true);
|
||||||
|
#else
|
||||||
|
private Updater updater = new Updater(new TimeSpan(0), "https://raw.githubusercontent.com/Stone-Red-Code/DiscordCLI/main/update/updateInfo.json", "./", true);
|
||||||
|
#endif
|
||||||
|
|
||||||
public static void Main() => new Program().Setup().GetAwaiter().GetResult();
|
public static void Main() => new Program().Setup().GetAwaiter().GetResult();
|
||||||
|
|
||||||
@@ -31,8 +35,8 @@ namespace DiscordCLI
|
|||||||
updater.UpdateAvailible += Updater_UpdateAvailible;
|
updater.UpdateAvailible += Updater_UpdateAvailible;
|
||||||
updater.NoUpdateAvailible += Updater_NoUpdateAvailible;
|
updater.NoUpdateAvailible += Updater_NoUpdateAvailible;
|
||||||
updater.ProgressChanged += Updater_ProgressChanged;
|
updater.ProgressChanged += Updater_ProgressChanged;
|
||||||
updater.Start();
|
|
||||||
|
|
||||||
|
updater.Start();
|
||||||
await Task.Delay(-1);
|
await Task.Delay(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,13 +97,13 @@ namespace DiscordCLI
|
|||||||
private void Updater_ProgressChanged(long? totalFileSize, long totalBytesDownloaded, double? progressPercentage)
|
private void Updater_ProgressChanged(long? totalFileSize, long totalBytesDownloaded, double? progressPercentage)
|
||||||
{
|
{
|
||||||
Console.CursorLeft = 0;
|
Console.CursorLeft = 0;
|
||||||
ConsoleExt.Write($"Downloading Update: {totalBytesDownloaded}/{totalFileSize} {progressPercentage}", ConsoleColor.Yellow);
|
ConsoleExt.WriteLine($"Downloading Update: {progressPercentage}% {totalBytesDownloaded}/{totalFileSize}", ConsoleColor.Yellow);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Updater_UpdateAvailible(string version, string additionalInformation)
|
private void Updater_UpdateAvailible(string version, string additionalInformation)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"New version avalible! {version}");
|
Console.WriteLine($"New version avalible! {version}");
|
||||||
updater.Start();
|
updater.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Client_MessageCreated(DSharpPlus.EventArgs.MessageCreateEventArgs e)
|
private async Task Client_MessageCreated(DSharpPlus.EventArgs.MessageCreateEventArgs e)
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||||||
-->
|
-->
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<History>True|2021-05-29T15:07:22.9610987Z;True|2021-05-29T16:21:45.0240481+02:00;</History>
|
<History>True|2021-05-29T16:25:28.6698849Z;True|2021-05-29T17:53:55.7039453+02:00;True|2021-05-29T17:07:22.9610987+02:00;True|2021-05-29T16:21:45.0240481+02:00;</History>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
"compilationOptions": {},
|
"compilationOptions": {},
|
||||||
"targets": {
|
"targets": {
|
||||||
".NETCoreApp,Version=v5.0": {
|
".NETCoreApp,Version=v5.0": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"AlwaysUpToDate": "1.0.0.3",
|
"AlwaysUpToDate": "1.0.0.3",
|
||||||
"ColorMineStandard": "1.0.0",
|
"ColorMineStandard": "1.0.0",
|
||||||
@@ -1013,7 +1013,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"libraries": {
|
"libraries": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"serviceable": false,
|
"serviceable": false,
|
||||||
"sha512": ""
|
"sha512": ""
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
"compilationOptions": {},
|
"compilationOptions": {},
|
||||||
"targets": {
|
"targets": {
|
||||||
".NETCoreApp,Version=v5.0": {
|
".NETCoreApp,Version=v5.0": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"AlwaysUpToDate": "1.0.0.3",
|
"AlwaysUpToDate": "1.0.0.3",
|
||||||
"ColorMineStandard": "1.0.0",
|
"ColorMineStandard": "1.0.0",
|
||||||
@@ -1013,7 +1013,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"libraries": {
|
"libraries": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"serviceable": false,
|
"serviceable": false,
|
||||||
"sha512": ""
|
"sha512": ""
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"runtimeOptions": {
|
|
||||||
"additionalProbingPaths": [
|
|
||||||
"C:\\Users\\David\\.dotnet\\store\\|arch|\\|tfm|",
|
|
||||||
"C:\\Users\\David\\.nuget\\packages",
|
|
||||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
|
|
||||||
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"runtimeOptions": {
|
|
||||||
"tfm": "net5.0",
|
|
||||||
"framework": {
|
|
||||||
"name": "Microsoft.NETCore.App",
|
|
||||||
"version": "5.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
"compilationOptions": {},
|
"compilationOptions": {},
|
||||||
"targets": {
|
"targets": {
|
||||||
".NETCoreApp,Version=v5.0": {
|
".NETCoreApp,Version=v5.0": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"AlwaysUpToDate": "1.0.0.3",
|
"AlwaysUpToDate": "1.0.0.3",
|
||||||
"ColorMineStandard": "1.0.0",
|
"ColorMineStandard": "1.0.0",
|
||||||
@@ -1013,7 +1013,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"libraries": {
|
"libraries": {
|
||||||
"DiscordCLI/1.0.0": {
|
"DiscordCLI/0.0.4.0": {
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"serviceable": false,
|
"serviceable": false,
|
||||||
"sha512": ""
|
"sha512": ""
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"runtimeOptions": {
|
|
||||||
"tfm": "net5.0",
|
|
||||||
"framework": {
|
|
||||||
"name": "Microsoft.NETCore.App",
|
|
||||||
"version": "5.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"runtimeOptions": {
|
|
||||||
"tfm": "net5.0",
|
|
||||||
"framework": {
|
|
||||||
"name": "Microsoft.NETCore.App",
|
|
||||||
"version": "5.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,11 +13,11 @@ using System.Reflection;
|
|||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.3.1")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.4.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.4.0")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyProductAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.3.1")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.4.0")]
|
||||||
|
|
||||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
9b99ab83dcda73570f129246f1c0607940ee987c
|
dedb7a4646bba9201d29c4cc7211a4881d770e52
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
|||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj": {
|
"C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "0.0.4",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
"projectUniqueName": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
||||||
"projectName": "DiscordCLI",
|
"projectName": "DiscordCLI",
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ using System.Reflection;
|
|||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.4.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.4.0")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyProductAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DiscordCLI")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("DiscordCLI")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.4.0")]
|
||||||
|
|
||||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
8dbf5d9b5cf6fb65f2290f681f68bfa7a21560cd
|
e7a28f44480e6d7c3cc5ae26796c4ed1fed24767
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5937,7 +5937,7 @@
|
|||||||
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}
|
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}
|
||||||
},
|
},
|
||||||
"project": {
|
"project": {
|
||||||
"version": "1.0.0",
|
"version": "0.0.4",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
"projectUniqueName": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
||||||
"projectName": "DiscordCLI",
|
"projectName": "DiscordCLI",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "xN3R9JWvaILB1RFf8ZjeIPjgIebiqc6JTEiUoqzxRfWNpvvikqipFUp/rsvByUHMKTc8/bP4JPTnC3EWatCf8w==",
|
"dgSpecHash": "sDgX8qm8cSHJ0TDjQxLzYI0BGqd9ZbIQHKZL5+1wc6kCWhLM7an1Y8nmm5tii35pK9ispeNnJ+CPKEl6Y5a2Cg==",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
"projectFilePath": "C:\\Users\\David\\Google Drive\\Programmieren\\DiscordCLI\\src\\DiscordCLI\\DiscordCLI.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Version":"0.0.4.0",
|
"Version":"0.0.4.0",
|
||||||
"FileUrl":"https://github.com/Stone-Red-Code/DiscordCLI/tree/develop/update/DiscordCLI.zip"
|
"FileUrl":"https://raw.githubusercontent.com/Stone-Red-Code/DiscordCLI/develop/update/DiscordCLI.zip"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user