Page 1 of 1
Layout of an OGRE based project
Posted: Mon Feb 14, 2005 1:24 pm
by Dalfy
Hello everybody,
I am on the way of starting a project based on OGRE. I would like some tips on how 'skilled' developers layout their project source tree around OGRE.
Does they use a folder containing the whole project including all external library such as OGRE ?
Does the library does not appear in the source tree and are available in the system ?
I have think at something similar to :
Code: Select all
project
src
build
bin
lib
share
...
vendor
Ogre
ODE
...
data
mesh
scene
...
Thanks for your answering and sorry for my english writing mistakes.
Posted: Mon Feb 14, 2005 2:03 pm
by DWORD
'Skilled' I don't know. But the way I do it is:
Code: Select all
Development
+-ogrenew
| (Ogre's source and libs)
+-MyProject
| +-bin
| | +-debug
| | +-release
| +-include
| +-media
| +-obj
| | +-debug
| | +-release
| +-scripts
| +-src
This way I keep my project and Ogre's source seperate. Still I need to copy over Ogre's DLLs into my own bin/debug and bin/release directories (in Windows), but that's not a big deal. You can take a look at
YAT's source to see it in practice. For a release I would just take the contents of the bin/release directory, and then zip the media directory and put it in there too.
I found this to be a good way to do things. It requires a little setup to point to the right include and lib directories, but once it's done it works very well. Hth
Posted: Mon Feb 14, 2005 2:12 pm
by Dalfy
Thanks for your answer.
So you don't manage a build dir outside of your project source ?
Have you work with an SCM using this layout ?
Posted: Mon Feb 14, 2005 3:10 pm
by DWORD
Dalfy wrote:Thanks for your answer.
So you don't manage a build dir outside of your project source ?
No problem. No, I don't have a build dir, but the binaries end up in the bin/xxx directories, and temporary build files are in obj/xxx, so the source isn't filled with irrelevant files.
Dalfy wrote:Have you work with an SCM using this layout ?
What is an SCM? Source control management? I haven't used that before.
Posted: Mon Feb 14, 2005 4:22 pm
by Exsortis
@DWORD:
SCM = Source code management, i.e., CVS, Subversion, Perforce, etc.
@Dalfy:
Dalfy wrote:Thanks for your answer.
So you don't manage a build dir outside of your project source ?
Have you work with an SCM using this layout ?
DWORD's layout could work with SCM. Just don't add bin or obj to the repo.

Personally, I keep my build products outside of the project's directory.
Dalfy wrote:Does they use a folder containing the whole project including all external library such as OGRE ?
You can put your 3rd-party libraries wherever you wish.
Dalfy wrote:Does the library does not appear in the source tree and are available in the system ?
Only if the library is yours and part of the project itself. Otherwise, you would keep it outside, and let others know who are using your project that those libraries are required to build your project.
-E
Posted: Mon Feb 14, 2005 4:44 pm
by DWORD
Exsortis wrote:SCM = Source code management, i.e., CVS, Subversion, Perforce, etc.
Ah, ok. I use CVS but only as a client so far.
Exsortis wrote:DWORD's layout could work with SCM. Just don't add bin or obj to the repo.

Personally, I keep my build products outside of the project's directory.
Yeah, I can see it could be a problem having those files in the project directory with respect to SCM. But if you are careful not to commit these files I think it would work well. That's how it's done with Ogre's CVS repository, I think.
Posted: Mon Feb 14, 2005 4:55 pm
by Dalfy
There is no real problem for not storing unwanted files such as object or binary executable file format even if the build dir layout is inside of the project tree.
I think I will keep the library outside of the project but inside of the "working area" doing something like this in order to keep all the information together.
I think on using something similar to this in order to easly provide binary version of my project
Code: Select all
project_area
project (SCM)
src
include
build_target1
bin
conf
lib
data (compiled) or shared or whatever name that fits well
build_target2
bin
conf
lib
data (compiled)
data (source) (SCM)
vendor
OGRE_target1
OGRE_target2
ODE_target1
ODE_target2
Posted: Mon Feb 14, 2005 5:04 pm
by haffax
you can also just add an .cvsignore file into your bin and obj directories to prevent unwanted files from being committed accidently.
Posted: Mon Feb 14, 2005 9:31 pm
by Emmeran
my structure is this:
Code: Select all
Disk 2
+ Ogre
| (Ogre v0.1.1)
+-Palaba
| +-src
| +-include
| +-Binary
| | +-Debug
| | | +-Media
| | | | +-Config
| | | | | (Config files for debug)
| | +-Release
| | | +-Media
| | | | +-Config
| | | | | (Config files for release)
| | +-Media
| | | (Global media files etc.)
| +-Build
| | (Build files etc.)