From 9f701015ea5ea20b5d30b38dcafef749eb16211d Mon Sep 17 00:00:00 2001 From: Margen67 Date: Sat, 8 May 2021 00:18:27 -1000 Subject: [PATCH] Formatting, https, improve commands --- Installing-on-Linux.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/Installing-on-Linux.md b/Installing-on-Linux.md index 051ae8f..4220d31 100644 --- a/Installing-on-Linux.md +++ b/Installing-on-Linux.md @@ -1,6 +1,7 @@ NOTE: Only 32-bit architectures are supported, or distributions that allow the installation of 32-bit packages under a 64-bit architecture. ## Index + 1. [Introduction](#introduction) 2. [CMake Build System](#cmake-build-system) 3. [Debugging](#debugging) @@ -13,27 +14,32 @@ NOTE: Only 32-bit architectures are supported, or distributions that allow the i ## Introduction -This is intended to give you an idea of how to compile PCSX2 from Git in Linux. Some of the steps may be different on some versions of Linux, and this is not generally supported by the PCSX2 team. If you have issues following this guide, I'd recommend going through this thread for help: http://forums.pcsx2.net/Thread-Linux-Compile-Guide-and-Support +This is intended to give you an idea of how to compile PCSX2 from Git in Linux. Some of the steps may be different on some versions of Linux, and this is not generally supported by the PCSX2 team. If you have issues following this guide, I'd recommend going through this thread for help: https://forums.pcsx2.net/Thread-Linux-Compile-Guide-and-Support ## CMake Build System ### Debian/Ubuntu build dependencies #### Enable 32-bit libraries + `sudo dpkg --add-architecture i386` #### Build system + `sudo apt install cmake gcc-multilib g++-multilib` #### 32-bit libraries + `sudo apt install libaio-dev:i386 libbz2-dev:i386 libcggl:i386 libegl1-mesa-dev:i386 libglew-dev:i386 libgles2-mesa-dev:i386 libgtk2.0-dev:i386 libjpeg-dev:i386 libsdl1.2-dev:i386 libwxgtk3.0-gtk3-dev:i386 nvidia-cg-toolkit zlib1g-dev:i386 libsdl2-dev:i386 libjack-jackd2-dev:i386 libportaudiocpp0:i386 portaudio19-dev:i386 liblzma-dev:i386 libsoundtouch-dev:i386 libxml2-dev:i386 libpcap0.8-dev:i386` ### Arch Linux build dependencies #### Build system + `gcc-multilib`, `cmake` #### 32-bit libraries + Add or uncomment the following lines in `/etc/pacman.conf`: ``` [Multilib] @@ -49,10 +55,12 @@ pacman -Syu ### Using CMake #### Basic mode: straightforward compilation + Run the `build.sh` script. You can view the available options with `build.sh -help` #### Expert mode: CMake build parameters + Basic parameters: - Use Release/Development/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug` - `Release`: Best in speed, but provides little or no debug/crash info. @@ -79,7 +87,7 @@ Experimental parameters (not supported, the best is to use the default options): - Use Clang (works) : `-DUSE_CLANG=TRUE` - 64-bit support (nothing work): `-D64BIT_BUILD_DONT_WORK=TRUE` -Expert options for package creation +Expert options for package creation: - Enable package mode : follow the FHS for distribution `-DPACKAGE_MODE=TRUE` - Plugin install path in package mode : `-DPLUGIN_DIR="/usr/lib/pcsx2"` - GameDB install path in package mode : `-DGAMEINDEX_DIR="/usr/share/games/pcsx2"` @@ -101,16 +109,18 @@ cmake .. ``` #### Do the compilation: + ``` make ``` #### Install files: + ``` make install ``` -### Reporting Cmake bugs +### Reporting CMake bugs Not all distributions and configurations were tested. In case you encounter a CMake bug that is really a CMake issue, you can report it. Please provide the following information: @@ -206,12 +216,14 @@ zypper in pcsx2 With multiarch functionality, you can install a 32-bit PPA on a 64-bit Ubuntu. You need at least Ubuntu 12.04 (Precise) to do this. #### Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only) + In a terminal, type: ```` sudo dpkg --add-architecture i386 ```` #### Add the multiverse package repository + Uncomment lines looking like this, where trusty is replaced by your Ubuntu version ```` deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse @@ -227,6 +239,7 @@ In a terminal, type: sudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa sudo apt-get update ``` + ##### Daily Builds We also have a PPA with the daily builds of `pcsx2-unstable` if @@ -235,7 +248,9 @@ you prefer the bleeding edge. sudo add-apt-repository ppa:pcsx2-team/pcsx2-daily sudo apt-get update ``` + #### Install the package on your system + To install the latest stable release: ``` sudo apt-get install pcsx2 @@ -246,16 +261,18 @@ sudo apt-get install pcsx2-unstable ``` ## Arch Linux + NOTE: for 64-bit architectures, [multilib](https://wiki.archlinux.org/index.php/multilib) must be enabled in order to install PCSX2. ### PCSX2 Stable -Open a terminal, and type: +Open a terminal, and type: ``` sudo pacman -S pcsx2 ``` ### PCSX2 Unstable + Add or uncomment the following lines in `/etc/pacman.conf`: ``` [Multilib] @@ -276,6 +293,7 @@ This will build the package, automatically installing all dependencies. It will ## How to compile PCSX2 in 2021 (Ubuntu 20.04) + ``` sudo apt remove gcc-9 g++-9 @@ -294,29 +312,31 @@ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 git clone https://github.com/PCSX2/pcsx2.git -cd pcsx2 && mkdir build && cd build +mkdir pcsx2/build && cd build git submodule init git submodule update cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_REPLAY_LOADERS=TRUE -D CMAKE_BUILD_PO=FALSE -D GTK3_API=TRUE .. -make -j10 +make -j$(nproc) make install cd ../bin ``` + ## How to compile PCSX2 in 2020 (Gentoo & Derivatives): + ``` sudo emerge -av net-libs/libpcap x11-libs/wxGTK media-libs/libsoundtouch dev-libs/libaio \ media-libs/libsdl2 app-arch/lzma net-libs/libpcap dev-libs/libxml2 git clone https://github.com/PCSX2/pcsx2.git -cd pcsx2 && mkdir build && cd build +mkdir pcsx2/build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_REPLAY_LOADERS=TRUE -DCMAKE_BUILD_PO=FALSE -DGTK3_API=TRUE \ -DwxWidgets_CONFIG_EXECUTABLE="/usr/lib64/wx/config/gtk3-unicode-3.0-gtk3" \ -DPACKAGE_MODE=TRUE -DCMAKE_INSTALL_PREFIX=/usr .. -make -j$(nproc --all) +make -j$(nproc) make install cd ../bin -``` \ No newline at end of file +```