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 

LUA FilePAK 0.1 Beta

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



Joined: 18 Jul 2005
Posts: 116

PostPosted: Wed Mar 15, 2006 12:51 am    Post subject: LUA FilePAK 0.1 Beta Reply with quote

Well... Tell me what you think guys.

http://haggar.pocketheaven.com/files/luapak01b.zip


This release is only for devs ;)

This program packs lots of files together into a single file.
This could be useful for people with games that have lots of level files.

There are currently 3 functions in unpak.lc:
returnvalue unpak(pakname,filename) - unpacks a file fully into the memory stick,
not recommended to use because it's very slow for big files.

returnvalue unpakFunc(pakname,filename) - runs a lua script in the pak file in
memory. It does the same thing as dofile("level01.lua") would do.

table unpakList(pakname) - gives a System.listDirectory() kind of table.

If the above made no sense whatsoever, then look at unpak.lua for examples.

You should use pak.lua to make a pak file before doing anything else. If you think
it's slow, then remove the big 1mb file from the test subdir. ;)

Whatever files you put in the test subdir will be added to the pak file (err... after you (re)run pak.lua that is, it doesn't get added by magic powers).
The exceptions are 0 byte files, and directories.

When you run the unpak function, the temp files will be put in the temp dir.
unpakFunc and unpakList doesn't need any temp files.

This is only a beta, so there's almost no checks for stuff that could go wrong.
Like missing pak files and missing test and temp dirs.


====
TODO
====
- Finish it.
- Add FileBrowser integration.
- Scrap it whenever PhysicsFS gets added to luaplayer.

========
CONTROLS
========
Select = Quit the scripts ;)



Oh... And this got nothing to do with .pak files you find in <insert game name here>.
Back to top
View user's profile Send private message
Wraggster



Joined: 26 Aug 2005
Posts: 121

PostPosted: Wed Mar 15, 2006 6:25 am    Post subject: Reply with quote

damn i was gonna post this until i read the devs only bit ;)
_________________
Webmaster of http://www.dcemu.co.uk

DCEMU The Worlds Only Homebrew & Gaming Network of Sites.
Back to top
View user's profile Send private message Visit poster's website
matriculated



Joined: 04 Mar 2006
Posts: 31

PostPosted: Sat Mar 18, 2006 5:38 am    Post subject: Reply with quote

Does this compress the data? Combining this with modsyn's huffman compression would be a neat way to distribute Lua programs. If Lua apps were hosted this way, someone could make a Lua program to download these and install them directly to the memory stick without using a PC.
Back to top
View user's profile Send private message
MikeHaggar



Joined: 18 Jul 2005
Posts: 116

PostPosted: Mon Mar 20, 2006 7:23 am    Post subject: Reply with quote

Well... Somebody must send me lua-huff.rar then ;)
Back to top
View user's profile Send private message
matriculated



Joined: 04 Mar 2006
Posts: 31

PostPosted: Tue Mar 21, 2006 3:51 am    Post subject: Reply with quote

it's right in this forum:
http://forums.ps2dev.org/viewtopic.php?t=4777
Back to top
View user's profile Send private message
MikeHaggar



Joined: 18 Jul 2005
Posts: 116

PostPosted: Thu Mar 23, 2006 10:49 pm    Post subject: Reply with quote

Umm... Nice broken link ;)
Back to top
View user's profile Send private message
matriculated



Joined: 04 Mar 2006
Posts: 31

PostPosted: Fri Mar 24, 2006 3:25 am    Post subject: Reply with quote

Um, what? I just clicked on it, and downloaded it just now. ?!?
Back to top
View user's profile Send private message
MikeHaggar



Joined: 18 Jul 2005
Posts: 116

PostPosted: Fri Mar 24, 2006 4:41 am    Post subject: Reply with quote

Yep, it works fine now.
Back to top
View user's profile Send private message
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