feat: net10.0 Linux Console mode — zero Mono, 0 compile errors
Migrated from net48 (.NET Framework) to net10.0 (cross-platform): - All 14 csproj: net48 → net10.0, WindowsDesktop SDK → Microsoft.NET.Sdk - Excluded WinForms files (Form/**, DebugControl, GameControl, etc.) - Excluded DB modules (GameDAL db/Sql/**, MrWu DB files) - Excluded server runtime files (GameBase, GlobalSever managers, GameNetModule stubs) - Added minimal stubs (GameDoStub.cs, NamespaceStubs.cs, ServerCoreStubs.cs) - Created hjha-console entry project - Fixed hardcoded Windows path → ./test/ directory - Updated global.json to SDK 10.0.109 Console test mode: PdkGameMain(null).Test() → 发牌→包庄→打牌→结算 Verified: dotnet build 0 errors, dotnet run outputs game state machine
This commit is contained in:
19
hjha-console/Program.cs
Normal file
19
hjha-console/Program.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using PdkFriendServer.Logic;
|
||||
using System;
|
||||
|
||||
namespace hjha_console
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("=== HJHA Console Mode - 跑得快测试 ===");
|
||||
Console.WriteLine("启动游戏状态机:发牌 → 包庄 → 打牌 → 结算");
|
||||
Console.WriteLine();
|
||||
|
||||
string jsonPath = args.Length > 0 ? args[0] : null;
|
||||
var main = new PdkGameMain(null);
|
||||
main.Test(jsonPath ?? "");
|
||||
}
|
||||
}
|
||||
}
|
||||
30
hjha-console/hjha-console.csproj
Normal file
30
hjha-console/hjha-console.csproj
Normal file
@ -0,0 +1,30 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<OutputPath>../exe/hjha-console/</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>../exe/hjha-console_Re/</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../PdkFriendServer/PdkFriendServer.csproj" />
|
||||
<ProjectReference Include="../ServerCore/ServerCore.csproj" />
|
||||
<ProjectReference Include="../GameFix/GameFix.csproj" />
|
||||
<ProjectReference Include="../NetWorkMessage/NetWorkMessage.csproj" />
|
||||
<ProjectReference Include="../MrWu/MrWu.csproj" />
|
||||
<ProjectReference Include="../ObjectModel/ObjectModel.csproj" />
|
||||
<ProjectReference Include="../ServerData/ServerData.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user