tags:

views:

129

answers:

6

I have created an open source project that runs from Visual Studio. But it relies on some external libraries to work as well. These libraries are also open source. The question I'm wondering is if I should

  1. Point users to these libraries and have them download the source code and then add them to the project
  2. Point users to the dll and have them reference it directly
  3. Include the dll directly into the project
  4. Include the source code of these libraries directly into the project

Which is the best way or standard way of doing this?

+2  A: 

There are guidelines that are not open source specific, but I think they apply.

I always include binaries of all external libraries (except for standard ones like System.dll) in source control. This way, people that check out source code can immediately build the project. Moreover, I can easily switch to older version of project and immediately have dependencies in versions that were used to build that revision - this is particulary useful when debuging older release of software.

maciejkow
+1  A: 

Most projects I've seen include a ThirdParty folder (or something similar) with the dll files in the project, and the project references those. This ensures everyone has the same version and theres no need to change the references.

If its in version control it also makes it easier to debug if you need to switch back to an earlier version.

Brandon
+1  A: 

(1) is fine for users downloading the source for your project, assuming that the list of dependencies does not get out of control and they remain easy to acquire.

(2) is basically the same as (1) as long as you're referring to a binary that someone else builds. I wouldn't build and distribute the dll's yourself outside of your own package.

(3) For binary distributions, I would do this, and include every dependency so my software runs "out of the box"

(4) Don't do this unless you need to fork the other libraries for some reason (hopefully this never happens)

EDIT: For your own source control, do whatever is easiest. My recommendations are for your distributions (source and binary) only. It's not uncommon to put the source code to 3rd party libraries in your own revision control, or just put the headers and binary libraries in - whatever works best for your situation.

Nick Bastin
A: 

I'd say it depends on the size and availability and volatility of the libraries.

The larger they are, the less you want to include them and the more you want to point to them.

The more problems your users are likely to have in getting them, the more you want to include them. Something on Sourceforge is likely to stay there, but something on Joe's personal website is likely not to.

If the libraries are likely to change to cause problems, you want to include a version in your project.

If the libraries are likely to change to improve something without breaking things, you want to point to them.

At the very least, you should provide the DLLs unless they're too large, and mark them with the version.

Also, check the licenses. Particularly under a copyleft license like the GPL, you may have an obligation to make sure the source for everything is available yourself.

David Thornley
what do you mean by mark them with the version? Specify the version they should be using?
seanlinmt
Specify the version you used, anyway. That way they're pretty well guaranteed to build the same software you're providing.
David Thornley
A: 

You can make it as simple or complex as you like. As a user, I prefer that all libraries be included in downloadable distributions of the product. That makes things as simple as possible for people who just want to use your project with a minimum of fuss. Downloading external libraries can really be difficult for a user (esp in the .Net world), and giving them a known good set of dependencies can be a real help.

jsight
A: 

You should give them at least two options:

  • a binary download, all executables and libraries (no source)
  • full source for your own code (mo external library source)

You should not provide the source for the external libraries UNLESS you have modified them, in which case you MUST do so. Providing the libarary source just multiplies the various places you can get the source from, and adds to confusion about what version you have got.

You should, of course, provide links to the library home pages. If you are distributing under the GPL, you must also be prepared to supply the library source directly yourself.

anon