Changes

Jump to navigation Jump to search
Line 1: Line 1:  
= Setup =
 
= Setup =
* Install [http://devkitpro.org/ devkitARM]. If it's already installed, update it.
+
Install [https://devkitpro.org/ devkitARM]. If it's already installed, update it using sudo (dkp-)pacman -Syu. On Windows, there's a [https://github.com/devkitPro/installer/releases/latest graphical installer]. On Unix-like platforms such as Linux/macOS, there's [https://github.com/devkitPro/pacman/releases/latest pacman]..
** On Windows, there's a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].
  −
** On Unix-like platforms such as Linux/macOS, there's a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download Perl script]. Make sure you also select libctru and the 3ds examples when installing.
  −
* Depending on the kind of homebrew you want to develop, you may be interested in installing and using additional libraries and tools which don't ship alongside devkitARM/libctru. A list of them can be found in [[Homebrew Libraries and Tools]].
      
==Windows==
 
==Windows==
devkitPro provides Win32-native precompiled versions of devkitARM which can be run directly on Windows.
+
* If you already use msys2 then you can follow the instructions at https://github.com/devkitPro/pacman/releases/latest to add the devkitPro repositories.
* [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ download the latest version of the graphical installer] from SourceForge and run it, following the instructions as you go.
+
 
 +
Otherwise
 +
 
 +
* [https://github.com/devkitPro/installer/releases/latest download the latest version of the graphical installer] from github and run it, following the instructions as you go.
 
* An Internet connection is required.
 
* An Internet connection is required.
* You will want to make sure devkitARM is selected during the installation process to develop for the 3DS (and also the DS and GBA) - you can also install devkitPPC (for GameCube/Wii development) and devkitPSP (for PlayStation Portable development) if you wish.
+
* Ensure at least "3DS Development" is ticked - you can also leave the other options ticked if you wish.
 
* Once the installer has finished, launch MSYS from:
 
* Once the installer has finished, launch MSYS from:
 
** Windows 7 and earlier: Start -> All Programs -> devkitPro -> MSYS
 
** Windows 7 and earlier: Start -> All Programs -> devkitPro -> MSYS
Line 19: Line 19:     
==Unix-like platforms==
 
==Unix-like platforms==
Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x86/x64), macOS (universal binary). Note that Linux x64 binaries are usable under WSL.
+
Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x86_64), macOS (x86_64). Note that Linux x86_64 binaries are usable under WSL.
   −
* First, you need to install curl so the installer can download the devkitARM packages, and you should also install Git - you'll need it to update libctru or share your code on GitHub, among many other things. If you are running Linux, you'll also need wget; it comes preinstalled on most distributions, but not all.
+
* Follow the instructions to install pacman found at https://github.com/devkitPro/pacman/releases/latest
 
+
* run sudo (dkp-)pacman -S 3ds-dev to install the tools and libraries for 3ds development
* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:
+
* logout and login again to get the environment settings needed.
** Debian/Ubuntu/Linux Mint/Ubuntu on WSL: <code>sudo apt-get install git curl</code>
  −
** Fedora/CentOS/RHEL: <code>sudo yum install git curl</code>
  −
** openSUSE: <code>sudo zypper install git curl</code>
  −
** Arch Linux/ALWSL: <code>sudo pacman -S git curl wget</code>
  −
** macOS: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.
  −
 
  −
* Next, we need to download, make executable and run the devkitARM updater (don't worry, the updater is also the installer.)
  −
<pre>
  −
curl -L https://raw.githubusercontent.com/devkitPro/installer/master/perl/devkitARMupdate.pl -o devkitARMupdate.pl
  −
chmod +x ./devkitARMupdate.pl
  −
sudo ./devkitARMupdate.pl /opt/devkitpro
  −
</pre>
  −
 
  −
* Finally, we need to tell your shell where to find the devkitARM binaries.
  −
<pre>
  −
echo "export DEVKITPRO=/opt/devkitpro" >> ~/.bashrc
  −
echo "export DEVKITARM=/opt/devkitpro/devkitARM" >> ~/.bashrc
  −
source ~/.bashrc
  −
</pre>
      
= Building the examples =
 
= Building the examples =
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository].
+
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository]. These are downloaded by the installer and can be found in $DEVKITPRO/examples/3ds
There are now too many to list here in detail, so go ahead and browse them.
  −
 
  −
* To download these, if you installed Git (as you will have if you followed the above instructions), simply type <code>git clone https://github.com/devkitPro/3ds-examples.git</code> into your shell in the directory you wish to store the 3ds-examples folder in.
      
These can be built from the command line.
 
These can be built from the command line.
Line 82: Line 60:     
Now you can use Netbeans' code completion feature and build your project from the Run menu.
 
Now you can use Netbeans' code completion feature and build your project from the Run menu.
  −
= Building homebrew for distribution =
  −
To build your homebrew, open a Bash shell as described above, browse to the folder of the homebrew you wish to compile, and run <code>make</code>.
  −
  −
* This will build a .elf file and a .3dsx file (the homebrew executable itself).
  −
** The Homebrew Launcher can only run homebrew in the 3DSX format.
  −
  −
* To build a CIA file, you need to use makerom on it along with a RSF file describing the application:
  −
  makerom -f cia -o [.cia file] -rsf [RSF file] -target t -exefslogo -elf [ELF file] -icon [icon file] -banner [banner file]
      
= Troubleshooting =
 
= Troubleshooting =
 
'''I get the "Please set DEVKITARM in your environment." error.'''
 
'''I get the "Please set DEVKITARM in your environment." error.'''
   −
Use the following command before installing [http://askubuntu.com/questions/573070/problem-setting-up-environment-for-make-command-execution]:
+
Ensure you have the devkit-env package installed - (dkp-)pacman -Sl | grep devkit-env. Logout and login to get the enviroment settings.
sudo chown $USER /opt/devkitpro/ -R
  −
echo "export DEVKITPRO=\"/opt/devkitpro/\"" >> ~/.profile
  −
echo "export DEVKITARM=\"\${DEVKITPRO}/devkitARM/\"" >> ~/.profile
  −
source ~/.profile
      
For WSL users, you need to close the Bash shell, then reopen it for WSL to reload all of the variables from a clean state.
 
For WSL users, you need to close the Bash shell, then reopen it for WSL to reload all of the variables from a clean state.

Navigation menu