Saturday, May 18, 2013

Software assembly line Pt2.

In part 1 of this series, we gathered our dependencies, and placed them into a known directory. In this part, we'll discuss how to build the software, and set up for 'installing'.

Creating the project

The first thing you need to do when creating the project is to set up your build script, makefile, CMakeLists.txt, or whatever your build environment calls for. In your build script, you'll need to refer to the dependencies area. Its a good idea to retrieve your dependencies before you attempt to create the makefile, as you'll have the file structure to reference.

One good thing about putting all your dependencies in one spot is you will always know where your dependencies are, in every project, so configuring multiple projects is consistent. Too many times, I've seen one project think that the dependencies are in some random folder, and another project think they are somewhere else.

Building the project

Next up, build the project. Make sure that it links, and VALIDATE THAT IT LINKS AGAINST YOUR DEPENDENCIES, and not your system's libraries. This is very important if you want to have consistent builds. Once you've validated that you're using the correct dependencies, you need to install the project.

Installing the project

When I say install the project, I do not mean install it for use. The install that I'm referring to is for packaging.  What I do is install into a directory in my project called "installed_files". Anything that goes in this directory is packaged up for use by the dependency manager. 

Submit to the dependency manager

Once you've installed, you'll want to submit those installed files to the dependency manager. This will give us the ability to use ant of our projects as a dependency.

In part 3, I'll do a walk through of the entire process, tying everything together. I will also have a few other hints to help build a stable development process. 

No comments:

Post a Comment