[Sputnik-list] Installing sputnik under windows,xavante

Yuri Takhteyev yuri at sims.berkeley.edu
Wed Nov 7 11:58:05 GMT+3 2007


I am not 100% sure, since I don't know how Kepler files are laid out
on Windows, but, let me try to explain what it does, which will
hopefully allow you to map it to Windows.

There are two different types of .lua files:

1. sputnik.lua is a "LuaScript" and its location is specified through
sputnik_config.lua and cgilua/config.lua

2. All other lua files, including those in "dependencies," are modules
and they go wherever .lua modules go on Windows, presumably to
Kepler_dir/lua.

#2 should be simple enough.  #1 is a bit tricky, since unlike normal
CGILua applications, the location of spunik.lua gets "hardcoded" into
cgilua/config.lua.

I provide a file called cgilua.config.lua which needs to be copied to
cgialu/config.lua in your installation.  It has the following line:

    cgilua.script_path = sputnik_config.SCRIPT_PATH

This line makes CGILua always use the file specified by
sputnik_config.SCRIPT_PATH instead of using the standard CGILua logic
for deciding what to file to run.  So, you would need to make sure
that at the end of the day your "sputnik_config" module sets
SCRIPT_PATH to the path to your "sputnik.lua".

On UNIX sputnik_config.lua is generated on by running
make_config_file.lua.  The relevant lines in build_sputnik are

$SPUTNIK_DIR/bin/lua5.1 make_config_file.lua
$SPUTNIK_DIR/etc/kepler/1.1/kepler_init.lua $SPUTNIK_DIR
cp new_sputnik_config.lua $SPUTNIK_DIR/share/lua/5.1/sputnik_config.lua

So, make_config_file.lua takes two parameters: a path to your
kepler_init.lua and your installation directory.  It generates a file
called "new_sputnik_config.lua", which you need to copy as
"sputnik_config.lua" in the same directory as all of your other Lua
files.

However, maybe it would be simpler on Windows to just generate the
sputnik_config.lua file automatically.   When you edit
sputnik_config.lua, look for the following two values:

SCRIPT_PATH = "$script_path"
SECRET_CODE = "$secret_code"

The $... parts are slots that make_config_file.lua will fill in.
Instead of running make_config_file.lua, you can just put the absolute
path to your sputnik.lua in SCRIPT_PATH and some random string of
digits in SECRET_CODE.  E.g.:

SCRIPT_PATH = "c:/my_sputnik_dir/sputnik.lua"
SECRET_CODE = "1982307498172309841720938"

Then just copy sputnik_config.lua to where all of your other lua modules go.

Does this help at all or does it only make it more confusing?  The
problem is that I don't have Windows at hand to try this on, so I have
to make guesses about how Kepler might work on Windows.

  - yuri

On Nov 7, 2007 6:16 AM, Georgios Petsagourakis <petsagouris at gmail.com> wrote:
> I am a bit confused with setting up sputnik under Windows and Xavante.
> I do I need to move all the modules in the Kepler_dir/lua ?
> or is there another way I have missed to install it easier?
>
> --
> Best Regards,...
> George Petsagourakis
> _______________________________________________
> Sputnik-list mailing list
> Sputnik-list at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/sputnik-list
>
>



-- 
Yuri Takhteyev
Ph.D. Candidate, UC Berkeley School of Information
http://takhteyev.org/, http://www.freewisdom.org/



More information about the Sputnik-list mailing list