Skip to content

Commit

Permalink
Updated OSX executables and added 'fake' proxy for lua-dist support (…
Browse files Browse the repository at this point in the history
…ref pkulchenko#225).

LuaDist relies on using liblua.dylib for all its modules with the same
name for both Lua 5.1 and Lua 5.2 interpreters. This presents an issue for
ZBS as it needs not only to refer to a proper liblua.dylib, but also to
avoid loading two interpreters as its own interperter loads its own
library.

To resolve this, liblua.dylib doesn't export any symbols (it's a dummy
library), but it needs to be present to satisfy dyld dependency (as some
of the libraries and LuaDist build process are outside of our control).

All the other Lua symbols are already available in memory, but to make
LuaDist libraries to use them, we enforce flat namespace.
  • Loading branch information
pkulchenko committed Dec 3, 2013
1 parent 5afa0fe commit 5268b5f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 0 deletions.
Binary file modified bin/liblua.dylib
100755 → 100644
Binary file not shown.
Binary file added bin/libluadef.dylib
Binary file not shown.
Binary file modified bin/lua.app/Contents/MacOS/lua
Binary file not shown.
1 change: 1 addition & 0 deletions zbstudio/MANIFEST-bin-macos
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bin/clibs52/socket/core.dylib
bin/libwx.dylib
bin/liblua.dylib
bin/liblua52.dylib
bin/libluadef.dylib
bin/lua
bin/lua.app/Contents/Info.plist
bin/lua.app/Contents/MacOS/lua
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ZBS_PATH=${0%/*/*}
if [ ! -d $ZBS_PATH ]; then ZBS_PATH=${PWD%/*}; fi
export DYLD_LIBRARY_PATH="$ZBS_PATH/ZeroBraneStudio/bin"
export DYLD_FORCE_FLAT_NAMESPACE=1
if [[ ! -e $DYLD_LIBRARY_PATH/libedit.3.dylib && ! -e /usr/lib/libedit.3.dylib ]]
then ln -s /usr/lib/libedit.2.dylib $DYLD_LIBRARY_PATH/libedit.3.dylib; fi
(cd "$ZBS_PATH/ZeroBraneStudio"; bin/lua src/main.lua zbstudio "$@")

0 comments on commit 5268b5f

Please sign in to comment.