2016-08-05

← Older revision

Revision as of 00:34, 5 August 2016

Line 2:

Line 2:

* Install [http://devkitpro.org/ devkitARM]. If it's already installed, update it.

* Install [http://devkitpro.org/ devkitARM]. If it's already installed, update it.

** On Windows, there's a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].

** On Windows, there's a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].



** On Linux /
Mac OS X / Win10 WSL
, 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.

+

** 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]].

* 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 10==



On Windows 10, if you have installed the Anniversary Update you can use the Windows Subsystem for Linux.



This is essentially a version of the command line portion of Ubuntu Linux running within Windows 10, under the Windows 10 kernel.



It replaces msys, and being built in to the Windows 10 kernel, it is faster.





This is advantageous to use as most of the development tools were originally written for Linux (eg. GCC (compiler), 3dsxtool, etc) and run better than on Windows.





Note that you can still use the standard Windows tools instead. However, if you wish to use the WSL, follow these instructions:





* First, check that you have the Anniversary Update installed. To do this, hit Win+R to open the Run box, type <code>winver</code>, and hit OK. If you have Windows 10 version 1607 or higher, you're good to go.





Screenshot: https://i.imgur.com/01bFYYN.png (image uploading is broken on 3Dbrew)





* Next, open the Settings and enter Update and Security -> For developers.





* Switch to Developer Mode, and reboot.





* Next, hit Start and search for 'features', and select 'Turn Windows features on or off'.





* Scroll down until you find 'Windows Subsystem for Linux' - tick the box to enable it, and hit OK. Reboot again.





* Finally, To do this, hit Win+R to open the Run box, type <code>bash</code>, and hit OK.



** Hit 'y' when it asks you to download the Linux binaries. This shouldn't take long; on a 5Mbps connection, it took about 3 minutes, but YMMV (Your Mileage May Vary).





* Now follow the Linux / Ubuntu instructions to install devkitARM - you can open the <code>bash</code> shell by hitting Start and running the 'Bash on Ubuntu on Windows' application, opening a Command Prompt / PowerShell window and typing <code>bash</code>, or hitting Win+R to open the Run box and typing <code>bash</code>.

==Windows==

==Windows==



If you don't have Windows 10, or don't wish to use the WSL, then you can use the native
Win32
tools instead
.

+

devkitPro provides
Win32
-native precompiled versions of devkitARM which can be run directly on Windows
.

* [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.

* [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.

* An Internet connection is required.

* An Internet connection is required.

Line 42:

Line 16:

** Windows 10 (post-Anniversary Update): Start -> devkitPro -> MSYS

** Windows 10 (post-Anniversary Update): Start -> devkitPro -> MSYS



==
Linux / Mac OS X
==

+

Alternatively starting with Windows 10 Anniversary Update (Version 1607), the [https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Windows Subsystem for Linux (WSL)] may also be used to run the Linux version of devkitARM. Due to the fact that GCC was originally designed for Unix-like platforms its use may yield performance and convenience improvements. For instructions on how to set up devkitARM under WSL refer to the ''Unix-like platforms'' section.

+

+

==
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.

+

* 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 ctrulib or share your code on GitHub, among many other things.

* 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 ctrulib or share your code on GitHub, among many other things.

* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:

* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:



** Debian/Ubuntu/Linux Mint: <code>sudo apt-get install git curl</code>

+

** Debian/Ubuntu/Linux Mint
/WSL
: <code>sudo apt-get install git curl</code>

** Fedora/CentOS/RHEL: <code>sudo yum install git curl</code>

** Fedora/CentOS/RHEL: <code>sudo yum install git curl</code>

** openSUSE: <code>sudo zypper install git curl</code>

** openSUSE: <code>sudo zypper install git curl</code>



**
Mac OS X
: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.

+

**
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.)

* Next, we need to download, make executable and run the devkitARM updater (don't worry, the updater is also the installer.)

Line 73:

Line 51:

** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type <code>git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds</code>.

** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type <code>git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds</code>.



These can be built from the command line
- open a Bash shell by following these instructions:

+

These can be built from the command line.



* Windows:

+



** Windows 10:

+



*** Anniversary Update and later:

+



**** Windows Subsystem for Linux: Choose from any of these options:

+



***** Hit Start and run the 'Bash on Ubuntu on Windows' application.

+



***** Open a Command Prompt / PowerShell window and type <code>bash</code>.

+



***** Hit Win+R to open the Run box and type <code>bash</code>.

+



**** Msys: Start -> devkitPro -> MSYS

+



*** Pre-Anniversary Update: Start -> All Apps -> devkitPro -> MSYS.

+



** Windows 8 and 8.1: Right click on the Start screen and select 'All Apps'. You should find MSYS there.

+



** Windows 7 and earlier: Start -> All Programs -> devkitPro -> MSYS
.

+

To start a new homebrew project from the <code>bash</code> shell, simply type the following (replacing <code>'''~/projects/my3dsproject'''</code> with the place you would like your project to be stored, with <code>~</code> meaning your HOME directory):

To start a new homebrew project from the <code>bash</code> shell, simply type the following (replacing <code>'''~/projects/my3dsproject'''</code> with the place you would like your project to be stored, with <code>~</code> meaning your HOME directory):

Show more