diff options
Diffstat (limited to 'ShiftOS.Updater/Program.cs')
| -rw-r--r-- | ShiftOS.Updater/Program.cs | 32 |
1 files changed, 32 insertions, 0 deletions
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"); + } + } +} |
