Tome2: Unlua

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Message
Author
AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: Tome2: Unlua

#16 Post by AnonymousHero »

I think this may be an instance of the old "does not create its own directories" bug. Try running

Code: Select all

mkdir ~/.tome/2.3/theme
in a console.

(This is definitely one of those things people will be confused by, so I'll try to fix it ASAP.)

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Tome2: Unlua

#17 Post by Lord Estraven »

Umm, just wondering, is it possible to compile against jansson without doing a full system install of said library? Where would I put it if I wanted to use it only for ToME?

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: Tome2: Unlua

#18 Post by AnonymousHero »

Lord Estraven wrote:Umm, just wondering, is it possible to compile against jansson without doing a full system install of said library? Where would I put it if I wanted to use it only for ToME?
See the instructions. It should be possible to supply a different "--prefix" option to the "configure" script. You can provide a prefix which points somewhere in your home directory.

Now,our CMake-based build uses "pkgconfig" to find the jansson library, so you'll need some way to get "pkgconfig" to pick up your home directory. I don't really know much about how "pkgconfig" looks up libraries except that it looks for ".pc" files. You'll probably need to tweak where it looks for those .pc files.

Is this a matter of not having the appropriate permissions or just that you don't have jansson packages and don't want to mess up your system by installing things willy-nilly? If so, I think I have an easier solution...

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Tome2: Unlua

#19 Post by Lord Estraven »

Thanks.
Is this a matter of not having the appropriate permissions or just that you don't have jansson packages and don't want to mess up your system by installing things willy-nilly? If so, I think I have an easier solution...
The latter. :) Are you thinking of using GNU Stow, or such, as a solution?

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: Tome2: Unlua

#20 Post by AnonymousHero »

Yes, I was thinking of "stow" -- it's what I use in the rare situations where my distribution doesn't have a package.

... or, actually, you could just help your distribution out by creating a package for it. Usually it's not very difficult and you work will help others a lot :).

Old Tomnoddy
Wayist
Posts: 19
Joined: Tue May 25, 2010 11:49 pm

Re: Tome2: Unlua

#21 Post by Old Tomnoddy »

First of all, big many thanks to Anonymous Hero for maintaining and improving one of the greatest roguelikes ever created!

As a console player I managed to compile a no-x11, no-SDL, no-GTK version. At startup I get the info
<pre>
Error parsing automatizer rules from from $HOME/.tome/2.3/automat.atm'. Line 1, Column 5
</pre>
-- i guess this is due to the introduction of Jansson and simply means there’s no backward compatibility for automation?

As for the removal of Lua I agree with AH’s arguments. I consider myself as something like a Lua zealot, using it on a daily basis -- strangely though I never came to use it with games. I recall looking at the Lua parts of the old tome2 source from time to time and wondering what the heck was going on :? Now the code base looks a lot cleaner than before. Thanks for the purification.

Considering the preferences AH stated -- can we expect a Scheme -- or better: ML -- based extension language at some time in the future? =)

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: Tome2: Unlua

#22 Post by AnonymousHero »

i guess this is due to the introduction of Jansson and simply means there’s no backward compatibility for automation?
Yes. It's a bit unfortunate, but I really wanted to avoid a dependency on something as huge (and unwieldly API-wise compared to jansson) as libxml2.

Your comments on reading the old T2 Lua code reminded me: One thing I really forgot to mention when ragging on T2/Lua was the fact that all the Lua code was also extremely low-level -- it was basically almost all very C-like. This is the main reason that this was even feasible -- a lot of it was just copy/paste and adjust the syntax for C. (Well, it was a little more than that, but you get the idea.)

Re: Scheme/ML: Unfortunately I think it would probably be unrealistic in the near term without some form of semi-automated translation or radical restructuring of the C code to be more modular and FFI-friendly.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: Tome2: Unlua

#23 Post by Lord Estraven »

Stow works fine... Consider the issue solved. :oops:

Now if only there were something like Stow for Windows...

Post Reply