Page 2 of 5
Re: Steamworks FFI
Posted: Wed Nov 18, 2020 5:53 pm
by artless
Still not working at the moment.
Error message remains the same.
(I tried both Contents/Frameworks/libsteam_api.dylib and gamefolder/Contents/Frameworks/libsteam_api.dylib)
Where should I edit, if I want to simply load dylib from game folder?
(It would be better than load from somewhere else, as it avoids installation)
Extra information:
I'm working in VM VirtualBox. Not sure if it makes the difference.
This is my first time using a Mac system. I could be making some really silly mistakes.
Re: Steamworks FFI
Posted: Wed Nov 18, 2020 7:44 pm
by ivan
No, don't put it in the game folder, it should be in the love folder.
The game folder should be cross platform and shouldn't contain any binaries.
I'm not on a Mac but it should be under "Contents/Frameworks/" so it depends how you have Love2D setup
Re: Steamworks FFI
Posted: Wed Nov 18, 2020 8:25 pm
by ReFreezed
So that would be "MyGame.app/Contents/Frameworks/" (where MyGame.app is a copy of the original love.app that you downloaded from this website).
Re: Steamworks FFI
Posted: Thu Nov 19, 2020 3:35 am
by artless
It takes me a few minutes to notice Contents/Frameworks means inside love.app.
It worked.
Thanks!
Re: Steamworks FFI
Posted: Thu Dec 31, 2020 2:31 pm
by qaisjp
There's no license file in the repo, so this cannot (legally) be used in any games. Please can you add a license?
Re: Steamworks FFI
Posted: Thu Dec 31, 2020 2:43 pm
by ivan
Yep, I'll include a license in the update.
It is allowed to use the library in your commercial projects as long as you provide credit to 2dengine.
Re: Steamworks FFI
Posted: Sun Jan 24, 2021 12:19 am
by groverburger
Hey ivan, I got your Steamworks FFI to work on Windows perfectly, but on Mac I'm failing on assert(Steam.init()) only when I run the game fused as a .love file.
EDIT: on further inspection, the failure seems to occur on line 59 of api.lua, api.lib.SteamAPI_Init() is not behaving correctly. Could the api be failing to load the dylib?
EDIT EDIT: after some trial and error, putting the steam_appid.txt in the .app/Contents/MacOS seems to work!
I'm logged in to Steam, and I have my libsteam_api.dylib in my .app/Contents/Frameworks, so I think everything should be in order. I'm also using macOS Big Sur 11.1 and Steam SDK v1.5.
Any ideas?
Re: Steamworks FFI
Posted: Sun Jan 24, 2021 9:16 am
by ivan
Hello. I am primarily testing this library on Windows and Ubuntu. The Mac version was tested a while ago but things may have broken since then. I don't have any Mac hardware at the moment so please help me out and we can get it up and running again.
First off make sure you have the correct binaries Steamworks SDK v1.5 (looks like 1.51 is out so I will have to update it soon)
Double check that libsteam_api.dylib is in the ".app/Contents/Frameworks"
Next, make sure your Steam client is up and running before you start your game. Also make sure your AppID is set up and you have the game in your Steam library.
failure seems to occur on line 59 of api.lua, api.lib.SteamAPI_Init()
This is a very generic error so it's hard to say. The Steamworks docs say:
-The Steam client isn't running. A running Steam client is required to provide implementations of the various Steamworks interfaces.
-The Steam client couldn't determine the App ID of game. If you're running your application from the executable or debugger directly then you must have a steam_appid.txt in your game directory next to the executable, with your app ID in it and nothing else. Steam will look for this file in the current working directory. If you are running your executable from a different directory you may need to relocate the steam_appid.txt file.
-Your application is not running under the same OS user context as the Steam client, such as a different user or administration access level.
-Ensure that you own a license for the App ID on the currently active Steam account. Your game must show up in your Steam library.
-Your App ID is not completely set up, i.e. in Release State: Unavailable, or it's missing default packages.
Re: Steamworks FFI
Posted: Mon Jan 25, 2021 5:01 pm
by pauljessup
I tried this library, and I get this error when I call any function from it. Running on OSX, gamve is approved on steam, app ID all set up, etc. I tried placing the steamworks dynamic link in both the .love file, the resulting app, and the folder next to it. Keep getting the same error, even when I drag and drop into Love2d to run it.
- Screen Shot 2021-01-25 at 11.58.46 AM.png (108.91 KiB) Viewed 16126 times
Re: Steamworks FFI
Posted: Mon Jan 25, 2021 5:07 pm
by pauljessup
Update-
it looks like steam init is causing this error, and not steam.isRunning() is causing another error (saying that there is no function with that name)