OK, I've done all the fixing up I'm doing today.  If anyone else would
like a go at it, feel free.  Here and now, there are 533 .cpp files to
be compiled, 358 of them succeed, and 175 fail.

To get the branch:

svn co 
https://svn.sourceforge.net/svnroot/rosegarden/branches/reorganisation/rosegarden
 reorganisation

That last argument can be whatever you like, but don't overwrite your
existing working tree.

You'll notice that all the source code is now under src/.  There are no
scons files yet; I've been using a simple makefile, which is in
scripts/reorganise-makefile.

There is also an even simpler script in scripts/reorganise-compilecheck,
that tries to compile each file and prints out just the first error line
for each one that fails -- quite a useful thing for doing broad but
shallow fixups on loads of files at once while waiting for it to trundle
through compiling them.  You have to build with the simple makefile at
least once before using this script, as it doesn't know how to make the
moc files.

So, when you have your source tree, first edit scripts/reorganise-makefile
to fix the paths to Qt, moc, uic etc (which are currently Debianish).  Then

cd src
make -f ../scripts/reorganise-makefile

With a bit of luck that should get you through quite a few files before
it first bombs out (though I'm using gcc-3.x here, so you gcc-4 people
will probably find it bombs out on the very first file for some reason).

To run the general compileability check, just do

bash ../scripts/reorganise-compilecheck

If you get the urge to fix some files, please send a message to the list
to say what group of files you're fixing (if just a subset), and when
you start and stop work (assuming you're going to commit at the end).

I'd also suggest that if the reason for a failure is not immediately
obvious to you, you leave it and move on to the next one.  It'll be more
obvious to someone else, and there are plenty of others to fix.  That's
where the compilecheck script is more useful than make.

Most common reasons for compile failures:

 * Missing #include for KDE or other Rosegarden class.  Particularly
   insidious where the required class is not explicitly mentioned,
   e.g. m_view->getTrackEditor()->blah() requiring the definition of
   TrackEditor.

 * Class declaration in header refers to a typedef, #define or constant
   that was defined in the same header as it, but the script hasn't
   associated them together and the definition of the thing referred to
   has been lost.  You'd generally need to copy the definition back
   across from trunk in this case.

 * Class definition in .cpp file refers to a typedef, #define, constant,
   or another class or struct defined locally in the .cpp file, which
   has similarly been lost.  Same resolution.

 * Code refers to Rosegarden::Key but compiler assumes Qt::Key.  If you
   can think of a good way to handle this in general, please say.  I've
   reluctantly had to restore some explicit Rosegarden:: prefixes.

 * Script has buggered up and omitted the return type for a function
   definition -- has happened quite a lot where the return type has a ::
   in it.  e.g.

   std::string
   MyClass::getSomeString() const

   becomes

   MyClass::getSomeString() const
  
   and you need to restore the std::string.

Right, I'm outta here for today.


Chris

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to