Persistent data with starkits and starpacks

"Sergio Anis" <[email protected]> Mon, 23 Feb 2009 07:36:01 -0500
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
I usually write files (metakit and other support exec) to the OS file system. To avoid problems with the location and rights I put it into $::env(TEMP)

>>> Jean-Claude Wippler <[email protected]> 2/23/2009 5:26:44 AM >>>

On 23 Feb 2009, at 05:16, irrational wrote:

> I conclude then that if I want persistent data across sessions I have
> to either (1) distribution as a starkit, or (2) write the persistent
> data out to a file somewhere in OS file system.

It's an OS-enforced no-no: you can't write to running executables.

If you insist on doing something to that effect anyway, you'll need to  
launch something else, make the changes, and re-launch the modified  
starpack. I.e. save to another file and switch/rename from a batch  
file / shell script, for example.

> The problem with (1) is my users are not savvy and need a simple
> clickable application. Preferably with a sweet little icon.
>
> The problem with (2) is where to put the data? Every OS has different
> conventions, user areas and privileges, etc. Any suggestions on this,
> surely others have deal with this before?

One approach I've used a few times is to create a starkit next to the  
app at runtime.

FWIW, I recently used a minimal starpack with just enough startup  
logic to fetch the real app as a starkit and then launch it - that  
allows me to use the same mechanism for on-line updates: check for a  
new version and adjust local copy accordingly if needed, then launch  
it. With a starsync-like approach, that can be done without disrupting  
other data saved locally in that same file - config params, caches,  
whatever.

-jcw






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en
-~----------~----~----~----~------~----~------~--~---