Skip to content

Commit

Permalink
v2.9.2
Browse files Browse the repository at this point in the history
- Updated patch
- Added voice chat patch
  • Loading branch information
Eavilaswayce committed Mar 22, 2024
1 parent bddcdf0 commit fef1b72
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 10 deletions.
8 changes: 7 additions & 1 deletion H1EmuLauncher/Classes/ApplyPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public static void CheckPatch()
if (gameVersionString == "kotk" && Properties.Settings.Default.currentPatchVersionKotK != latestPatchVersion ||
gameVersionString == "22dec2016" && Properties.Settings.Default.currentPatchVersion2016 != latestPatchVersion ||
gameVersionString == "22dec2016" && Directory.Exists($"{Properties.Settings.Default.activeDirectory}\\BattlEye") ||
gameVersionString == "22dec2016" && Directory.Exists($"{Properties.Settings.Default.activeDirectory}\\Resources\\Assets\\Assets_256.pack") ||
gameVersionString == "22dec2016" && !Directory.Exists($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoice") ||
gameVersionString == "22dec2016" && !File.Exists($"{Properties.Settings.Default.activeDirectory}\\Resources\\Assets\\Assets_256.pack") ||
!File.Exists($"{Properties.Settings.Default.activeDirectory}\\dinput8.dll") ||
!File.Exists($"{Properties.Settings.Default.activeDirectory}\\msvcp140d.dll") ||
!File.Exists($"{Properties.Settings.Default.activeDirectory}\\ucrtbased.dll") ||
Expand Down Expand Up @@ -88,6 +89,8 @@ public static void ApplyPatch()
{
File.WriteAllBytes($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip", Properties.Resources.Game_Patch_2016);
ZipFile.ExtractToDirectory($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip", $"{Properties.Settings.Default.activeDirectory}", true);
File.WriteAllBytes($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip", Properties.Resources.H1EmuVoicePatch);
ZipFile.ExtractToDirectory($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip", $"{Properties.Settings.Default.activeDirectory}", true);
}
else if (gameVersionString == "kotk")
{
Expand All @@ -108,7 +111,10 @@ public static void ApplyPatch()

// Delete the .zip file, not needed anymore
if (gameVersionString == "22dec2016")
{
File.Delete($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip");
File.Delete($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip");
}
else if (gameVersionString == "kotk")
File.Delete($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_KotK.zip");

Expand Down
10 changes: 7 additions & 3 deletions H1EmuLauncher/H1EmuLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<FileVersion>2.9.1</FileVersion>
<FileVersion>2.9.2</FileVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Authors>H1Emu</Authors>
<Version>2.9.1</Version>
<Version>2.9.2</Version>
<AssemblyName>H1EmuLauncher</AssemblyName>
<SignAssembly>false</SignAssembly>
<Copyright>© H1Emu</Copyright>
<Product>H1Emu Launcher</Product>
<Description>A launcher for the H1Emu project.</Description>
<Title>H1Emu Launcher</Title>
<PackageIcon>Icon.ico</PackageIcon>
<AssemblyVersion>2.9.1</AssemblyVersion>
<AssemblyVersion>2.9.2</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -57,6 +57,7 @@
<None Remove="Resources\Grain.png" />
<None Remove="Resources\H1EmuIcon.png" />
<None Remove="Resources\H1EmuLogo.png" />
<None Remove="Resources\H1EmuVoicePatch.zip" />
<None Remove="Resources\H1Z1_BE.exe" />
<None Remove="Resources\HideKey.png" />
<None Remove="Resources\HideKey_Hover.png" />
Expand Down Expand Up @@ -221,6 +222,9 @@
<Resource Include="Resources\H1EmuLogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\H1EmuVoicePatch.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\H1Z1_BE.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
Expand Down
10 changes: 10 additions & 0 deletions H1EmuLauncher/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions H1EmuLauncher/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,7 @@
<data name="Game-Patch-2016" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Game-Patch-2016.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="H1EmuVoicePatch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\H1EmuVoicePatch.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
Binary file modified H1EmuLauncher/Resources/Game-Patch-2016.zip
Binary file not shown.
Binary file added H1EmuLauncher/Resources/H1EmuVoicePatch.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions H1EmuLauncher/SettingsPages/GameFiles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:local="clr-namespace:H1EmuLauncher.SettingsPages"
mc:Ignorable="d"
d:DesignWidth="735"
d:DesignHeight="250"
d:DesignHeight="320"
Title="GameFiles"
FontFamily="Bahnschrift Light"
FontSize="16"
Expand Down Expand Up @@ -89,7 +89,7 @@
Style="{DynamicResource StandardButton}">

<Button.Effect>

<!-- Drop shadow effect -->
<DropShadowEffect BlurRadius="15"
Direction="-90"
Expand Down
5 changes: 5 additions & 0 deletions H1EmuLauncher/SettingsPages/GameFiles.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public void ApplyPatch()
{
File.WriteAllBytes($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip", Properties.Resources.Game_Patch_2016);
ZipFile.ExtractToDirectory($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip", $"{Properties.Settings.Default.activeDirectory}", true);
File.WriteAllBytes($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip", Properties.Resources.H1EmuVoicePatch);
ZipFile.ExtractToDirectory($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip", $"{Properties.Settings.Default.activeDirectory}", true);
}
else if (LauncherWindow.gameVersionString == "kotk")
{
Expand All @@ -150,7 +152,10 @@ public void ApplyPatch()
}));

if (LauncherWindow.gameVersionString == "22dec2016")
{
File.Delete($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_2016.zip");
File.Delete($"{Properties.Settings.Default.activeDirectory}\\H1EmuVoicePatch.zip");
}
else if (LauncherWindow.gameVersionString == "kotk")
File.Delete($"{Properties.Settings.Default.activeDirectory}\\Game_Patch_KotK.zip");

Expand Down
18 changes: 18 additions & 0 deletions H1EmuLauncher/Windows/LauncherWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,21 @@ private void LaunchClient(object sender, RoutedEventArgs e)

ApplyPatchClass.CheckPatch();

//Start voice chat client
Process voiceChatClient = new();
if (gameVersionString == "22dec2016")
{
voiceChatClient.StartInfo = new ProcessStartInfo
{
FileName = $"{Properties.Settings.Default.activeDirectory}\\H1EmuVoice\\H1EmuVoice.exe",
WindowStyle = ProcessWindowStyle.Normal,
WorkingDirectory = Properties.Settings.Default.activeDirectory,
UseShellExecute = true
};
voiceChatClient.Start();
}

// Start game
Process h1Process = new();
h1Process.StartInfo = new ProcessStartInfo
{
Expand All @@ -574,6 +589,9 @@ private void LaunchClient(object sender, RoutedEventArgs e)
Show();
Activate();
launcherNotifyIcon.Visible = false;

if (Process.GetProcessesByName("H1EmuVoice").Length > 0)
voiceChatClient.CloseMainWindow();
}));
}
};
Expand Down
8 changes: 4 additions & 4 deletions H1EmuLauncherSetup/H1EmuLauncherSetup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:H1Emu Launcher"
"ProductCode" = "8:{DC56D036-95FA-4E0B-A97E-714018D54627}"
"PackageCode" = "8:{D35E3664-62B0-4E12-8E2A-83C636237CAE}"
"ProductCode" = "8:{20B3315A-5C3E-4BA5-A6D7-C2C149D27CCB}"
"PackageCode" = "8:{C1111241-3A43-4F3F-903C-6E09BAA3574E}"
"UpgradeCode" = "8:{4E679270-65C8-4021-83BE-3B8EC3EC7AFE}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:2.9.1"
"ProductVersion" = "8:2.9.2"
"Manufacturer" = "8:H1Emu © 2022"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:https://discord.com/invite/RM6jNkj"
Expand All @@ -227,7 +227,7 @@
"UseSystemSearchPath" = "11:TRUE"
"TargetPlatform" = "3:0"
"PreBuildEvent" = "8:"
"PostBuildEvent" = "8:echo Modifying the installer to launch the application when finished...\r\ncscript.exe \"$(ProjectDir)EnableLaunchApplication.js\" \"$(BuiltOuputPath)\"\r\n\r\necho Combining setups into a single .exe file...\r\ncd $(ProjectDir)\r\nC:\\Windows\\System32\\iexpress.exe /n /q IExpressPackageH1EmuLauncherSetup.sed\r\necho Done.\r\n\r\necho Digitally signing the .exe setup file...\r\n\"C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64\\signtool.exe\" sign /f \"$(ProjectDir)H1EmuLauncherCertificate.pfx\" /t http://timestamp.digicert.com /p 3126Ri34 /fd SHA256 \"$(ProjectDir)Debug\\H1EmuLauncherSetup.exe\"\r\necho Done.\r\n\r\necho Zipping installation contents to a portable .zip file...\r\ntar.exe -a -c -f \"$(ProjectDir)Debug\\H1EmuLauncherVPortable.zip\" -C \"$(ProjectDir)\\..\\H1EmuLauncher\\bin\\Debug\\net6.0-windows\" *\r\necho Done."
"PostBuildEvent" = "8:echo Modifying the installer to launch the application when finished...\r\ncscript.exe \"$(ProjectDir)EnableLaunchApplication.js\" \"$(BuiltOuputPath)\"\r\n\r\necho Combining setups into a single .exe file...\r\ncd $(ProjectDir)\r\nC:\\Windows\\System32\\iexpress.exe /n /q IExpressPackageH1EmuLauncherSetup.sed\r\necho Done.\r\n\r\necho Digitally signing the .exe setup file...\r\n\"C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64\\signtool.exe\" sign /f \"$(ProjectDir)H1EmuLauncherCertificate.pfx\" /t http://timestamp.digicert.com /p 3126Ri34 /fd SHA256 \"$(ProjectDir)Debug\\H1EmuLauncherSetup.exe\"\r\necho Done.\r\n\r\necho Zipping installation contents to a portable .zip file...\r\ntar.exe -a -c -f \"$(ProjectDir)Debug\\H1EmuLauncherVPortable.zip\" -C \"$(ProjectDir)\\..\\H1EmuLauncher\\bin\\Debug\\net6.0-windows10.0.17763.0\" *\r\necho Done."
"RunPostBuildEvent" = "3:0"
}
"Registry"
Expand Down

0 comments on commit fef1b72

Please sign in to comment.