Comments (7)
It has to do with how love sets up cpath
when running lua, in both fused and unfused binaries. This thread has some more info about that. It might be possible to not set the cpath but this was a consistent way to do it across platforms I found, and I haven't look much deeper into that.
I would be glad to review a PR with those changes, no need to close the issue now :)
from luasteam.
Hi there George!
Have you tried putting luasteam.so on the same root folder as your .app? I believe this was our solution when we used luasteam on a OSX binary release in a project a few years ago, please try to see if it works and update us in any case
from luasteam.
Hi there George!
Have you tried putting luasteam.so on the same root folder as your .app? I believe this was our solution when we used luasteam on a OSX binary release in a project a few years ago, please try to see if it works and update us in any case
Hi rilifon! Gave that a go, and it still gives me the same error.
from luasteam.
On that note, its also worth noting im not sure where I need to place the libsteam_api.dylib
too. This might be a combined issue?
from luasteam.
Okay I managed to get a somewhat hacky approach to this working. If I modify the package.cpath
in lua to search for the current source directory like so:
local dir = love.filesystem.getSourceBaseDirectory()
package.cpath = package.cpath .. ';' .. dir .. '/?.so'
And put the luasteam.so
and the libsteam_api.dylib
inside of MyApp.app/Contents/Resources
it works!
But I am not stoked about this approach, it feels rather wrong to have to do this. Can I get any confirmation this is an OK thing to do or will I run into issues when actually distributing the app...?
from luasteam.
Hey @GeorgeA93 !
I'm afraid that's the solution to be able to place the library next to the love file, and it is indeed what we have done in our game in which we use luasteam (and for which we created luasteam :D)
Check it out here: https://github.com/MarvellousSoft/MarvInc/blob/e914dcd15d7b538793c7dcac27d3350d716d47db/marv/main.lua#L10-L13
This is definitely ok to do. It is something we could explain on the "Getting Started" wiki for this repo.
from luasteam.
Hi @yancouto good to see someone else is doing the same thing! I'd be happy to submit a PR which adds this to the Getting Started section. Would deffo help a lot of people out!
My final question, why is this needed? What is the difference about running it as a mac app vs running it via love. The cpath is the same in both scenarios?
I can close out this issue with the PR to add the docs, unless you want to close now.
from luasteam.
Related Issues (18)
- Add License
- Cannot find libsteaam_api.so HOT 2
- macOS: libluajit missing HOT 2
- Functions for game-server HOT 3
- Getting / Setting Stats HOT 3
- Add "games using luasteam" session on README HOT 17
- Cut a release HOT 1
- Installation instructions wrong for OSX HOT 2
- [Feature] Add ISteamApps' BIsSubscribed and GetAppInstallDir HOT 1
- Steam network api HOT 13
- Game invite functionality HOT 2
- Possible error in the documentation HOT 1
- ISteamUser::GetAuthSessionTicket adds additional parameter HOT 2
- Suggestion - ISteamFriends::GetPersonaName HOT 1
- IPlayerService::GetOwnedGames HOT 2
- Steam overlay wont show. HOT 4
- Callbacks don't seem to work for me HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luasteam.