mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 14:00:29 +00:00
C# test suite and C reproducer validating DLL initialization. The probe test (DllMainWorkaround_IsStillActive) checks that the CRT workaround is compiled in via ghostty_crt_workaround_active(). When Zig fixes MSVC DLL CRT init, removing the DllMain will make this test fail with instructions on how to verify the fix and clean up. ghostty_init is tested via the C reproducer (test_dll_init.c) rather than C# because the global state teardown crashes the test host on DLL unload. The C reproducer exits without FreeLibrary.
31 lines
963 B
XML
31 lines
963 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<LangVersion>latest</LangVersion>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="MSTest" Version="4.0.2" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Copy ghostty.dll from the Zig build output so P/Invoke can find it.
|
|
Build libghostty first: zig build -Dapp-runtime=none -Demit-exe=false
|
|
-->
|
|
<Target Name="CopyGhosttyDll" AfterTargets="Build"
|
|
Condition="Exists('$(MSBuildThisFileDirectory)..\..\zig-out\lib\ghostty.dll')">
|
|
<Copy SourceFiles="$(MSBuildThisFileDirectory)..\..\zig-out\lib\ghostty.dll"
|
|
DestinationFolder="$(OutputPath)"
|
|
SkipUnchangedFiles="true" />
|
|
</Target>
|
|
|
|
</Project>
|