forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

System.listDirectory on windows

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
fullerlee



Joined: 03 Nov 2005
Posts: 54

PostPosted: Tue Nov 29, 2005 9:07 am    Post subject: System.listDirectory on windows Reply with quote

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:

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


I get:

Code:

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
Back to top
View user's profile Send private message
cancan



Joined: 18 Nov 2005
Posts: 30
Location: France

PostPosted: Tue Nov 29, 2005 10:06 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
sweetlilmre



Joined: 01 Oct 2005
Posts: 27

PostPosted: Wed Nov 30, 2005 12:07 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
cancan



Joined: 18 Nov 2005
Posts: 30
Location: France

PostPosted: Wed Nov 30, 2005 12:24 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
sweetlilmre



Joined: 01 Oct 2005
Posts: 27

PostPosted: Wed Nov 30, 2005 7:16 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
cancan



Joined: 18 Nov 2005
Posts: 30
Location: France

PostPosted: Thu Dec 01, 2005 12:28 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
cancan



Joined: 18 Nov 2005
Posts: 30
Location: France

PostPosted: Thu Dec 01, 2005 12:48 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Visit poster's website
fullerlee



Joined: 03 Nov 2005
Posts: 54

PostPosted: Thu Dec 01, 2005 4:36 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Thu Dec 01, 2005 5:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
cancan



Joined: 18 Nov 2005
Posts: 30
Location: France

PostPosted: Thu Dec 01, 2005 5:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group