mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-19 13:51:16 +00:00
Generate iso, and hey it actually kinda runs!
Kinda starts running, but seems to "boot-loop", which is annoying. Also, `isle.ini` is empty, for some reason.
This commit is contained in:
parent
f30144c239
commit
f5d38d1dbb
@ -509,6 +509,9 @@ if (NXDK)
|
|||||||
target_sources(lego1 PRIVATE
|
target_sources(lego1 PRIVATE
|
||||||
ISLE/xbox/atof.c
|
ISLE/xbox/atof.c
|
||||||
)
|
)
|
||||||
|
target_sources(lego1 PRIVATE
|
||||||
|
ISLE/xbox/dbg.c
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ISLE_BUILD_APP)
|
if (ISLE_BUILD_APP)
|
||||||
@ -595,6 +598,9 @@ if (ISLE_BUILD_APP)
|
|||||||
target_sources(isle PRIVATE
|
target_sources(isle PRIVATE
|
||||||
ISLE/xbox/atof.c
|
ISLE/xbox/atof.c
|
||||||
)
|
)
|
||||||
|
target_sources(isle PRIVATE
|
||||||
|
ISLE/xbox/dbg.c
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(Python3_FOUND)
|
if(Python3_FOUND)
|
||||||
if(NOT DEFINED PYTHON_PIL_AVAILABLE)
|
if(NOT DEFINED PYTHON_PIL_AVAILABLE)
|
||||||
@ -839,6 +845,12 @@ if(NINTENDO_3DS)
|
|||||||
endif()
|
endif()
|
||||||
install(FILES "$<TARGET_FILE_DIR:isle>/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
install(FILES "$<TARGET_FILE_DIR:isle>/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
if (NXDK)
|
||||||
|
include("${CMAKE_SOURCE_DIR}/PostbuildAction.cmake")
|
||||||
|
set(XBE_TITLE isle)
|
||||||
|
set(XBOX_ISO_DIR ${CMAKE_CURRENT_BINARY_DIR}/xiso)
|
||||||
|
add_xbox_build_steps(isle ${XBE_TITLE} ${XBOX_ISO_DIR})
|
||||||
|
endif()
|
||||||
if(WINDOWS_STORE)
|
if(WINDOWS_STORE)
|
||||||
install(
|
install(
|
||||||
DIRECTORY
|
DIRECTORY
|
||||||
|
|||||||
@ -72,6 +72,10 @@
|
|||||||
#include "ios/config.h"
|
#include "ios/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NXDK
|
||||||
|
#include "xbox/dbg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(IsleApp, 0x8c)
|
DECOMP_SIZE_ASSERT(IsleApp, 0x8c)
|
||||||
|
|
||||||
// GLOBAL: ISLE 0x410030
|
// GLOBAL: ISLE 0x410030
|
||||||
@ -300,6 +304,8 @@ void IsleApp::SetupVideoFlags(
|
|||||||
|
|
||||||
SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv)
|
SDL_AppResult SDL_AppInit(void** appstate, int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
SDL_SetLogOutputFunction(my_output, NULL);
|
||||||
|
|
||||||
*appstate = NULL;
|
*appstate = NULL;
|
||||||
|
|
||||||
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
|
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
|
||||||
|
|||||||
7
ISLE/xbox/dbg.c
Normal file
7
ISLE/xbox/dbg.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <xboxkrnl/xboxkrnl.h>
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
|
||||||
|
void my_output(void *userdata, int category, SDL_LogPriority priority, const char *message) {
|
||||||
|
DbgPrint("%s", message);
|
||||||
|
}
|
||||||
14
ISLE/xbox/dbg.h
Normal file
14
ISLE/xbox/dbg.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// atof.h
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void my_output(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
35
PostbuildAction.cmake
Normal file
35
PostbuildAction.cmake
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
function(add_xbox_build_steps TARGET_NAME XBE_TITLE XBOX_ISO_DIR)
|
||||||
|
# Ensure ISO output directory exists
|
||||||
|
file(MAKE_DIRECTORY ${XBOX_ISO_DIR})
|
||||||
|
|
||||||
|
# Convert EXE to XBE
|
||||||
|
add_custom_target(${TARGET_NAME}_cxbe_convert ALL
|
||||||
|
COMMENT "CXBE Conversion: [EXE -> XBE]"
|
||||||
|
VERBATIM
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E env
|
||||||
|
${NXDK_DIR}/tools/cxbe/cxbe
|
||||||
|
-OUT:${CMAKE_CURRENT_BINARY_DIR}/default.xbe
|
||||||
|
-TITLE:${XBE_TITLE}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${XBE_TITLE}.exe > NUL 2>&1
|
||||||
|
)
|
||||||
|
add_dependencies(${TARGET_NAME}_cxbe_convert ${TARGET_NAME})
|
||||||
|
|
||||||
|
# Convert XBE to XISO
|
||||||
|
add_custom_target(${TARGET_NAME}_xbe_iso ALL
|
||||||
|
COMMENT "XISO Conversion: [XBE -> XISO]"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/default.xbe"
|
||||||
|
"${XBOX_ISO_DIR}/default.xbe"
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E env
|
||||||
|
${NXDK_DIR}/tools/extract-xiso/build/extract-xiso
|
||||||
|
-c ${XBOX_ISO_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${XBE_TITLE}.iso
|
||||||
|
WORKING_DIRECTORY ${XBOX_ISO_DIR}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
add_dependencies(${TARGET_NAME}_xbe_iso ${TARGET_NAME}_cxbe_convert)
|
||||||
|
|
||||||
|
# Silence output
|
||||||
|
set_target_properties(${TARGET_NAME}_cxbe_convert PROPERTIES OUTPUT_QUIET ON)
|
||||||
|
set_target_properties(${TARGET_NAME}_xbe_iso PROPERTIES OUTPUT_QUIET ON)
|
||||||
|
endfunction()
|
||||||
Loading…
Reference in New Issue
Block a user