Hi @ll,
I am trying to build my .app For OS X according to the Wiki entry, which works like a charm.
My Problem is, I need additional lualibs (e.g. luadbi, md5,...) and I want to pack them into the app.
Can any OS X developer please give me a hint or tell me how to use them?
I am able to build .a, .so, .dylib and .framework, but I don't know which one to use best and how to include them correctly.
Any help or hint would be appreciated very much!
Greetings, Haimi
Including additional lualibs in OS X .app
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Including additional lualibs in OS X .app
Okay, I figured it out myself:
A big problem was, that our game must be started from the game directory for some very deep coding reasons
I fetched the needed packages via luarocks (I am using md5 by example)
Now all I need to do is to change the starting executable from love to my starting script.
I hope I can help anybody who might have this problem too.
Greetings!
A big problem was, that our game must be started from the game directory for some very deep coding reasons
I fetched the needed packages via luarocks (I am using md5 by example)
Code: Select all
sudo luarocks install md5
- placed the game directory in Game.app/Contents/Resources
- copied the initializer file (/opt/local/var/luarocks/share/lua/5.1/md5.lua) to a new Directory: Game.app/Contents/Resources/Libraries
- copied the md5 core library (/opt/local/var/luarocks/lib/lua/5.1/md5) to: Game.app/Contents/Frameworks
- wrote a small bash script for game starting in Game.app/Contents/MacOS:
Code: Select all
#!/bin/bash
export LUA_CPATH="../../Frameworks/?/core.so;$1/Contents/Frameworks/?.so;$LUA_CPATH"
export LUA_PATH="../Libraries/?.lua;$LUA_PATH"
BIN_DIR=$(dirname $0)
cd ${BIN_DIR}/../Resources/<gamefolder>
../../MacOS/love .
I hope I can help anybody who might have this problem too.
Greetings!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests