Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crazyvito11/vita-hello-world-docker
A simple Hello World application for the Vita, build with VitaSDK via Docker
https://github.com/crazyvito11/vita-hello-world-docker
boilerplate cmake cpp docker docker-compose hello-world homebrew playstation-vita ps-vita vita-companion vitasdk
Last synced: 23 days ago
JSON representation
A simple Hello World application for the Vita, build with VitaSDK via Docker
- Host: GitHub
- URL: https://github.com/crazyvito11/vita-hello-world-docker
- Owner: CrazyVito11
- Created: 2024-07-11T13:29:44.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-14T19:42:13.000Z (4 months ago)
- Last Synced: 2024-10-04T21:42:13.813Z (about 1 month ago)
- Topics: boilerplate, cmake, cpp, docker, docker-compose, hello-world, homebrew, playstation-vita, ps-vita, vita-companion, vitasdk
- Language: C
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vita Hello World Docker
A simple Hello World application for the Vita, build with VitaSDK via Docker.## Why?
While setting up VitaSDK manually isn't that difficult, doing it via Docker should lower the barrier to entry even further.This repository contains the Hello World C++ example from VitaSDK as a proof of concept.
## Setup
To get started with this example, simply follow these steps.### Copy the example `vita.env` file
We first want to create the environment file that we will then use inside the container, this file contains information about your Vita console.An `vita.env.example` file has been provided, so you only have to make a copy of it and fill it in.
Store the environment file as `vita.env`, this way it should be picked up by our container later on.
### Fill in the `vita.env` file
Now that you have an Vita environment file, we can enter information about our Vita console.> [!TIP]
> It's recommended that you assign a static IP address to your Vita console.### Install the Vita Companion plugin
To use the `build-and-test-app.sh` script, your Vita also needs to have the [Vita Companion plugin](https://github.com/Ibrahim778/vitacompanion) installed.Simply follow the steps on their GitHub page.
> [!NOTE]
> This is a fork of [devnoname120's Vita Companion](https://github.com/devnoname120/vitacompanion) that also allows installing VPK files remotely.> [!TIP]
> Don't forget to also enable the "CMD/FTP Servers" option in the quick start menu, as otherwise you won't be able to connect to your Vita.### Start the container
We should now be ready to start the container!You can start it using `docker compose up -d`, it should automatically build the image if it's the first time.
> [!TIP]
> If you need to rebuild the image, you can add `--build` at the end of the command.### Create `Intellisense-src` directory (Recommended)
While this step is optional, it is highly recommended to make the development experience a lot easier.> [!NOTE]
> In this example we will be using VS Code, but this likely will also work for other IDE's.First, install the "C/C++" extension from Microsoft.
This can be installed by pressing CTRL + P, and then running `ext install ms-vscode.cpptools`.> [!TIP]
> If you can't find the extension, you might be running an unofficial build of VS Code that doesn't have Microsoft extensions.
>
> You can install the extension manually by downloading the [.vsix file straight from Microsoft's website](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).Once you have the extension installed, simply run `./configure-intellisense.sh` in a terminal on your host to copy the relevant files to your host machine.
Your editor should now be able to find the sources and provide you with proper Intellisense.
## Building + Testing
First, enter the Bash shell of the contain with `docker compose exec builder bash`.You should now be inside the `/src` directory, in which is the source code of our application and 2 scripts.
If you only want to compile the application, simply run `./build-app.sh` to receive the application in vpk form, which you can then copy to the Vita manually.
> [!NOTE]
> `./build-app.sh` builds the application as a Release candidate, meaning it will have better performance.If you also want to transfer it to your Vita console over the network with Vita Companion, run `./build-and-test-app.sh` instead.
This should automatically transfer, install and run the application.> [!WARNING]
> Running the `build-and-test-app.sh` script will close all running applications on the Vita, so keep that in mind.> [!NOTE]
> `build-and-test-app.sh` builds the application as a Debug release, meaning it has worse performance but with better debug information.## Debugging
If your application crashes, you can use the `vita-parse-core.sh` script to parse the crash dump and get more information about what went wrong.First, copy the crash dump file from your Vita and store it in the `crashdumps` directory.
> [!TIP]
> If you have multiple crash dumps at `ux0:data/`, check the Vita error screen, as it should show the filename of the current crash.Once you have copied the crash dump file over to your machine, once again enter the builder container.
Inside the container run the following command: `vita-parse-core.sh /crashdumps/.psp2dmp build/`Here is an example: `vita-parse-core.sh /crashdumps/psp2core-1720985303-0x0002492929-eboot.bin.psp2dmp build/hello_cpp_world`