[fdo-internals] RE: Provider registry

Robert Fortin robert.fortin at autodesk.com
Wed Dec 17 17:00:54 EST 2008


Jason,

I look at the existing installer and merge module for FDO and provider and there is a bit of "Autodesk-ism" that would need to be cleaned up in order to post it to OS and make it generic.  It will require a bit of time to do this.

And yes, all the info to register the provider is extracted from the dll and used for the registration. Once the info is gathered, you can use the RegisterProvider() function on FdoFeatureAccessManager:GetProviderRegistry() to register the provider. Similar mechanism can be used to unregister a provider (although all you need is a name to unregister it).

RF

-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Monday, December 15, 2008 10:18 PM
To: fdo-internals at lists.osgeo.org; mapguide-internals at lists.osgeo.org
Subject: [fdo-internals] Provider registry

Hi all,

I'm working on an open source installer for MapGuide using the WiX toolset.  As part of this, I want to offer users the choice of registering each of the installed providers or not during the install setup.

Obviously, the best way of doing this would be to create a custom action DLL or exe that Registers on install and UnRegisters on uninstall, but I lack the C++ chops to do that.

An alternative would be for me to write the XML to the providers.xml file directly using WiX's XMLConfig or XMLFile functions.  However, I've run into a bit of a problem.  There doesn't appear to be any way for me to create a FeatureProvider element and then reference that uniquely as the parent for the Name, etc, elements.  Sure would be nice if the provider details were stored in attributes of the FeatureProvider rather than elements :)

I'd thought of tagging each provider with a dummy name attribute, but I don't think that the schema MapGuide uses would validate against that:

http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/Schema/FeatureProviderRegistry-1.0.0.xsd <http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/Schema/FeatureProviderRegistry-1.0.0.xsd>

Does ADSK have custom action code for this that they'd be willing to open source?  The FDO merge modules in the current MGOS installer appear to have a custom action which is called with the provider .dll as an argument; I'm guessing that this extracts the provider details and uses them to register the provider, but am not positive.  If this functionality could be wrapped up into a console app, then it would be useful for both the installer and for end users / external provider authors.

As an aside, I'd be happy to create a standalone installer for FDO once I've got the MapGuide one working.  Perhaps I should be dealing with FDO core and providers as merge modules in preparation for that step.

Any ideas?

Thanks,
Jason
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals


More information about the fdo-internals mailing list