Line 1: |
Line 1: |
| = Setup = | | = Setup = |
− | Install [http://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].. | + | 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== |
Line 39: |
Line 39: |
| | | |
| ==Running your code== | | ==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>$DEVKITPRO/tools/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. If not, it could help to add <code>-a '''ipaddress'''</code>, replacing '''ipaddress''' with the ip address of the console (visible on homebrew launcher after pressing Y). |
− | | |
− | ==Building the examples on Linux with Netbeans==
| |
− | * Go to File->New Project...
| |
− | * Select C/C++ Project with existing code
| |
− | * Navigate to the examples directory and select the folder for the project you want to build; eg. /home/vtsingaras/3ds/examples/app_launch
| |
− | * Leave Configuration Mode to 'Automatic' and click 'Finish'.
| |
− | * It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:
| |
− | <pre>export DEVKITPRO=/opt/devkitpro | |
− | export DEVKITARM=/opt/devkitpro/devkitARM</pre>
| |
− | * Right-click the project and go to Properties->Code Assistance and click C Compiler.
| |
− | * In include directories enter
| |
− | <pre>/opt/devkitpro/devkitARM/include;/opt/devkitpro/libctru/include</pre>
| |
− | adjusting again for your devkitPro path.
| |
− | * Do the same for 'C++ Compiler'.
| |
− | * Go to 'Run' and click 'Clean and Build Project'.
| |
− | * Now right-click on the project and select Code Assistance->Reparse Project.
| |
− | | |
− | 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.''' |
| | | |
− | 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. |