One approach I use to "unpack" my prc is to simply create a new resource database and
move the records from my own prc
(SysCurAppDatabase) and attach them to the new PRC.
This assumes you don't mind using resources in place of records, and begs the question
"well, if you can use resources anyway, why
make the second application?)
Well, the other approach which you can roll into your UnPack() function is similar to
above except you generate your unpacked
database a record at a time, and manually create the database header info, but then
just copy the raw info from the resource into
the record. You then delete the record and your index points to the next one. You
can display a progress bar during this.
Sometimes, for added flexibility, I put a "marker record" after my original prc so
that I can easily tell where my data starts and
my original prc ends.
If all this sounds like a lot of work, I'm sure you realize by now that it's MUCH less
work than writing an installer and full scale
conduit. :)
Chad Harrison wrote:
> > > any pointers on creating this "self-extracting" archive? I still need to
> > > support < 3.5.
> >
> > It's an idea that's been floating around for a while on this forum - check
> > the archives. I was going to say that the implementation was left as an
> > exercise for the reader. :) Ideally, the self-extracting archive should
> > gradually delete itself as it expands. You shouldn't need twice as much free
> > memory as the data actually consumes. This is one of the tricky parts.
> > Another trick is deleting the final "stub" when you're all done - how do you
> > delete yourself? Fun, fun!
> >
>
> I have searched the archives... but havent really gained any insight ;) I
> just need a point in the right direction I think. how can a palm
> application create another palm application (the sefl extracting part) on
> the fly? or, if I create a new database, dump all of my other databses
> into it, and then beam that over, how does the receiving palm 'know' to
> 'run' it? I'm grasping here...
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/