Forum

> > CS2D > Scripts > Structuring Lua C modules in CS2D. Suggestions?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Structuring Lua C modules in CS2D. Suggestions?

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Structuring Lua C modules in CS2D. Suggestions?

MikuAuahDark
User Off Offline

Zitieren
So I've successfully wrote my CS2D Lua wrapper (Thread: thread cs2d Calling CS2D's statically Lua function. Legal?) and now I need suggestion about how to structure the DLLs/.so

What is CS2D Lua Wrapper >


First approach would be having liblua5.1.so/lua51.dll act as the wrapper itself and Lua C modules compiled depends on that DLL/shared object.
√ In case of CS2D update, only single file needs to be updated.
× In Linux, CS2D (dedicated server) must be run with
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. ./CS2D


A second approach would be compiling the C modules and the CS2D Lua wrapper together. It's just single file "cs2dlua.c" that must be added to module compilation.
√ No need of specialized command to run the CS2D (dedicated server)
× In case of CS2D update, all modules must be recompiled

I'm also open to other suggestion that maybe interesting.

Regards,
AuahDark

alt Re: Structuring Lua C modules in CS2D. Suggestions?

ohaz
User Off Offline

Zitieren
setting the LD_LIBRARY_PATH is rather common and should be the preferred way in this case. As you usually start cs2d automated anyways, nobody ever needs to enter this more than once so it's fine.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht