mirror of
https://github.com/etaHEN/etaHEN.git
synced 2026-01-12 19:25:33 +08:00
etaHEN 2.4B etaHEN 2.4B Change log - Updated to support the latest PS5 Payload SDK - Fixed etaHEN and Cheats support for 8.40-10.01 - Added a Game Overlay menu to show CPU/GPU Temp and utilization, Local IP Address and other future states - Added a Kstuff menu for options like downloading the latest kstuff from github, turning off kstufff autoload and more - Added a Custom Background Package Installer for installing PKGs from internal storage from any directory (Requires DPIv2 enabled for 5.50+) - DPIv2 can now download local files via url example http://192.xxx.xxx.xxx:12800/data/etaHEN/etaHEN.log - Improved Cheats support, cheats with or without 0 sections are now supported - Added Fix by TheFlow to Improve 2.xx PS4 PKG speeds - Replaced the donation links in the etaHEN credits menu with ones to github sponsers - Removed the non-whitelist app jailbreak option and moved it to an optional Legacy CMD Server option in the etaHEN Settings off by default - Game Decryptor has been updated for the Itemzflow Dumper - Updated the Plugin loader System - The Payload SDK ELFLDR is now REQUIRED for etaHEN to load - Replaced HTTP2 with Curl for better compatibility - Added timeout for ShellUI to receive a response (will stop it from freezing if no response is given) small fix
72 lines
3.0 KiB
CMake
72 lines
3.0 KiB
CMake
cmake_minimum_required (VERSION 3.20)
|
|
|
|
set(basename "fps_elf")
|
|
project(${basename} C CXX ASM)
|
|
|
|
# Language Standard Defaults
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
# Check for sub-project as part of main build or external build
|
|
if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
set(IS_SUBPROJECT TRUE)
|
|
else()
|
|
set(IS_SUBPROJECT FALSE)
|
|
endif()
|
|
|
|
message("IS_SUBPROJECT: ${IS_SUBPROJECT}")
|
|
|
|
set(D_CWD "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${D_CWD}/../daemon/assets)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${D_CWD}/bin)
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${D_CWD}/bin) # static libs are archive
|
|
set(D_SRC ${D_CWD}/src)
|
|
|
|
# Headers
|
|
include_directories (SYSTEM "${PS5_PAYLOAD_SDK}")
|
|
include_directories (SYSTEM "${PS5_PAYLOAD_SDK}/include")
|
|
|
|
add_executable(${PROJECT_NAME})
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}.elf")
|
|
|
|
# Must build with clang
|
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "[Cc]lang")
|
|
set(IS_CLANG 1)
|
|
else()
|
|
message(FATAL_ERROR "${PROJECT_NAME} is meant to be built with clang! CompilerID: ${CMAKE_CXX_COMPILER_ID}")
|
|
endif()
|
|
|
|
# Finalize main target sources
|
|
target_compile_options(${PROJECT_NAME} PUBLIC
|
|
$<$<COMPILE_LANGUAGE:C>:${C_DEFS} ${C_FLAGS}>
|
|
$<$<COMPILE_LANGUAGE:CXX>:${CXX_DEFS} ${CXX_FLAGS}>
|
|
$<$<COMPILE_LANGUAGE:ASM>:${ASM_FLAGS}>
|
|
)
|
|
|
|
message("========== build: ${PROJECT_NAME} ==========")
|
|
|
|
|
|
file(GLOB SrcFiles ${D_SRC}/*.c ${D_SRC}/*.cpp ${D_SRC}/../include/*.h ${D_SRC}/../include/*.hpp ${D_SRC}/*.s ${D_SRC}/../../extern/tiny-json/*.cpp ${D_SRC}/../../extern/tiny-json/*.hpp ${D_SRC}/../../extern/cJSON/*.cpp ${D_SRC}/../../extern/cJSON/*.hpp ${D_SRC}/../../lib/backtrace.cpp)
|
|
|
|
set(CMAKE_C_FLAGS "--target=x86_64-sie-ps5 -DPPR -DPS5 -DPS5_FW_VERSION=${V_FW} ")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nested-anon-types -Wno-gnu-anonymous-struct -Wno-zero-length-array -Wno-keyword-macro -fPIC -fPIE -march=znver2 -Wall -Werror -fstack-protector-all")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -DDEBUG -gfull -gdwarf-2 -O0 -pedantic -pedantic-errors")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 ")
|
|
|
|
target_sources(${PROJECT_NAME} PRIVATE ${SrcFiles})
|
|
target_include_directories(${PROJECT_NAME} PRIVATE "${D_CWD}/include")
|
|
target_link_directories (${PROJECT_NAME} PUBLIC "${PROJECT_ROOT}/lib")
|
|
target_link_libraries (${PROJECT_NAME} PUBLIC hijacker ScePad SceSystemService SceNet SceSysmodule SceUserService SceNetCtl kernel )
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
# Add post-build command
|
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_OBJCOPY} --remove-section .debug_info --remove-section .debug_abbrev --remove-section .debug_line --remove-section .debug_str --remove-section .debug_loc --remove-section .debug_aranges --remove-section .debug_ranges --remove-section .debug_pubnames --remove-section .debug_pubtypes --remove-section .debug_frame --strip-unneeded $<TARGET_FILE:${PROJECT_NAME}>
|
|
COMMENT "Stripping debugging information from ${PROJECT_NAME}.elf"
|
|
)
|
|
|