Formatting, https, improve commands

Margen67 2021-05-08 00:18:27 -10:00
parent c94ff38b37
commit 9f701015ea
1 changed files with 29 additions and 9 deletions

@ -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. NOTE: Only 32-bit architectures are supported, or distributions that allow the installation of 32-bit packages under a 64-bit architecture.
## Index ## Index
1. [Introduction](#introduction) 1. [Introduction](#introduction)
2. [CMake Build System](#cmake-build-system) 2. [CMake Build System](#cmake-build-system)
3. [Debugging](#debugging) 3. [Debugging](#debugging)
@ -13,27 +14,32 @@ NOTE: Only 32-bit architectures are supported, or distributions that allow the i
## Introduction ## 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 ## CMake Build System
### Debian/Ubuntu build dependencies ### Debian/Ubuntu build dependencies
#### Enable 32-bit libraries #### Enable 32-bit libraries
`sudo dpkg --add-architecture i386` `sudo dpkg --add-architecture i386`
#### Build system #### Build system
`sudo apt install cmake gcc-multilib g++-multilib` `sudo apt install cmake gcc-multilib g++-multilib`
#### 32-bit libraries #### 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` `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 ### Arch Linux build dependencies
#### Build system #### Build system
`gcc-multilib`, `cmake` `gcc-multilib`, `cmake`
#### 32-bit libraries #### 32-bit libraries
Add or uncomment the following lines in `/etc/pacman.conf`: Add or uncomment the following lines in `/etc/pacman.conf`:
``` ```
[Multilib] [Multilib]
@ -49,10 +55,12 @@ pacman -Syu
### Using CMake ### Using CMake
#### Basic mode: straightforward compilation #### Basic mode: straightforward compilation
Run the `build.sh` script. Run the `build.sh` script.
You can view the available options with `build.sh -help` You can view the available options with `build.sh -help`
#### Expert mode: CMake build parameters #### Expert mode: CMake build parameters
Basic parameters: Basic parameters:
- Use Release/Development/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug` - Use Release/Development/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.
@ -79,7 +87,7 @@ Experimental parameters (not supported, the best is to use the default options):
- Use Clang (works) : `-DUSE_CLANG=TRUE` - Use Clang (works) : `-DUSE_CLANG=TRUE`
- 64-bit support (nothing work): `-D64BIT_BUILD_DONT_WORK=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` - 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"`
@ -101,16 +109,18 @@ cmake .. <other options>
``` ```
#### Do the compilation: #### Do the compilation:
``` ```
make make
``` ```
#### Install files: #### Install files:
``` ```
make install 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: 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. 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) #### Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only)
In a terminal, type: In a terminal, type:
```` ````
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
```` ````
#### Add the multiverse package repository #### Add the multiverse package repository
Uncomment lines looking like this, where trusty is replaced by your Ubuntu version Uncomment lines looking like this, where trusty is replaced by your Ubuntu version
```` ````
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse 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 add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa
sudo apt-get update sudo apt-get update
``` ```
##### Daily Builds ##### Daily Builds
We also have a PPA with the daily builds of `pcsx2-unstable` if 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 add-apt-repository ppa:pcsx2-team/pcsx2-daily
sudo apt-get update sudo apt-get update
``` ```
#### Install the package on your system #### Install the package on your system
To install the latest stable release: To install the latest stable release:
``` ```
sudo apt-get install pcsx2 sudo apt-get install pcsx2
@ -246,16 +261,18 @@ sudo apt-get install pcsx2-unstable
``` ```
## Arch Linux ## Arch Linux
NOTE: for 64-bit architectures, [multilib](https://wiki.archlinux.org/index.php/multilib) must be enabled in order to install PCSX2. NOTE: for 64-bit architectures, [multilib](https://wiki.archlinux.org/index.php/multilib) must be enabled in order to install PCSX2.
### PCSX2 Stable ### PCSX2 Stable
Open a terminal, and type: Open a terminal, and type:
``` ```
sudo pacman -S pcsx2 sudo pacman -S pcsx2
``` ```
### PCSX2 Unstable ### PCSX2 Unstable
Add or uncomment the following lines in `/etc/pacman.conf`: Add or uncomment the following lines in `/etc/pacman.conf`:
``` ```
[Multilib] [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) ## How to compile PCSX2 in 2021 (Ubuntu 20.04)
<!--- I've wasted more time than I'd like to admit searching for this --> <!--- I've wasted more time than I'd like to admit searching for this -->
``` ```
sudo apt remove gcc-9 g++-9 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 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
git clone https://github.com/PCSX2/pcsx2.git git clone https://github.com/PCSX2/pcsx2.git
cd pcsx2 && mkdir build && cd build mkdir pcsx2/build && cd build
git submodule init git submodule init
git submodule update git submodule update
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_REPLAY_LOADERS=TRUE -D CMAKE_BUILD_PO=FALSE -D GTK3_API=TRUE .. 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 make install
cd ../bin cd ../bin
``` ```
## How to compile PCSX2 in 2020 (Gentoo & Derivatives): ## How to compile PCSX2 in 2020 (Gentoo & Derivatives):
``` ```
sudo emerge -av net-libs/libpcap x11-libs/wxGTK media-libs/libsoundtouch dev-libs/libaio \ 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 media-libs/libsdl2 app-arch/lzma net-libs/libpcap dev-libs/libxml2
git clone https://github.com/PCSX2/pcsx2.git 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 \ 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" \ -DwxWidgets_CONFIG_EXECUTABLE="/usr/lib64/wx/config/gtk3-unicode-3.0-gtk3" \
-DPACKAGE_MODE=TRUE -DCMAKE_INSTALL_PREFIX=/usr .. -DPACKAGE_MODE=TRUE -DCMAKE_INSTALL_PREFIX=/usr ..
make -j$(nproc --all) make -j$(nproc)
make install make install
cd ../bin cd ../bin
``` ```