Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional lua for debugging #2862

Closed
wants to merge 8 commits into from

Conversation

Projects
None yet
8 participants
@CIB
Copy link
Contributor

commented Sep 5, 2013

See the commit for more details.

I tested compilation with LUA=1 and without, but tests on more systems would be good. Right now the Makefile only includes support for the way things are set up on arch linux, since I have no damn clue where the lua 5.1 stuff is on other systems.

EDIT: I had planned to use CMake to get this to run on all systems easily, but it turns out the CMake lua51 include file is broken. So yeah, gonna have to fix up the Makefile with all the platforms.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Sep 6, 2013

Please make us a windows makefile!
I'm not a programmer and I have no idea what wizardry makes it tick but I need one to compile and test some of my stuff.
I will give you one million internets if you can get us a makefile again so I can properly test my PRs!

@fergus-dall

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2013

@Rivet-the-Zombie You should be able to compile it by setting NATIVE=win32

@CIB

This comment has been minimized.

Copy link
Contributor Author

commented Sep 6, 2013

This particular PR with LUA=1 doesn't work yet on windows, but I mean to add support/instructions for it. Generally, the regular makefile should work just fine on windows, as does the cmakelists.txt

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Sep 6, 2013

Anybody have any idea what's the actual command(s) to compile for Windows under MinGW using the current makefile? I really have no idea what I'm doing when it comes to the compiling stage, except for what I've picked up from guides on the forums and they're no longer really up to date about this.

@narc0tiq

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2013

@Rivet-the-Zombie Please keep issue and pull request discussions about the actual issue/pull request. Help for compiling on Windows would be best handled in IRC or on the forums.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Sep 7, 2013

FYI, CMake-only support isn't ok, if the main Makefile won't build it, I'm not going to land it.

@atomicdryad

This comment has been minimized.

Copy link
Contributor

commented Sep 14, 2013

Okay this is simply too useful to let rot due to percieved build 'hurdles'....thus it's fair to say help compiling is quite relevent. Mostly re; mingw building, is the official wintendo bin mingw? If so, how does it handle SDL? How is that different from msvc++? Afaik mingw build will work with a liblua.a and lua headers thrown in right where sdl is...neh?

@kevingranade

This comment has been minimized.

Copy link
Member

commented Sep 17, 2013

Doesn't build on Fedora and I have no idea how to make it so.

@atomicdryad

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2013

...build error?
output of rpm -qla '_lua_devel*' ?

@CIB

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2013

Yeah, the easiest would probably be to find another Makefile that includes lua5.1 and check how they're handling cross-platform problems.

CIB added some commits Sep 5, 2013

Cleaned up optional lua functionality for debugging.
* Basic lua initialization
* Customized lua bindings generator with bindings for player, monster, item, uimenu and more
* Wrapper function for iuse so that if lua is enabled, lua functions can be called as well as C++ functions
* Debug option to call arbitrary lua code interactively
@CIB

This comment has been minimized.

Copy link
Contributor Author

commented Oct 20, 2013

Okay, other than the MinGW build guide that I still need to finish(http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile#MinGW_with_MSYS), this should now build on most unix-likes and windows. No idea about OS X, though I hear pkg-config exists for that as well, so it should work(after installing pkg-config and lua5.1).

@kevingranade

This comment has been minimized.

Copy link
Member

commented Oct 21, 2013

pkg-config on my system seems to want "lua" instead of "lua5.1", so sure if that's resolvable.
also after adjusting that and compiling I get this on startup:
DEBUG: Error in lua module: cannot open data/main.lua: No such file or directory

CIB added some commits Oct 21, 2013

Added all kinds of *.pc names for lua5.1
Dammit, distros, get it together already!
Added missing data/main.lua
It's been sitting here all this time and I never noticed it wasn't checked into git.
@vache

This comment has been minimized.

Copy link
Contributor

commented Oct 22, 2013

I was able to compile and test a few lua commands on Debian

@GlyphGryph

This comment has been minimized.

Copy link
Contributor

commented Nov 14, 2013

Brought up to date and re-PRed in #4337

@GlyphGryph GlyphGryph closed this Nov 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.