-
-
Notifications
You must be signed in to change notification settings - Fork 82
Compiling from sources
This wiki explains how to install the development tools on your system (see below the list of available systems).
Before following this tutorial, we strongly recommend you to do a first installation from the release version thanks to this page.
It will provide you tools and command lines to install dependencies and avoid you some loss of time here!
It means that this tuturial is only needed if you wish to participate to the project itself and make your own contribution
- Compiling the project from source
First at all, you have to install MSYS2 as provided in the installation documentation here. Just follow the instructions from step 1 to 5.
When MSYS2 is installed, we want first to be sure that all is updated.
In the MSYS2 terminal, update it:
- Run
pacman -Suuyto update the rest of the packages (allowing downgrades). You MUST restart MSYS2.
Now we can install the development tools needed to compile PVSNESLIB.
In the MSYS2 terminal, install the following packages:
pacman -Sy mingw-w64-ucrt-x86_64-toolchain
pacman -Sy mingw-w64-ucrt-x86_64-cmake
pacman -Sy mingw-w64-ucrt-x86_64-doxygen
pacman -Sy mingw-w64-ucrt-x86_64-pcre2
pacman -Sy base-devel
pacman -Sy git
pacman -Sy zipCongratulations, you're done to start to compile PVSNESLIB on Windows !
Now, to use the MSYS2 UCRT64 toolchain, just open the MSYS2 UCRT64 terminal. See here to integrate it under Visual Studio Code.
This procedure explains how to install the development tools on Ubuntu latest (22).
First at all, you have to ensure that your distribution is up to date.
In a terminal:
sudo apt update -yOnce it's done, in case of change, you should reboot your system.
Then, you can install the development tools:
sudo apt-get install -y build-essential \
gcc-12 \
cmake \
make \
git \
doxygen \
texi2html \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extraFinally, set gcc-12 as your default compiler:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90This step will set
gcc-12as your the default compiler. the90is the priority, here higher priority. We need to do it because the default compiler on Ubuntu 22 isclang.
Congratulations, you're done to start to compile PVSNESLIB on Ubuntu!
This procedure explains how to install the development tools on debian latest (11).
First at all, we need to add the testing component from the Debian repository, which contains gcc-12.
echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.listThen, let's ensure that your distribution is up to date.
In a terminal:
sudo apt update -yOnce it's done, in case of change, you should reboot your system.
Then, you can install the development tools:
sudo apt-get install -y build-essential \
gcc-12 \
cmake \
make \
git \
doxygen \
texi2html \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extraFinally, set gcc-12 as your default compiler:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90This step will set
gcc-12as your the default compiler. the90is the priority, here higher priority. We need to do it because the default compiler on Debian 11 isgcc-11.
Congratulations, you're done to start to compile PVSNESLIB on Debian!
This procedure explains how to install the development tools on Fedora latest (37).
First at all, you have to ensure that your distribution is up to date.
In a terminal:
sudo dnf update -yOnce it's done, in case of change, you should reboot your system.
Then, you can install the development tools:
sudo dnf -y groupinstall "Development Tools"
sudo dnf -y install cmake \
gcc-c++ \
glibc-static \
libstdc++-static \
git \
doxygen \
texi2html \
texlive-scheme-basicCongratulations, you're done to start to compile PVSNESLIB on Fedora!
This procedure explains how to install the development tools on Centos latest (7).
First at all, you have to ensure that your distribution is up to date and that the powertools repository is enable on your system.
In a terminal:
sudo dnf -y install dnf-plugins-core
sudo dnf -y config-manager --set-enabled powertools
sudo dnf update -yOnce it's done, in case of change, you should reboot your system.
Then, you can install the development tools:
sudo dnf -y groupinstall "Development Tools"
sudo dnf -y install cmake \
gcc-c++ \
glibc-static \
libstdc++-static \
git \
doxygen \
texi2html \
texlive-scheme-basicCongratulations, you're done to start to compile PVSNESLIB on Centos!
This procedure explains how to install the development tools on MacOS.
First at all, you have to ensure that your distribution is up to date.
In a terminal:
sudo softwareupdate -i -aNote: You can also use the graphical interface to perform the same action. It's really up to you.
Then, install Xcode.
Xcode-select —installThen, install brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Finally, install brew packages:
brew install doxygen
brew install gnu-sed
brew install texi2html
brew install texliveFor the same reason that Ubuntu (clang being installed as the default compiler) We need to create symlinks to set gcc and g++ to respectively gcc-12 and g++-12:
sudo ln -s /usr/local/bin/gcc-12 /usr/local/bin/gcc
sudo ln -s /usr/local/bin/g++-12 /usr/local/bin/g++Ditto for gnu-sed, we need to set it as your default sed command. Let's do it by updating the PATH environment.
A quick way to do this is by adding PATH at the end of your ~/.zshrc
Edit this file and add this the end, or update the existing environment variable PATH if it already exists by using your favorite file editor (nano, vim, ...).
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
export PATHSave the file and reload it:
source ~/.zshrc
Now gnu-sed will be used by default because it precedes all other sed commands installed on your system.
Congratulations, you're done to start to compile PVSNESLIB on MacOS!
This procedure is supposed to work whatever the system used: Windows under MSYS2, Linux or MacOS.
By using the git command, clone the repository first :
git clone --recurse-submodules --depth=1 https://github.com/alekmaul/pvsneslib.gitThe recurse-submodules option will download WLA and TCC tools which are required and stored in other repositories.
depth=1 is optional but allow you to download only the last version of source code. If you do not want all modifications history, you will probably win some time and disk space by using it.
To avoid forgetting it later, we can begin from this point. Just create an environment variable PVSNESLIB_HOME
pointing on your pvsneslib directory.
You can accomplish it by using the following command in your terminal:
export PVSNESLIB_HOME=$(pwd)Please remember that:
-
PVSNESLIB_HOMEenvironment variable (or any folder you will create under its tree) CANNOT contains spaces. - This environment variable is not persistent. It means you'll have to set it if you launch a new terminal, or close the current one.
Don't worry, if you forget, you will be notified of an error message by running the make command.
Building the whole project can be performed by simply running the make command at the root of the project.
Note: The Makefile at the root of the project is written to run the all the others Makefile in the subdirectories. It will always perform a full clean recipe before to compile as well as the install recipe after compilation.
Once the compilation is done, you can find all the tools, compilers and libraries in the devkitsnes directory.
This procedure is pretty the same as building the whole project, just add the release after your make command:
make releaseOnce the compilation is done, you can find your compressed release (zip) in the release directory.
You can help use to improve pvsneslib but you need to make all changes on `develop``.
Don't forget to be on this branch before requesting a Pull Request !
git checkout develop- Installation
- PVSneslib and Visual Studio Code
- First steps with No$sns emulator
- Compiling from sources