Página académica del Colegio Nacional



Comunidad y Foros de discusión
No estás autentificado

< Último hilo   Siguiente hilo > Nuevo Tema  Publicar una respuesta
Autor: Asunto: PRM Delveopment

Miembro normal





Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 23/2/2004 en 13:21
Hey, TeeJay thought that I might be of service by trying to update Thraka's Princed Resource Manager. We've briefly discussed the idea and have decided that a "WinZip" style user-friendly GUI would work best.

poirot, do you think you could write me up a document containing the file format of the *.dat files, including things such as what markers to look for and so forth? Given the information I've found I managed to put together a quick *.mid extractor for the MIDISND1.DAT and MIDISND2.DAT files.

Any help would be greatly appreciated!
All ideas are welcome!

 
Reply With Quote Visit User's Homepage

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 23/2/2004 en 23:33
Did Tammo Jan read my mind? that was exactely what I was going to tell you! I'll send you the sources of PRM. Can you register a username in http://project.princed.com.ar so I can add you in the developer team?

I can't explain how the format works, it's too complex for a thread post, even for a forum. But I have something better: the pr.dll!!! this dll can be used in VB programs to extract files from a dat file. Please subscribe to the developer email too, so we will be a bit more in touch. Anyways, I'm trying to add your ICQ un my jabber transport.

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 24/2/2004 en 07:00
Hey, I managed to register my name at http://sourceforge.net/ which is the same thing I hope! I couldn't find a link on http://project.princed.com.ar except on the left hand side where it read: "New user via SSL". If I've made a mistake, just tell me. My user name is the same as my registered name here: ugmo_joe.

I have the pr.dll and thought about using it, but then I ran into the complication of viewing the contents of a *.dat file without extracting anything. Pr.dll only allows you to either extract, import, confirm the content type or clear the res table . I need to be able to view the file's contents without having to extract the files and read the res table.

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 25/2/2004 en 02:24
You did right, http://project.princed.com.ar is just a link to our SF.net project, I use it as URL shortcut. I'll add your username to the project so you can see the CVS; use the bug reporting, patches and support features; post news, etc etc.

About the extraction, please download PR 0.9-r2 (the version released this week), there you'll find a file named resources.xml.
Well, you can't see inside a dat file because dat files doesn't have any resource information inside (like resource type or name) so the file resources.xml is a database with all this information. If you want to see what information is inside a dat file, just take a look at the resources.xml, I can add some functions to PR to parse the file so you can show the users what information is inside.
Another interesting function I can code to solve the program is a one-specific resorce extraction, so you can show a thumbail of a picture when you are showing the list read from the xml.
I've added you in a mailing list, did you get the mail? if you did, you can contact me and other coders using it

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 26/2/2004 en 11:00
Great news! Although I've never coded with an XML DOM Document in Visual Basic 6.0 before, I've found out how to use the resources.xml file you gave me. It's taken me two whole nights to figure it out, but I've done it. Now I'm just designing the GUI and assigning the appropriate functions.
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 27/2/2004 en 16:30
I've added to pr.dll some functions that parses the XML file, here you have them:

int parseStructure(const char* vFile);
tTag* resourceTreeGetChild(tTag* whereAmI);
tTag* resourceTreeGetNext (tTag* whereAmI);
tTag* resourceTreeGetRoot ();
int resourceTreeGetInfo (tTag* whereAmI, char** tag, char** desc, char** path, char** file, char** itemtype, char** name, char** palette, char** type, char** value, char** version, char** number);

in VB, use int as Boolean, const char* as byval string, char** as byref string and tTag* as variant.

I have to compile the file and I'll send you.

so if you want to start you use:
if parseStructure("resources.xml") then
root=resourceTreeGetRoot
else
debug.print "error"
endif

to move to the child of root use firstChild=resourceTreeGetChild(root)
to move to the next siebling of the child of root use resourceTreeGetNext(firstChild)

and using recursivity you can show all the XML tree.

when you need to get information on a node, use resourceTreeGetInfo.

I hope it would be useful!

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 1/3/2004 en 07:51
Sounds great! Send it to ugmo_joe@hotmail.com
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 3/3/2004 en 04:24
Ok, gimme some more time, I've successfully compiled pr.dll v1.0 beta but I got some problems running it in VB, I'll test it a bit more and upgrade the definition module pr.bas so you can use the functions from the bas file. I need to read the manual about passing variables to a DLL from VB (it isn't so simple). I think tomorrow I'll be able to send something useful
 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 3/3/2004 en 04:31
Great!

I've ran into one problem: how to extract single files without extracting them all. Because a user can make their own *.dat files, the sizes of the files inside will vary. Do you have any ideas?

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 4/3/2004 en 00:34
First of all you've got an email
Answering to your problem... well... I can code very fast a one-item extraction option, but I can't code a one-item importing option veryfas as the whole file needs to be remade. For that reason we have to decide if it's very important that I code this or it's better that your program extract the file in a temporary directory and copy only the resource you need. The time performance of both options are the same, perhaps the second it's a bit slower, but I don't think it's too much. Well, if you think the first option is better I'll code the one-item importer/exporter.

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 22/2/2004
Status: Desconectado

  publicado el 11/3/2004 en 07:46
Hey poriot, sorry I haven't replied sooner. I've been swamped with homework for the past week!

I've been thinkng about those two extra functions that you say you can add in: to extract and import single files. I think that it would definitely be a good addition to the DLLs flexibility. I think it would make things a lot easier for developers such as myself to modify the *.dat files.

If I'm asking for too much then tell me. I can just as easily code the program to extract all the files to a temporary directory and move only the desired items into another folder.

 
Reply With Quote
Nuevo Tema    Publicar una respuesta


Powered by XForum 1.6n by Trollix Software
original script by xmb


 
  All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me. Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Página Generada en: 0.292 Segundos