I had to upgrade our test software when we built new systems because the DAQ hardware is obsololete. So far I have created the new drivers and updated the old dll's to run in the new environment Win 7 but now I am getting to the integration point and I am thinking our original thought to include some branching in our classes that initialize the devices might not be the best way, for one I don't like making changes to a well established class, in order to get the new stuff to work, because this adds considerably to regression testing, so I am thinking I just really need to duplicate the old class and upgrade it to work only with the new hardware and then create separate build configs - one for legacy support - one for new hardware
Please give me thoughts on the best way to handle this situation, I have the time upfront to plan this out, which is usually not the case
First of all, congratulations to you for even planning this out! So many times we programmers end up just trying to code without thinking.
Also, having the time upfront to plan this up is very fortunate! I very much agree that not having the time is ususally the case!
One thing to consider is whether you need to support the old version or not. It sounds like that you do have to support both because of your statement about not waning to make changes to a well-established class. So if it's easy to separate out the builds, I'd say I'd rather maintain makefiles than code in this case. It really depends on whether you have to build for more than one environment too (different Windows versions, or UNIXes or Linuxes).
We have our OS-specific code in its own modules so that most of the code is the same across all platforms. This saves us a ton of regression work.