views:

22

answers:

3

Hi,

Good practice is to include into source repository all 3rd party assemblies required by sources to compile. Then reference such assembies from within repository. The problem is, sometimes license of referenced assembly directly prohibits such action, eg: "You can not publish the software for others to copy" - this covers any kind of redistribution. Putting assembly into source repository would be violation of this statement.

From end user point of view, issue is rather minor: Simple note about prerequisite in Wiki page together with readme file should be enough. Something like "In order to use our library please download and install product X first."

From developer point of view, problem is more interesting. As a dev, I want to be able to download sources, open solution and be able to recompile it. Thus I need downloaded sources to have access to referenced assembly. I have to download and install it first, similar as end user would have to do. This cannot be avoided if I want to play nice and according to license. The question is, how to reference such assembly in sources? Let's assume, that it doesn't go to GAC during installation. Answer would be trivial otherwise. I could reference it from within standard installation folder, which is probably somewhere in program files, but:

  • one can install it into custom folder. I am too lazy to change default installation folder, but others may be not.
  • path to program files differs in various releases of Windows (32 vs 64 bit, OS editions localized into other languages than English etc.) So path working on my machine can be broken on another.
  • standard installation folder may contain version number in its name. So this folder name will change with every new release of referenced assembly.
  • sometimes assembly contains version number in file name. This will also change with new releases.

There is number of 3rd party assemblies that are available for free and at the same time prohibit their redistribution. They have to be obtained directly from publisher. IMO such licensing is not OSS friendly - world is cruel sometimes.

I need solution that will require as few manuall steps from developer as possible (ideally zero) in order to be able to recompile sources after checkout. Are there any best practices or standards here? How to handle mentioned issues?

+1  A: 

I would include the following. A click here bat file. A description in a readme and also in the FAQ

In the instructions I would go pretty much right to baby steps as to what versions download , where from. Step by step installation, and how to check it was successful. Including screen shots. You can never have too much doco.

Preet Sangha
A: 

path to program files differs in various releases of Windows

Environment variables exist, you know. Things like %PROGRAMFILES%.

Otherwise, it's simple to have as part of your config script (or something similar) a quick scan for the libraries you need, and if you can't find them, ask for their location to be specified manually.

Anon.
A: 

A script to download whatever libraries are necessary to the right paths relative to your source tree would be immensely helpful. Beyond that, use environment variables or appropriate system calls to determine paths of interest on the local system.

Novelocrat