Setting up Development Environment: Difference between revisions
Fixing ninja edit. |
WinterMute (talk | contribs) |
||
(22 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
= Setup = | = Setup = | ||
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].. | |||
==Windows== | ==Windows== | ||
devkitPro | * If you already use msys2 then you can follow the instructions at https://github.com/devkitPro/pacman/releases/latest to add the devkitPro repositories. | ||
* [ | |||
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. | ||
* | * 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 ( | 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. | ||
* | * 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 | |||
* logout and login again to get the environment settings needed. | |||
= 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 | ||
These can be built from the command line. | These can be built from the command line. | ||
Line 59: | Line 37: | ||
To compile it, type <code>make</code> in the project directory. | To compile it, type <code>make</code> in the project directory. | ||
==Running your code== | |||
To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: <code>$DEVKITARM/bin/3dslink '''my3dsproject'''.3dsx</code>, replacing '''my3dsproject''' with the name of the 3dsx file you want to run.) | To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: <code>$DEVKITARM/bin/3dslink '''my3dsproject'''.3dsx</code>, replacing '''my3dsproject''' with the name of the 3dsx file you want to run.) | ||
If all goes well, you'll soon see your application running on your 3DS. | If all goes well, you'll soon see your application running on your 3DS. | ||
Line 81: | 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. | ||
= Troubleshooting = | = Troubleshooting = | ||
'''I get the "Please set DEVKITARM in your environment." error.''' | '''I get the "Please set DEVKITARM in your environment." error.''' | ||
Ensure you have the devkit-env package installed - (dkp-)pacman -Sl | grep devkit-env. Logout and login to get the enviroment settings. | |||
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. |