aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Updater
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-05-28 12:37:00 -0700
committerGitHub <[email protected]>2017-05-28 12:37:00 -0700
commit771c20cfb3a703e0f1550fdcf9eb07b78298c944 (patch)
tree59cb532e15ebff313fdba2be264d78ec0033f407 /ShiftOS.Updater
parent496b0cbf8659c99203f48210fd39c572400ae623 (diff)
parentc7ba7d733c756d196f98dd4533289a1ef4db715f (diff)
downloadshiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.gz
shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.bz2
shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.zip
Merge pull request #1 from shiftos-game/master
welp, no longer a dev.
Diffstat (limited to 'ShiftOS.Updater')
-rw-r--r--ShiftOS.Updater/App.config18
-rw-r--r--ShiftOS.Updater/Program.cs32
-rw-r--r--ShiftOS.Updater/Properties/AssemblyInfo.cs36
-rw-r--r--ShiftOS.Updater/ShiftOS.Updater.csproj66
4 files changed, 152 insertions, 0 deletions
diff --git a/ShiftOS.Updater/App.config b/ShiftOS.Updater/App.config
new file mode 100644
index 0000000..757ddce
--- /dev/null
+++ b/ShiftOS.Updater/App.config
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+ </startup>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.1000.0" newVersion="3.0.1000.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/ShiftOS.Updater/Program.cs b/ShiftOS.Updater/Program.cs
new file mode 100644
index 0000000..df41492
--- /dev/null
+++ b/ShiftOS.Updater/Program.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ShiftOS.Updater
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ if (Directory.Exists("updater-work"))
+ {
+ //Give the engine time to shutdown before invoking this app.
+ Thread.Sleep(5000);
+ foreach (var f in Directory.GetFiles("updater-work"))
+ {
+ var bytes = File.ReadAllBytes(f);
+ var finf = new FileInfo(f);
+ File.WriteAllBytes(finf.Name, bytes);
+ }
+ Directory.Delete("updater-work", true);
+ }
+
+ //Restart the actual game.
+ System.Diagnostics.Process.Start("ShiftOS.WinForms.exe");
+ }
+ }
+}
diff --git a/ShiftOS.Updater/Properties/AssemblyInfo.cs b/ShiftOS.Updater/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..74602cb
--- /dev/null
+++ b/ShiftOS.Updater/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ShiftOS.Updater")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ShiftOS.Updater")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("36bc512f-6fd4-4139-aed7-565fc8d5bcbc")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ShiftOS.Updater/ShiftOS.Updater.csproj b/ShiftOS.Updater/ShiftOS.Updater.csproj
new file mode 100644
index 0000000..70d8263
--- /dev/null
+++ b/ShiftOS.Updater/ShiftOS.Updater.csproj
@@ -0,0 +1,66 @@
+<?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>{36BC512F-6FD4-4139-AED7-565FC8D5BCBC}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ShiftOS.Updater</RootNamespace>
+ <AssemblyName>ShiftOS.Updater</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.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ShiftOS.WinForms\ShiftOS.WinForms.csproj">
+ <Project>{2295d2e2-3a00-4e02-b66f-b961ac329fe6}</Project>
+ <Name>ShiftOS.WinForms</Name>
+ </ProjectReference>
+ </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> \ No newline at end of file