| View previous topic :: View next topic |
| Author |
Message |
wasted
Joined: 19 Feb 2006 Posts: 6
|
Posted: Sun Feb 19, 2006 9:15 am Post subject: Newbie - cygwin Lua emulator question. |
|
|
Hi all - I've been searching through and am just stuck on how to invoke the Lua emulator in cygwin.
I've installed the toolchain etc... and can get a lua hello world test script to run, but one that uses psp functions fails with:
$ lua script.lua
lua: script.lua:2: attempt to index global `Color' (a nil value)
stack traceback:
script.lua:2: in main chunk
[C]: ?
where the script contains :
$ cat script.lua
-- create a new Color object
green = Color.new(0, 255, 0)
-- show some text on offscreen
screen:print(200, 100, "Hello World!", green)
-- flip visible and offscreen
screen.flip()
-- wait forevever
while true do
screen.waitVblankStart()
end
I guess I need to include the PSP library that contains the Color function, but do not know how to do this.
Any help much appreciated ! |
|
| Back to top |
|
 |
wasted
Joined: 19 Feb 2006 Posts: 6
|
Posted: Mon Feb 20, 2006 8:41 pm Post subject: |
|
|
| Am I asking for something that cannot be done ? |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Tue Feb 21, 2006 5:18 am Post subject: |
|
|
you can't do it that way.
what you try is calling luaplayer-specific functions on normal lua release
you need to get luaplayer for windows
put it in a folder eg ~/luaplayerwindows
then enter this directory and put your script.lua in.
start the script by typing
./luaplayer.exe script.lua
thats it
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
wasted
Joined: 19 Feb 2006 Posts: 6
|
Posted: Sat Feb 25, 2006 10:07 pm Post subject: |
|
|
Thanks - that makes sense.
I've followed the instructions at http://wiki.ps2dev.org/psp:lua_player:compiling and got LuaPlayer source. When I try to compile I get the error for missing header file - tdefs.h (see below).
Can anyone help with another location for the source ?
wasted@Sun ~/source/LuaPlayer
$ make -f Makefile.windows
g++ -I. -I/include -I/sdk/include -I/include -Isrc -c -o src/luacontrols.o sr
c/luacontrols.cpp
In file included from src/luacontrols.cpp:2:
src/luaplayer.h:5:19: tdefs.h: No such file or directory
src/luacontrols.cpp:4:21: pspctrl.h: No such file or directory |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Sat Feb 25, 2006 10:42 pm Post subject: |
|
|
do you have pspsdk path set? _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
wasted
Joined: 19 Feb 2006 Posts: 6
|
Posted: Thu Mar 02, 2006 7:30 am Post subject: |
|
|
No I don't. I have :
PSPDEV=/usr/local/pspdev
Looking at http://wiki.ps2dev.org/psp:lua_player:compiling the only reference to pspsdk is in the block for making freetype:
cd freetype
sh autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
Do I need to start from this point ?
Thanks. |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Thu Mar 02, 2006 7:33 am Post subject: |
|
|
if you want to compile the whole thingy i got a script for you (which SHOULD do all the stuff)
if you want it, let me know and i mail it to you, please give me feedback as if its working fine... i can release it!
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
wasted
Joined: 19 Feb 2006 Posts: 6
|
Posted: Fri Mar 03, 2006 7:15 am Post subject: |
|
|
| Yes please ! Do I need to add my email add to my profile ? |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Fri Mar 03, 2006 10:17 pm Post subject: |
|
|
you can PM me your email too ;)
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
|