Skip to content

Commit

Permalink
*Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
Applelo committed Jul 26, 2017
1 parent 3058be7 commit 88b5bf0
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Files
*.o
*.elf
*.velf
*.bin
*.vpk
*.sfo
*.self

ctp_shortcut

# CMake data
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
84 changes: 84 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
## This file is a quick tutorial on writing CMakeLists for targeting the Vita
cmake_minimum_required(VERSION 2.8)

## This includes the Vita toolchain, must go before project definition
# It is a convenience so you do not have to type
# -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake for cmake. It is
# highly recommended that you include this block for all projects.
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
if(DEFINED ENV{VITASDK})
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file")
else()
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!")
endif()
endif()

## Define project parameters here
# Name of the project
set(SHORT_NAME ctp_shortcut)
set(PSVITAIP "192.168.1.100")
project(${SHORT_NAME})
# This line adds Vita helper macros, must go after project definition in order
# to build Vita specific artifacts (self/vpk).
include("${VITASDK}/share/vita.cmake" REQUIRED)

## Configuration options for this app
# Display name (under bubble in LiveArea)
set(VITA_APP_NAME "Custom Protocol")
# Unique ID must be exactly 9 characters. Recommended: XXXXYYYYY where X =
# unique string of developer and Y = a unique number for this app
set(VITA_TITLEID "VCTP12345")
# Optional version string to show in LiveArea's more info screen
set(VITA_VERSION "01.00")

## Flags and includes for building
# Note that we make sure not to overwrite previous flags

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")


include_directories(
../common
)

add_executable(${SHORT_NAME}
src/main.c
)

# Library to link to (drop the -l prefix). This will mostly be stubs.
target_link_libraries(${SHORT_NAME}
SceAppMgr_Stub
)


vita_create_self(eboot.bin ${SHORT_NAME})
vita_create_vpk(${SHORT_NAME}.vpk ${VITA_TITLEID} eboot.bin
VERSION ${VITA_VERSION}
NAME ${VITA_APP_NAME}
FILE sce_sys/icon0.png sce_sys/icon0.png
sce_sys/livearea/contents/bg.png sce_sys/livearea/contents/bg.png
sce_sys/livearea/contents/startup.png sce_sys/livearea/contents/startup.png
sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml
)


add_custom_target(send
COMMAND curl -T eboot.bin ftp://${PSVITAIP}:1337/ux0:/app/${VITA_TITLEID}/
DEPENDS eboot.bin
)

add_custom_target(copy
COMMAND cp eboot.bin F:/app/${VITA_TITLEID}/eboot.bin
DEPENDS eboot.bin
)

add_custom_target(send_vpk
COMMAND curl -T ${SHORT_NAME}.vpk ftp://${PSVITAIP}:1337/ux0:/data/
DEPENDS ${SHORT_NAME}.vpk
)

add_custom_target(copy_vpk
COMMAND cp ${SHORT_NAME}.vpk F:/data/${VITA_TITLEID}/${SHORT_NAME}.vpk
DEPENDS ${SHORT_NAME}.vpk
)
Binary file added sce_sys/icon0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sce_sys/livearea/contents/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sce_sys/livearea/contents/startup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions sce_sys/livearea/contents/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>

<livearea style="a1" format-ver="01.00" content-rev="1">
<livearea-background>
<image>bg.png</image>
</livearea-background>

<gate>
<startup-image>startup.png</startup-image>
</gate>
</livearea>
7 changes: 7 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <psp2/appmgr.h>

int main() {
while (1) {
sceAppMgrLaunchAppByUri(0xF0000, "http://customprotocol.com");
}
}

0 comments on commit 88b5bf0

Please sign in to comment.