-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CSFML version to 2.5.1 #158
Conversation
Test NuGet package: CSFML.2.5.1.nupkg.zip |
@Davipb maybe you have some idea on what I need to do, so that CSFML is found on macOS. It just seems to look for *.DLLs instead of the provided *.dylib 🤔 |
Analyzing the compiled binaries from the test NuGet package you provided, it seems that the libraries are trying to load versioned names of its dependencies (e.g.
I had the same issue when building for Linux and "solved" it by including multiple copies of each library in the package, versioned and unversioned (NuGet doesn't support symlinks sadly). Does it work if you do the same for macOS? |
Yeah, I was thinking about this as well, but wasn't sure since it was complaining about missing dylib but dlls. I'll rebuild and try again. Thanks for taking a look! 🙂 Test NuGet package v2: CSFML.2.5.1.nupkg.zip |
I think that worked. The last challenge is getting the RPath right. The trick with LDFLAGS as on Linux somehow didn't work, meaning the same command just fails on macOS. I'll try to play around with it more, but if you have some idea, let me know. Test NuGet package v3: CSFML.2.5.1.nupkg.zip |
It seems that the macOS equivalent of The CMAKE flag itself is definitely working, since
|
00e6da5
to
1c3c84d
Compare
So I tried all sorts of combinations, but seem to be missing the required knowledge of figuring things out. 😓
Even if I set DYLD_PRINT_LIBRARIES output
Test Applicationusing System;
using SFML.Graphics;
using SFML.Window;
namespace SFMLTest
{
internal static class Program
{
public static void Main(string[] args)
{
var window = new SimpleWindow();
window.Run();
}
private class SimpleWindow
{
public void Run()
{
var window1 = new RenderWindow(new VideoMode(800, 600), "SFML Window 1!");
window1.SetFramerateLimit(60);
window1.Closed += OnClose;
var window2 = new RenderWindow(new VideoMode(800, 600), "SFML Window 2!");
window2.SetFramerateLimit(60);
window2.Closed += OnClose;
while (window1.IsOpen || window2.IsOpen)
{
window1.DispatchEvents();
window2.DispatchEvents();
window1.Clear();
window1.Display();
window2.Clear();
window2.Display();
}
}
private static void OnClose(object sender, EventArgs _)
{
var window = (Window) sender;
window.Close();
}
}
}
} Project File<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>SFML_Test</RootNamespace>
<Configurations>Debug;Release</Configurations>
<Platforms>osx.11.0-x64</Platforms>
<CSFMLIgnoreAnyCPU>true</CSFMLIgnoreAnyCPU>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>TRACECOREAPP;DYLD_PRINT_LIBRARIES;COREAPP</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CSFML" Version="2.5.1" />
<PackageReference Include="SFML.Net" Version="2.5.1" />
</ItemGroup>
</Project>
|
You might be able to get some extra info with probe tracing by setting the COREHOST_TRACE output fragment
Alternatively, you could make a fake NuGet package with different code for each RID and run it to check what RID the .NET Core host is using. Here's one I made: lib.1.0.0.nupkg.zip, and here's how you use it (it should print the detected RID or 'unknown' if neither was used): lib.1.0.0 usageusing System;
using lib;
namespace netcoreproj
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(RidDetector.RID);
}
}
} Also checking online, some people claim that Sadly I don't have access to a macOS machine, so I don't think I'll be able to help with more practical debugging. |
- Add macOS build script - Update existing nuget build script
1c3c84d
to
c5e531d
Compare
I can't figure the macOS builds out at this point. For now, I'll just release CSFML 2.5.1 without macOS builds and then maybe I'll find some more time to iron this out further for CSFML 2.5.2 or CSFML 2.6... |
ToDo
Get SFML.Net working on macOSwill be done as part of Add NuGet support for macOS #161