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