KAZIK/build/AssemblerCasinoLauncher.cs
Artvasil09 797ee366dc feat: implement upper lounge, manual stairs, cabaret, and casino terminals
- Native player-controlled stairs, upper lounge bar, and Hell Tower infernal portal
- Cabaret stage with musical acts, audience seating, and interaction
- Dedicated cash/trophy wall terminals with native balance and achievement screens
- Projecting 3D wall lanterns with ray/plane intersection
- Six roaming guests with seated poses and card rank rendering updates
- Synchronized launcher hash and updated binaries
2026-10-18 21:36:12 +03:00

65 lines
2.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Diagnostics;
using System.IO;
using System.Security.Cryptography;
using System.Windows.Forms;
namespace AssemblerCasinoLauncher
{
static class Program
{
const string ExpectedPokerSha256 = "C0B5A1DD9A678E68599724138AF009D29C935EEFDD6D70D28789AABF071395F8";
[STAThread]
static void Main()
{
var root = AppDomain.CurrentDomain.BaseDirectory;
// The installed launcher is at the root; developer builds live in dist.
if (!File.Exists(Path.Combine(root, "bin", "poker.exe")))
{
var parent = Directory.GetParent(root.TrimEnd(Path.DirectorySeparatorChar));
if (parent != null && Directory.Exists(Path.Combine(parent.FullName, "assets")) &&
File.Exists(Path.Combine(parent.FullName, "bin", "poker.exe")))
root = parent.FullName;
}
var game = Path.Combine(root, "bin", "poker.exe");
if (!File.Exists(game))
{
MessageBox.Show("bin\\poker.exe не найден рядом с лаунчером.", "Assembler Casino", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!VerifyGame(game))
{
MessageBox.Show("bin\\poker.exe был изменен или поврежден. Запуск остановлен.", "Assembler Casino", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Process.Start(new ProcessStartInfo
{
FileName = game,
WorkingDirectory = root,
UseShellExecute = false
});
}
static bool VerifyGame(string gamePath)
{
try
{
using (var sha = SHA256.Create())
using (var stream = File.OpenRead(gamePath))
{
var actual = BitConverter.ToString(sha.ComputeHash(stream)).Replace("-", "");
return actual.Equals(ExpectedPokerSha256, StringComparison.OrdinalIgnoreCase);
}
}
catch
{
return false;
}
}
}
}