Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolostov committed Aug 11, 2020
2 parents a72e871 + 18f28cc commit f635c1f
Show file tree
Hide file tree
Showing 14 changed files with 1,585 additions and 214 deletions.
61 changes: 38 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@ add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/boot_param2.bin
COMMAND dolce-make-bootparam app_memsize 0x1000 ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
COMMAND dolce-make-bootparam app_memsize 0x4000 attribute 0x03 ${CMAKE_CURRENT_BINARY_DIR}/boot_param2.bin
COMMAND dolce-make-bootparam app_memsize 0x4000 attribute 0x03 directory_max_level 0x12 ${CMAKE_CURRENT_BINARY_DIR}/boot_param2.bin
)

project(appbgservice)
dolce_gen_libs(SceNotificationUtil_stubs
SceNotificationUtil.yml
LIB SceNotificationUtil_stub_weak)
dolce_gen_libs(SceIncomingDialog_stubs
SceIncomingDialog.yml
LIB SceIncomingDialog_stub_weak)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -fno-builtin")

add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}
appbgservice/main.c
appbgservice/ftpvita.c
)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wall")

link_directories(${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${PROJECT_NAME}
SceNetCtl_stub
Expand All @@ -43,47 +39,66 @@ target_link_libraries(${PROJECT_NAME}
SceAppMgr_stub
SceAppUtil_stub
ScePower_stub
SceNotificationUtil_stub_weak
SceIncomingDialog_stub_weak
SceRtc_stub
SceFiber_stub
SceNotificationUtil_stub
SceIncomingDialog_stub
SceLibc_stub
)

set(DOLCE_ELF_CREATE_FLAGS "${DOLCE_ELF_CREATE_FLAGS} -h 14680064")

set_target_properties(${PROJECT_NAME}
PROPERTIES LINK_FLAGS "-nostdlib"
)

dolce_create_self(eboot2.bin
${PROJECT_NAME}
UNSAFE
BOOT_PARAM ${CMAKE_CURRENT_BINARY_DIR}/boot_param2.bin
)

project(appmain)
dolce_gen_libs(SceBgAppUtil_stubs
SceBgAppUtil.yml
LIB SceBgAppUtil_stub_weak)
add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/appmain/main.c)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wall")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -fno-builtin")

add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}
appmain/main.c
)

link_directories(${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(${PROJECT_NAME}
SceLibKernel_stub
SceIofilemgr_stub
SceCtrl_stub
SceSysmodule_stub
SceAppMgr_stub
SceLibKernel_stub_weak
SceBgAppUtil_stub_weak
SceGxm_stub_weak
SceBgAppUtil_stub
)

set(DOLCE_ELF_CREATE_FLAGS "${DOLCE_ELF_CREATE_FLAGS} -h 262144")

set_target_properties(${PROJECT_NAME}
PROPERTIES LINK_FLAGS "-nostdlib"
)

dolce_create_self(eboot.bin
${PROJECT_NAME}
UNSAFE
UNCOMPRESSED
BOOT_PARAM ${CMAKE_CURRENT_BINARY_DIR}/boot_param.bin
)

set(DOLCE_MKSFOEX_FLAGS "${DOLCE_MKSFOEX_FLAGS} -d ATTRIBUTE=16814080 -s CATEGORY=gdc -s PUBTOOLINFO=has_bg=1")
set(DOLCE_MKSFOEX_FLAGS "${DOLCE_MKSFOEX_FLAGS} -d ATTRIBUTE=16814080 -d SAVEDATA_MAX_SIZE=1024 -s CATEGORY=gdc -s PUBTOOLINFO=has_bg=1")

dolce_create_vpk(${PROJECT_NAME}.vpk BGFTP0010 eboot.bin
VERSION 02.00
dolce_create_vpk(${PROJECT_NAME}.vpk GRVA00001 eboot.bin
VERSION 03.10
NAME "BGFTP"
CONTENT_ID_LABEL "BGFTPSERVER00000"
FILE ${CMAKE_CURRENT_BINARY_DIR}/eboot2.bin eboot2.bin
FILE common_data/sce_sys/param2.sfo sce_sys/param2.sfo
FILE common_data/sce_sys/icon0.png sce_sys/icon0.png
FILE common_data/sce_sys/pic0.png sce_sys/pic0.png
FILE common_data/sce_sys/livearea/contents/bg0.png sce_sys/livearea/contents/bg0.png
FILE common_data/sce_sys/livearea/contents/gate.png sce_sys/livearea/contents/gate.png
FILE common_data/sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml
)
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Can be somewhat slow when cpu-hungry game process is running due to BGFTP proces

1. Install [LowMemMode plugin](https://github.com/GrapheneCt/LowMemMode) to increase multitasking abilities. It is not required, but highly recommended.
2. Intstall .vpk, start BGFTP application.
3. Press X button to start BGFTP background application.
4. Now you can use BGFTP.

To disable notifications, go to Settings -> Notifications -> BGFTP.
Don't forget to terminate BGFTP after you finished using it, otherwise you system will not switch to sleep mode.
Expand All @@ -21,9 +19,7 @@ Don't forget to terminate BGFTP after you finished using it, otherwise you syste
2. Enlarged memory mode game is started. BGFTP can be relaunched afterwards if you have [LowMemMode plugin](https://github.com/GrapheneCt/LowMemMode) installed.

# How to build
To build this application you will need [libvita2d_sys](https://github.com/GrapheneCt/libvita2d_sys).

Use DolceSDK to build application.
Use DolceSDK to build this application.

# Credits

Expand Down
11 changes: 0 additions & 11 deletions SceBgAppUtil.yml

This file was deleted.

16 changes: 0 additions & 16 deletions SceIncomingDialog.yml

This file was deleted.

17 changes: 0 additions & 17 deletions SceNotificationUtil.yml

This file was deleted.

Loading

0 comments on commit f635c1f

Please sign in to comment.