Sublime Text 3 for Homebrew?

Discussion in '3DS - Homebrew Development and Emulators' started by BurningDesire, Feb 24, 2015.

?

how could I setup Sublime text 3 to compile .3dsx files.

  1. How to set up sublime text

    0 vote(s)
    0.0%
  2. how to use a compiler to make .3dsx files

    2 vote(s)
    100.0%
  1. BurningDesire
    OP

    BurningDesire Nepu Nepu Nepu

    Member
    4,943
    5,728
    Jan 27, 2015
    United States
    Behind a screen reading news
    Hey all! I was wondering how or if I could setup Sublime text 3 to compile .3dsx files.
     
  2. JustPingo

    JustPingo GBAtemp Fan

    Member
    497
    996
    Jan 11, 2015
    France
    Can't you just ask it to run some BASH? (or even do it yourself, that would only be a file to run)
     
  3. mid-kid

    mid-kid GBAtemp spamBOT

    Member
    879
    961
    Aug 2, 2012
    Since when has the choice of a text editor mattered in development of any kind? (Except where a specialized IDE is used: see Unity3d)
    Just open a terminal and run "make" there, or create a shortcut for that command with your editor.
     
  4. Tjessx

    Tjessx GBAtemp Maniac

    Member
    1,156
    508
    Dec 3, 2014
    Belgium
    Have used sublime text to edit the c files, but i think Netbeans comes in handier,
     
  5. BurningDesire
    OP

    BurningDesire Nepu Nepu Nepu

    Member
    4,943
    5,728
    Jan 27, 2015
    United States
    Behind a screen reading news
    I want to build from sublime text directly to the Citra emulator for testing. Which you can't do in any specific compiler (Netbeans) for example. Or can you?
     
  6. Lenan

    Lenan GBAtemp Regular

    Member
    172
    65
    Feb 1, 2015
    Swaziland
    You can, add this to your makefile after all:/clean: section

    Code:
    run:
        @ echo run ...
        PathToCitra\citra.exe $(TARGET).smdh
    remove the space between @ and echo (I'm too dumb to figure out how to escape in this forum lol)
     
    JustPingo likes this.
  7. BurningDesire
    OP

    BurningDesire Nepu Nepu Nepu

    Member
    4,943
    5,728
    Jan 27, 2015
    United States
    Behind a screen reading news
    On Mac?
     
  8. JustPingo

    JustPingo GBAtemp Fan

    Member
    497
    996
    Jan 11, 2015
    France

    Same, just change citra.exe to the "package" (don't remember how they are called).

    EDIT: Never mind, I'm saying shit.
     
  9. Lenan

    Lenan GBAtemp Regular

    Member
    172
    65
    Feb 1, 2015
    Swaziland
    uh... not sure, but try this:
    Code:
    run:
        open -a Citra $(TARGET).smdh
     
  10. BurningDesire
    OP

    BurningDesire Nepu Nepu Nepu

    Member
    4,943
    5,728
    Jan 27, 2015
    United States
    Behind a screen reading news
    Okay I will. Thank you.
     
  11. Lenan

    Lenan GBAtemp Regular

    Member
    172
    65
    Feb 1, 2015
    Swaziland
    Ok just retested it on windows, there are some errors and missing stuff in my previous post.
    Here is an update instruction:

    1. in your makefile add.
    Code:
    run:
        PathToCitra\citra.exe $(TARGET).elf //If you're using Windows
        open -a Citra $(TARGET).elf //If you're using Linux/Mac.
    
    NetBeans only:
    2. Right click your project -> properties -> run -> and in the run command field write : make run

    Sublime Text 3:
    1. Tools -> Build System -> New Build System
    2. Replace existing code with:
    Code:
    //Assuming you work from a source folder within your project. Else, you have to tweak "-C .."
    {
        "cmd": "make -C ..",
     
        "variants":
        [
            {
            "name": "Run",
            "cmd": "make run -C .."
            },
           
            {
            "name": "Clean",
            "cmd": "make clean -C .."
            },
     
        ]
    }
    
    3. Save it as 3DS (or whatever)
    4. Open your source file
    5. Tools -> Build System -> 3DS (or whatever)

    You can now build/run from the tools tab and you will find all options in the command palette (CTRL+Shift+P)

    Hope that helps :)
     
  12. mid-kid

    mid-kid GBAtemp spamBOT

    Member
    879
    961
    Aug 2, 2012
    I'm not really for adding a run target in the makefile, because it's too platform- and installation-dependent. Just do something like "make && path/to/citra thing" on the cmd line (again, this differs per platform and text editor).
     
  13. Lenan

    Lenan GBAtemp Regular

    Member
    172
    65
    Feb 1, 2015
    Swaziland
    Yeah, but he asked how to do it directly with sublime and/or netbeans.
     
  14. mid-kid

    mid-kid GBAtemp spamBOT

    Member
    879
    961
    Aug 2, 2012
    With "in the cmdline" I meant something like
    Code:
    "cmd": "make && path/to/citra thing"
    
     
  15. BurningDesire
    OP

    BurningDesire Nepu Nepu Nepu

    Member
    4,943
    5,728
    Jan 27, 2015
    United States
    Behind a screen reading news
    Thank you. I will try this as soon as I can.