View Full Version : Run-time package creation
vsevolod
03-13-2005, 03:07 AM
I need to create packages at runtime from external files, one package per file, and add these packages into existing category.
First, I couldn't find any _simple_ way to enumerate external files, basing on existing external files filter, entered at design time;
Second, I couldn't find an action to create package myself.
Is it possible to do that in SF7?
Ted Sullivan
03-13-2005, 08:41 AM
Can you please provide some more detail as to what your goal is? I'm not sure why you'd need to create packages at runtime that couldn't be determined when you are creating your installer.
vsevolod
03-14-2005, 04:02 AM
Well, there is generiс core installer, which may or may not install arbitrary number of additional plugins. Plugin files that vendor intends to supply, resides in the same dir as installer. So far, installer weakly references these files via External tab, using file extension filter, and assigning dummy "Plug-ins" package to it. So, at the Select Package screen we have just one common "Plug-ins" package node for any external plug-in file found by installer. What I'd like to have at this stage - create root category "Plug-ins" and for each external plug-in file, found by installer, create the corresponding package at runtime, then add it to this category, allowing user to explicitly select installation action for each plugin. So far, we have only two options for any external plugin file found - all or nothing.
BTW, I didn't find any handy way of enumerating files hooked as externals. At least, at the moment of Startup action execution, SUF7 may have built such list. Of course I may implement file enumeration code myself, but at least, it would be useful to have access to the External tab settings, I don't want to hard-code file filter, duplicating existing one, which was added at designtime.
vsevolod,
You may be able to accomplish something like this using the ListBox screen. You could do a File.Find action to populate the list. Then when the user clicks on an item you could do a File.Copy to place that file into the proper directory. This could be dynamic so you would not have to update the executable in order to add additional plugins ect.
Adam Kapilik
vsevolod
03-16-2005, 04:58 AM
Thanks, Adam
And though I believe your approach is feasible, but it would be more natural to have it in SelectPackages tree, wouldnt it?
Vsevolod
I understand where you are comming from but there is no way to create packages that reference files on the fly. If this did not need to be dynamic then I think it would be possible but without previous knowledge of the files I do not believe that it is possible.
Adam Kapilik
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.