[TUT] How to compile Vita/PSTV henkaku homebrew using PSDK3v3

Discussion in 'Tutorials & Guides' started by kozarovv, Aug 7, 2016.

  1. 7,587
    5,721
    872
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    7,587
    Likes Received:
    5,721
    Trophy Points:
    872
    Home Page:
    Simple step by step tutorial to compile henkaku homebrew from available sources. Is not specially useful for devs, they know how to do this, tutorial is for most users that want to have newest available homebrew versions. Or even get not released projects to test them out. Is not only existing way for vita homebrew compilation, but this way have some advancement. Files in PSDK3v3 allow you to compile also psl1ght PS3 projects (basically this was main point of PSDK3, vita sdk is additional feature to have everything in one place), or even PS3 $DK projects if PS3 $DK are installed. So instructions should be universal for both platforms VITA/PSTV and PS3. Tutorial will be updated if needed.



    Requirements:


    PSDK3v3 - https://github.com/zecoxao/PSDK3v3
    Windows based PC (tested on W10)

    Instalation:

    - Go to https://github.com/zecoxao/PSDK3v3 and download needed files. To do that click on "Clone or Download" button and select download ZIP.
    - Extract downloaded file to root of C:\ drive (IMPORTANT THIS NEED TO BE SAME DRIVE THAT YOUR WINDOWS INSTALLATION FOLDER).
    Your file tree should now look like C:/PSDK3v3-master/miniGW,
    - Rename folder PSDK3v3-master to PSDK3v3
    - Go in to C:\PSDK3v3\MinGW\msys\1.0\ and click on msys.bat This step will create folder with your username in C:\PSDK3v3\MinGW\msys\1.0\home
    - Close opened cmd window go to C:\PSDK3v3\MinGW\msys\1.0\ and send msys.bat to desktop (create shortcut)
    - Your setup is Done

    Usage:

    I split usage in to 2 different examples, but every developer is working in his own way so read carefully compilation readme files of project you want to compile because sometime additional steps are needed (vide retroarch).

    Basics:

    - Your homebrew source code always going to C:\PSDK3v3\MinGW\msys\1.0\home\<your username>\<homebrew source code folder>
    eg. C:\PSDK3v3\MinGW\msys\1.0\home\psxplace\vitadump-master

    - After starting msys by desktop shortcut you are in C:\PSDK3v3\MinGW\msys\1.0\home\<your username>\ to navigate to homebrew folder you need to type cd <homebrew folder>. In some cases you need go deeper, because is important to be in same folder as vita makefile.

    Examples:

    Vitadump St4rk fork - https://github.com/St4rk/vitadump

    - Download zip file like in PSDK3v3, and extract into: C:\PSDK3v3\MinGW\msys\1.0\home\<your username>\
    - Now your folder structure should look like: C:\PSDK3v3\MinGW\msys\1.0\home\<your> username\vitadump-master\
    - Open msys using desktop shortcut and navigate to vitadump-master folder.
    Code:
    cd vitadump-master
    - type make, push enter and wait few seconds until compilation is done
    Code:
    make
    - Your vpk file is in C:\PSDK3v3\MinGW\msys\1.0\home\<your> username\vitadump-master\

    DeSMune (xerpi edition) - https://github.com/xerpi/desmume-vita

    - Download zip file like in PSDK3v3, and extract into: C:\PSDK3v3\MinGW\msys\1.0\home\<your username>
    - Now your folder structure should look like: C:\PSDK3v3\MinGW\msys\1.0\home\<your> username\desmume-vita-master\
    - Open msys using desktop shortcut and navigate to desmume-vita-master\src\vita folder.
    Code:
    cd desmume-vita-master/src/vita
    - type make, push enter, and wait until compilation is done
    Code:
    make
    - Your vpk file is in C:\PSDK3v3\MinGW\msys\1.0\home\<your> username\desmume-vita-master\

    Compiling same project again:

    If you want to compile same project but with some changes, etc. You need to remove every previously created files. In most cases is every file with .o extension (some devs using additional folder objs for that, then is simpler. Just remove that folder). You need also delete created vpk, eboot.bin, param.sfo, elf file, velf file. Everything that was created.

    Other way, is to just make different folder or rename old one. So if you compiled vitadump then rename it to vitadump-master-old. Or just delete full folder and unzip again new one. Never owerwrite old files by new one (excluding cases when developer recommend this way on his readme).

    Troubleshot:

    Q: Everything is compiling but vpk file isn't created or i got error 53 or 57.
    A: PSDK3v3 folder need to be in root of C:\ drive, if not you will not get vpk file.

    Q: When i type cd desmume-vita-master\src\vita i get error that directory doesn't exist
    A: You need to use unix like slash "/" So correct command is cd desmume-vita-master/src/vita

    Thanks to:

    @zecoxao , xxyz, Yifan Lu, Davee, psxdev, Proxima, xerpi, curl team, estwald, everyone who contributed to PSDK3 project and all homebrew developers.

    Note: I'm not developer, i'm just learning this for myself. And I want to share my knowledge now, that's all.
     

    Attached Files:

    Last edited: Aug 7, 2016
    Joonie, bguerville, El Juri and 5 others like this.
  2. 5,752
    2,823
    497
    atreyu187

    atreyu187 Retired Old Hunter Moderator

    Joined:
    Sep 29, 2014
    Messages:
    5,752
    Likes Received:
    2,823
    Trophy Points:
    497
    Gender:
    Male
    Occupation:
    Scholar of Byrgenwerth
    Location:
    Cainhurst Castle
    Home Page:
    DUDE best guide ever!! Broke this down so simply!! Now to attempt to setup some of the official SDK's I can only hope it is this easy all the time!!
     
    STLcardsWS and kozarovv like this.
  3. 7,587
    5,721
    872
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    7,587
    Likes Received:
    5,721
    Trophy Points:
    872
    Home Page:
    Thanks. $DK are needed only for some PS3 projects (eg. webman). Vita projects for now don't using $DK. So don't need to get them.
     
    atreyu187 and STLcardsWS like this.
  4. 355
    115
    72
    ed89

    ed89 Member

    Joined:
    Nov 8, 2014
    Messages:
    355
    Likes Received:
    115
    Trophy Points:
    72
    Location:
    Euroasia
    Thanks for this simple to follow Tut this is what i searched for!
     
    kozarovv likes this.
  5. 5,752
    2,823
    497
    atreyu187

    atreyu187 Retired Old Hunter Moderator

    Joined:
    Sep 29, 2014
    Messages:
    5,752
    Likes Received:
    2,823
    Trophy Points:
    497
    Gender:
    Male
    Occupation:
    Scholar of Byrgenwerth
    Location:
    Cainhurst Castle
    Home Page:
    Yea this has been my saving grace. With all the bogus vpk files going around and source being updated left and right this is the only way to go. Thankfully TheFl0w and team molecule put those checks in place to reduce damage caused by malicious code.
     
  6. 5,752
    2,823
    497
    atreyu187

    atreyu187 Retired Old Hunter Moderator

    Joined:
    Sep 29, 2014
    Messages:
    5,752
    Likes Received:
    2,823
    Trophy Points:
    497
    Gender:
    Male
    Occupation:
    Scholar of Byrgenwerth
    Location:
    Cainhurst Castle
    Home Page:

    Still cant compile VitaShell have you had any luck?
     
  7. 7,587
    5,721
    872
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    7,587
    Likes Received:
    5,721
    Trophy Points:
    872
    Home Page:
    Yes i'm using currently my own build of vitashell 0.7 with minor changes from my side. Are you using latest psdk3v3?
     

Share This Page