Pack resource
BlitzMax Forums/BlitzMax Beginners Area/Pack resource
| ||
Hello guys Someone could explain me how to pack all the resources in a unique file (.dat ie). ? Thanks |
| ||
incbin? |
| ||
Welcome to the forums. There are different ways of packing resources. If you are after a single exe file solution INCBIN should be the command to use. If you need external data files that include all your media you could: 1. use the Zip module in order to create your own files and password protect them. Download: http://www.blitzbasic.com/Community/posts.php?topic=50074 2. use Filax's MPacker Download: http://www.blitzbasic.com/Community/posts.php?topic=49274#550695 3. use other tools I currently can't remember... ;) Grisu |
| ||
3. use other tools I currently can't remember... ;) Were you thinking of Molebox? http://www.molebox.com/ |
| ||
Yes, for instance Molebox. Thanks Gabriel. I'm getting old... :o) Also, there's another third party solution to protect your media which costs about 120 Dollar. Can't remember its name. Conclusion: There are many paths to rome. The problem is finding the one that fits you most. |
| ||
Does MoleBox work with BlitzMax? |
| ||
MoleBox works fine with BlitzMax for me. I've used it with a program that has several graphics files, two .ttf files, and an XP manifest file that are included along with the BMax/MaxGUI executable (which imports a projecticon.o file) in a single .exe. So, it seems to be able to handle just about anything. :) The free approaches mentioned above should be able to do most if not all of that, though. I went with MoleBox Pro since I want to be able to send out updated data/resource files as archive updates if needed for bigger projects, and MBP allows for that easily. For the Mac & Linux versions of the above-mentioned program, I recoded a bit to use Incbin (the executables were naturally larger since MoleBox compresses and Incbin doesn't), but all three versions were similar sizes when zipped for downloading. |
| ||
You probably already know this, but in case anyone else reading this doesn't, you shouldn't worry about larger EXE's from IncBin'ing data. Contrary to a popular misconception, resources in executables are not loaded when the EXE is, so your memory usage shouldn't increase over using an exe and a .dat file. At least not unless IncBin does something funky it shouldn't. |
| ||
Thaks a lot to all. I'll test each solution. |
| ||
I've tried to download Filax Mpacker recently but the url doesn't work. Someone knows another site where it can be found that .bmx? Thanks |
| ||
Making a data packer isnt that hard realy, ive just finished with mine. Let me know if you want it. |
| ||
Download my Packer ;) http://www.blitzforum.de/upload/file.php?id=1256 Well the module is documented and fully working, but unfortunately there is no GUI Interface to create Packages easily.(I'm working on one ;) ) Features: -ZLib Kompression -multibranch directory (like a normal dir) -password protection -currently a simple encryption algo |
| ||
grable:I would like to try your code klepto2: Your code would be very usefull for me (and surely other people). I see that your unpack function needs to load the full pack file on memory before unpack an specific file. I need to pack a large amount or files, some of then with more of 1 Mb of data. It's possible to load on memory only de needed data each time instead the complete file? does another code do that? To solve that i can pack the larger files each one on a unique pack file but this solution is a bit tedious. Thanks |
| ||
xuulspectrum: heres the code, its not a module though (you can easily do that yourself) so the documentation is in the Readme file. And all packing is done through a commandline utility. http://grable0.googlepages.com/PakFile.rar |
| ||
@klepto2, Great packer! Is the request of xuulspectrum possible? It would be userfull. @grable interesting packer, I will take a look thanks |