System.listDirectory on windows

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
fullerlee
Posts: 54
Joined: Thu Nov 03, 2005 9:46 am

System.listDirectory on windows

Post by fullerlee »

I'm having a problem using System.listDirectory under windows LUAPlayer and I wondered if anyone had any insight.

I believe I have the latest version of luaplayer (timestamp: 11/26/2005 02:09 dl'ed from LUMO's site).

I have a directory music underneath the script directory.

For the following code:

Code: Select all

files = System.listDirectory("music")
		
for eachFile in files do
	table.foreach(files[eachFile], print)
end
I get:

Code: Select all

directory       false
name
size    1.836e+16

directory       false
name
size    1.1671e+18

directory       false
name
size    1.2456e+18
Can anyone help?

Thanks,
Lee
cancan
Posts: 30
Joined: Fri Nov 18, 2005 9:15 pm
Location: France
Contact:

Post by cancan »

Same problem, I don't get any file name or directory flag under windows.
Even when starting Lowser I get some strange char. instead of the real file name.

Anyway it is better than before, it is not blocking the app anymore it just don't give the expected result.

I did try it directly under windows and under Cygwin. Failed in both cases.
sweetlilmre
Posts: 27
Joined: Sat Oct 01, 2005 7:24 pm

Post by sweetlilmre »

The initial build I gave LuMo had some stubbed functionality.
The new build (0.14) from the official site (www.luaplayer.org) should work (I added the flag info's in that build).

I have tested this with Lowser and the icons for folders / files / scripts display correctly (at least on my home and work machines).

File permissions are as yet unimplemented.
-(e)
cancan
Posts: 30
Joined: Fri Nov 18, 2005 9:15 pm
Location: France
Contact:

Post by cancan »

Sweetlilmre

This is the version I'm working with and where the problem is.
In the previous version the function was blocking the apps.

I agree that when Lowser is started icons are displayed, but the file names are weird.
sweetlilmre
Posts: 27
Joined: Sat Oct 01, 2005 7:24 pm

Post by sweetlilmre »

Hi,

What do you mean by "the file names are weird"?
I've just tested this with luaplayer.exe and system.lua in a dir that contains the Applications folder from the release, and I get:

3D Cube
Calculator
Clock
etc.

-(e)
cancan
Posts: 30
Joined: Fri Nov 18, 2005 9:15 pm
Location: France
Contact:

Post by cancan »

Hi

Just started luaplayer system.lua in the Applications directory from release 0.14.

I should then get as you wrote
3D Cube
Calculator
....

What I receive is the good path (....../Aplications) in the top and one icon as folder and the rest of the icons as files.
No text is displayed next to the icons except some characters which looks more like chinese (or like an ace, a cross, a spade, etc.. ) than pure ascii.
After if I select -> (right) to go to the directory I receive 9 folders, the path does not change in the top (remains ...../Applications) and I can use the right arrow thousands of times.
Sometimes a file name comes (again the graphic stuff looking like chinese char. and a list of folders.)

I can send you some screenshots if it helps (don't know how to attach it here and I don't have any website available to post them).

Maybe I do something wrong, have you a way to start this?

I will give it a try on a system where no Cygwin is installed at all.
cancan
Posts: 30
Joined: Fri Nov 18, 2005 9:15 pm
Location: France
Contact:

Post by cancan »

I did test it on a system without any Cygwin installation on it.
Same result, no file names.

Do I need some psp sdk libraries to have it running well?
fullerlee
Posts: 54
Joined: Thu Nov 03, 2005 9:46 am

Post by fullerlee »

I just downloaded the latest windows version from luaplayer.org, and my results are still the same (see above).

Haven't had chance to try it on a real PSP yet.

Lee
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

fullerlee wrote:I just downloaded the latest windows version from luaplayer.org, and my results are still the same (see above).
I've tried it with the version I've compiled and uploaded to www.luaplayer.org and can reproduce the problem. I don't know why it doesn't work, the code looks ok, perhaps something is wrong with my Cygwin Windows built environment.
cancan
Posts: 30
Joined: Fri Nov 18, 2005 9:15 pm
Location: France
Contact:

Post by cancan »

Shine, sweetlilmre:
That's why I'm thinking on a missing library.
For information I installed Cygwin using the PalmOsDevelopperSuite and added the stuff I needed (XWin, some shell commands like vim, inetd modules,...).
Also my home path for Cywin is not C:\Cygwin.
I did recently updated the installation.
I will check if I have updated all the latest system libs related to file systems.
I'm also using the dos file format and not the unix one in Cygwin.

fullerlee:
On the PSP it's working fine like before.
Post Reply