Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2
This is the forum to discuss the Wrox book Beginning Lua Programming by Kurt Jung, Aaron Brown; ISBN: 9780470069172
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2007, 07:30 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default dummy lua install

Since Lua is a very good language for beginners, I was hoping there would be a instructions for dummies to install on windows in this book. What Ive done so far is to unzip the lua binarys (using Power Archiver)to a lua directory I created by right clicking on the desktop. The books says that unzipping the tarball file gives a
lua5.1
bin
Win32

directory stucture. Well I didnt get that, I just got the 4 files that are supposed to be in the Wing32 file by themselves. And the windows binarys only came as a zip file, not a tarball. So I copied those 4 files by right click/copying them into a directory I made called utility and then changed the name of the 3 files by right click/renaming them. I also set the utility directory in the system path, and it seems to work ok as I can type lua into the command window and the lua interpreter comes up. So now I want to set user enviornment variables, but Im afraid it wont work because I have a different directory structure. Here are the enviorment variables as stated in the book:
UTIL_DIR=c:\program files\utility
LUA_DIR=c:\program files\lua\5.1
LUA_CPATH=?.dll;%LUA_DIR%\?.dll
LUA_PATH=?.lua;%LUA_DIR%\?.lua

But notice is the second one it has a backslash between lua and 5.1, whats that about, is there a seperate directory called 5.1? Remember I have no directorys inside my lua directory.

And to make these variables, I suppose on the last one LUA_PATH is the variable name and ?.lua;%LUA_DIR%\?.lua is what I put as the target, right? Well thats about it, I hope someone can make sense of this.
  #2 (permalink)  
Old March 28th, 2007, 06:30 AM
Wrox Author
 
Join Date: Apr 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brad,

You're right, there is no directory structure in the new Lua
binaries zip file. The file lua5_1_1_Win32_bin.zip at

  http://luaforge.net/

contains the files

  luac5.1.exe
  bin2c5.1.exe
  lua5.1.exe
  lua5.1.dll

> So I copied those 4 files by right click/copying them into a
> directory I made called utility and then changed the name of the
> 3 files by right click/renaming them.

The book recommends that you rename lua5.1.exe to lua.exe, and
rename luac5.1.exe to luac.exe. However, you can't rename
lua5.1.dll because lua.exe looks for it by its original name.
Versions of luac.exe downloaded after 14 March 2007 no longer
depend on lua5.1.dll. You can disregard bin2c5.1.exe.

> I also set the utility directory in the system path, and it seems
> to work ok as I can type lua into the command window and the lua
> interpreter comes up.

Good. You're all set to proceed with all of the material in the
first half of the book.

> So now I want to set user enviornment variables, but Im afraid it
> wont work because I have a different directory structure.

The extra 'lua\5.1' directory really only matters when you start
using Lua modules. The whole idea is to keep Lua modules in a
directory that is not part of the Windows search path. The book
recommends that you create a directory named 'c:\program
files\lua\5.1' to hold modules. First, create a directory named
'lua' directory in the 'c:\program files' directory, and then
create a directory named '5.1' in the 'c:\program files\lua'
directory. Once these directories have been created, you can set up
your environment variables.

> And to make these variables, I suppose on the last one LUA_PATH
> is the variable name and ?.lua;%LUA_DIR%\?.lua is what I put as
> the target, right?

Exactly.

  Variable name: UTIL_DIR
  Variable value: c:\program files\utility

  Variable name: LUA_DIR
  Variable value: c:\program files\lua\5.1

  Variable name: LUA_CPATH
  Variable value: ?.dll;c:\program files\lua\5.1\?.dll

  Variable name: LUA_PATH
  Variable value: ?.lua;c:\program files\lua\5.1\?.lua

Good luck!

--
Kurt
  #3 (permalink)  
Old March 28th, 2007, 11:36 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks much Kurt! Im really looking forward to this book.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dummy AS400 butter Javascript How-To 1 October 28th, 2008 02:08 AM
Lua install and Luaedit ashzr BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 0 November 19th, 2007 10:00 AM
lua - HELP, PLEASE! thedreameater Other Programming Languages 1 November 13th, 2007 05:20 PM
Beginning LUA trav BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 11 February 20th, 2007 07:47 AM
adding fixed dummy column yuvalk SQL Language 4 March 29th, 2004 05:37 AM



All times are GMT -4. The time now is 06:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.