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

Commit

Permalink
remove useless curl args / bugfix & updt copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGruber committed Jan 5, 2021
1 parent b87fe57 commit 9582595
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 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:H1Z1_server"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="H1emu v1.2.1"
Title="H1emu v1.2.2"
Width="800"
Height="550"
Icon="img/EmuIco_By_ZamZam.ico"
Expand Down Expand Up @@ -129,7 +129,7 @@
HorizontalAlignment="Center"
FontSize="9"
Foreground="White"
Text="Copyright (C) 2020 Quentin Gruber" />
Text="Copyright (C) 2021 H1emu community" />
</StackPanel>

</Grid>
Expand Down
31 changes: 16 additions & 15 deletions H1emu/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ private void LaunchServer_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("cd "+ServerFilesPath);
sw.WriteLine("cd " + ServerFilesPath);
sw.WriteLine("npm start");
}
}
}

private void InstallNodejs_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();
Expand Down Expand Up @@ -76,16 +76,16 @@ private void ApplyPatch_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --output dinput8.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/dinput8.dll?"+ new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --output msvcp140d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/msvcp140d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --output ucrtbased.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/ucrtbased.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --output vcruntime140_1d.dll https://h1emu.s3.eu-west-3.amazonaws.com/patch/vcruntime140_1d.dll?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --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/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());
}
}
}


private void LaunchH1Z1_OnClick(object sender, RoutedEventArgs e)
{
Process p = new Process();
Expand Down Expand Up @@ -121,22 +121,22 @@ private void UpdtServer_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("cd "+ServerFilesPath);
sw.WriteLine("cd " + ServerFilesPath);
sw.WriteLine("npm update");
}
}
}

private void InstallServer_OnClick(object sender, RoutedEventArgs e)
{
Process p1 = new Process();
Process p2 = new Process();

ProcessStartInfo cmdShell = new ProcessStartInfo();
cmdShell.FileName = "cmd.exe";
cmdShell.RedirectStandardInput = true;
cmdShell.UseShellExecute = false;

ProcessStartInfo powershellShell = new ProcessStartInfo();
powershellShell.FileName = "powershell.exe";
powershellShell.RedirectStandardInput = true;
Expand All @@ -149,8 +149,9 @@ private void InstallServer_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("del /f h1z1-server-QuickStart-master.zip"); // just in case of corrupted archive
sw.WriteLine("rd /s /q H1emuServersFiles");
sw.WriteLine("curl -LJO -H 'Cache-Control: no-cache' --output h1z1-server-QuickStart-master.zip " + ServerFilesRepo +"?"+ new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());
sw.WriteLine("curl -LJO --output h1z1-server-QuickStart-master.zip " + ServerFilesRepo + "?" + new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds());


}
Expand All @@ -174,8 +175,8 @@ private void InstallServer_OnClick(object sender, RoutedEventArgs e)
{
if (sw.BaseStream.CanWrite)
{
sw.WriteLine("cd "+ServerFilesPath);
sw.WriteLine("npm ci");
sw.WriteLine("cd " + ServerFilesPath);
sw.WriteLine("npm ci");
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions H1emu/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
[assembly: AssemblyTitle("H1emu")]
[assembly: AssemblyDescription("Desktop app to run h1z1 servers")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Gruber Quentin")]
[assembly: AssemblyCompany("H1emu community")]
[assembly: AssemblyProduct("H1emu")]
[assembly: AssemblyCopyright("Copyright (C) 2020 Quentin Gruber")]
[assembly: AssemblyCopyright("Copyright (C) 2021 H1emu community")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down 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.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]

0 comments on commit 9582595

Please sign in to comment.