Common large software project development file directory structure

xiaoxiao2021-03-06  59

Common large software project development file directory structure

Java project

The ClassS file after the debug stage is placed in the class content. Put the classes directory and other tools in the lib. Jar in the ClassPath. Run the current directory is the project root directory.

The official release of .CLASS is placed in one or more .jar files, usually in the root directory, but also to the classpath.

Since the multi-compiler is often compiled in the Java project, it is more common that development is compiled using development tools and packaged, and the Project file is placed in a secondary location.

2. Visual Basic project

The COM DLL and EXE compiled by the Visual Basic project are generally placed under the root directory. Since Visual Basic is easy to do, there is a large number of subscriber projects to compile COM DLLs, and load it after starting through the primary EXE.

There is a problem with the above directory setting: When debugging, the current directory is in the sub-project directory, for example, for module1_submodule2, and the current directory of the release is under the root directory, so it is necessary to determine the process when the program is started.

3. Visual C project

Debug phase, all DLLs, LIB files are placed below the build and lib directory. For subprojects, put the DLL directly in Build, exe in the build directory.

Like the Visual Basic project, there is an inconsistency between the commissioning phase and the official version of the current directory. However, the Working Directory can be set in the VC project properties, so this problem is also easy to solve.

For large projects, there is still a problem, that is, the entire project is compiled and may reach half an hour. Let everyone take the latest code every morning from the repository, which is very normal. But there is no need to let everyone spend half an hour later every morning. A more common practice is that a timing compiled batch program is running on a server, typically in half of the night, compiled files are placed in the shared directory. This way programmers only need to take the latest source code from the repository every day, then copy the compiled file, such as .class, .obj, .dll, .exe.

There is another place to pay attention to here, it is to synchronize the time of different computers. Can not serve the server at May 1st, my computer time is June 1. The compiler can make incremental compilation, saving time. Incremental compilation The time and compile time of the source code. Since compiled files are replicated from the server, different computer times cannot differ too much.

Automatic compiled files such as .class, .obj, .dll, .exe generally do not put them in the repository, but just shared. Because if you put it in a repository, the file attribute after the client download is read-only, there are many inconvenient.

Of course, if it is just a small project, all files are placed in a directory and there is no major relationship, more expensive.

转载请注明原文地址:https://www.9cbs.com/read-119122.html

New Post(0)