Skip to content

Commit

Permalink
AutoUpdaterを搭載した
Browse files Browse the repository at this point in the history
  • Loading branch information
anoyetta committed May 5, 2021
1 parent 6b40db5 commit 9e6dfde
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 40 deletions.
4 changes: 2 additions & 2 deletions ReleaseNote.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.4.0</version>
<url>https://github.com/anoyetta/CeVIOAIProxy/releases/download/v1.0.0.0/CeVIOAIProxy.exe</url>
<changelog>https://github.com/anoyetta/CeVIOAIProxy/releases/tag/v1.0.0.0</changelog>
<url>https://github.com/anoyetta/CeVIOAIProxy/releases/download/v1.0.4.0/CeVIOAIProxy.exe</url>
<changelog>https://github.com/anoyetta/CeVIOAIProxy/releases/tag/v1.0.4.0</changelog>
<mandatory>true</mandatory>
</item>
32 changes: 0 additions & 32 deletions source/CeVIOAIProxy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.31213.239
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CeVIOAIProxy", "CeVIOAIProxy\CeVIOAIProxy.csproj", "{6E4F4DB9-1280-419E-9266-9FECE1629E60}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "CeVIOAIProxy.Package", "CeVIOAIProxy.Package\CeVIOAIProxy.Package.wapproj", "{54D67445-70D1-4AC5-BD3C-52057612A718}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -41,36 +39,6 @@ Global
{6E4F4DB9-1280-419E-9266-9FECE1629E60}.Release|x64.Build.0 = Release|Any CPU
{6E4F4DB9-1280-419E-9266-9FECE1629E60}.Release|x86.ActiveCfg = Release|Any CPU
{6E4F4DB9-1280-419E-9266-9FECE1629E60}.Release|x86.Build.0 = Release|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM.ActiveCfg = Debug|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM.Build.0 = Debug|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM.Deploy.0 = Debug|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM64.ActiveCfg = Debug|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM64.Build.0 = Debug|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|ARM64.Deploy.0 = Debug|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x64.ActiveCfg = Debug|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x64.Build.0 = Debug|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x64.Deploy.0 = Debug|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x86.ActiveCfg = Debug|x86
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x86.Build.0 = Debug|x86
{54D67445-70D1-4AC5-BD3C-52057612A718}.Debug|x86.Deploy.0 = Debug|x86
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|Any CPU.Build.0 = Release|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|Any CPU.Deploy.0 = Release|Any CPU
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM.ActiveCfg = Release|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM.Build.0 = Release|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM.Deploy.0 = Release|ARM
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM64.ActiveCfg = Release|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM64.Build.0 = Release|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|ARM64.Deploy.0 = Release|ARM64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x64.ActiveCfg = Release|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x64.Build.0 = Release|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x64.Deploy.0 = Release|x64
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x86.ActiveCfg = Release|x86
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x86.Build.0 = Release|x86
{54D67445-70D1-4AC5-BD3C-52057612A718}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
25 changes: 25 additions & 0 deletions source/CeVIOAIProxy/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System;
using System.IO;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Threading;
using AutoUpdaterDotNET;
using CeVIOAIProxy.Servers;

namespace CeVIOAIProxy
Expand Down Expand Up @@ -36,6 +38,8 @@ private void App_Startup(object sender, StartupEventArgs e)

this.server = new CAPTcpServer();
this.server.Open(c.TcpServerPort);

this.RunAutoUpdater();
}

private void App_Exit(object sender, ExitEventArgs e)
Expand Down Expand Up @@ -102,5 +106,26 @@ await Task.Run(() =>
GC.SuppressFinalize(this);
this.Shutdown(1);
}

private void RunAutoUpdater()
{
var updaterJson = Path.Combine(
AppContext.BaseDirectory,
"CeVIOAIProxy.AutoUpdater.json");

#if DEBUG
if (File.Exists(updaterJson))
{
File.Delete(updaterJson);
}
#endif

AutoUpdater.PersistenceProvider = new JsonFilePersistenceProvider(updaterJson);

AutoUpdater.ShowSkipButton = false;
AutoUpdater.Start(
"https://raw.githubusercontent.com/anoyetta/CeVIOAIProxy/main/ReleaseNote.xml",
Assembly.GetExecutingAssembly());
}
}
}
7 changes: 4 additions & 3 deletions source/CeVIOAIProxy/CeVIOAIProxy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
<AssemblyOriginatorKeyFile>CeVIOAIProxy.pfx</AssemblyOriginatorKeyFile>
<Authors>anoyetta</Authors>
<Copyright>(c) 2021 anoyetta</Copyright>
<AssemblyVersion>1.0.3.0</AssemblyVersion>
<AssemblyVersion>1.0.4.0</AssemblyVersion>
<PackageIcon>share.ico</PackageIcon>
<PackageIconUrl />
<PackageProjectUrl>https://github.com/anoyetta/CeVIOAIProxy</PackageProjectUrl>
<RepositoryUrl>https://github.com/anoyetta/CeVIOAIProxy.git</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<Version>1.0.3</Version>
<Version>1.0.4</Version>
<StartupObject>CeVIOAIProxy.App</StartupObject>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -40,6 +41,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autoupdater.NET.Official" Version="1.6.4" />
<PackageReference Include="Costura.Fody" Version="5.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -50,7 +52,6 @@
<PackageReference Include="MahApps.Metro.IconPacks" Version="4.8.0" />
<PackageReference Include="MaterialDesignThemes.MahApps" Version="0.1.6" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" />
<PackageReference Include="Nancy" Version="2.0.0" />
<PackageReference Include="Nancy.Hosting.Self" Version="2.0.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
Expand Down
6 changes: 3 additions & 3 deletions source/CeVIOAIProxy/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Weavers
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura
IncludeDebugSymbols="false" />
</Weavers>

0 comments on commit 9e6dfde

Please sign in to comment.