IncludePacked
Posted: Sat Nov 15, 2008 1:00 pm
I would like to have an easy way to pack files on compile time and catch them in the executable.
For example:
or with existing commands + new MemoryPack:
The important thing is that the compiler packs the files. It should use the internal Packer commands to be cross platform.
Currently I am using an optimized version of the PackPlus Include, but it's annoying to pack the files again and again.
At least MemoryPack() should be added, because that would allow me to create a pre-compiler on my own.
Thanks in advance!
For example:
Code: Select all
CatchImage(#TestFileA, PackedInclude(?TestFileA))
CatchXML(#TestFileB, PackedInclude(?TestFileB), PackedIncludeLength(?TestFileB), 0, #PB_UTF8)
DataSection
TestFileA: IncludePacked "testA.bmp"
TestFileB: IncludePacked "testB.xml"
EndDataSection
Code: Select all
MemoryPack(?TestFiles)
CatchImage(#TestFileA, NextPackFile())
CatchXML(#TestFileB, NextPackFile(), PackFileSize(), 0, #PB_UTF8)
ClosePack()
DataSection
TestFiles:
IncludePacked "testA.bmp"
IncludePacked "testB.xml"
EndDataSection
Currently I am using an optimized version of the PackPlus Include, but it's annoying to pack the files again and again.
At least MemoryPack() should be added, because that would allow me to create a pre-compiler on my own.
Thanks in advance!