Advertising (This ad goes away for registered users. You can Login or Register)

[DEV TUT] Vita programming Tutorials: Part 0 -- Installation

Post here your guides, tips, how-to, etc...
thevitamaster
Posts: 10
Joined: Tue Aug 16, 2016 5:49 am

[DEV TUT] Vita programming Tutorials: Part 0 -- Installation

Post by thevitamaster » Tue Aug 16, 2016 7:12 am

Hi guys,
welcome to my tutorial series on how to develop homebrew for the Vita with the unofficial vitaSDK toolchain and vita2dlib. In this series, we will start with part zero, which guides you through the installation of the necessary components, then we will continue in part one with a graphical hello world and we'll do a Game Menu in part two. Along the way, I'll explain all the function calls in the sample programs, and why they are needed, to you. Now, let's get started.

Requirements:
- An up-to-date Linux distribution which runs either natively or in a VM (some distros have Virtualbox images, so you can just plug and play, for example the Kali Linux distribution).
To update your linux system (provided you use apt as your package manager), you can open a terminal and type:

Code: Select all

apt-get update
apt-get upgrade
********************************************************************************************************************
- An internet connection
********************************************************************************************************************
- Some common sense for troubleshooting, etc.
********************************************************************************************************************

So, let's begin with the installation of the VitaSDK toolchain.
Here we'll do a manual install instead of running the automated vdpm script, because we want to keep a light ship and know exactly where everything is located.
1.:
Open a terminal and download the nightly build of the linux version:

Code: Select all

wget https://bintray.com/vitasdk/vitasdk/download_file?file_path=vitasdk-gcc-5.4-linux-compat-nightly-e4a61561aa42a32280c28406395a9e82fb0e75cd.tar.bz2
2.: Untar the archive:

Code: Select all

tar -xvf vitasdk-gcc-5.4-linux-compat-nightly-e4a61561aa42a32280c28406395a9e82fb0e75cd.tar.bz2 
3.: Move the contents of the untarred folder into the correctly named one:

Code: Select all

mkdir vitasdk
mv ~/gcc-arm-vita-eabi-5_4-2016q3/* ~/vitasdk/
rmdir gcc-arm-vita-eabi-5_4-2016q3/
4.: Move the vitasdk folder to /usr/local/:

Code: Select all

mv ~/vitasdk/ /usr/local/vitasdk
5.: Set the $VITASDK enviroment variable (this step varies between linux distributions):

Code: Select all

gedit ~/.bashrc
then press control+f and type .bash_aliases.
If this returns anything, then execute

Code: Select all

 gedit ~/.bash_aliases 
and add the line:

Code: Select all

export VITASDK=/usr/local/vitasdk
else, add the line

Code: Select all

export VITASDK=/usr/local/vitasdk
to your .bashrc file (gedit ~./bashrc)

Now, we install vita_portlibs followed by vitasdk:
1.:
Clone vita_portlibs

Code: Select all

git clone https://github.com/xerpi/vita_portlibs
cd vita_portlibs
2.:
Make

Code: Select all

sudo make
3.:
Clean up

Code: Select all

cd .. & rm -R vita_portlibs
4.:
Clone vita2dlib and install it

Code: Select all

git clone https://github.com/xerpi/libvita2d
cd libvita2d/libvita2d/
sudo make & sudo make install
5.:
And, lastly, it's always good to clean up behind you!

Code: Select all

cd ~/
rm -R libvita2d
And that was it! Quite simple, right?
Advertising
Last edited by thevitamaster on Fri Sep 16, 2016 1:56 am, edited 1 time in total.

User avatar
domis4
Posts: 12
Joined: Sun Jun 12, 2011 8:19 am

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by domis4 » Tue Sep 13, 2016 7:07 pm

Thank you for the really helpfull tutorial!
My 2 cents are maybe for some people helpfull, if vita_portlibs make fails (like mine) with the error:

Code: Select all

domi@domispc:~/vita_portlibs$ make
Using arm-vita-eabi-gcc-ar
Checking for arm-vita-eabi-gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Makefile:97: recipe for target 'zlib' failed
make: *** [zlib] Error 1
this is on some distros relevant and solved my problem:
https://github.com/xerpi/vita_portlibs/ ... /README.md
This will install the portlibs to $VITASDK. If this is a privileged location, you will need to sudo make install-zlib and sudo make install in order for the portlibs to be installed.
Advertising

thevitamaster
Posts: 10
Joined: Tue Aug 16, 2016 5:49 am

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by thevitamaster » Fri Sep 16, 2016 1:59 am

domis4 wrote:Thank you for the really helpfull tutorial!
My 2 cents are maybe for some people helpfull, if vita_portlibs make fails (like mine) with the error:

Code: Select all

domi@domispc:~/vita_portlibs$ make
Using arm-vita-eabi-gcc-ar
Checking for arm-vita-eabi-gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Makefile:97: recipe for target 'zlib' failed
make: *** [zlib] Error 1
this is on some distros relevant and solved my problem:
https://github.com/xerpi/vita_portlibs/ ... /README.md
This will install the portlibs to $VITASDK. If this is a privileged location, you will need to sudo make install-zlib and sudo make install in order for the portlibs to be installed.
Hi domis4, thanks for pointing that out. I changed the make and make install commands to be executed by root with sudo. Didn't have that at first because my build machine was running Kali Linux.

User avatar
KronosXLI
Posts: 54
Joined: Wed Jul 13, 2011 5:05 am
Location: A Tropical Island

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by KronosXLI » Fri Sep 16, 2016 4:08 am

Is there a windows equivalent setup? I'm not going to download and setup a VM just for coding.
PSN: KronosXLI
Playing: Freedom Wars, Borderlands 2, Ar NoSurge Plus, Persona 4 Golden, Donganronpa 2

thevitamaster
Posts: 10
Joined: Tue Aug 16, 2016 5:49 am

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by thevitamaster » Fri Sep 16, 2016 9:37 am

KronosXLI wrote:Is there a windows equivalent setup? I'm not going to download and setup a VM just for coding.
Yes, there is actually, and, if you're using Windows 10, you can also make the process considerably easier by using Bash for Windows.

User avatar
KronosXLI
Posts: 54
Joined: Wed Jul 13, 2011 5:05 am
Location: A Tropical Island

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by KronosXLI » Tue Sep 20, 2016 4:29 pm

thevitamaster wrote:
KronosXLI wrote:Is there a windows equivalent setup? I'm not going to download and setup a VM just for coding.
Yes, there is actually, and, if you're using Windows 10, you can also make the process considerably easier by using Bash for Windows.
Oh thanks, not on win10 but I guess a bit of extra work is good for learning/practice.
PSN: KronosXLI
Playing: Freedom Wars, Borderlands 2, Ar NoSurge Plus, Persona 4 Golden, Donganronpa 2

User avatar
KronosXLI
Posts: 54
Joined: Wed Jul 13, 2011 5:05 am
Location: A Tropical Island

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by KronosXLI » Tue Sep 20, 2016 4:31 pm

How did I miss that tab on henkaku? Well, better late than never.
PSN: KronosXLI
Playing: Freedom Wars, Borderlands 2, Ar NoSurge Plus, Persona 4 Golden, Donganronpa 2

User avatar
Blankets_McGee
Posts: 66
Joined: Mon Jan 27, 2014 1:00 pm

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by Blankets_McGee » Thu Nov 24, 2016 3:07 am

trying to dl the nightly bulid from bintray.com....getting a 403 error...any help??? here is the original error:

Resolving bintray.com (bintray.com)... 108.168.194.93
Connecting to bintray.com (bintray.com)|108.168.194.93|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://dl.bintray.com/vitasdk/vitasdk/ ... cd.tar.bz2 [following]
--2016-11-23 22:03:03-- https://dl.bintray.com/vitasdk/vitasdk/ ... cd.tar.bz2
Resolving dl.bintray.com (dl.bintray.com)... 35.160.48.73, 35.163.95.201
Connecting to dl.bintray.com (dl.bintray.com)|35.160.48.73|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2016-11-23 22:03:03 ERROR 403: Forbidden.


what does this mean?? i tried using wget -U firefox but that doesn't help either.
PSVita PCH-1001 64gb WiFi w/ 3.60 HENkaku
CECH-2051A 160gb PS3 w/ REBUG 4.53/Cobra 7.01 + PS2 Plugin CFW
Red SuperSlim on OFW 4.55
PS4 OFW 1.76 + Webkit Access

Globi
Posts: 2
Joined: Sun Apr 07, 2013 9:12 am

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by Globi » Thu Nov 24, 2016 9:40 pm

I also run into a "403: forbidden" error in step 1.

User avatar
domis4
Posts: 12
Joined: Sun Jun 12, 2011 8:19 am

Re: [DEV TUT] Vita programming Tutorials: Part 0 -- Installa

Post by domis4 » Sun Nov 27, 2016 10:25 am

for anyone getting 403, you must built from source.
https://github.com/vitasdk/buildscripts

Post Reply

Return to “Tutorials”