Giter VIP home page Giter VIP logo

Comments (10)

merfolk avatar merfolk commented on June 29, 2024

I was able to get rid of the System.DllNotFoundException by using an absolute path in the steamworks.NET.dll.config file, e.g.

<dllmap os="osx" dll="CSteamworks" target="/Users/*my_username*/*path_to_repo*/bin/Debug/*game*.app/Contents/MonoBundle/CSteamworks.bundle/Contents/MacOS/CSteamworks"/>

Of course using an absolute path like this won't work for anyone else except me. I tried dropping dropping folders one by one from the start of that absolute path, but absolutely nothing worked except the full absolute path.

And the problems don't end there. I have copied steam_appid.txt, with the correct appID, to every level after the Debug folder, but I am still getting this error:

[S_API FAIL] SteamAPI_Init() failed; no appID found.
Either launch the game from Steam, or put the file steam_appid.txt containing the correct appID in your game folder.
KQ: Error reading KQ:Interrupted system call

from steamworks.net.

rlabrecque avatar rlabrecque commented on June 29, 2024

Hey Sorry, I had missed this the first time around! I'll have a look into how I did it again, It was kind of finicky in general. Did you try it out with Steamworks.NET-StandaloneTest at all?

Something that I haven't tested with at all is with a non Unity .app, I only ever tested it out running a .exe directly through mono.

from steamworks.net.

merfolk avatar merfolk commented on June 29, 2024

Thank you for replying. :)

I believe I came across the StandaloneTest, but I will take a look at it again.

The steam_appid.txt seems to work only when the game has been downloaded and launched from Steam, and not when running the game from e.g. /bin/Release. Maybe the original Steamworks API only looks for the txt file from the Steam folders, I didn't try just putting it there and launching the game from it's build folder.

However the absolute path required for CSteamworks to be found is still an issue.

from steamworks.net.

merfolk avatar merfolk commented on June 29, 2024

I tested the Steamworks.NET-StandaloneTest just now. When running it through Xamarin Studio, it never even enters the main, but does not fail either. When running it from bash using mono Steamworks.NET_StandaloneTest.exe it throws the following error, even though CSteamworks.dll is sitting right next to the exe:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for SteamworksNET_StandaloneTest.Program ---> System.DllNotFoundException: CSteamworks
at (wrapper managed-to-native) Steamworks.NativeMethods:SteamAPI_RegisterCallback (intptr,int)
at Steamworks.Callback1[Steamworks.PersonaStateChange_t].Register (Steamworks.DispatchDelegate func) [0x00000] in <filename unknown>:0 at Steamworks.Callback1[Steamworks.PersonaStateChange_t]..ctor (Steamworks.DispatchDelegate func, Boolean bGameServer, Boolean bKeepAlive) [0x00000] in :0
at Steamworks.Callback`1[Steamworks.PersonaStateChange_t].Create (Steamworks.DispatchDelegate func) [0x00000] in :0
at SteamworksNET_StandaloneTest.Program..cctor () [0x00000] in :0

from steamworks.net.

merfolk avatar merfolk commented on June 29, 2024

I used MONO_LOG_LEVEL=debug mono Steamworks.NET_StandaloneTest.exe to get the paths where mono is trying to find the CSteamworks library.

Mono: DllImport attempting to load: 'CSteamworks'.
Mono: DllImport error loading library '.../Steamworks.NET-StandaloneTest/bin/Debug/libCSteamworks': 'dlopen(.../Steamworks.NET-StandaloneTest/bin/Debug/libCSteamworks, 9): image not found'.

And the same thing for libCsteamworks.dylib, .so, and .bundle.

Where does the lib-prefix come from?

Unfortunately I have no idea how to get the same logging information from the actual game, since it's an app bundle and trying to run the .exe alone will just whine about Info.plist file missing.

from steamworks.net.

Eversor avatar Eversor commented on June 29, 2024

Hey merfolk, where you able to solve the issue? I'm having some problem as well in Xamarin Studio.

from steamworks.net.

merfolk avatar merfolk commented on June 29, 2024

Unfortunately I have not had time to wrestle with this issue.

My best guess is that the Steamworks.NET dll is actually trying to find a file named "libCSteamworks" instead of "CSteamworks". That's what I would try next.

from steamworks.net.

strich avatar strich commented on June 29, 2024

FYI the lib prefix comes from Mono itself - It will attempt to find libs with that prefix along with a bunch of others (With and without extension, etc). More info here: http://www.mono-project.com/docs/advanced/pinvoke/dllmap/

Given the appid file error though I'd say there is some issue with Steamworks correctly determining the relative directory of your game.

from steamworks.net.

Eversor avatar Eversor commented on June 29, 2024

I finally had it to work on my Xamarin configuration.
The problem was the signing of the mac bundle. Removing signing did the trick. (working on debug and release, both without signing)

from steamworks.net.

rlabrecque avatar rlabrecque commented on June 29, 2024

Awesome! I'm glad to hear that you figured that out!

from steamworks.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.