mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-24 05:29:01 +02:00
make .pkg and .self
This commit is contained in:
parent
3b9b120ab3
commit
a679230e8f
4 changed files with 60 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ include(UseCcache)
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
|
include(OpenOrbis)
|
||||||
|
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
message(FATAL_ERROR "Architecture didn't make it out of scope, did you delete DetectArchitecture.cmake?")
|
message(FATAL_ERROR "Architecture didn't make it out of scope, did you delete DetectArchitecture.cmake?")
|
||||||
|
|
|
||||||
42
CMakeModules/OpenOrbis.cmake
Normal file
42
CMakeModules/OpenOrbis.cmake
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
function(add_fself project target)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${target}.self"
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/create-fself
|
||||||
|
-in=${CMAKE_BINARY_DIR}/bin/${target}
|
||||||
|
-out=${CMAKE_BINARY_DIR}/bin/${target}.oelf
|
||||||
|
--eboot ${CMAKE_BINARY_DIR}/bin/eboot.bin
|
||||||
|
VERBATIM
|
||||||
|
DEPENDS "${project}"
|
||||||
|
)
|
||||||
|
add_custom_target("${project}_self" ALL DEPENDS "${target}.self")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(add_pkg project target)
|
||||||
|
set(sce_sys_dir ${CMAKE_BINARY_DIR}/sce_sys)
|
||||||
|
set(sce_sys_param ${sce_sys_dir}/param.sfo)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${target}.pkg"
|
||||||
|
COMMAND mkdir -p ${sce_sys_dir}
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_new ${sce_sys_param}
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} APP_TYPE --type Integer --maxsize 4 --value 1
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} APP_VER --type Utf8 --maxsize 8 --value '1.03'
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} ATTRIBUTE --type Integer --maxsize 4 --value 0
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} CATEGORY --type Utf8 --maxsize 4 --value 'gd'
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} CONTENT_ID --type Utf8 --maxsize 48 --value 'IV0000-BREW00090_00-EDENEMULAT000000'
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} DOWNLOAD_DATA_SIZE --type Integer --maxsize 4 --value 0
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} SYSTEM_VER --type Integer --maxsize 4 --value 0
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} TITLE --type Utf8 --maxsize 128 --value 'Eden Emulator'
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} TITLE_ID --type Utf8 --maxsize 12 --value 'BREW00090'
|
||||||
|
COMMAND ${CMAKE_SYSROOT}/bin/PkgTool.Core sfo_setentry ${sce_sys_param} VERSION --type Utf8 --maxsize 8 --value '1.03'
|
||||||
|
VERBATIM
|
||||||
|
DEPENDS "${target}.self"
|
||||||
|
)
|
||||||
|
add_custom_target("${project}_pkg" ALL DEPENDS "${target}.pkg")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if (NOT DEFINED ENV{OO_PS4_TOOLCHAIN})
|
||||||
|
set(ENV{OO_PS4_TOOLCHAIN} ${CMAKE_SYSROOT})
|
||||||
|
endif ()
|
||||||
|
|
@ -34,6 +34,8 @@ target_link_libraries(yuzu-cmd PRIVATE common core input_common frontend_common
|
||||||
target_link_libraries(yuzu-cmd PRIVATE glad)
|
target_link_libraries(yuzu-cmd PRIVATE glad)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_link_libraries(yuzu-cmd PRIVATE getopt)
|
target_link_libraries(yuzu-cmd PRIVATE getopt)
|
||||||
|
elseif(PLATFORM_PS4)
|
||||||
|
target_link_libraries(yuzu-cmd PRIVATE SceVideoOut SceAudioOut ScePad)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(yuzu-cmd PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
|
|
||||||
|
|
@ -65,3 +67,8 @@ if (NOT MSVC)
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Wno-missing-field-initializers)
|
-Wno-missing-field-initializers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (PLATFORM_PS4)
|
||||||
|
add_fself(yuzu-cmd eden-cli)
|
||||||
|
add_pkg(yuzu-cmd eden-cli)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,16 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __OPENORBIS__
|
||||||
|
# define STUB_WEAK(name) extern "C" void name() { printf("called " #name); asm volatile("ud2"); }
|
||||||
|
STUB_WEAK(__cxa_thread_atexit)
|
||||||
|
STUB_WEAK(__assert)
|
||||||
|
STUB_WEAK(ZSTD_trace_compress_begin)
|
||||||
|
STUB_WEAK(ZSTD_trace_compress_end)
|
||||||
|
STUB_WEAK(ZSTD_trace_decompress_begin)
|
||||||
|
STUB_WEAK(ZSTD_trace_decompress_end)
|
||||||
|
# undef STUB_WEAK
|
||||||
|
#endif
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// tells Nvidia and AMD drivers to use the dedicated GPU by default on laptops with switchable
|
// tells Nvidia and AMD drivers to use the dedicated GPU by default on laptops with switchable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue