PCSX2 Documentation/PCSX2 Build Scripts: Difference between revisions

From PCSX2 Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


==CMake==
==CMake==
PCSX2 is a cross platform application, so there are some individuals who prefer using Windows development tools (Visual Studio) and some who prefer using Linux development tools (GNU Compiler Collection, etc). It can become a headache trying to sync project files from all these different tools, so there is a program called CMake which can actually generate project and make files for all these different platforms.
PCSX2 is a cross platform application, so there are some individuals who prefer using Windows development tools (Visual Studio) and some who prefer using Linux development tools (GNU Compiler Collection). It can become a headache trying to sync project files from all these different tools, so there is a program called CMake which can actually generate project and make files for all these different platforms.


The CMake build process is controlled by [https://github.com/PCSX2/pcsx2/blob/master/CMakeLists.txt This file here]. Cmake will check if directories exist for the different modules of pcsx2 (core, plugins, etc) and then search for CMakeLists.txt files within those directories, which in turn may check for further subdirectories. For example, the CMakeLists.txt file in the plugins folder will check if directories exist for the different pcsx2 plugins. There will in turn be a CMakeLists.txt file in each of the plugin folders. When you add a new source code file, you will need to add it to the CMakeLists.txt file for the module of pcsx2 you are working on.
The CMake build process is controlled by [https://github.com/PCSX2/pcsx2/blob/master/CMakeLists.txt This file here]. Cmake will check if directories exist for the different modules of pcsx2 (core, plugins, etc) and then search for CMakeLists.txt files within those directories, which in turn may check for further subdirectories. For example, the CMakeLists.txt file in the plugins folder will check if directories exist for the different pcsx2 plugins. There will in turn be a CMakeLists.txt file in each of the plugin folders. When you add a new source code file, you will need to add it to the CMakeLists.txt file for the module of pcsx2 you are working on.

Revision as of 14:52, 7 January 2015

PCSX2 is an extremely complex project with many, many source code files, so much of the process of building and compiling the project is automated.

build.sh

This is where the fun begins. Running this shell script will begin the long build process for PCSX2. First, the script checks for arguments in the command line, setting the build and log directories. Then, the script runs CMake.

CMake

PCSX2 is a cross platform application, so there are some individuals who prefer using Windows development tools (Visual Studio) and some who prefer using Linux development tools (GNU Compiler Collection). It can become a headache trying to sync project files from all these different tools, so there is a program called CMake which can actually generate project and make files for all these different platforms.

The CMake build process is controlled by This file here. Cmake will check if directories exist for the different modules of pcsx2 (core, plugins, etc) and then search for CMakeLists.txt files within those directories, which in turn may check for further subdirectories. For example, the CMakeLists.txt file in the plugins folder will check if directories exist for the different pcsx2 plugins. There will in turn be a CMakeLists.txt file in each of the plugin folders. When you add a new source code file, you will need to add it to the CMakeLists.txt file for the module of pcsx2 you are working on.