PCSX2 Documentation/Compiling on Linux: Difference between revisions

Line 42: Line 42:
====Expert mode: CMake build parameters====
====Expert mode: CMake build parameters====
Basic parameters:
Basic parameters:
- Use Release/Devel/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug`
*Use Release/Devel/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug`
  - `Release`: Best in speed, but provides little or no debug/crash info.
**`Release`: Best in speed, but provides little or no debug/crash info.
  - `Devel`: Adds detailed trace logging abilities, but still lacks debug/crash info.
**`Devel`: Adds detailed trace logging abilities, but still lacks debug/crash info.
  - `Debug`: No compiler optimizations. Very good for debug/crash info but also very slooowww.  
**`Debug`: No compiler optimizations. Very good for debug/crash info but also very slooowww.  
- Follow XDG standard : `-DXDG_STD=TRUE`
*Follow XDG standard : `-DXDG_STD=TRUE`
- Build all plugins: `-DEXTRA_PLUGINS=TRUE`
*Build all plugins: `-DEXTRA_PLUGINS=TRUE`


Expert parameters (not supported, the best is to use the default options):
Expert parameters (not supported, the best is to use the default options):
- Tune C flags : `-DUSER_CMAKE_C_FLAGS:STRING="cflags"`
*Tune C flags : `-DUSER_CMAKE_C_FLAGS:STRING="cflags"`
- Tune C++ flags : `-DUSER_CMAKE_CXX_FLAGS:STRING="cxxflags"`
*Tune C++ flags : `-DUSER_CMAKE_CXX_FLAGS:STRING="cxxflags"`
- Tune linker flags : `-DUSER_CMAKE_LD_FLAGS:STRING="ldflags"`
*Tune linker flags : `-DUSER_CMAKE_LD_FLAGS:STRING="ldflags"`


Expert debugging parameters (typical developper only option):
Expert debugging parameters (typical developper only option):
- Build GS replayer: `-DBUILD_REPLAY_LOADERS=TRUE`
*Build GS replayer: `-DBUILD_REPLAY_LOADERS=TRUE`
- Use Address Sanitizer: `-DUSE_ASAN=TRUE`
*Use Address Sanitizer: `-DUSE_ASAN=TRUE`
- Force wxWidget 2.8 (to spot a regression) : `-DWX28_API=TRUE`
*Force wxWidget 2.8 (to spot a regression) : `-DWX28_API=TRUE`


Experimental parameters (not supported, the best is to use the default options):
Experimental parameters (not supported, the best is to use the default options):
- zzogl: Use GLSL for shading instead of nvidia cg : `-DGLSL_API=TRUE`
*zzogl: Use GLSL for shading instead of nvidia cg : `-DGLSL_API=TRUE`
- zzogl: Use EGL instead of GLX : `-DEGL_API=TRUE`
*zzogl: Use EGL instead of GLX : `-DEGL_API=TRUE`
- GSdx: Use openGL ES3.1 instead of pure openGL : `-DGLES_API=TRUE`  
*GSdx: Use openGL ES3.1 instead of pure openGL : `-DGLES_API=TRUE`
- Use SDL2 (wxWidget must be linked with SDL1) : `-DSL2_API=TRUE`
*Use clang (nothing work) : `-DUSE_CLANG=TRUE`
- Use GTK3 (wxWidget must be built with GTK3 support) : `-DGTK3_API=TRUE`
*64 bits support (nothing work): `-D64BIT_BUILD_DONT_WORK=TRUE`
- Use clang (nothing work) : `-DUSE_CLANG=TRUE`
- 64 bits support (nothing work): `-D64BIT_BUILD_DONT_WORK=TRUE`


*Use SDL2 (wxWidget must be linked with SDL1) : `-DSL2_API=TRUE`
*Use GTK3 (wxWidget must be built with GTK3 support) : `-DGTK3_API=TRUE`
Expert options for package creation
Expert options for package creation
- Enable package mode : follow the FHS for distribution `-DPACKAGE_MODE=TRUE`
*Enable package mode : follow the FHS for distribution `-DPACKAGE_MODE=TRUE`
- Plugin install path in package mode : `-DPLUGIN_DIR="/usr/lib/pcsx2"`
*Plugin install path in package mode : `-DPLUGIN_DIR="/usr/lib/pcsx2"`
- GameDB install path in package mode : `-DGAMEINDEX_DIR="/usr/share/games/pcsx2"`
*GameDB install path in package mode : `-DGAMEINDEX_DIR="/usr/share/games/pcsx2"`
- GLSL shader install directory : `-DGLSL_SHADER_DIR="/usr/share/games/pcsx2"`
*GLSL shader install directory : `-DGLSL_SHADER_DIR="/usr/share/games/pcsx2"`
- Update po (translation file) : `-DCMAKE_BUILD_PO=TRUE`
*Update po (translation file) : `-DCMAKE_BUILD_PO=TRUE`
- Rebuild shader : `-DREBUILD_SHADER=TRUE`
*Rebuild shader : `-DREBUILD_SHADER=TRUE`
- Disable AVX: `-DDISABLE_ADVANCE_SIMD=TRUE`
*Disable AVX: `-DDISABLE_ADVANCE_SIMD=TRUE`
- Enable/disable the stipping : `-DCMAKE_BUILD_STRIP=TRUE|FALSE`
*Enable/disable the stipping : `-DCMAKE_BUILD_STRIP=TRUE|FALSE`
   - `TRUE`: Remove debugging information.
   * <code>TRUE</code>: Remove debugging information.
   - `FALSE`: Keep symbols. Better for debug. (recommended since it should not have any impact on speed)  
   * <code>FALSE</code>: Keep symbols. Better for debug. (recommended since it should not have any impact on speed)


===Running CMake to generate the makefile:===
===Running CMake to generate the makefile:===
ninja
782

edits