[GUIDE] How to make your own Homebrew apps for nubes :)

Discussion in '3DS - Homebrew Development and Emulators' started by Owarai, Jul 7, 2016.

  1. Owarai
    OP

    Owarai Member

    Newcomer
    23
    8
    Feb 1, 2016
    United States
    Guide to Making a Homebrew App for Beginners
    When I tried starting making homebrew apps, I had to ask a lot of different sources for info, so here is a (supposedly) easy-to-use, guide (not a tutorial) for making them.

    If you're really into it, you're going to be able to make apps in no time! :yay3ds:(Well, except for the first step. ;))

    Requirements:
    Steps:

    1. :teach:Go learn C or C++. It is literally impossible to do anything until you do so. You only need to know the basics, like the usage of the standard library, control statements, and some other really basic stuff. (Correction: you only need to know the basics in order to make basic homebrew. But by basic, when you finish the C++ tutorials in the link, you can probably make over 100 different games/utilities This will take, say, about a week to get used to and understand. That's pretty quick for being able to understand. A lot faster than learning even just the basics of a foreign language.http://www.cplusplus.com/doc/tutorial/ is a great place to start. You can use just the online interpreter here: http://cpp.sh/, or get an IDE (integrated development environment). I don't want to sound advertising, but I personally use VS 2013, and I became addicted to it.
    Edit: Umbyy on reditt suggested this: https://en.wikiversity.org/wiki/C++ . Seems pretty cool to me!
    1. Download DevKitPro. http://devkitpro.org/wiki/Getting_Started/devkitARM. No, "Pro" doesn't mean you have to pay for it. It means it's awesome. Anyway, install it once you download it.
    2. It should be installed on the root of your hard drive by default.
    3. Test your compiler. Open up MSys (it's in \devkitPro\msys\msys.bat). Then type
      Code:
      cd  C:\devkitPro\examples\3ds\graphics\printing\hello-world
      (Change "C:" to your hard drive's actual letter. Mine's "C:"). Hit enter. Then type
      Code:
      make
      . Hit enter. Voila! You just compiled your first example code. :D The "cd" command made MSys go to the directory you typed after it, and the "make" command compiled your source using instructions from a file called "Makefile" that was located in the directory you typed previously. Pretty neat!
    4. Test it on your 3DS. Go to \devkitPro\examples\3ds\graphics\printing\hello-world\ in your favorite file explorer. There should be something like "hello-world.3dsx", "hello-world.elf", and "hello-world.smdh". Copy/move them all into your sd card in \3ds\ folder. Eject your sd and plug it in into your 3ds. Start up the Homebrew Launcher, and play "hello-world". There should be an output of your previously compiled app!
    5. Go to \devkitPro\examples\3ds in your explorer. Notice the list of folders that contains the examples. From there go to .\graphics\printing\hello-world\source\ (in the explorer), and open up main.c. If you want to use C++, rename the extension to cpp. Fiddle and experiment with the contents, and make sure there are no syntax errors.
    6. Turn off your 3ds. Repeat step 4 to compile the edited code, except this time, "cd" into the directory of your customized code. (This is the directory where there has to exist a file called "Makefile".
    7. That's it! Now you can create homebrew apps of your choice, as long as you know how! :grog:(The best way (I personally think) is to learn C or C++, and also at the same time, read the 3ds examples, and learn how to use some things, like input methods.)
    Credits:
    Oh, where should I start?
    #Cakey on Freenode for pretty much every development detail.
    devkitPro developers.
    Pretty much everyone who did stuff with exploiting the 3ds and making homebrew before I wrote this guide.

    Nintendo for my crappy o3ds that require an exploit to run homebrew. <sigh>
    If you think I forgot to mention you, please send me a pm, because I'm not on GBATemp often, and I probably won't read the comments after the 1st page.
     
    Last edited by Owarai, Jul 8, 2016
    FrankenMan, mutinize, haazet and 5 others like this.
  2. cots

    cots GBAtemp Fan

    Member
    493
    319
    Dec 29, 2014
    United States
    Nice guide!
     
    Owarai likes this.
  3. Owarai
    OP

    Owarai Member

    Newcomer
    23
    8
    Feb 1, 2016
    United States
    Thanks!
     
  4. Davidosky99

    Davidosky99 Eevee :3

    Banned
    2,582
    1,570
    Jun 7, 2015
    Porto
    This is a nice guide, when I first saw the title, I thought it was a joke or was the EoF, but turns out this is an excelent guide.
    Congratulations OP!
     
    azerti1304 likes this.
  5. Owarai
    OP

    Owarai Member

    Newcomer
    23
    8
    Feb 1, 2016
    United States
    Thanks again! I also updated the original post so that I don't sound like I'm yelling in the first step. Also, I added a little blurb to tell people that its really not that hard (except for the 1st step, maybe) if you put your mind to it.
     
  6. EmuAGR

    EmuAGR GBAtemp Regular

    Member
    200
    118
    Jan 11, 2016
    I'm here just to say:
    "Nubes" is the Spanish word for "clouds".
     
    ImCarlosGG likes this.
  7. Owarai
    OP

    Owarai Member

    Newcomer
    23
    8
    Feb 1, 2016
    United States
  8. Shadowfied

    Shadowfied GBAtemp Advanced Maniac

    Member
    1,740
    1,679
    Dec 6, 2014
    Nice, although it doesn't really explain how to "make homebrew", and I'm not saying that "making" can be explained so easily, but this guide is just for actually compiling your project :P
    Also.."VS 2013" [​IMG]
     
    Minnow likes this.
  9. Shadowfied

    Shadowfied GBAtemp Advanced Maniac

    Member
    1,740
    1,679
    Dec 6, 2014
    Nice, although it doesn't really explain how to "make homebrew", and I'm not saying that "making" can be explained so easily, but this guide is just for actually compiling your project :P
    Also.."VS 2013" [​IMG]
     
  10. Owarai
    OP

    Owarai Member

    Newcomer
    23
    8
    Feb 1, 2016
    United States
    I updated the original post to include a suggestion by Umbyy on reddit. Also, I get what you mean by how it doesn't explain how to exactly make your own homebrew, but the thread is titled this way because 1) I don't think repeating the other C/C++ tutorials are helpful, and 2) It's a pun :).
     
  11. Shadowehh

    Shadowehh Also known as Shadd

    Member
    226
    26
    Jan 27, 2016
    United States
    Jeff The Killer's Bathroom
    I tried to install it, it worked, but it would not let me use sudo or mkdir commands. I also though it just worked that way, but when I %100 set a valid directory when using the cd command. It says that the directory is invalid. I only managed to access the C:\devkitPro\ directory, but it would not let me get passed that. I even put the file into it, but when I made the make command when setting the directory to the file, it kept saying invalid directory. I am not able to even find an answer online either.