Topic: Creating a data package
As I'm about to submit the package file code, I think it might be best to explain how to use it. After all, I need testers to tell me that it's working, right?
So, unfortunately, at time of writing, there's no automagic way of doing this, although I'm planning on adding a publish button which will do just that, still, you might want to create automated build scripts to deploy or some such nonsense. But you're going to have to use the npk command line executable. There's a gui version, but it required wxwidgets, which I didn't have installed. Sorry. I've added the executables to the 3rdparty/npk/bin/{win32/linux} folder in svn (assuming Anael has submitted it there) and I will upload it somewhere and link it at the bottom of the post, if you don't fancy checking out the whole svn repository.
So, fire up your favourite command line and head to wherever your project is. It's also easiest if you add npk somewhere in your PATH where your OS can find it. Then repeat after me.
Doing Linux example first, I'll write a Windows one later
First add npk to the path
Nistur@DRAKE ~/maratis/3rdparty/npk/bin/linux $ ls
npk
Nistur@DRAKE ~/maratis/3rdparty/npk/bin/linux $ export PATH=`pwd`:$PATH
Then in your project directory, first create the package file
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ ls
Credits.txt YoFrankie.mproj levels maps meshs scripts
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -create
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ ls
Credits.txt YoFrankie.mproj YoFrankie.npk levels maps meshs scripts
Then, let's add some files. For now only images, scripts and sounds will work from the package
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -add maps/char_ram_col.jpg@maps/char_ram_col.jpg
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ npk YoFrankie.npk -list
Package : YoFrankie.npk
Version : 27
Total entity : 1
Timestamp : 2012-01-14 21:50:24
-------------------------------------------------------------------------------
size original flag date time name
-------------------------------------------------------------------------------
539,749 539,749 2012-01-14 21:21:38 maps/char_ram_col.jpg
-------------------------------------------------------------------------------
Note: you need to add the files with the same entity name, including the full path, otherwise Maratis might not find it.
You can always just add all the files together:
Nistur@DRAKE ~/maratis/trunk/dev/Examples/YoFrankie $ for dir in scripts maps ; do for file in $dir/* ; do npk YoFrankie.npk -add $file@$file; done; done
Hope that helps at least somebody