views:

286

answers:

2

Is there any tool that can convert a large and complex* Visual Studio 2005 (or 2008) Solution into a SCons project?

* Lots of projects and multiple configurations on multiple platforms/compilers

+2  A: 

Probably not, and even if there were, SCons gives you significantly more transparency and flexibility about managing your build than visual studio does. As a starting point, it's best to do each one in turn.

  1. Create a new makefile project
  2. Clone the source from one project to another
  3. Invoke scons from the makefile command.
  4. Replace the dependancies on the old project with the scons version.
  5. Test
  6. Repeat from 1. with each project.

Once you've done a few projects, it's pretty easy to refactor the major differences between build types (shared libs, static libs and programs) and platforms into a module of common scons helpers that can be imported. On windows, consider groups of flags for things like debug and release builds, standard library linkage and exception handling.

Also, things to look out for include:

  • If you're doing cross platform builds, consider the differences between the linking models with respect to the effects of missing symbols.
  • What you'll do to deal with manifest files and invoking the visual studio tools.
  • Variant build directories (debug/release) can be tricky at the start. Start simple, and enhance your build once you're sure it's necessary.
Andrew Walker
I'm starting to see a pattern for cross platform development where people start with Make/Scons builds and then have their builders generate Visual Studio/Eclipse/XCode projects for the native platforms to support people who use them.
Fuzz
That would be the correct way to do things, however the solution in question has hundreds of projects/dependencies (if they were all built live in the same solution).
Danielb
A: 

The following script looks promising. I may give it a whirl: the reason the by hand solution isn't completely practical due to the sheer scale of the solution in question: it has hundreds of projects. This is why I was thinking a script that would generate SCons modules would give me a starting point.

Unfortunately porting the solution in question to SCons by hand would be a project in itself!, although I do admit it would be the 'correct' way to do it.

Danielb