A boilerplate project to create Vita homebrew using lpp-vita and TypeScript to lua transpiler. Handles the process of creating a param.sfo file, compressing of image files using pngquant and creating a vpk package.
First, download the latest lpp-vita release from here and locate the "eboot_safe.bin" and "eboot_unsafe.bin" files.
Install node from here if you don't have it.
Install gulp cli globally. It's used for the build process.
npm install -g gulp/cli
Clone this project and run these commands.
cd tstlpp-vita
npm install
Copy and paste the "eboot_safe.bin" and "eboot_unsafe.bin" files to "system" folder.
Edit the vita-project.json file to your needs. Details are in the "The Vita Project File" section.
That's it.
Run the below command to watch for file changes to auto-transpile TypeScript to lua. The index.lua file will be in the "out-src" folder by default.
npm run dev
You can use BGFTP and an FTP client - like WinSCP to auto-sync updated source file.
Run the below command to create a vpk package that is ready to be used.
npm run build
The vpk package will be located at the distribution folder.
Make sure your image file format is PNG and it's 8-bit and uses the indexed mode. GIMP has the option to change the bit and image modes.
vita-project.json file is where you can define Vita homebrew specific details to be used in the build process.
It's a unique identifier for your homebrew. You can enter anything as long as it's 9 characters long and all in UPPERCASE (eg; HELLOWRLD). There is also a XXXXYYYYY pattern you can use where XXXX part can be author or app specific and YYYYY part can be number of that app. (eg; FTHD00001) Your choice.
This is the name of your homebrew.
Defines the eboot file to be used. If it's true, "eboot_unsafe.bin" will be used. If it's false, "eboot_safe.bin" will be used. Default value is "false".
Defines the directory where Vita application system files are located. Default value is "system".
Defines the directory where index.lua file located. Default value is "out-src".
Defines the directory where all the files copied before the packaging happens. This folder will be created during the build and deleted after the build process. Default value is ".temp".
Defines the directory where the packaged vpk file will be located. Default value is "dist".
Defines the files to be bundled within the package. For example, you can define a single file like below;
{
...
files:[
"assets/images/image.jpg"
],
...
}
Or you can define a globbing pattern. The example below will copy all of the files and folders within the "assets" folder.
{
...
files:[
"assets/**/*"
],
...
}
This approach doesn't copy the "assets" folder itself, just the contents of it. If you want to keep the folder itself too, you can put a "*" before the folder like below.
{
...
files:[
"*assets/**/*"
],
...
}
This way, the package will contain the "assets" folder too.