Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #16 from H1emu/dev
Browse files Browse the repository at this point in the history
Release/1.5.0
  • Loading branch information
QuentinGruber authored Apr 18, 2021
2 parents 0fc0266 + 7e7d4a5 commit cb0c61b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 18 deletions.
28 changes: 19 additions & 9 deletions H1emu/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:H1emu"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="H1emu v1.4.0"
Title="H1emu v1.5.0"
Width="800"
Height="550"
Icon="img/EmuIco_By_ZamZam.ico"
Expand Down Expand Up @@ -62,11 +62,16 @@
<Button
Margin="0,20,0,0"
Padding="5,10,5,10"
Click="ApplyPatch_OnClick"
Click="ApplyPatch2015_OnClick"
FontFamily="Unispace"
FontSize="18">
Apply Patch
</Button>
FontSize="18" Content="Apply 2015 Patch"/>
<Button
IsEnabled="False"
Margin="0,20,0,0"
Padding="5,10,5,10"
Click="ApplyPatch2016_OnClick"
FontFamily="Unispace"
FontSize="18" Content="Apply 2016 Patch"/>
<Button
Margin="0,20,0,0"
Padding="5,10,5,10"
Expand All @@ -92,11 +97,16 @@
<Button
Margin="0,20,0,0"
Padding="5,10,5,10"
Click="LaunchServer_OnClick"
Click="LaunchServer2015_OnClick"
FontFamily="Unispace"
FontSize="18">
Launch Solo Server
</Button>
FontSize="18" Content="Launch 2015 Solo Server"/>
<Button
IsEnabled="False"
Margin="0,20,0,0"
Padding="5,10,5,10"
Click="LaunchServer2016_OnClick"
FontFamily="Unispace"
FontSize="18" Content="Launch 2016 Solo Server"/>
<Button
Margin="0,20,0,0"
Padding="5,10,5,10"
Expand Down
54 changes: 47 additions & 7 deletions H1emu/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ static async Task GetLatestOnlineVersion(String localeVersion)
private string ServerFilesPath = "./H1emuServersFiles/h1z1-server-QuickStart-master";
private string ServerFilesRepo = "https://github.com/H1emu/h1z1-server-QuickStart/archive/master.zip";

private void LaunchServer_OnClick(object sender, RoutedEventArgs e)
private void LaunchServer2015_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "cmd.exe";
info.RedirectStandardInput = true;
info.UseShellExecute = false;

p.StartInfo = cmdShell;
p.Start();
Expand All @@ -78,6 +82,23 @@ private void LaunchServer_OnClick(object sender, RoutedEventArgs e)
}
}

private void LaunchServer2016_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();

p.StartInfo = cmdShell;
p.Start();

using (StreamWriter sw = p.StandardInput)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("cd " + ServerFilesPath);
sw.WriteLine("npm run start-2016");
}
}
}

private void InstallNodejs_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();
Expand All @@ -96,7 +117,7 @@ private void InstallNodejs_OnClick(object sender, RoutedEventArgs e)
}
}

private void ApplyPatch_OnClick(object sender, RoutedEventArgs e)
private void ApplyPatch2015_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();

Expand All @@ -107,11 +128,30 @@ private void ApplyPatch_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("curl --output dinput8.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/dinput8.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output msvcp140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/msvcp140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output ucrtbased.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/ucrtbased.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140_1d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/vcruntime140_1d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/vcruntime140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output dinput8.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/15jan2015/dinput8.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output msvcp140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/15jan2015/msvcp140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output ucrtbased.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/15jan2015/ucrtbased.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140_1d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/15jan2015/vcruntime140_1d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/15jan2015/vcruntime140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
}
}
}

private void ApplyPatch2016_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();

p.StartInfo = cmdShell;
p.Start();
using (StreamWriter sw = p.StandardInput)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("curl --output dinput8.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/22dec2016/dinput8.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output msvcp140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/22dec2016/msvcp140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output ucrtbased.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/22dec2016/ucrtbased.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140_1d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/22dec2016/vcruntime140_1d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl --output vcruntime140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patches/22dec2016/vcruntime140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions H1emu/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 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.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]

0 comments on commit cb0c61b

Please sign in to comment.