Skip to content

Commit

Permalink
Added auto update
Browse files Browse the repository at this point in the history
TODO
test appvayor
add Audio export
  • Loading branch information
EX3exp committed Sep 23, 2024
1 parent 1992554 commit 9aa82bc
Show file tree
Hide file tree
Showing 17 changed files with 601 additions and 174 deletions.
3 changes: 1 addition & 2 deletions Mirivoice.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Serilog;
using System;
using System.Text;
using Velopack;

namespace Mirivoice.Desktop;

class Program
Expand All @@ -17,7 +17,6 @@ class Program
[STAThread]
public static void Main(string[] args)
{
VelopackApp.Build().Run();

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
InitLogging();
Expand Down
24 changes: 16 additions & 8 deletions Mirivoice/Assets/Lang/strings-en-US.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@


<system:String x:Key="updater.title">Update Checker</system:String>
<system:String x:Key="updater.description">TTS Platform for everybody</system:String>
<system:String x:Key="updater.github">Go to GitHub</system:String>
<system:String x:Key="updater.description">An Universal TTS Platform</system:String>
<system:String x:Key="updater.status.available">Mirivoice v{0} is available!</system:String>
<system:String x:Key="updater.status.checking">Checking for Updates...</system:String>
<system:String x:Key="updater.status.notavailable">(Latest)</system:String>
<system:String x:Key="updater.status.unknown">Failed to check for updates. Please check your network connection.</system:String>
<system:String x:Key="updater.status.unknown">Update Checking Failed...</system:String>
<system:String x:Key="updater.update">Update</system:String>


<system:String x:Key="app.update.beforeExit">MiriVoice will be Rebooted after Updated. Current Project File is not saved. Do you want to save?</system:String>

<!-- Menu -->
<!--files...-->
<system:String x:Key="menu.files.title">Files</system:String>

<system:String x:Key="menu.files.open">Open...</system:String>
<system:String x:Key="menu.files.recent">Recent...</system:String>
<system:String x:Key="menu.files.openFailed">An Error occured during open file. Please Check Log file for more informations.</system:String>
<system:String x:Key="menu.files.recent.openFailed">Selected Recent file not exists. It seems to be already removed from your disk.</system:String>
<system:String x:Key="menu.files.openFailed">An Error occured during open file.
Please Check Log file for more informations.</system:String>
<system:String x:Key="menu.files.recent.openFailed">Selected Recent file not exists.
It seems to be already removed from your disk.</system:String>
<system:String x:Key="menu.files.save">Save</system:String>
<system:String x:Key="menu.files.saveas">Save As...</system:String>
<system:String x:Key="menu.files.new">New</system:String>
Expand Down Expand Up @@ -69,7 +68,15 @@

<!--editor body 1 -->
<system:String x:Key="editor.input.mult.title">Lines Input</system:String>
<system:String x:Key="editor.input.mult.desc">Input your texts here. You can input multiple Lines by pressing Enter twice. You can change Voicer using [Voicer nickname] (Style). e.g: [MIri] (normal)</system:String>
<system:String x:Key="editor.input.mult.desc">You can input multiple Lines here, separating each lines with "Enter" key.
You can Change Voicer with:
[Voicer nickname] (Style)
- Your lines here -

Example:
안녕하세요!
[미리] (bright)
날씨가 좋네요! </system:String>
<system:String x:Key="editor.input.mult.placeholder">Input your Lines here... </system:String>
<system:String x:Key="editor.input.mult.lineCount">Lines: {0}</system:String>

Expand All @@ -88,4 +95,5 @@
<system:String x:Key="gprefs.lang.ko">한국어</system:String>

<system:String x:Key="gprefs.clearcacheonquit">Clear Caches On Quit</system:String>
<system:String x:Key="gprefs.usebeta">Use Beta Version</system:String>
</ResourceDictionary>
Binary file added Mirivoice/Assets/logo-updater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion Mirivoice/Mirivoice.Core/Format/RecentFIles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using R3;
using ReactiveUI;
using Mirivoice.Mirivoice.Core.Format;
using Mirivoice.ViewModels;
using Avalonia.Controls;

namespace Mirivoice.Mirivoice.Core.Managers
Expand Down
5 changes: 3 additions & 2 deletions Mirivoice/Mirivoice.Core/Format/UserSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public partial class UserSetting
public Version Version { get; set; } = new Version(1, 0);
public string Langcode { get; set; } = "en-US"; // ui language
public bool ClearCacheOnQuit { get; set; } = false;
//public bool UseBeta { get; set; } = true;

public bool UseBeta { get; set; } = true;
public string SkipUpdate { get; set; } = "";

public void Save()
{
// save to file
Expand Down
7 changes: 2 additions & 5 deletions Mirivoice/Mirivoice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.19.2" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="NetSparkleUpdater.UI.Avalonia" Version="2.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="R3Extensions.Avalonia" Version="1.2.8" />
<PackageReference Include="ReactiveHistory" Version="0.10.7" />
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Velopack" Version="0.0.610" />
<PackageReference Include="Velopack.Build" Version="0.0.610">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="VYaml" Version="0.27.1" />
</ItemGroup>

Expand Down
73 changes: 73 additions & 0 deletions Mirivoice/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions Mirivoice/Resources/Resources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Unzipper" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Unzipper.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
Binary file added Mirivoice/Resources/Unzipper.exe
Binary file not shown.
Loading

0 comments on commit 9aa82bc

Please sign in to comment.