My OS is Ubuntu 22.04.5 and I'd like to install devkitpro in order to build homebrew…
- User
My OS is Ubuntu 22.04.5 and I'd like to install devkitpro in order to build homebrew apps for Nintendo Switch. How do I get started?
- Assistant
My OS is Ubuntu 22.04.5 and I'd like to install devkitpro in order to build homebrew apps for Nintendo Switch. How do I get started?
Installing devkitPro on Ubuntu 22.04.5 to develop homebrew applications for the Nintendo Switch involves several steps. This guide will walk you through the entire process, from setting up your system to building a simple homebrew application. Here's how to get started:
Before you begin, ensure that your system meets the following requirements:
sudoIt's always a good practice to update your system before installing new software to ensure all existing packages are up-to-date.
sudo apt update
sudo apt upgrade -y
devkitPro and its toolchains require several dependencies. Install them using the following command:
sudo apt install -y build-essential git curl libssl-dev libncurses5-dev \
libncursesw5-dev libreadline-dev libffi-dev libusb-1.0-0-dev \
python3 python3-pip unzip
The preferred method to install devkitPro is using the pacman package manager provided by devkitPro. Here's how to set it up:
First, download the latest pacman installer script from the devkitPro website.
mkdir -p ~/devkitpro
cd ~/devkitpro
curl -O https://raw.githubusercontent.com/devkitPro/installer-releases/master/packages/pacman/pacman-3.1.1.sh
Note: Ensure that the URL is correct by checking the devkitPro GitHub Releases. Replace the version (pacman-3.1.1.sh) if a newer version is available.
chmod +x pacman-3.1.1.sh
./pacman-3.1.1.sh
During the installation:
~/devkitPro. You can press Enter to accept the default or specify a different location.To make sure that your system can find devkitPro's tools, add the following lines to your ~/.bashrc or ~/.zshrc file, depending on your shell:
export DEVKITPRO=~/devkitpro
export DEVKITARM=$DEVKITPRO/devkitARM
export PATH=$PATH:$DEVKITARM/bin
export PATH=$PATH:$DEVKITPRO/tools/bin
Apply the changes by sourcing the file:
source ~/.bashrc # or source ~/.zshrc
Note: Adjust the DEVKITPRO path if you installed it in a different directory.
devkitPro uses libnx for Nintendo Switch development. Here's how to install it:
sudo dkp-pacman -S switch-libnx
This command uses devkitPro's pacman to install the switch-libnx package, which includes the necessary libraries and headers for Switch homebrew development.
To ensure that everything is set up correctly, try compiling a sample project.
git clone https://github.com/switchbrew/libnx-template.git
cd libnx-template
git submodule update --init
make
If the build completes without errors, your devkitPro setup is correctly configured.
root.If you plan to test your homebrew applications on a physical Nintendo Switch, you'll need to set up additional tools like fusée-hack printer or use a hardware payload injector. Refer to the libnx Wiki for detailed instructions.
While you can use any text editor or IDE, Visual Studio Code is a popular choice:
sudo snap install --classic code
Install the C/C++ extension for better development support.
Congratulations! You now have devkitPro installed on your Ubuntu system and are ready to start developing homebrew applications for the Nintendo Switch. Happy coding!
Not yet included in a published release.