Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Wed Dec 13, 2017 5:13 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

New package System Work correctly ?
Yes on win32 29%  29%  [ 2 ]
No on win32 0%  0%  [ 0 ]
Yes on Linux 29%  29%  [ 2 ]
No on Linux 14%  14%  [ 1 ]
Yes on iPhone 14%  14%  [ 1 ]
No on iPhone 0%  0%  [ 0 ]
Yes on other plateform 14%  14%  [ 1 ]
No on other plateform 0%  0%  [ 0 ]
Total votes : 7
Author Message
PostPosted: Sun Nov 29, 2009 10:54 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Package auto update feature have been greatly improved (hope so :? ). Rev 936

Run an raydium application with --package zipfile.zip switch.

During application run enter: raydium_path_package_mode("zipfile.zip",RAYDIUM_PACKAGE_READWRITE);

Leave application, normaly an zipfile.zip is created with all media files loaded.

Try to change sky box and live application. New files are automaticaly added to zipfile as it is flagged as READWRITE.

Add a modified file in your local dir, zipfile will be refreshed with local file.

change mode to READONLY, zipfile is now frozen.

Please report bugs, or remarqs suggestions.

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 1:02 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Sorry for taking so long to answer, I struggled to get Internet access before.

First point: I would prefer patch instead of commits for testing/unfinished features :) I must demonstrate the engine in the next two days, and I would very embarrassed if something goes wrong ! :) I may have said this before, but let's consider that the SVN trunk must remain stable.

Small points about the commits:
- a few typos in docs (seen "spécify", "paclage") that perhaps needs a last "re-read". For instance, I've not seen information about the default mode for a zip ? Other example: raydium_path_package_register() still states that zip can't be modified ... I think we can remove this, no ? Always for this function, we could perhaps repeat the default priority ?
- logs in path.c ("********* Path package update", ...) not relevant ? IMHO "'xxxx.xx' added to 'yyy.zip'" is enough.
- raydium_path_package_mode() is declared as "signed char" but returns nothing ?

Big points about the feature and the test:
./odyncomp.sh test6.c --package zipfile.zip
... tries to download zipfile.zip -> not found -> empty file (not created on the disk).
console : raydium_path_package_mode("zipfile.zip",RAYDIUM_PATH_PACKAGE_READWRITE);
when I quit: creates zipfile.zip and fills it with files. Seems ok to me.
BUT the readwrite flag is not added to the file ! (even if the console said it is when I quit)

So when I relaunch the application, package is set to readonly.

Another thing (perhaps related), when I launch again the application and the set the mode "again" to readwrite, when I quit, it "rebuilds" again the zip file even if the files inside are the same.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 2:57 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Don't misunderstand poll question. Commit have been tested, it don't broke nothing on standard package behaviour (hope so).

Poll was the fun part of message. :D sorry.

I was working on this for a long time, i prefer to commit everything than have a local copy too far from sync with trunk.

Last: i already use "local" patch to make small independant commits, so patch of patch seem quite complicated, sorry :oops:

Every small problem are updated in new commit.

For the rest it is more problematic. I can't easily test on linux machine.

1) RAYDIUM_PACKAGE_MODE_xxx is written in archive, it is the first step of package update. It use addFromString from php_zip lib. It work without problem on windows. Is there an error message in the console ?

2) It is the big trouble. Can you uncomment line 51 of zip_add.php. And post console result. I have lot's of trouble to get correct time stamp from "local" windows file and from zip file. Something to handle with light saving i think but not sure. Time stamp can help me a lot. Information about displayed date/time on linux shell (only for first file for example) can be great.

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 4:32 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Nothing is wrong with the poll, of course :) My fears are more about "stability": this patch changes things in some important areas of the project (file management, to make it short) and still needs testing (and that's the reason of this topic), so I'm not feeling confident to see this in the trunk.

Perhaps are you already using this, but I'm used to have multiples SVN "copy": a main one, continually updated, and one for each "work in progress" feature. It's very easy to deal using SVN merge feature, IMHO.

Now, about the bug: my bad, I forgot to "make install" the new release, it was using old rayphp scripts ! All my previously reported bugs are now obviously gone away. Very very sorry ! I made a few other tests and the result is good.

Since the subject is now closed, just a small idea: couldn't it be a good idea to display the zip mode when registering ? It could be a useful reminder.

Also, while reading the PHP code to understand the (non-existent) trouble, I came to a question: is the case where the application is using directories in the zip file still work ? (I'm afraid by "basename() calls" in zip_add.php)

I'll try some more complex tests, soon (read only local directory, files in the ~/.appname/data directory, ...) to see how far we can push this feature.


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 9:50 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
Just want you to inform that I'll check these great improvements on the next weekend for Mac OS X and the iPhone OS. :)


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 10:56 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Ok St waiting for your feedback.

Xfennec: Package mode log in console added.

About path, in zip file. I'll have a look.
Actually path are not saved in zip file. But it's probably quite easy to add.

Have a nive day.
Ouille


Top
 Profile  
 
PostPosted: Sun Dec 06, 2009 1:33 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Done a quick test for a particular case.

Quick introduction: when an application is installed, files are copied all over the system with administrator privileges (at least, that's how I see this with Linux and win targets). So when a user (without any privilege) will launch the application, nothing can be modify (binary/data), that's the point. It's why we've added "user home writing support" (~/.appname/data/) so the application can write things if needed (that leads me to the path priority question, but it's not the point of this message).

So I've switched my directory to read-only and launched test6 with the --package option. Test6 wasn't able to create the zip file, but no error was thrown. This is not a real trouble (even if some more error checking is probably required), but an improvement would be to use the usual "path resolving" to find a writing directory in this case.

A bit more strange and annoying: I'm not able to give any path to --package option. If I give --package "../zipfile.zip" option, the package is read at the good place but always re-created in Raydium current directory each time ... So I end up with zipfile.zip everywhere ! :) Probably a basename() issue, too.


Top
 Profile  
 
PostPosted: Sat Dec 12, 2009 2:32 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Here is a patch
Attachment:
File comment: Package with relative path handling patch.
package_v2.zip [3.3 KiB]
Downloaded 289 times
with better path handling within packages.

Full distinction is done between package name and package path. Basename of package is allowed for changing package mode (i.e. meaning that two package with the same name and differents path won't exist).

Path to write package is resolved in the raydium way of life.

About priority:
Once a package is registered, apllication use this package in priority, this is usefull for deployment.
To refresh a file in the package: copy file in current application directory, as this directory has higher priority file are searched here first.
And thus refreshed in package file.
But if this directory is not writable ... i'm in big trouble.
Ideas welcome !

Have a nice day.
Ouille.


Top
 Profile  
 
PostPosted: Sat Dec 12, 2009 4:44 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Quote:
But if this directory is not writable ... i'm in big trouble.


I'm probably missing a point, but why is it a trouble ? That's the point of ~/.appname/data/ no ?


Top
 Profile  
 
PostPosted: Sat Dec 12, 2009 7:11 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

My strategy for auto updating (refreshing) files is based on file copied in local directory.

If it is not writable, my strategy is down. But it will work with ~/.appname/data

We will see if it's ok like this.

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Sun Dec 13, 2009 1:59 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Quick notes about the patch:
- errors should be displayed using the regular format: "ERROR: package: the world will explode" (so the user can understand more easily the source of the error)
- unused variable in raydium_path_package_update() (base_name)
- "Package zipfile.zip mode: READ WRITE set to:" Not sure to understand the message ? Another message (almost the same: "Package zipfile.zip mode: READWRITE") appears right after when I launch again the application with the same --package.
- when the package is not in the current directory, everything seems to work perfectly, that was the most annoying point with the previous patch IMHO. Nice work on this !
- perhaps renaming raydium_path_package_add() would be a good idea, since it can confuse the user with raydium_path_package_register() I think. raydium_path_package_internal_add() ?


Top
 Profile  
 
PostPosted: Sun Dec 13, 2009 10:21 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Ok.
Here is the new patch. Hope everything ok now :?

for error i used more standard "path: ERROR: " ... syntax which seem more often used.

Bad raydium_log removed.

ok for internal.

Some questions: if i enable Wall option, lots of warnings with php/vorbis headers. How can i disable specificaly thoses warnings ? Do you have the same problem ?

Have a nice day.
Ouille.


Attachments:
File comment: package patch v3
package_v3.zip [4.23 KiB]
Downloaded 250 times
Top
 Profile  
 
PostPosted: Thu Dec 17, 2009 8:05 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Looked at this last patch very quickly, seems OK to me so far to join the trunk. Nice job !


Top
 Profile  
 
PostPosted: Thu Mar 18, 2010 8:13 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
ouille, is there any reason why this patch wasn't commited ? Package system is very useful so far to me, so this patch would be cool ;)


Top
 Profile  
 
PostPosted: Thu Mar 18, 2010 10:11 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I thought i've commit everythings ...

I'll check all of this during this week end.

Sorry :?

Have a nice day.
Ouille


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group