diff --git a/AppInstallerReset.sln b/AppInstallerReset.sln index d11f8d7..60dd354 100644 --- a/AppInstallerReset.sln +++ b/AppInstallerReset.sln @@ -42,6 +42,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "priformatcli", "priformatcl {EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{512BF866-1AA0-4169-A7D6-D2776B5D731E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -160,6 +162,18 @@ Global {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x64.Build.0 = Release|x64 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.ActiveCfg = Release|Win32 {33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Release|x86.Build.0 = Release|Win32 + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.ActiveCfg = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x64.Build.0 = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.ActiveCfg = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Debug|x86.Build.0 = Debug|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|Any CPU.Build.0 = Release|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.ActiveCfg = Release|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x64.Build.0 = Release|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.ActiveCfg = Release|Any CPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Update/Program.cs b/Update/Program.cs new file mode 100644 index 0000000..6a6d5a3 --- /dev/null +++ b/Update/Program.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using System.Diagnostics; +using System.IO; +using System.Text; + +namespace Update +{ + static class Program + { + static string EscapeArgument (string arg) + { + if (arg.Length == 0) return "\"\""; + bool needQuotes = arg.Any (char.IsWhiteSpace) || arg.Contains ('"'); + if (!needQuotes) return arg; + var sb = new StringBuilder (); + sb.Append ('"'); + int backslashes = 0; + foreach (char c in arg) + { + if (c == '\\') + { + backslashes++; + } + else if (c == '"') + { + sb.Append ('\\', backslashes * 2 + 1); + sb.Append ('"'); + backslashes = 0; + } + else + { + sb.Append ('\\', backslashes); + sb.Append (c); + backslashes = 0; + } + } + sb.Append ('\\', backslashes * 2); + sb.Append ('"'); + return sb.ToString (); + } + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main (string [] args) + { + Process p = new Process (); + p.StartInfo.FileName = Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "settings.exe"); + var arguments = new List + { + "appinstaller", + "update" + }; + arguments.AddRange (args); + p.StartInfo.Arguments = string.Join (" ", arguments.Select (EscapeArgument)); + p.Start (); + p.WaitForExit (); + int exitCode = p.ExitCode; + } + } +} diff --git a/Update/Project1.ico b/Update/Project1.ico new file mode 100644 index 0000000..7d52dd4 Binary files /dev/null and b/Update/Project1.ico differ diff --git a/Update/Properties/AssemblyInfo.cs b/Update/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5e63a9a --- /dev/null +++ b/Update/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle ("Update")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("Update")] +[assembly: AssemblyCopyright ("Copyright © 2026")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible (false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid ("512bf866-1aa0-4169-a7d6-d2776b5d731e")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ("1.0.0.0")] +[assembly: AssemblyFileVersion ("1.0.0.0")] diff --git a/Update/Properties/Resources.Designer.cs b/Update/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2d99d76 --- /dev/null +++ b/Update/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace Update.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute ("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute ()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute ()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute ("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources () + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager ("Update.Properties.Resources", typeof (Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 覆盖当前线程的 CurrentUICulture 属性 + /// 使用此强类型的资源类的资源查找。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Update/Properties/Resources.resx b/Update/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Update/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Update/Properties/Settings.Designer.cs b/Update/Properties/Settings.Designer.cs new file mode 100644 index 0000000..78fd36d --- /dev/null +++ b/Update/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Update.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute ()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute ("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings: global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized (new Settings ()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Update/Properties/Settings.settings b/Update/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Update/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Update/Update.csproj b/Update/Update.csproj new file mode 100644 index 0000000..312ce70 --- /dev/null +++ b/Update/Update.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {512BF866-1AA0-4169-A7D6-D2776B5D731E} + WinExe + Properties + Update + Update + v4.0 + 512 + + + AnyCPU + true + full + false + ..\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\Release\ + TRACE + prompt + 4 + + + + + Project1.ico + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff --git a/shared/Update.Assets/150x150Logo.png b/shared/Update.Assets/150x150Logo.png new file mode 100644 index 0000000..4f31716 Binary files /dev/null and b/shared/Update.Assets/150x150Logo.png differ diff --git a/shared/Update.Assets/150x150Logo.scale-100.png b/shared/Update.Assets/150x150Logo.scale-100.png new file mode 100644 index 0000000..4f31716 Binary files /dev/null and b/shared/Update.Assets/150x150Logo.scale-100.png differ diff --git a/shared/Update.Assets/150x150Logo.scale-140.png b/shared/Update.Assets/150x150Logo.scale-140.png new file mode 100644 index 0000000..ff88eec Binary files /dev/null and b/shared/Update.Assets/150x150Logo.scale-140.png differ diff --git a/shared/Update.Assets/150x150Logo.scale-180.png b/shared/Update.Assets/150x150Logo.scale-180.png new file mode 100644 index 0000000..775e06a Binary files /dev/null and b/shared/Update.Assets/150x150Logo.scale-180.png differ diff --git a/shared/Update.Assets/150x150Logo.scale-80.png b/shared/Update.Assets/150x150Logo.scale-80.png new file mode 100644 index 0000000..993391c Binary files /dev/null and b/shared/Update.Assets/150x150Logo.scale-80.png differ diff --git a/shared/Update.Assets/70x70Logo.png b/shared/Update.Assets/70x70Logo.png new file mode 100644 index 0000000..49d947e Binary files /dev/null and b/shared/Update.Assets/70x70Logo.png differ diff --git a/shared/Update.Assets/70x70Logo.scale-100.png b/shared/Update.Assets/70x70Logo.scale-100.png new file mode 100644 index 0000000..49d947e Binary files /dev/null and b/shared/Update.Assets/70x70Logo.scale-100.png differ diff --git a/shared/Update.Assets/70x70Logo.scale-140.png b/shared/Update.Assets/70x70Logo.scale-140.png new file mode 100644 index 0000000..028b61a Binary files /dev/null and b/shared/Update.Assets/70x70Logo.scale-140.png differ diff --git a/shared/Update.Assets/70x70Logo.scale-180.png b/shared/Update.Assets/70x70Logo.scale-180.png new file mode 100644 index 0000000..7e05087 Binary files /dev/null and b/shared/Update.Assets/70x70Logo.scale-180.png differ diff --git a/shared/Update.Assets/70x70Logo.scale-80.png b/shared/Update.Assets/70x70Logo.scale-80.png new file mode 100644 index 0000000..834640a Binary files /dev/null and b/shared/Update.Assets/70x70Logo.scale-80.png differ diff --git a/shared/Update.VisualElementsManifest.xml b/shared/Update.VisualElementsManifest.xml new file mode 100644 index 0000000..170ecda --- /dev/null +++ b/shared/Update.VisualElementsManifest.xml @@ -0,0 +1,4 @@ + + + +