Quantcast Compiling LUA - WoWInterface
Thread Tools Display Modes
04-11-06, 12:46 AM   #1
G4m3w1z
A Murloc Raider
Join Date: Apr 2006
Posts: 5
Compiling LUA

Okay, I have a compiler and would like to compile lua 5.1. But I don't know where to start, how to do this, etc.

http://www.cs.virginia.edu/~lcc-win32/

This is the compiler. Could anyone help me on what I should do? I know it's a lot of work and might be difficult to explain. :/

Thanks!
  Reply With Quote
04-11-06, 08:01 AM   #2
brotherhobbes
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 313
That is a compilier for the C programming language, G4m3w1z.

If you want to make an addon for WoW, you just write the .lua files and leave them like that in the appropriate directory (World of Warcraft/Interface/Addons/yourAddonName/yourAddonName.lua). You do not have to compile the .lua files.
  Reply With Quote
04-11-06, 12:23 PM   #3
G4m3w1z
A Murloc Raider
Join Date: Apr 2006
Posts: 5
Originally Posted by brotherhobbes
That is a compilier for the C programming language, G4m3w1z.

If you want to make an addon for WoW, you just write the .lua files and leave them like that in the appropriate directory (World of Warcraft/Interface/Addons/yourAddonName/yourAddonName.lua). You do not have to compile the .lua files.
Yes, I do want to start making addons, and I do know all I need to do is make the files, and do not need to compile lua. I was just wondering if it would help in learning. I didn't realize that was C. I'm so stupid -.- Thanks.

EDIT: Since I'm learning LUA and the book suggests having the lua executable (which I assume is the compiled version) to run my first examples, I was just hoping I could compile it. If that's not the case then where could I get the lua executable file? I'm a total newb at this but I'm really willing to learn, and I really WANT to.
Thanks.

Last edited by G4m3w1z : 04-11-06 at 12:45 PM.
  Reply With Quote
04-11-06, 03:25 PM   #4
Creamo
A Murloc Raider
Join Date: Mar 2006
Posts: 4
Basic steps for creating a WoW addon:
  • Think about what you wish to make.
  • Implement your ideas into a lua script. Available lua, WoW user interface, etc functions/procedures can be found at WoWWiki, and thus is a very decent place to start learning the API.
  • Create a name for your project. Example: MyFirstAddon
  • Open up your World of Warcraft\Interface\Addons folder, and create a new folder named after your project. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn
  • Write your lua script. Name this script after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.lua
  • If you wish to implement a UI, write your xml file, name it after your project, and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.xml
  • Create the toc (table of contents) file for your project. This file will inform WoW detailed information about your addon, such as which files your project should include in your addon. Name this file after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.toc
  • You should now be able to test your addon in WoW. To do so: Run WoW. Log in. Click the "AddOns" button located in the bottom-left corner of the character selection screen. Make sure your addon is enabled. Enter the game world.
Hope this helps.
- Creamo
  Reply With Quote
04-11-06, 04:20 PM   #5
G4m3w1z
A Murloc Raider
Join Date: Apr 2006
Posts: 5
Originally Posted by Creamo
Basic steps for creating a WoW addon:
  • Think about what you wish to make.
  • Implement your ideas into a lua script. Available lua, WoW user interface, etc functions/procedures can be found at WoWWiki, and thus is a very decent place to start learning the API.
  • Create a name for your project. Example: MyFirstAddon
  • Open up your World of Warcraft\Interface\Addons folder, and create a new folder named after your project. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn
  • Write your lua script. Name this script after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.lua
  • If you wish to implement a UI, write your xml file, name it after your project, and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.xml
  • Create the toc (table of contents) file for your project. This file will inform WoW detailed information about your addon, such as which files your project should include in your addon. Name this file after your project and place it in your project folder. Example: C:\World of Warcraft\Interface\Addons\MyFirstAddOn\MyFirstAddOn.toc
  • You should now be able to test your addon in WoW. To do so: Run WoW. Log in. Click the "AddOns" button located in the bottom-left corner of the character selection screen. Make sure your addon is enabled. Enter the game world.
Hope this helps.
- Creamo
It does, thank you! But I am still wondering where/how to get the lua EXE file mentioned here.
http://www.lua.org/pil/1.html
Bottom of the page. "For a start, we recommend that you use the stand-alone interpreter (that is, the lua executable) to run your first examples and experiments. "

Thanks.
  Reply With Quote
04-11-06, 04:34 PM   #6
Ratbert_CP
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 17
Originally Posted by G4m3w1z
It does, thank you! But I am still wondering where/how to get the lua EXE file mentioned here.
http://www.lua.org/pil/1.html
Bottom of the page. "For a start, we recommend that you use the stand-alone interpreter (that is, the lua executable) to run your first examples and experiments. "

Thanks.
Follow the downloads link at lua.org to get the appropriate binary. But you'll have really, really bad luck trying to test WoW addons, since you're missing the entire WoW API...
  Reply With Quote
04-11-06, 04:53 PM   #7
G4m3w1z
A Murloc Raider
Join Date: Apr 2006
Posts: 5
Originally Posted by Ratbert_CP
Follow the downloads link at lua.org to get the appropriate binary. But you'll have really, really bad luck trying to test WoW addons, since you're missing the entire WoW API...
Yeah, I understand that, but I want to learn the basics of lua first, and therefor this could help me, couldn't it?
  Reply With Quote
04-11-06, 05:43 PM   #8
brotherhobbes
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 313
You don't need it. Having a basic understanding of programming concepts would help the most, I think.

I had no previous experience with LUA, but using the http://www.wowwiki.com/World_of_Warcraft_API that Creamo mentioned and the FuBar API documents I was able to write an addon.

If you want to read up on LUA, check out these links I just found on Google:
http://www.lua.org/pil/
http://www.lua.org/manual/5.1/
but I honestly think you could make something without having even looked at them (although it might turn out with some ugly code like my addon ).
  Reply With Quote
04-11-06, 07:40 PM   #9
G4m3w1z
A Murloc Raider
Join Date: Apr 2006
Posts: 5
Originally Posted by brotherhobbes
You don't need it. Having a basic understanding of programming concepts would help the most, I think.

I had no previous experience with LUA, but using the http://www.wowwiki.com/World_of_Warcraft_API that Creamo mentioned and the FuBar API documents I was able to write an addon.

If you want to read up on LUA, check out these links I just found on Google:
http://www.lua.org/pil/
http://www.lua.org/manual/5.1/
but I honestly think you could make something without having even looked at them (although it might turn out with some ugly code like my addon ).
Thanks! FuBar?... ;o what's that?

EDIT: Okay, I'm doing Farang's tutorial, I've gotten to the point where you should load up WoW and test it. However it is not working. I've redone the code over and over, looked for any possible ways it wouldn't work. I'm confused. I try to type /ff 1 it does nothing.

Last edited by G4m3w1z : 04-11-06 at 08:59 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Compiling LUA

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off