FROM : Andrew Zamler-Carhart
DATE : Thu Jan 30 18:48:43 2003
Daniel,
I have a plug-in loading feature in my application that works as you
have described. When the program runs, it checks an XML file on a web
server to get a dictionary of all available plug-ins and their
versions. It then presents a window to the user asking which plug-ins
they would like to download.
If the user chooses to download one or more plug-ins, the program
downloads a .tar.gz file to a temporary directory using curl. Then it
decodes the archive using tar, and copies the files into the
Application Support directory. So the work here is really done using
NSTask with command line utilities.
Then it sweeps the Application Support directory for plug-ins, and
loads the plug-ins that aren't already loaded. An this all really only
takes a second or two in practice. Voila, there's loading code directly
off the web.
The one problem I've encountered is that while this is great for
loading new plug-ins, there's no way to unload the old version of a
bundle once it has been loaded. Therefore, updates will actually
require the program to be restarted.
For more information on iConquer plug-ins, see:
http://www.kavasoft.com/iConquer/developer
If you want a more robust interface to curl, check out Dan Wood's
CURLHandle. This is the framework that he uses to download plug-ins in
Watson.
http://curlhandle.sourceforge.net/
Andrew
KavaSoft
On Thursday, January 30, 2003, at 10:10 AM, Daniel Delp wrote:
> I am working on an app that is completely based on bundles. Each
> section of the app is broken down this way to allow for quicker and
> easier (although not at the time being) upgrades. My thought is, it is
> much easier to just download a portion instead of the whole file.
> However, I have yet to find a way to programmatically create a bundle
> instance in the file system. To explain better, The client computer
> connects to a master computer and sends the bundle versions. If one is
> not up to date, the server will send the contents of the bundle to the
> client. That I can do, but I'm not sure (other than the long way of
> using CFBundleCreate) how to create the new bundle. Thanks for any > help
DATE : Thu Jan 30 18:48:43 2003
Daniel,
I have a plug-in loading feature in my application that works as you
have described. When the program runs, it checks an XML file on a web
server to get a dictionary of all available plug-ins and their
versions. It then presents a window to the user asking which plug-ins
they would like to download.
If the user chooses to download one or more plug-ins, the program
downloads a .tar.gz file to a temporary directory using curl. Then it
decodes the archive using tar, and copies the files into the
Application Support directory. So the work here is really done using
NSTask with command line utilities.
Then it sweeps the Application Support directory for plug-ins, and
loads the plug-ins that aren't already loaded. An this all really only
takes a second or two in practice. Voila, there's loading code directly
off the web.
The one problem I've encountered is that while this is great for
loading new plug-ins, there's no way to unload the old version of a
bundle once it has been loaded. Therefore, updates will actually
require the program to be restarted.
For more information on iConquer plug-ins, see:
http://www.kavasoft.com/iConquer/developer
If you want a more robust interface to curl, check out Dan Wood's
CURLHandle. This is the framework that he uses to download plug-ins in
Watson.
http://curlhandle.sourceforge.net/
Andrew
KavaSoft
On Thursday, January 30, 2003, at 10:10 AM, Daniel Delp wrote:
> I am working on an app that is completely based on bundles. Each
> section of the app is broken down this way to allow for quicker and
> easier (although not at the time being) upgrades. My thought is, it is
> much easier to just download a portion instead of the whole file.
> However, I have yet to find a way to programmatically create a bundle
> instance in the file system. To explain better, The client computer
> connects to a master computer and sends the bundle versions. If one is
> not up to date, the server will send the contents of the bundle to the
> client. That I can do, but I'm not sure (other than the long way of
> using CFBundleCreate) how to create the new bundle. Thanks for any > help
| Related mails | Author | Date |
|---|---|---|
| Daniel Delp | Jan 30, 10:12 | |
| Daniel Delp | Jan 30, 10:14 | |
| tom wible | Jan 30, 11:05 | |
| Daniel Delp | Jan 30, 12:41 | |
| Andrew Zamler-Carh… | Jan 30, 18:48 | |
| Daniel Delp | Jan 30, 21:26 |






Cocoa mail archive

