Wii: Generate HBC bundle
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 01:25:33 -0700
4 files changed,
27 insertions(+),
3 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -199,9 +199,6 @@
if(WII) add_definitions(-U__STRICT_ANSI__) execute_process(COMMAND ${RAW2C} ${CMAKE_SOURCE_DIR}/src/platform/wii/font.tpl OUTPUT_QUIET ERROR_QUIET) - add_executable(${BINARY_NAME}.elf ${GUI_SRC} ${CMAKE_BINARY_DIR}/font.c) - target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${OS_LIB}) - add_custom_command(TARGET ${BINARY_NAME}.elf POST_BUILD COMMAND ${ELF2DOL} ${BINARY_NAME}.elf ${BINARY_NAME}.dol) endif() if(BUILD_RASPI)@@ -448,6 +445,10 @@ endif()
if(BUILD_QT) add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/qt ${CMAKE_BINARY_DIR}/qt) +endif() + +if(WII) + add_subdirectory(${CMAKE_SOURCE_DIR}/src/platform/wii ${CMAKE_BINARY_DIR}) endif() if(BUILD_PERF)
A
src/platform/wii/CMakeLists.txt
@@ -0,0 +1,16 @@
+add_executable(${BINARY_NAME}.elf ${GUI_SRC} ${CMAKE_BINARY_DIR}/font.c) +target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${OS_LIB}) +add_custom_command(TARGET ${BINARY_NAME}.elf POST_BUILD COMMAND ${ELF2DOL} ${BINARY_NAME}.elf ${BINARY_NAME}.dol) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta.xml.in ${CMAKE_CURRENT_BINARY_DIR}/meta.xml) +add_custom_target(${BINARY_NAME}-wii.zip ALL + COMMAND ${CMAKE_COMMAND} -E remove ${BINARY_NAME}-wii.zip + COMMAND ${CMAKE_COMMAND} -E make_directory ${BINARY_NAME}-wii + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/meta.xml ${BINARY_NAME}-wii/ + COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_NAME}.dol ${BINARY_NAME}-wii/boot.dol + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/icon.png ${BINARY_NAME}-wii/ + COMMAND zip -r ${BINARY_NAME}-wii.zip ${BINARY_NAME}-wii + DEPENDS ${BINARY_NAME}.elf + SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/meta.xml.in + ${BINARY_NAME}.dol + ${CMAKE_CURRENT_SOURCE_DIR}/icon.png)
A
src/platform/wii/meta.xml.in
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<app version="1"> + <name>mGBA</name> + <coder>Jeffrey Pfau (endrift)</coder> + <version>${VERSION_STRING}</version> + <short_description>mGBA Game Boy Advance emulator</short_description> +</app>