Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Dependencies for Linux distributions using the `dnf` or `apt` package managers w

- flex
- bison
- gcc-multilib
- gcc-multilib (if on x86\_64)
- libgmp3-dev
- libmpfr-dev
- libmpc-dev
Expand Down Expand Up @@ -71,4 +71,4 @@ PATH="${PATH:+${PATH}:}"$DEVKITXENON"/bin:"$DEVKITXENON"/usr/bin"
```
`DEVKITXENON` depends on your chosen installation prefix location. The default value is `/usr/local/xenon` unless you changed it.

You may edit your ~/.bashrc to set these in every shell automatically. Alternatively, you may execute `./build-xenon-toolchain env-cmd` to install a command named `xenon-env`. When you run that command, it will set those variables in a new shell.
You may edit your ~/.bashrc to set these in every shell automatically. Alternatively, you may execute `./build-xenon-toolchain env-cmd` to install a command named `xenon-env`. When you run that command, it will set those variables in a new shell.
16 changes: 13 additions & 3 deletions toolchain/build-xenon-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GCC_DL="https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz"
NEWLIB_DL="https://sourceware.org/pub/newlib/newlib-3.1.0.tar.gz"

ZLIB_DL="https://zlib.net/fossils/zlib-1.2.11.tar.gz"
LIBPNG_DL="https://download.sourceforge.net/libpng/libpng-1.5.10.tar.xz"
LIBPNG_DL="https://download.sourceforge.net/libpng/libpng-1.5.30.tar.xz"
BZIP2_DL="https://sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz"
FREETYPE_DL="https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.gz"

Expand Down Expand Up @@ -435,9 +435,19 @@ if [ "$1" == "toolchain" ]; then
fi

if command -v apt-get &> /dev/null; then
sudo apt install -y build-essential flex bison gcc-multilib libgmp-dev libmpfr-dev libmpc-dev texinfo git wget
pkgs="build-essential flex bison libgmp-dev libmpfr-dev libmpc-dev texinfo git wget"
if [ "$(uname -m)" = "x86_64" ]; then
pkgs="$pkgs gcc-multilib"
fi
sudo apt install -y $pkgs || {
echo "Failed to install required packages!"
exit 1
}
elif command -v dnf &> /dev/null; then
sudo dnf -y install gcc g++ flex bison glibc-devel.i686 libstdc++-devel.i686 gmp-devel mpfr-devel libmpc-devel texinfo git wget
sudo dnf -y install gcc g++ flex bison glibc-devel.i686 libstdc++-devel.i686 gmp-devel mpfr-devel libmpc-devel texinfo git wget || {
echo "Failed to install required packages!"
exit 1
}
else
echo "Info: a package manager was not detected. Ensure that the required dependencies have been installed."
fi
Expand Down
Loading