Shoutbox

Author Topic: Help with Lua  (Read 4775 times)

0 Members and 1 Guest are viewing this topic.

Offline Davis

  • Newbie
  • *
  • Posts: 1
  • Reputation Power:
Help with Lua
« on: 21 January 2012, 03:14:04 »
Hi,
i just downloaded the Lua file on my Mac but i can't seam to get it to build,
i have opened my terminal command line but whenever i try doing what the makefile/install file says it doesn't seam to work, I've also tried looking at some webpages the Lua site linked me to but they don't seam to help me much either,
I'm not sure if its just that I'm missing something in the way i type it (/drag in the file location) or if i don't have the permission required, and if the second is it how do i change it so that i have permission,
also one of the documents i read said something about typing "set" in and something about changing the environment and "batch" or something but when i type it in it doesn't seam to let me change the thing they said, cause i can't find the right thing they said there is a few different variations but not the one I'm looking for.
Im using a Mac, if someone could help me i would appreciate it,
thanks Davis.
« Last Edit: 21 January 2012, 03:23:08 by Davis »

Offline FH

  • Administrator
  • *****
  • Posts: 974
  • Reputation Power:
  • Gender: Male
    • Runeforge Game Studio
Re: Help with Lua
« Reply #1 on: 21 January 2012, 10:22:58 »
Uhm.... What?!?

Offline LordProtektor

  • Jr. Member
  • **
  • Posts: 199
  • Reputation Power:
  • Gender: Male
Re: Help with Lua
« Reply #2 on: 21 January 2012, 14:23:50 »
Lua is a scripting language, not a programming language.

You don't need to compile lua, nor can you possibly do this with your terminal.

You don't have to "download" any file, and there is no description or documents here saying something like this. The Lua files are already inside your game folder of Guild II Ren.

Are you even talking about Guild II Ren?

Offline General Chaos

  • Supporter
  • **
  • Posts: 491
  • Reputation Power:
  • Gender: Male
Re: Help with Lua
« Reply #3 on: 21 January 2012, 18:32:12 »
o_O

This is the best post ever.  I have never been so confused.

Offline H.-P.

  • Community Manager
  • ***
  • Posts: 572
  • Reputation Power:
  • Gender: Male
    • blackshuck.de
Re: Help with Lua
« Reply #4 on: 21 January 2012, 18:53:17 »
Uhm.... What?!?

I could not say it better  ;D

Offline Davis

  • Newbie
  • *
  • Posts: 1
  • Reputation Power:
Re: Help with Lua
« Reply #5 on: 22 January 2012, 03:28:44 »
haha okay so I'm going to try make sense this time,

first of all I'm not talking about the Guild here, I'm just asking about the Lua program, in this post i just want to know about the program itself not about how the Guild uses it

on another post i was told to check out "Programming in Lua by Roberto Ierusalimschy" after asking if someone could tell me anything that would help teach me code,
so i typed it in google and got sent to ( http://www.lua.org/pil/ )
after that i went to the Lua website ( http://www.lua.org/home.html )
and then went to ( http://www.lua.org/versions.html ) and downloaded 5.1.4
but when i tried getting it to work i can't seam to make it,
i know that Lua works on Mac's which is what I'm using
now what I've looked at tells me to go to Terminal which is the Mac's Command Line ( /doesn't make it clear where I'm meant to go)
but when i try typing in what i think the sites and/or manual tells me it doesn't seam to know what I'm talking about
I've been reading the "Makefile" and the "INSTALL" both of which are in the "lua-5.1.4" file which i got out of the "lua-5.1.4.tar" which is what comes up in my downloads section in Finder, there is a "lua-5.1.4.tar.gz" in my trash which for some reason was put there after my computer downloaded it (i don't know if that helps at all)
what i am asking is how do i make the program build itself because from what i understand i downloaded a make it yourself file,
in the "INSTALL" file the very first section is called 'Building Lua' but where is it telling me to write 'make xxx' is it meaning in the terminal,
because from what i have read here (http://media.wiley.com/product_data/excerpt/71/04700691/0470069171.pdf) that is were I'm meant to build/install it

long story short if someone could just tell me how to instal Lua on my Mac i would appreciate it,
and sorry for the first post (and probable this post) being so confusing.
« Last Edit: 22 January 2012, 03:31:31 by Davis »

Offline FH

  • Administrator
  • *****
  • Posts: 974
  • Reputation Power:
  • Gender: Male
    • Runeforge Game Studio
Re: Help with Lua
« Reply #6 on: 22 January 2012, 12:18:07 »
Hmm, Mac isn't exactly made to build stuff from scratch. But it should work.
First of all you have to extract the tar.gz file somewhere. Then go to that directory in your command line
Code: [Select]
$ cd /path/to/the/extracted/tar.gz/folder

If you have installed all the dependencies (g++ and a lot of other build tools) you could install it via
Code: [Select]
$ configure
$ make

I don't have any experience with building stuff on a Mac, so I can't help you with the dependencies, sorry :/

Offline void

  • Runeforge Game Studio
  • ***
  • Posts: 104
  • Reputation Power:
Re: Help with Lua
« Reply #7 on: 22 January 2012, 12:50:45 »
Basically you can build software on a Mac as you build software on a Linux system.

Do you have XCode installed? I think this package provides all the build tools for mac.

Open the terminal and cd to the folder where you have extracted the lua source.

Ususally you can find a file named configure there run this by typing

Code: [Select]
./configure

Watch if any errors occur. If some do occur then install the missing packages (libraries) or set the environment variables to the directory so that the configure script can find it. Probably you can add some parameters to the configure script on the command line. Check them with

Code: [Select]
./configure --help

This gives you a hint about the parameters you can set in case of an error.

If your configuration is done correctly just type
Code: [Select]
make

and wait until it's done. It may take from several minutes to several hours. Depending on your system.

If that part is finished you just have to type
Code: [Select]
make install

which makes the library available to the system and other scripts can find it. Basically if you don't enter a path you can find them in
Code: [Select]
/usr/local/

HTH

Offline void

  • Runeforge Game Studio
  • ***
  • Posts: 104
  • Reputation Power:
Re: Help with Lua
« Reply #8 on: 22 January 2012, 12:58:47 »
Ok. Just checked out the LUA sources.

Have you edited the Makefile to fit your needs?

have you set the PLATS variable to macosx ?

Code: [Select]
# Your platform. See PLATS for possible values.
PLAT= macosx

If done so just type
Code: [Select]
make macosx

After that run
Code: [Select]
make test
to see if the compilation worked.

Last but not least you can install LUA on your system by typing
Code: [Select]
make macosx install

This will take the INSTALL_* variables and install LUA there. Just make sure that they are in your path variable when you want to execute the lua binaries.

Offline Davis

  • Newbie
  • *
  • Posts: 1
  • Reputation Power:
Re: Help with Lua
« Reply #9 on: 24 January 2012, 11:12:11 »
okay thankyou void and FH,
I'm still trying to get it working but i think i know what to do now,
the problem this time is i don't have permission but i know where to go/how to change that,
and void when you say configure file in the lua file could this be named "luaconf.h" in the "src" file I'm assuming it is and i know that it probable seams like an obvious question, also when you talk about editing the "Makefile" do i need to do anything special or can i just edit it in the "textedit" program that opens it, i know that these must seam like obvious questions but i just don't want to mess around with anything and ruin it.
thanks again guys for helping me and sorry for being so like unsure about stuff

Offline FH

  • Administrator
  • *****
  • Posts: 974
  • Reputation Power:
  • Gender: Male
    • Runeforge Game Studio
Re: Help with Lua
« Reply #10 on: 24 January 2012, 11:35:04 »
and void when you say configure file in the lua file could this be named "luaconf.h" in the "src" file

No, don't edit that file. Void didn't know that your package doesn't have a configure-file at all when he wrote his post, just skip the part where he advises you to edit the configure file.

Offline Davis

  • Newbie
  • *
  • Posts: 1
  • Reputation Power:
Re: Help with Lua
« Reply #11 on: 24 January 2012, 11:58:33 »
and void when you say configure file in the lua file could this be named "luaconf.h" in the "src" file

No, don't edit that file. Void didn't know that your package doesn't have a configure-file at all when he wrote his post, just skip the part where he advises you to edit the configure file.

i wasn't going to edit that file but wasn't void saying i have to put that into terminal

Offline void

  • Runeforge Game Studio
  • ***
  • Posts: 104
  • Reputation Power:
Re: Help with Lua
« Reply #12 on: 24 January 2012, 12:18:47 »
and void when you say configure file in the lua file could this be named "luaconf.h" in the "src" file I'm assuming it is and i know that it probable seams like an obvious question, also when you talk about editing the "Makefile" do i need to do anything special or can i just edit it in the "textedit" program that opens it, i know that these must seam like obvious questions but i just don't want to mess around with anything and ruin it.

As FH said, don't edit the luaconf.h. Actually the only file you probably need to edit is the Makefile. And yes, you can edit it with any editor you like. So textedit on mac should just be fine.

and void when you say configure file in the lua file could this be named "luaconf.h" in the "src" file

No, don't edit that file. Void didn't know that your package doesn't have a configure-file at all when he wrote his post, just skip the part where he advises you to edit the configure file.

i wasn't going to edit that file but wasn't void saying i have to put that into terminal

My bad. I didn't have a closer look at the lua sources before I wrote this. LUA doesn't have a configure script. Just use the make commands I used in the second post.

 

quarterly
quarterly