Erin Catto wrote:
I appreciate efforts to make Box2D work well on Linux and other gcc platforms.
We had a poll a while back about separating header files:
http://www.box2d.org/forum/viewtopic.php?f=3&t=655&p=4058I would like to suggest an alternative: separate the headers but organize them together in the solution so windows users will get the same overview as before (e.g. everyting in ./Source) but Linux and Mingw users can easily copy the ./Include/box2d to their library.
Of course i will yield to the general opinion in this question if this feels to messy, but the work involved in "separating" the header files when installing on linux is much greater than just editing the vcproj-file to simulate the same effect.
Erin Catto wrote:
Having Box2D.h off in some separate directory means that all the classes need to be defined in that file, like glui.h. IMO this would break the modularity of the code. We cannot require the user to define some other include directories in order to include Box2D.h.
Actually, this will allow you to have the same modularity as before, since Box2D.h will be in box2d/Box2D.h and Dynamics will be in box2d/Dynamics. The reason that this is necessary in Linux is because the Dynamics, Commons, etc... should not be directly in the library include directory since it clutters it up. And this will force code examples to be different under linux and in windows, since the header files will be repackaged under linux anyways. (it would be #include <Box2D.h> in windows and #include <box2d/Box2D.h> under linux).
To adjust the linux release to fit the current scheme is simply a greater task than just having another subdirectory. The extra subdirectory will also ensure that code examples stay platform independant (Without having to rewrite the headerfiles just for linux).
Erin Catto wrote:
Currently, the Box2D.h file is optional. You are free to include only the header files you need.
Same goes for an extra subdirectory, the only difference is that you use, for example: #include <box2d/Common/b2Math.h> which in my opinion is much nicer when you use a global library.
Same would go for windows if you just used the ./Include directory in "additional includes".
Erin Catto wrote:
I want to ensure that Windows developers can double-click the sln file and press F5 to run the testbed without installing files in separate places or defining include directories.
[..]
We cannot have an sln file at the top level because we might need to support multiple versions of Visual C++.
I've ensured that they can do just that, currently it's just to double-click the Box2D.VC9.sln (for visual studio 9), i am going to modify the old one to work the same for Visual Studio 8.
I personally believe that this is much clearer than having to go into the ./Build directory to find out
how you can build the library, especially when working in a terminal (like when compiling with msys/mingw under windows for those who doesn't use visual studio).
Multiple versions of visual studio could be achieved by having a file named Box2D.VC8.sln in the root. I am working on it right now.
Erin Catto wrote:
I like the idea about putting glui and freeglut into the TestBed directory. They are not needed by the Box2D library.
Thank you, i especially liked that part aswell

.
Erin Catto wrote:
We made a lot of directory changes at the beginning of Box2D development, taking into account Java and Flash developers.
I just want to take Linux, Freebsd and Solaris (whatever) into account aswell. This library is exquisitely cross platform since it uses only basic C features (in a c++ manner). I would love to se it's filestructure perfected aswell!
Erin Catto wrote:
Branches make sense to me if multiple people will be working on a separate branch, otherwise you can just merge. Any branches should integrate with the main branch asap. We don't have the resources to support multiple branches.
A branch would have been nice when i was developing this branch, since that would mean that people very easily could have checked it out and helped me, so patches would have been as easy as 'diff svn'. A tags directory would also be very nice to have, since it would allow you to forget which revision number was which release (just svn export the trunk into tags/Box2D-<version> and add it). And people downloading the library or a specific version wouldn't have to know either (or ask us for help about it).
Erin Catto wrote:
I suggest taking a look at other libraries like Box2D, such as Bullet and see how they are setup.
I have, under Linux they use a painful keep-track-of-where-all-files-should-end-up-seperately approach. I firmly believe that the ./Include approach would save us a lot of pain and labour on the Linux side, and virtually cause none on the windows.
I neglected to mention the part about flash and Java, since i don't understand how that is relevant.