Browse Source

创建可用于更新模块的更新工具(创建模型)

yuzhengyang 8 years ago
parent
commit
b007d9ef30

+ 21 - 10
Fork.Net/Fork.Net.sln

@@ -53,7 +53,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.CleverDog", "Oreo.Clev
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.PCMonitor", "Oreo.PCMonitor\Oreo.PCMonitor.csproj", "{1CEE1934-4969-4FE2-9DB0-C98633313DAF}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.PCMonitor", "Oreo.PCMonitor\Oreo.PCMonitor.csproj", "{1CEE1934-4969-4FE2-9DB0-C98633313DAF}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.Update", "Oreo.Update\Oreo.Update.csproj", "{C0DF37F7-296F-4D65-8987-51C016CD844A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.VersionUpdate", "Oreo.VersionUpdate\Oreo.VersionUpdate.csproj", "{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.VersionBuilder", "Oreo.VersionBuilder\Oreo.VersionBuilder.csproj", "{D167CAD1-2E8B-40FF-A953-96008004BB76}"
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -213,14 +215,22 @@ Global
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|Any CPU.Build.0 = Release|Any CPU
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|Any CPU.Build.0 = Release|Any CPU
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|x86.ActiveCfg = Release|Any CPU
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|x86.ActiveCfg = Release|Any CPU
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|x86.Build.0 = Release|Any CPU
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF}.Release|x86.Build.0 = Release|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Debug|x86.Build.0 = Debug|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Release|x86.ActiveCfg = Release|Any CPU
-		{C0DF37F7-296F-4D65-8987-51C016CD844A}.Release|x86.Build.0 = Release|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Debug|x86.Build.0 = Debug|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Release|x86.ActiveCfg = Release|Any CPU
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}.Release|x86.Build.0 = Release|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Debug|x86.Build.0 = Debug|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Release|x86.ActiveCfg = Release|Any CPU
+		{D167CAD1-2E8B-40FF-A953-96008004BB76}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE
@@ -244,6 +254,7 @@ Global
 		{82B0FE94-1339-42C8-953F-E400CF9F1FF2} = {A89FC45A-A907-4487-8719-114530A62684}
 		{82B0FE94-1339-42C8-953F-E400CF9F1FF2} = {A89FC45A-A907-4487-8719-114530A62684}
 		{A7365B83-32FF-4B92-8C80-A450AC92007F} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 		{A7365B83-32FF-4B92-8C80-A450AC92007F} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 		{1CEE1934-4969-4FE2-9DB0-C98633313DAF} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
-		{C0DF37F7-296F-4D65-8987-51C016CD844A} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
+		{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
+		{D167CAD1-2E8B-40FF-A953-96008004BB76} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 	EndGlobalSection
 	EndGlobalSection
 EndGlobal
 EndGlobal

+ 0 - 13
Fork.Net/Oreo.Update/Models/VersionFile.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Oreo.Update.Models
-{
-    public class VersionFile
-    {
-        public string File { get; set; }
-    }
-}

+ 0 - 14
Fork.Net/Oreo.Update/Models/VersionModel.cs

@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Oreo.Update.Models
-{
-    public class VersionModel
-    {
-        public string Version { get; set; }
-        public string ServerPath { get; set; }
-    }
-}

Fork.Net/Oreo.Update/App.config → Fork.Net/Oreo.VersionBuilder/App.config


+ 39 - 0
Fork.Net/Oreo.VersionBuilder/Form1.Designer.cs

@@ -0,0 +1,39 @@
+namespace Oreo.VersionBuilder
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "Form1";
+        }
+
+        #endregion
+    }
+}
+

+ 20 - 0
Fork.Net/Oreo.VersionBuilder/Form1.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Oreo.VersionBuilder
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 73 - 0
Fork.Net/Oreo.VersionBuilder/Models/VersionModel.cs

@@ -0,0 +1,73 @@
+namespace Oreo.VersionBuilder.Models
+{
+    public class VersionModel
+    {
+        /// <summary>
+        /// 更新代号
+        /// </summary>
+        public string CodeName { get; set; }
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        public string VersionNumber { get; set; }
+        /// <summary>
+        /// 版本描述
+        /// </summary>
+        public string VersionDesc { get; set; }
+        /// <summary>
+        /// 服务器客户端文件根目录
+        /// </summary>
+        public string ServerPath { get; set; }
+        /// <summary>
+        /// 更新前 关闭进程
+        /// </summary>
+        public string[] BeforeUpdateKillProcess { get; set; }
+        /// <summary>
+        /// 更新前 启动进程
+        /// </summary>
+        public string[] BeforeUpdateStartProcess { get; set; }
+        /// <summary>
+        /// 更新后 关闭进程
+        /// </summary>
+        public string[] AfterUpdateKillProcess { get; set; }
+        /// <summary>
+        /// 更新后 启动金城
+        /// </summary>
+        public string[] AfterUpdateStartProcess { get; set; }
+        /// <summary>
+        /// 文件列表
+        /// </summary>
+        public VersionFile[] FileList { get; set; }
+        /// <summary>
+        /// 属于插件(用于更新插件清单)
+        /// </summary>
+        public bool IsPlugin { get; set; }
+        /// <summary>
+        /// 插件名称
+        /// </summary>
+        public string PluginName { get; set; }
+        /// <summary>
+        /// 插件运行入口
+        /// </summary>
+        public string PluginEntry { get; set; }
+    }
+    public class VersionFile
+    {
+        /// <summary>
+        /// 服务器根目录下文件相对位置
+        /// </summary>
+        public string ServerFile { get; set; }
+        /// <summary>
+        /// 更新到本地位置(绝对位置 或 相对于更新程序位置)
+        /// </summary>
+        public string LocalFile { get; set; }
+        /// <summary>
+        /// 文件MD5验证码
+        /// </summary>
+        public string FileMD5 { get; set; }
+        /// <summary>
+        /// 删除文件(用于清理冗余)
+        /// </summary>
+        public bool Delete { get; set; }
+    }
+}

+ 88 - 0
Fork.Net/Oreo.VersionBuilder/Oreo.VersionBuilder.csproj

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D167CAD1-2E8B-40FF-A953-96008004BB76}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Oreo.VersionBuilder</RootNamespace>
+    <AssemblyName>Oreo.VersionBuilder</AssemblyName>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Models\VersionModel.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 22 - 0
Fork.Net/Oreo.VersionBuilder/Program.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Oreo.VersionBuilder
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 36 - 0
Fork.Net/Oreo.VersionBuilder/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Oreo.VersionBuilder")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Oreo.VersionBuilder")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("d167cad1-2e8b-40ff-a953-96008004bb76")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
Fork.Net/Oreo.VersionBuilder/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Oreo.VersionBuilder.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 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()
+        {
+        }
+
+        /// <summary>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [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("Oreo.VersionBuilder.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   覆盖当前线程的 CurrentUICulture 属性
+        ///   使用此强类型的资源类的资源查找。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

Fork.Net/Oreo.Update/Properties/Resources.resx → Fork.Net/Oreo.VersionBuilder/Properties/Resources.resx


+ 30 - 0
Fork.Net/Oreo.VersionBuilder/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     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.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Oreo.VersionBuilder.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;
+            }
+        }
+    }
+}

Fork.Net/Oreo.Update/Properties/Settings.settings → Fork.Net/Oreo.VersionBuilder/Properties/Settings.settings


+ 6 - 0
Fork.Net/Oreo.VersionUpdate/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+    </startup>
+</configuration>

+ 39 - 0
Fork.Net/Oreo.VersionUpdate/Form1.Designer.cs

@@ -0,0 +1,39 @@
+namespace Oreo.VersionUpdate
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Text = "Form1";
+        }
+
+        #endregion
+    }
+}
+

+ 20 - 0
Fork.Net/Oreo.VersionUpdate/Form1.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Oreo.VersionUpdate
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 73 - 0
Fork.Net/Oreo.VersionUpdate/Models/VersionModel.cs

@@ -0,0 +1,73 @@
+namespace Oreo.VersionUpdate.Models
+{
+    public class VersionModel
+    {
+        /// <summary>
+        /// 更新代号
+        /// </summary>
+        public string CodeName { get; set; }
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        public string VersionNumber { get; set; }
+        /// <summary>
+        /// 版本描述
+        /// </summary>
+        public string VersionDesc { get; set; }
+        /// <summary>
+        /// 服务器客户端文件根目录
+        /// </summary>
+        public string ServerPath { get; set; }
+        /// <summary>
+        /// 更新前 关闭进程
+        /// </summary>
+        public string[] BeforeUpdateKillProcess { get; set; }
+        /// <summary>
+        /// 更新前 启动进程
+        /// </summary>
+        public string[] BeforeUpdateStartProcess { get; set; }
+        /// <summary>
+        /// 更新后 关闭进程
+        /// </summary>
+        public string[] AfterUpdateKillProcess { get; set; }
+        /// <summary>
+        /// 更新后 启动金城
+        /// </summary>
+        public string[] AfterUpdateStartProcess { get; set; }
+        /// <summary>
+        /// 文件列表
+        /// </summary>
+        public VersionFile[] FileList { get; set; }
+        /// <summary>
+        /// 属于插件(用于更新插件清单)
+        /// </summary>
+        public bool IsPlugin { get; set; }
+        /// <summary>
+        /// 插件名称
+        /// </summary>
+        public string PluginName { get; set; }
+        /// <summary>
+        /// 插件运行入口
+        /// </summary>
+        public string PluginEntry { get; set; }
+    }
+    public class VersionFile
+    {
+        /// <summary>
+        /// 服务器根目录下文件相对位置
+        /// </summary>
+        public string ServerFile { get; set; }
+        /// <summary>
+        /// 更新到本地位置(绝对位置 或 相对于更新程序位置)
+        /// </summary>
+        public string LocalFile { get; set; }
+        /// <summary>
+        /// 文件MD5验证码
+        /// </summary>
+        public string FileMD5 { get; set; }
+        /// <summary>
+        /// 删除文件(用于清理冗余)
+        /// </summary>
+        public bool Delete { get; set; }
+    }
+}

+ 9 - 8
Fork.Net/Oreo.Update/Oreo.Update.csproj

@@ -4,11 +4,11 @@
   <PropertyGroup>
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{C0DF37F7-296F-4D65-8987-51C016CD844A}</ProjectGuid>
+    <ProjectGuid>{B48DFBE0-C3D0-4FE7-9F9F-1663FBFC7482}</ProjectGuid>
     <OutputType>WinExe</OutputType>
     <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Oreo.Update</RootNamespace>
-    <AssemblyName>Oreo.Update</AssemblyName>
+    <RootNamespace>Oreo.VersionUpdate</RootNamespace>
+    <AssemblyName>Oreo.VersionUpdate</AssemblyName>
     <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
     <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
@@ -46,7 +46,12 @@
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <Compile Include="Models\VersionFile.cs" />
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
     <Compile Include="Models\VersionModel.cs" />
     <Compile Include="Models\VersionModel.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -72,10 +77,6 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="App.config" />
     <None Include="App.config" />
   </ItemGroup>
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Services\" />
-    <Folder Include="Views\" />
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.

+ 1 - 1
Fork.Net/Oreo.Update/Program.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.Windows.Forms;
 
 
-namespace Oreo.Update
+namespace Oreo.VersionUpdate
 {
 {
     static class Program
     static class Program
     {
     {

+ 3 - 3
Fork.Net/Oreo.Update/Properties/AssemblyInfo.cs

@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
 // 有关程序集的一般信息由以下
 // 有关程序集的一般信息由以下
 // 控制。更改这些特性值可修改
 // 控制。更改这些特性值可修改
 // 与程序集关联的信息。
 // 与程序集关联的信息。
-[assembly: AssemblyTitle("Oreo.Update")]
+[assembly: AssemblyTitle("Oreo.VersionUpdate")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Oreo.Update")]
+[assembly: AssemblyProduct("Oreo.VersionUpdate")]
 [assembly: AssemblyCopyright("Copyright ©  2017")]
 [assembly: AssemblyCopyright("Copyright ©  2017")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: AssemblyCulture("")]
@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
 [assembly: ComVisible(false)]
 [assembly: ComVisible(false)]
 
 
 // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
 // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("c0df37f7-296f-4d65-8987-51c016cd844a")]
+[assembly: Guid("b48dfbe0-c3d0-4fe7-9f9f-1663fbfc7482")]
 
 
 // 程序集的版本信息由下列四个值组成: 
 // 程序集的版本信息由下列四个值组成: 
 //
 //

+ 2 - 2
Fork.Net/Oreo.Update/Properties/Resources.Designer.cs

@@ -8,7 +8,7 @@
 // </auto-generated>
 // </auto-generated>
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 
 
-namespace Oreo.Update.Properties
+namespace Oreo.VersionUpdate.Properties
 {
 {
 
 
 
 
@@ -44,7 +44,7 @@ namespace Oreo.Update.Properties
             {
             {
                 if ((resourceMan == null))
                 if ((resourceMan == null))
                 {
                 {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oreo.Update.Properties.Resources", typeof(Resources).Assembly);
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oreo.VersionUpdate.Properties.Resources", typeof(Resources).Assembly);
                     resourceMan = temp;
                     resourceMan = temp;
                 }
                 }
                 return resourceMan;
                 return resourceMan;

+ 117 - 0
Fork.Net/Oreo.VersionUpdate/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?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.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: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" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </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" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 1 - 1
Fork.Net/Oreo.Update/Properties/Settings.Designer.cs

@@ -8,7 +8,7 @@
 // </auto-generated>
 // </auto-generated>
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 
 
-namespace Oreo.Update.Properties
+namespace Oreo.VersionUpdate.Properties
 {
 {
 
 
 
 

+ 7 - 0
Fork.Net/Oreo.VersionUpdate/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>