Install DevkitPro (DevkitPPC) on Debian Linux
Chapter 1. Introduction
Many beginners have issues installing DevkitPro in general. In the past, step by step tutorials were not really available to help the newbie install DevkitPro, especially for Debian Linux.
Chpater 2. About DevkitPro and overview of this Guide
DevkitPro is the main program used to create Homebrew Applications. It comes with all the Wii's libraries. You can compile your projects directly to a .dol file (renamed to boot.dol) which HBC can directly boot. You can write your projects in C/C++ code or even in PowerPC Assembly.
This guide will step by step you to install DevkitPro, compile the example project, teach you how to keep Devkit updated, and other various things.
Chapter 3. Download and install Devkit
Open up a terminal in your Home directly (i.e. /home/Vega)
Enter in the following 3 commands to download the devkitpro github's script and execute it
wget https://apt.devkitpro.org/install-devkitpro-pacman
chmod +x ./install-devkitpro-pacman
sudo ./install-devkitpro-pacman
After this, DevkitPro will be installed at the /opt directory of your computer.
Chapter 4. Updating Devkit
Now that devkit is installed, let's make sure to update before installing any libraries/packages. Devkit uses the command 'dkp-pacman' to update/upgrade/etc.
Navigate the /opt directory
cd /opt
Update the Devkit repositories
sudo dkp-pacman -Sy
This is similar to a 'sudo apt-get udpate' command.
If any updates are listed, let's be sure to upgrade to install them.
sudo dkp-pacman -Syu
This is similar to a 'sudo apt-get upgrade' command.
Chapter 5: Installing Wii libraries
Alright, our Devkit is fully updated and upgraded. Let's install the Wii libraries
sudo dkp-pacman -S wii-dev
You will be prompted by a message to install a specific selection, or install all the packages:
Simply press Enter on your keyboard to install everything from wii-dev.
Another prompt will appear asking if you want to proceed with the installation. Press the Y key, hit Enter to proceed. The libraries will install, Should take less than a minute.
Chapter 6: Copying over certain files, setting environment variables
DevkitPro (for wii-dev) comes with an example Wii HBC project for you to compile. It's a good idea to copy paste over the example wii template+project over to a personal folder, so we never lose the original example project.
Let's make a new directory in your user account home directory called projects
mkdir /home/yourusername/projects
Now let's copy over the example project
sudo cp -r /opt/devkitpro/examples/wii/template /home/yourusername/projects/wii-template
As this point, the wii-template folder in projects does not have full user permissions, let's give it back user permissions.
sudo chown -R yourusername:yourusername /home/yourusername/projects/wii-template
Before you can compile any project, you need to edit your export settings for your shell. You can use any text editor you want for this. I like to use nano.
nano /home/yourusername/.bashrc
Be sure to NOT run sudo with the above command. At the very end of the file add this..
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=${DEVKITPRO}/devkitARM
export DEVKITPPC=${DEVKITPRO}/devkitPPC
export PATH=${DEVKITPRO}/tools/bin:$PATH
Close any terminal windows you have open.
Chapter 7: Compiling the example project
Open a new terminal window...cd /home/yourusername/projects/wii-template
make
The project will now compile! Some new items in /wii-template will be created...
/build (contains items such as the object code and a symbol map)
wii-template.dol
wii-template.elf
Chapter 8: Testing the compiled project in HBC
Rename the wii-template.dol to boot.dol. Insert your SD/USB stick into your computer, and make a folder in your apps folder called Example. Now we also need an icon.png and a meta.xml, you can borrow those from any HBC application you want. Within the Example folder, place your chose icon.png and meta.xml in there. Now take your boot.dol and place it in there too.
Open up the meta.xml and rename the title to something like "hello world app". This way when you load the app preview and read the description, you know its our example project. Eject the SD/USB, place it in your Wii, boot HBC.
Select whatever icon app you used, check the description for 'hello world app'. If you have found it, launch the app! You should see a black screen with the words "Hello World!" at the top left. Congratz!
Chapter 9: Other dkp-pacman commands
To list packages:
sudo dkp-pacman -Sl
To list only libraries supplied by devkitPro:
sudo dkp-pacman -Sl dkp-libs
To search for packages:
sudo dkp-pacman -Ss <search string>
To install a package:
sudo dkp-pacman -S <name of package>
To remove a package:
sudo dkp-pacman -R <name of package>
Here's a list of all devkitPPC packages~
- gp32-dev
- gba-dev
- nds-dev
- 3ds-dev
- gamecube-dev
- wii-dev
- wiiu-dev
- switch-dev
Congrats on installing DevkitPPC!