Popular folder structure for build

2019-01-21 02:31发布

I am wondering what the popular or best way to organise your build assets and source code within a project is?

9条回答
ゆ 、 Hurt°
2楼-- · 2019-01-21 02:40

For me it depends on the project size. For small projects, I find that a project directory with a single Makefile, /src and /include directory works well.

查看更多
时光不老,我们不散
3楼-- · 2019-01-21 02:47

For .NET projects check ProjectScaffold and discussion under this gist.

查看更多
Ridiculous、
4楼-- · 2019-01-21 02:51

Personaly I use

/client/projectname/trunk/source/Solution Name.sln
/client/projectname/trunk/source/Project.One
/client/projectname/trunk/source/Project.Two
/client/projectname/trunk/source/Project.Three
/client/projectname/trunk/source/SQL/
/client/projectname/trunk/source/SQL/SomeScript.sql
/client/projectname/trunk/libraries
/client/projectname/trunk/resources/Nunit
/client/projectname/trunk/resources/LLBLGEN
/client/projectname/trunk/documentation
/client/projectname/trunk/builds

It works fine for us but I don't think it's the best. If it's about .net you can also take a look at treesurgeon They describe it themselves as:

Have you ever spent a few days setting up a new development tree? Have you ever spent several days setting up several development trees? Have you even spent weeks trying to perfect all your development trees using a set of best practices?

If the answer to any of the above answers is 'yes', then you'll like Tree Surgeon!

Tree Surgeon is a .NET development tree generator. Just give it the name of your project, and it will set up a development tree for you in seconds. More than that, your new tree has years worth of accumulated build engineering experience built right in.

查看更多
甜甜的少女心
5楼-- · 2019-01-21 02:53

In general:

src/      - source files
src/tests - unit tests
doc/      - documentation
res/      - static resources (textures, locale database, level definitions etc)
build/    - tools needed to build the system
            project specific libraries and compilers
Makefile  - the makefile (make, test, clean etc)
查看更多
姐就是有狂的资本
6楼-- · 2019-01-21 02:54

As I am working only on Java projects, and all of them are "Mavenized", I use the conventions defined by Maven for the project structure.

Basically:

project
  src/main/java        --> source files
  src/main/resources   --> resources files (*.xml, *.properties, etc.)
  src/test/java        --> source files for tests.
  src/test/resources   --> resources files for tests.
查看更多
叼着烟拽天下
7楼-- · 2019-01-21 02:56

I like the way the Netbeans IDE organizes projects. Just start a new project, and it will set-up a default development tree and an ant script.

查看更多
登录 后发表回答