From 62ea9ffea7789537790c0daa1f37a55f58f8481a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 23 Jun 2022 07:26:24 +0200 Subject: [PATCH 001/155] add cmake for Win and Linux --- BUILDING-cmake.md | 61 + OTRExporter/CMake/Default.cmake | 65 + OTRExporter/CMake/DefaultCXX.cmake | 12 + OTRExporter/CMake/Utils.cmake | 233 +++ OTRExporter/CMakeLists.txt | 89 ++ OTRExporter/OTRExporter/CMakeLists.txt | 245 +++ ZAPDTR/ZAPD/CMakeLists.txt | 446 ++++++ ZAPDTR/ZAPDUtils/CMakeLists.txt | 213 +++ libultraship/libultraship/CMakeLists.txt | 509 +++++++ soh/CMake/Default.cmake | 65 + soh/CMake/DefaultCXX.cmake | 12 + soh/CMake/Linux32bit-toolchain.cmake | 18 + soh/CMake/Utils.cmake | 234 +++ soh/CMakeLists.txt | 1748 ++++++++++++++++++++++ 14 files changed, 3950 insertions(+) create mode 100644 BUILDING-cmake.md create mode 100644 OTRExporter/CMake/Default.cmake create mode 100644 OTRExporter/CMake/DefaultCXX.cmake create mode 100644 OTRExporter/CMake/Utils.cmake create mode 100644 OTRExporter/CMakeLists.txt create mode 100644 OTRExporter/OTRExporter/CMakeLists.txt create mode 100644 ZAPDTR/ZAPD/CMakeLists.txt create mode 100644 ZAPDTR/ZAPDUtils/CMakeLists.txt create mode 100644 libultraship/libultraship/CMakeLists.txt create mode 100644 soh/CMake/Default.cmake create mode 100644 soh/CMake/DefaultCXX.cmake create mode 100644 soh/CMake/Linux32bit-toolchain.cmake create mode 100644 soh/CMake/Utils.cmake create mode 100644 soh/CMakeLists.txt diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md new file mode 100644 index 00000000000..bb78cbdf7c7 --- /dev/null +++ b/BUILDING-cmake.md @@ -0,0 +1,61 @@ +libpng and zlib will be used from VCPKG. +My vcpkg is located at d:/VCPKG +I also created a new triplet to be used. + +~~~ +x64-windows-v142: +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_PLATFORM_TOOLSET v142) +~~~ + +prepare libpng: +~~~ +D:\vcpkg\vcpkg.exe install libpng --triple=x86-windows-v142 +~~~ + +~~~ +git clone https://github.com/th-2021/Shipwright-cmake.git +# +# build SoH +# +cd shipwright-cmake +cd OTRExporter +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release +# copy ROM for asset extraction +#.\extract_assets.py +cd ../soh +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/Win32" -G "Visual Studio 17 2022" -T v142 -A Win32 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-v142" +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release +~~~ + +Linux (Ubuntu 22.04): + +using native build (not docker) + +~~~ +cd ShipWright +git clone https://github.com/ladislav-zezula/StormLib external/StormLib +git clone https://github.com/Perlmint/glew-cmake.git external/glew +~~~ + +(will be built with below cmake commands) - no extra build needed + +~~~ +cd OTRExporter + +# change the path to ZAPD in extract_assets.py +sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD%" < extract_assets.py > extract_assets_cmake.py +chmod +x extract_assets_cmake.py + +cmake -S . -B build-cmake +cmake --build build-cmake + +./extract_assets_cmake.py + +cd ../soh +cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=CMake/Linux32bit-toolchain.cmake +cmake --build build-cmake +~~~ diff --git a/OTRExporter/CMake/Default.cmake b/OTRExporter/CMake/Default.cmake new file mode 100644 index 00000000000..f4d0ba084be --- /dev/null +++ b/OTRExporter/CMake/Default.cmake @@ -0,0 +1,65 @@ +################################################################################ +# Command for variable_watch. This command issues error message, if a variable +# is changed. If variable PROPERTY_READER_GUARD_DISABLED is TRUE nothing happens +# variable_watch( property_reader_guard) +################################################################################ +function(property_reader_guard VARIABLE ACCESS VALUE CURRENT_LIST_FILE STACK) + if("${PROPERTY_READER_GUARD_DISABLED}") + return() + endif() + + if("${ACCESS}" STREQUAL "MODIFIED_ACCESS") + message(FATAL_ERROR + " Variable ${VARIABLE} is not supposed to be changed.\n" + " It is used only for reading target property ${VARIABLE}.\n" + " Use\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}\" \"\")\n" + " or\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}_\" \"\")\n" + " instead.\n") + endif() +endfunction() + +################################################################################ +# Create variable with generator expression that expands to value of +# target property _. If property is empty or not set then property +# is used instead. Variable has watcher property_reader_guard that +# doesn't allow to edit it. +# create_property_reader() +# Input: +# name - Name of watched property and output variable +################################################################################ +function(create_property_reader NAME) + set(PROPERTY_READER_GUARD_DISABLED TRUE) + set(CONFIG_VALUE "$>>>") + set(IS_CONFIG_VALUE_EMPTY "$") + set(GENERAL_VALUE "$>") + set("${NAME}" "$" PARENT_SCOPE) + variable_watch("${NAME}" property_reader_guard) +endfunction() + +################################################################################ +# Set property $_${PROPS_CONFIG_U} of ${PROPS_TARGET} to +# set_config_specific_property( ) +# Input: +# name - Prefix of property name +# value - New value +################################################################################ +function(set_config_specific_property NAME VALUE) + set_target_properties("${PROPS_TARGET}" PROPERTIES "${NAME}_${PROPS_CONFIG_U}" "${VALUE}") +endfunction() + +################################################################################ + +create_property_reader("TARGET_NAME") +create_property_reader("OUTPUT_DIRECTORY") + +set_config_specific_property("TARGET_NAME" "${PROPS_TARGET}") +set_config_specific_property("OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("ARCHIVE_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("LIBRARY_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("RUNTIME_OUTPUT_NAME" "${TARGET_NAME}") + +set_config_specific_property("ARCHIVE_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("LIBRARY_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("RUNTIME_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") \ No newline at end of file diff --git a/OTRExporter/CMake/DefaultCXX.cmake b/OTRExporter/CMake/DefaultCXX.cmake new file mode 100644 index 00000000000..e06b3cd2fcb --- /dev/null +++ b/OTRExporter/CMake/DefaultCXX.cmake @@ -0,0 +1,12 @@ +include("${CMAKE_CURRENT_LIST_DIR}/Default.cmake") + +set_config_specific_property("OUTPUT_DIRECTORY" "${CMAKE_SOURCE_DIR}$<$>:/${CMAKE_VS_PLATFORM_NAME}>/${PROPS_CONFIG}") + +if(MSVC) + create_property_reader("DEFAULT_CXX_EXCEPTION_HANDLING") + create_property_reader("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT") + + set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") + set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi") +endif() diff --git a/OTRExporter/CMake/Utils.cmake b/OTRExporter/CMake/Utils.cmake new file mode 100644 index 00000000000..d9822f0a367 --- /dev/null +++ b/OTRExporter/CMake/Utils.cmake @@ -0,0 +1,233 @@ +# utils file for projects came from visual studio solution with cmake-converter. + +################################################################################ +# Wrap each token of the command with condition +################################################################################ +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) +macro(prepare_commands) + unset(TOKEN_ROLE) + unset(COMMANDS) + foreach(TOKEN ${ARG_COMMANDS}) + if("${TOKEN}" STREQUAL "COMMAND") + set(TOKEN_ROLE "KEYWORD") + elseif("${TOKEN_ROLE}" STREQUAL "KEYWORD") + set(TOKEN_ROLE "CONDITION") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(TOKEN_ROLE "COMMAND") + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + set(TOKEN_ROLE "ARG") + endif() + + if("${TOKEN_ROLE}" STREQUAL "KEYWORD") + list(APPEND COMMANDS "${TOKEN}") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(CONDITION ${TOKEN}) + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + list(APPEND COMMANDS "$<$:${DUMMY}>$<${CONDITION}:${TOKEN}>") + elseif("${TOKEN_ROLE}" STREQUAL "ARG") + list(APPEND COMMANDS "$<${CONDITION}:${TOKEN}>") + endif() + endforeach() +endmacro() +cmake_policy(POP) + +################################################################################ +# Transform all the tokens to absolute paths +################################################################################ +macro(prepare_output) + unset(OUTPUT) + foreach(TOKEN ${ARG_OUTPUT}) + if(IS_ABSOLUTE ${TOKEN}) + list(APPEND OUTPUT "${TOKEN}") + else() + list(APPEND OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${TOKEN}") + endif() + endforeach() +endmacro() + +################################################################################ +# Parse add_custom_command_if args. +# +# Input: +# PRE_BUILD - Pre build event option +# PRE_LINK - Pre link event option +# POST_BUILD - Post build event option +# TARGET - Target +# OUTPUT - List of output files +# DEPENDS - List of files on which the command depends +# COMMANDS - List of commands(COMMAND condition1 commannd1 args1 COMMAND +# condition2 commannd2 args2 ...) +# Output: +# OUTPUT - Output files +# DEPENDS - Files on which the command depends +# COMMENT - Comment +# PRE_BUILD - TRUE/FALSE +# PRE_LINK - TRUE/FALSE +# POST_BUILD - TRUE/FALSE +# TARGET - Target name +# COMMANDS - Prepared commands(every token is wrapped in CONDITION) +# NAME - Unique name for custom target +# STEP - PRE_BUILD/PRE_LINK/POST_BUILD +################################################################################ +function(add_custom_command_if_parse_arguments) + cmake_parse_arguments("ARG" "PRE_BUILD;PRE_LINK;POST_BUILD" "TARGET;COMMENT" "DEPENDS;OUTPUT;COMMANDS" ${ARGN}) + + if(WIN32) + set(DUMMY "cd.") + elseif(UNIX) + set(DUMMY "true") + endif() + + prepare_commands() + prepare_output() + + set(DEPENDS "${ARG_DEPENDS}") + set(COMMENT "${ARG_COMMENT}") + set(PRE_BUILD "${ARG_PRE_BUILD}") + set(PRE_LINK "${ARG_PRE_LINK}") + set(POST_BUILD "${ARG_POST_BUILD}") + set(TARGET "${ARG_TARGET}") + if(PRE_BUILD) + set(STEP "PRE_BUILD") + elseif(PRE_LINK) + set(STEP "PRE_LINK") + elseif(POST_BUILD) + set(STEP "POST_BUILD") + endif() + set(NAME "${TARGET}_${STEP}") + + set(OUTPUT "${OUTPUT}" PARENT_SCOPE) + set(DEPENDS "${DEPENDS}" PARENT_SCOPE) + set(COMMENT "${COMMENT}" PARENT_SCOPE) + set(PRE_BUILD "${PRE_BUILD}" PARENT_SCOPE) + set(PRE_LINK "${PRE_LINK}" PARENT_SCOPE) + set(POST_BUILD "${POST_BUILD}" PARENT_SCOPE) + set(TARGET "${TARGET}" PARENT_SCOPE) + set(COMMANDS "${COMMANDS}" PARENT_SCOPE) + set(STEP "${STEP}" PARENT_SCOPE) + set(NAME "${NAME}" PARENT_SCOPE) +endfunction() + +################################################################################ +# Add conditional custom command +# +# Generating Files +# The first signature is for adding a custom command to produce an output: +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [DEPENDS [depends...]] +# [COMMENT comment] +# +# Build Events +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [COMMENT comment] +# +# Input: +# output - Output files the command is expected to produce +# condition - Generator expression for wrapping the command +# command - Command-line(s) to execute at build time. +# args - Command`s args +# depends - Files on which the command depends +# comment - Display the given message before the commands are executed at +# build time. +# PRE_BUILD - Run before any other rules are executed within the target +# PRE_LINK - Run after sources have been compiled but before linking the +# binary +# POST_BUILD - Run after all other rules within the target have been +# executed +################################################################################ +function(add_custom_command_if) + add_custom_command_if_parse_arguments(${ARGN}) + + if(OUTPUT AND TARGET) + message(FATAL_ERROR "Wrong syntax. A TARGET and OUTPUT can not both be specified.") + endif() + + if(OUTPUT) + add_custom_command(OUTPUT ${OUTPUT} + ${COMMANDS} + DEPENDS ${DEPENDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + elseif(TARGET) + if(PRE_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio") + add_custom_target( + ${NAME} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + add_dependencies(${TARGET} ${NAME}) + else() + add_custom_command( + TARGET ${TARGET} + ${STEP} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + endif() + else() + message(FATAL_ERROR "Wrong syntax. A TARGET or OUTPUT must be specified.") + endif() +endfunction() + +################################################################################ +# Use props file for a target and configs +# use_props( ) +# Inside there are following variables: +# PROPS_TARGET - +# PROPS_CONFIG - One of +# PROPS_CONFIG_U - Uppercase PROPS_CONFIG +# Input: +# target - Target to apply props file +# configs - Build configurations to apply props file +# props_file - CMake script +################################################################################ +macro(use_props TARGET CONFIGS PROPS_FILE) + set(PROPS_TARGET "${TARGET}") + foreach(PROPS_CONFIG ${CONFIGS}) + string(TOUPPER "${PROPS_CONFIG}" PROPS_CONFIG_U) + + get_filename_component(ABSOLUTE_PROPS_FILE "${PROPS_FILE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") + if(EXISTS "${ABSOLUTE_PROPS_FILE}") + include("${ABSOLUTE_PROPS_FILE}") + else() + message(WARNING "Corresponding cmake file from props \"${ABSOLUTE_PROPS_FILE}\" doesn't exist") + endif() + endforeach() +endmacro() + +################################################################################ +# Add compile options to source file +# source_file_compile_options( [compile_options...]) +# Input: +# source_file - Source file +# compile_options - Options to add to COMPILE_FLAGS property +################################################################################ +function(source_file_compile_options SOURCE_FILE) + if("${ARGC}" LESS_EQUAL "1") + return() + endif() + + get_source_file_property(COMPILE_OPTIONS "${SOURCE_FILE}" COMPILE_OPTIONS) + + if(COMPILE_OPTIONS) + list(APPEND COMPILE_OPTIONS ${ARGN}) + else() + set(COMPILE_OPTIONS "${ARGN}") + endif() + + set_source_files_properties("${SOURCE_FILE}" PROPERTIES COMPILE_OPTIONS "${COMPILE_OPTIONS}") +endfunction() + +################################################################################ +# Default properties of visual studio projects +################################################################################ +set(DEFAULT_CXX_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultCXX.cmake") diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt new file mode 100644 index 00000000000..39e2f344ba8 --- /dev/null +++ b/OTRExporter/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) + +set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) +set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") +set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") + +project(OTRExporter C CXX) + +################################################################################ +# Set target arch type if empty. Visual studio solution generator provides it. +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(NOT CMAKE_VS_PLATFORM_NAME) + set(CMAKE_VS_PLATFORM_NAME "x64") + endif() + message("${CMAKE_VS_PLATFORM_NAME} architecture in use") + + if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64" + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")) + message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!") + endif() +endif() + +################################################################################ +# Global configuration types +################################################################################ +set(CMAKE_CONFIGURATION_TYPES + "Debug" + "Release" + CACHE STRING "" FORCE +) + +################################################################################ +# Global compiler options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_C_FLAGS "") + set(CMAKE_C_FLAGS_DEBUG "") + set(CMAKE_C_FLAGS_RELEASE "") + set(CMAKE_CXX_FLAGS "") + set(CMAKE_CXX_FLAGS_DEBUG "") + set(CMAKE_CXX_FLAGS_RELEASE "") +endif() + +################################################################################ +# Global linker options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_EXE_LINKER_FLAGS "") + set(CMAKE_MODULE_LINKER_FLAGS "") + set(CMAKE_SHARED_LINKER_FLAGS "") + set(CMAKE_STATIC_LINKER_FLAGS "") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS}") +endif() + +################################################################################ +# Common utils +################################################################################ +include(CMake/Utils.cmake) + +################################################################################ +# Additional Global Settings(add specific info there) +################################################################################ +include(CMake/GlobalSettingsInclude.cmake OPTIONAL) + +################################################################################ +# Use solution folders feature +################################################################################ +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +################################################################################ +# Sub-projects +################################################################################ +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") +add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) +endif() +add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) +add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +add_subdirectory(OTRExporter) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt new file mode 100644 index 00000000000..03fac4438a7 --- /dev/null +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -0,0 +1,245 @@ +set(PROJECT_NAME OTRExporter) + +################################################################################ +# Source groups +################################################################################ +set(Header_Files + "AnimationExporter.h" + "ArrayExporter.h" + "BackgroundExporter.h" + "BlobExporter.h" + "CollisionExporter.h" + "command_macros_base.h" + "CutsceneExporter.h" + "DisplayListExporter.h" + "Exporter.h" + "Main.h" + "MtxExporter.h" + "PathExporter.h" + "PlayerAnimationExporter.h" + "RoomExporter.h" + "SkeletonExporter.h" + "SkeletonLimbExporter.h" + "TextExporter.h" + "TextureExporter.h" + "VersionInfo.h" + "VtxExporter.h" + "z64cutscene.h" + "z64cutscene_commands.h" +) +source_group("Header Files" FILES ${Header_Files}) + +set(Source_Files + "AnimationExporter.cpp" + "ArrayExporter.cpp" + "BackgroundExporter.cpp" + "BlobExporter.cpp" + "CollisionExporter.cpp" + "CutsceneExporter.cpp" + "DisplayListExporter.cpp" + "Exporter.cpp" + "Main.cpp" + "MtxExporter.cpp" + "PathExporter.cpp" + "PlayerAnimationExporter.cpp" + "RoomExporter.cpp" + "SkeletonExporter.cpp" + "SkeletonLimbExporter.cpp" + "TextExporter.cpp" + "TextureExporter.cpp" + "VersionInfo.cpp" + "VtxExporter.cpp" +) +source_group("Source Files" FILES ${Source_Files}) + +set(ALL_FILES + ${Header_Files} + ${Source_Files} +) + +################################################################################ +# Target +################################################################################ +add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) + +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +set(ROOT_NAMESPACE OTRExporter) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set_target_properties(${PROJECT_NAME} PROPERTIES + VS_GLOBAL_KEYWORD "Win32Proj" + ) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + endif() +endif() +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() +################################################################################ +# Compile definitions +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "UNICODE;" + "_UNICODE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG;" + "_CRT_SECURE_NO_WARNINGS" + ">" + "$<$:" + "NDEBUG" + ">" + "WIN32;" + "_CONSOLE;" + "UNICODE;" + "_UNICODE" + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "UNICODE;" + "_UNICODE" + ) +endif() +################################################################################ +# Compile and link options +################################################################################ + +target_include_directories(${PROJECT_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPD/ + ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/tinyxml2 + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 + . +) + +if(MSVC) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /Oi; + /Gy + > + /permissive-; + /std:c++17; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /std:c++17 + > + $<$: + /Oi; + /Gy + > + /permissive-; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + endif() + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /OPT:REF; + /OPT:ICF + > + /SUBSYSTEM:CONSOLE + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /DEBUG; + /OPT:REF; + /OPT:ICF; + /INCREMENTAL:NO + > + /SUBSYSTEM:CONSOLE + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + $<$:-Wno-deprecated-enum-enum-conversion> + ) +endif() +################################################################################ +# Dependencies +################################################################################ +add_dependencies(${PROJECT_NAME} + libultraship +) + +# Link with other targets. + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "$<$:" + "ZAPDUtils;" + "OTRLib" + ">" + ) + endif() +endif() +target_link_libraries(${PROJECT_NAME} PUBLIC "${ADDITIONAL_LIBRARY_DEPENDENCIES}") + diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt new file mode 100644 index 00000000000..1fa567d5cc4 --- /dev/null +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -0,0 +1,446 @@ +set(PROJECT_NAME ZAPD) + +################################################################################ +# Source groups +################################################################################ +set(Header_Files + "../lib/tinyxml2/tinyxml2.h" + "CRC32.h" + "Declaration.h" + "FileWorker.h" + "GameConfig.h" + "Globals.h" + "ImageBackend.h" + "OutputFormatter.h" + "WarningHandler.h" +) +source_group("Header Files" FILES ${Header_Files}) + +set(Header_Files__Libraries + "../../libultraship/libultraship/Lib/stb/stb_image.h" + "../../libultraship/libultraship/Lib/stb/stb_image_write.h" + "ctpl_stl.h" +) +source_group("Header Files\\Libraries" FILES ${Header_Files__Libraries}) + +set(Header_Files__Libraries__elfio + "../lib/elfio/elfio/elf_types.hpp" + "../lib/elfio/elfio/elfio.hpp" + "../lib/elfio/elfio/elfio_dump.hpp" + "../lib/elfio/elfio/elfio_dynamic.hpp" + "../lib/elfio/elfio/elfio_header.hpp" + "../lib/elfio/elfio/elfio_note.hpp" + "../lib/elfio/elfio/elfio_relocation.hpp" + "../lib/elfio/elfio/elfio_section.hpp" + "../lib/elfio/elfio/elfio_segment.hpp" + "../lib/elfio/elfio/elfio_strings.hpp" + "../lib/elfio/elfio/elfio_symbols.hpp" + "../lib/elfio/elfio/elfio_utils.hpp" +) +source_group("Header Files\\Libraries\\elfio" FILES ${Header_Files__Libraries__elfio}) + +set(Header_Files__Libraries__libgfxd + "../lib/libgfxd/gbi.h" + "../lib/libgfxd/gfxd.h" + "../lib/libgfxd/priv.h" +) +source_group("Header Files\\Libraries\\libgfxd" FILES ${Header_Files__Libraries__libgfxd}) + +set(Header_Files__Yaz0 + "yaz0/readwrite.h" + "yaz0/yaz0.h" +) +source_group("Header Files\\Yaz0" FILES ${Header_Files__Yaz0}) + +set(Header_Files__Z64 + "OtherStructs/SkinLimbStructs.h" + "Overlays/ZOverlay.h" + "ZAnimation.h" + "ZArray.h" + "ZBackground.h" + "ZBlob.h" + "ZCollision.h" + "ZCutscene.h" + "ZCutsceneMM.h" + "ZDisplayList.h" + "ZFile.h" + "ZLimb.h" + "ZMtx.h" + "ZPath.h" + "ZPlayerAnimationData.h" + "ZResource.h" + "ZRom.h" + "ZScalar.h" + "ZSkeleton.h" + "ZString.h" + "ZSymbol.h" + "ZText.h" + "ZTexture.h" + "ZTextureAnimation.h" + "ZVector.h" + "ZVtx.h" +) +source_group("Header Files\\Z64" FILES ${Header_Files__Z64}) + +set(Header_Files__Z64__ZRoom + "ZRoom/ZRoom.h" + "ZRoom/ZRoomCommand.h" +) +source_group("Header Files\\Z64\\ZRoom" FILES ${Header_Files__Z64__ZRoom}) + +set(Header_Files__Z64__ZRoom__Commands + "ZRoom/Commands/EndMarker.h" + "ZRoom/Commands/SetActorCutsceneList.h" + "ZRoom/Commands/SetActorList.h" + "ZRoom/Commands/SetAlternateHeaders.h" + "ZRoom/Commands/SetAnimatedMaterialList.h" + "ZRoom/Commands/SetCameraSettings.h" + "ZRoom/Commands/SetCollisionHeader.h" + "ZRoom/Commands/SetCsCamera.h" + "ZRoom/Commands/SetCutscenes.h" + "ZRoom/Commands/SetEchoSettings.h" + "ZRoom/Commands/SetEntranceList.h" + "ZRoom/Commands/SetExitList.h" + "ZRoom/Commands/SetLightingSettings.h" + "ZRoom/Commands/SetLightList.h" + "ZRoom/Commands/SetMesh.h" + "ZRoom/Commands/SetMinimapChests.h" + "ZRoom/Commands/SetMinimapList.h" + "ZRoom/Commands/SetObjectList.h" + "ZRoom/Commands/SetPathways.h" + "ZRoom/Commands/SetRoomBehavior.h" + "ZRoom/Commands/SetRoomList.h" + "ZRoom/Commands/SetSkyboxModifier.h" + "ZRoom/Commands/SetSkyboxSettings.h" + "ZRoom/Commands/SetSoundSettings.h" + "ZRoom/Commands/SetSpecialObjects.h" + "ZRoom/Commands/SetStartPositionList.h" + "ZRoom/Commands/SetTimeSettings.h" + "ZRoom/Commands/SetTransitionActorList.h" + "ZRoom/Commands/SetWind.h" + "ZRoom/Commands/SetWorldMapVisited.h" + "ZRoom/Commands/Unused09.h" + "ZRoom/Commands/Unused1D.h" + "ZRoom/Commands/ZRoomCommandUnk.h" +) +source_group("Header Files\\Z64\\ZRoom\\Commands" FILES ${Header_Files__Z64__ZRoom__Commands}) + +set(Resource_Files + "../../OTRExporter/CFG/SymbolMap_OoTMqDbg.txt" +) +source_group("Resource Files" FILES ${Resource_Files}) + +set(Source_Files + "Declaration.cpp" + "FileWorker.cpp" + "GameConfig.cpp" + "Globals.cpp" + "ImageBackend.cpp" + "Main.cpp" + "OutputFormatter.cpp" + "WarningHandler.cpp" +) +source_group("Source Files" FILES ${Source_Files}) + +set(Source_Files__Libraries__libgfxd + "../lib/libgfxd/gfxd.c" + "../lib/libgfxd/uc.c" + "../lib/libgfxd/uc_f3d.c" + "../lib/libgfxd/uc_f3db.c" + "../lib/libgfxd/uc_f3dex.c" + "../lib/libgfxd/uc_f3dex2.c" + "../lib/libgfxd/uc_f3dexb.c" +) +source_group("Source Files\\Libraries\\libgfxd" FILES ${Source_Files__Libraries__libgfxd}) + +set(Source_Files__Yaz0 + "yaz0/yaz0.cpp" +) +source_group("Source Files\\Yaz0" FILES ${Source_Files__Yaz0}) + +set(Source_Files__Z64 + "OtherStructs/SkinLimbStructs.cpp" + "Overlays/ZOverlay.cpp" + "ZAnimation.cpp" + "ZArray.cpp" + "ZBackground.cpp" + "ZBlob.cpp" + "ZCollision.cpp" + "ZCutscene.cpp" + "ZCutsceneMM.cpp" + "ZDisplayList.cpp" + "ZFile.cpp" + "ZLimb.cpp" + "ZMtx.cpp" + "ZPath.cpp" + "ZPlayerAnimationData.cpp" + "ZResource.cpp" + "ZRom.cpp" + "ZScalar.cpp" + "ZSkeleton.cpp" + "ZString.cpp" + "ZSymbol.cpp" + "ZText.cpp" + "ZTexture.cpp" + "ZTextureAnimation.cpp" + "ZVector.cpp" + "ZVtx.cpp" +) +source_group("Source Files\\Z64" FILES ${Source_Files__Z64}) + +set(Source_Files__Z64__ZRoom + "ZRoom/ZRoom.cpp" + "ZRoom/ZRoomCommand.cpp" +) +source_group("Source Files\\Z64\\ZRoom" FILES ${Source_Files__Z64__ZRoom}) + +set(Source_Files__Z64__ZRoom__Commands + "ZRoom/Commands/EndMarker.cpp" + "ZRoom/Commands/SetActorCutsceneList.cpp" + "ZRoom/Commands/SetActorList.cpp" + "ZRoom/Commands/SetAlternateHeaders.cpp" + "ZRoom/Commands/SetAnimatedMaterialList.cpp" + "ZRoom/Commands/SetCameraSettings.cpp" + "ZRoom/Commands/SetCollisionHeader.cpp" + "ZRoom/Commands/SetCsCamera.cpp" + "ZRoom/Commands/SetCutscenes.cpp" + "ZRoom/Commands/SetEchoSettings.cpp" + "ZRoom/Commands/SetEntranceList.cpp" + "ZRoom/Commands/SetExitList.cpp" + "ZRoom/Commands/SetLightingSettings.cpp" + "ZRoom/Commands/SetLightList.cpp" + "ZRoom/Commands/SetMesh.cpp" + "ZRoom/Commands/SetMinimapChests.cpp" + "ZRoom/Commands/SetMinimapList.cpp" + "ZRoom/Commands/SetObjectList.cpp" + "ZRoom/Commands/SetPathways.cpp" + "ZRoom/Commands/SetRoomBehavior.cpp" + "ZRoom/Commands/SetRoomList.cpp" + "ZRoom/Commands/SetSkyboxModifier.cpp" + "ZRoom/Commands/SetSkyboxSettings.cpp" + "ZRoom/Commands/SetSoundSettings.cpp" + "ZRoom/Commands/SetSpecialObjects.cpp" + "ZRoom/Commands/SetStartPositionList.cpp" + "ZRoom/Commands/SetTimeSettings.cpp" + "ZRoom/Commands/SetTransitionActorList.cpp" + "ZRoom/Commands/SetWind.cpp" + "ZRoom/Commands/SetWorldMapVisited.cpp" + "ZRoom/Commands/Unused09.cpp" + "ZRoom/Commands/Unused1D.cpp" + "ZRoom/Commands/ZRoomCommandUnk.cpp" +) +source_group("Source Files\\Z64\\ZRoom\\Commands" FILES ${Source_Files__Z64__ZRoom__Commands}) + +set(ALL_FILES + ${Header_Files} + ${Header_Files__Libraries} + ${Header_Files__Libraries__elfio} + ${Header_Files__Libraries__libgfxd} + ${Header_Files__Yaz0} + ${Header_Files__Z64} + ${Header_Files__Z64__ZRoom} + ${Header_Files__Z64__ZRoom__Commands} + ${Resource_Files} + ${Source_Files} + ${Source_Files__Libraries__libgfxd} + ${Source_Files__Yaz0} + ${Source_Files__Z64} + ${Source_Files__Z64__ZRoom} + ${Source_Files__Z64__ZRoom__Commands} + ${any__any} +) + +################################################################################ +# Target +################################################################################ +add_executable(${PROJECT_NAME} ${ALL_FILES}) + +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +################################################################################ +# Includes for CMake from *.props +################################################################################ +#use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "../../OTRExporter/packages/YY.NuGet.Import.Helper.1.0.0.4/build/native/YY.NuGet.Import.Helper.cmake") + +set(ROOT_NAMESPACE ZAPD) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + endif() +endif() +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() +################################################################################ +# Compile definitions +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "_CRT_SECURE_NO_WARNINGS;" + "_MBCS" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_CRT_SECURE_NO_WARNINGS" + ">" + "_MBCS" + ) + endif() +endif() + +################################################################################ +# Compile and link options +################################################################################ + +find_package(PNG REQUIRED) + +target_include_directories(${PROJECT_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/tinyxml2 + ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/libgfxd + ${PNG_PNG_INCLUDE_DIR}/ + . + ) + +if(MSVC) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /Od; + /RTC1 + > + $<$: + /Oi; + /Gy + > + /permissive-; + /std:c++17; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /std:c++17; + /Od + > + $<$: + /O2; + /Oi; + /Gy + > + /permissive-; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + endif() + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /PROFILE + > + $<$: + /OPT:REF; + /OPT:ICF + > + /DEBUG:FULL + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /PROFILE + > + $<$: + /OPT:REF; + /OPT:ICF + > + /DEBUG:FULL + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread + ) + + target_link_options(${PROJECT_NAME} PRIVATE + -pthread + -Wl,-export-dynamic + ) + +endif() + +################################################################################ +# Dependencies +################################################################################ +add_dependencies(${PROJECT_NAME} + OTRExporter + ZAPDUtils + libultraship +) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + #set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib") + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "ZAPDUtils;" + "-WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib" + "libultraship;" + PNG::PNG + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS64.lib + ) + endif() +else() + find_package(BZip2 REQUIRED) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "ZAPDUtils;" + -Wl,--whole-archive ${PROJECT_BINARY_DIR}/OTRExporter/libOTRExporter.a -Wl,--no-whole-archive + "libultraship;" + storm + PNG::PNG + BZip2::BZip2 + ${CMAKE_DL_LIBS} + Threads::Threads + ) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") diff --git a/ZAPDTR/ZAPDUtils/CMakeLists.txt b/ZAPDTR/ZAPDUtils/CMakeLists.txt new file mode 100644 index 00000000000..5c9cd87e4c6 --- /dev/null +++ b/ZAPDTR/ZAPDUtils/CMakeLists.txt @@ -0,0 +1,213 @@ +set(PROJECT_NAME ZAPDUtils) + +################################################################################ +# Source groups +################################################################################ +set(Header_Files + "Color3b.h" + "StrHash.h" + "Vec2f.h" + "Vec3f.h" + "Vec3s.h" +) +source_group("Header Files" FILES ${Header_Files}) + +set(Header_Files__Utils + "Utils/BinaryReader.h" + "Utils/BinaryWriter.h" + "Utils/BitConverter.h" + "Utils/Directory.h" + "Utils/File.h" + "Utils/MemoryStream.h" + "Utils/Path.h" + "Utils/Stream.h" + "Utils/StringHelper.h" +) +source_group("Header Files\\Utils" FILES ${Header_Files__Utils}) + +set(Source_Files__Libraries + "../lib/tinyxml2/tinyxml2.cpp" +) +source_group("Source Files\\Libraries" FILES ${Source_Files__Libraries}) + +set(Source_Files__Utils + "Utils/BinaryReader.cpp" + "Utils/BinaryWriter.cpp" + "Utils/MemoryStream.cpp" + "Utils/StringHelper.cpp" +) +source_group("Source Files\\Utils" FILES ${Source_Files__Utils}) + +set(ALL_FILES + ${Header_Files} + ${Header_Files__Utils} + ${Source_Files__Libraries} + ${Source_Files__Utils} +) + +################################################################################ +# Target +################################################################################ +add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) + +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +set(ROOT_NAMESPACE ZAPDUtils) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set_target_properties(${PROJECT_NAME} PROPERTIES + VS_GLOBAL_KEYWORD "Win32Proj" + ) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + endif() +endif() +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + MultiThreaded + ) + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() +################################################################################ +# Compile definitions +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG;" + "_MBCS" + ">" + "$<$:" + "NDEBUG;" + "UNICODE;" + "_UNICODE" + ">" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "WIN32;" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "UNICODE;" + "_UNICODE" + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "UNICODE;" + "_UNICODE" + ) +endif() + +################################################################################ +# Compile and link options +################################################################################ +if(MSVC) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /Oi; + /Gy + > + /permissive-; + /MP; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /O2; + /Ot + > + $<$: + /Gy + > + /permissive-; + /MP; + /Oi; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + endif() + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /OPT:REF; + /OPT:ICF + > + /SUBSYSTEM:CONSOLE + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /OPT:REF; + /OPT:ICF + > + /SUBSYSTEM:CONSOLE + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + $<$:-Wno-deprecated-enum-enum-conversion> + ) +endif() +################################################################################ +# Dependencies +################################################################################ +# Link with other targets. + + diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt new file mode 100644 index 00000000000..1c110770d0e --- /dev/null +++ b/libultraship/libultraship/CMakeLists.txt @@ -0,0 +1,509 @@ +set(PROJECT_NAME libultraship) + +################################################################################ +# Source groups +################################################################################ +set(Header_Files__Resources__Factories + "Factories/AnimationFactory.h" + "Factories/ArrayFactory.h" + "Factories/BlobFactory.h" + "Factories/CollisionHeaderFactory.h" + "Factories/CutsceneFactory.h" + "Factories/DisplayListFactory.h" + "Factories/MaterialFactory.h" + "Factories/MtxFactory.h" + "Factories/PathFactory.h" + "Factories/PlayerAnimationFactory.h" + "Factories/SceneFactory.h" + "Factories/SkeletonFactory.h" + "Factories/SkeletonLimbFactory.h" + "Factories/TextFactory.h" + "Factories/TextureFactory.h" + "Factories/VtxFactory.h" +) +source_group("Header Files\\Resources\\Factories" FILES ${Header_Files__Resources__Factories}) + +set(Header_Files__Resources__Files + "Animation.h" + "Array.h" + "Blob.h" + "CollisionHeader.h" + "Cutscene.h" + "DisplayList.h" + "Factories/ResourceLoader.h" + "Material.h" + "Matrix.h" + "Model.h" + "Path.h" + "PlayerAnimation.h" + "Scene.h" + "Skeleton.h" + "SkeletonLimb.h" + "Text.h" + "Texture.h" + "Vertex.h" +) +source_group("Header Files\\Resources\\Files" FILES ${Header_Files__Resources__Files}) + +set(Source_Files__Audio + "abi.h" + "AudioPlayer.h" + "mixer.c" + "mixer.h" + "SDLAudioPlayer.cpp" + "SDLAudioPlayer.h" +) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +set(Source_Files__Audio__Windows + "WasapiAudioPlayer.cpp" + "WasapiAudioPlayer.h" +) +else() +set(Source_Files__Audio__Linux + "PulseAudioPlayer.cpp" + "PulseAudioPlayer.h" +) +endif () + +source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__Windows} ${Source_Files__Audio__Linux}) + +set(Source_Files__Config + "ConfigFile.cpp" + "ConfigFile.h" +) +source_group("Source Files\\Config" FILES ${Source_Files__Config}) + +set(Source_Files__Controller + "Controller.cpp" + "Controller.h" + "KeyboardController.cpp" + "KeyboardController.h" + "SDLController.cpp" + "SDLController.h" + "UltraController.h" +) +source_group("Source Files\\Controller" FILES ${Source_Files__Controller}) + +set(Source_Files__Controller__Attachment + "ControllerAttachment.cpp" + "ControllerAttachment.h" + "MemoryPack.cpp" + "MemoryPack.h" + "RumblePack.cpp" + "RumblePack.h" +) +source_group("Source Files\\Controller\\Attachment" FILES ${Source_Files__Controller__Attachment}) + +set(Source_Files__CustomImpl + "GameOverlay.cpp" + "GameOverlay.h" + "GameSettings.cpp" + "GameSettings.h" + "SohConsole.cpp" + "SohConsole.h" + "SohImGuiImpl.cpp" + "SohImGuiImpl.h" +) +source_group("Source Files\\CustomImpl" FILES ${Source_Files__CustomImpl}) + +set(Source_Files__CustomImpl__Environment + "Environment.cpp" + "Environment.h" +) +source_group("Source Files\\CustomImpl\\Environment" FILES ${Source_Files__CustomImpl__Environment}) + +set(Source_Files__CustomImpl__Hooks + "SohHooks.cpp" + "SohHooks.h" +) +source_group("Source Files\\CustomImpl\\Hooks" FILES ${Source_Files__CustomImpl__Hooks}) + +set(Source_Files__CustomImpl__Utils + "Utils.cpp" + "Utils.h" +) +source_group("Source Files\\CustomImpl\\Utils" FILES ${Source_Files__CustomImpl__Utils}) + +set(Source_Files__Globals + "Cvar.cpp" + "Cvar.h" + "GlobalCtx2.cpp" + "GlobalCtx2.h" + "LUSMacros.h" + "Window.cpp" + "Window.h" + "WindowShim.cpp" + "WindowShim.h" +) +source_group("Source Files\\Globals" FILES ${Source_Files__Globals}) + +set(Source_Files__Lib + "Lib/mINI/src/mini/ini.h" + "Lib/StrHash64.cpp" + "Lib/StrHash64.h" + "Lib/tinyxml2/tinyxml2.cpp" + "stox.cpp" + "stox.h" +) +source_group("Source Files\\Lib" FILES ${Source_Files__Lib}) + +set(Source_Files__Lib__Fast3D + "Lib/Fast3D/gfx_cc.cpp" + "Lib/Fast3D/gfx_cc.h" + "Lib/Fast3D/gfx_direct3d11.cpp" + "Lib/Fast3D/gfx_direct3d11.h" + "Lib/Fast3D/gfx_direct3d12.cpp" + "Lib/Fast3D/gfx_direct3d12.h" + "Lib/Fast3D/gfx_direct3d12_guids.h" + "Lib/Fast3D/gfx_direct3d_common.cpp" + "Lib/Fast3D/gfx_direct3d_common.h" + "Lib/Fast3D/gfx_dxgi.cpp" + "Lib/Fast3D/gfx_dxgi.h" + "Lib/Fast3D/gfx_glx.cpp" + "Lib/Fast3D/gfx_glx.h" + "Lib/Fast3D/gfx_opengl.cpp" + "Lib/Fast3D/gfx_opengl.h" + "Lib/Fast3D/gfx_pc.cpp" + "Lib/Fast3D/gfx_pc.h" + "Lib/Fast3D/gfx_rendering_api.h" + "Lib/Fast3D/gfx_screen_config.h" + "Lib/Fast3D/gfx_sdl.h" + "Lib/Fast3D/gfx_sdl2.cpp" + "Lib/Fast3D/gfx_window_manager_api.h" +) +source_group("Source Files\\Lib\\Fast3D" FILES ${Source_Files__Lib__Fast3D}) + +set(Source_Files__Lib__ImGui + "Lib/ImGui/backends/imgui_impl_opengl3.cpp" + "Lib/ImGui/backends/imgui_impl_opengl3.h" + "Lib/ImGui/backends/imgui_impl_sdl.cpp" + "Lib/ImGui/backends/imgui_impl_sdl.h" + "Lib/ImGui/imconfig.h" + "Lib/ImGui/imgui.cpp" + "Lib/ImGui/imgui.h" + "Lib/ImGui/imgui_demo.cpp" + "Lib/ImGui/imgui_draw.cpp" + "Lib/ImGui/imgui_internal.h" + "Lib/ImGui/imgui_tables.cpp" + "Lib/ImGui/imgui_widgets.cpp" + "Lib/ImGui/imstb_rectpack.h" + "Lib/ImGui/imstb_textedit.h" + "Lib/ImGui/imstb_truetype.h" +) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +set(Source_Files__Lib__ImGui__Windows + "Lib/ImGui/backends/imgui_impl_dx11.cpp" + "Lib/ImGui/backends/imgui_impl_dx11.h" + "Lib/ImGui/backends/imgui_impl_win32.cpp" + "Lib/ImGui/backends/imgui_impl_win32.h" +) +endif () +source_group("Source Files\\Lib\\ImGui" FILES ${Source_Files__Lib__ImGui} ${Source_Files__Lib__ImGui__Windows}) + +set(Source_Files__Lib__stb + "Lib/stb/stb_image.h" + "Lib/stb/stb_image_write.h" + "Lib/stb/stb_impl.c" +) +source_group("Source Files\\Lib\\stb" FILES ${Source_Files__Lib__stb}) + +set(Source_Files__Lib__tinyxml2 + "Lib/tinyxml2/tinyxml2.h" +) +source_group("Source Files\\Lib\\tinyxml2" FILES ${Source_Files__Lib__tinyxml2}) + +set(Source_Files__Logging + "luslog.cpp" + "luslog.h" +) +source_group("Source Files\\Logging" FILES ${Source_Files__Logging}) + +set(Source_Files__ModManager + "ModManager.cpp" + "ModManager.h" +) +source_group("Source Files\\ModManager" FILES ${Source_Files__ModManager}) + +set(Source_Files__ModManager__ModModule + "ModModule.h" + "TextureMod.cpp" + "TextureMod.h" +) +source_group("Source Files\\ModManager\\ModModule" FILES ${Source_Files__ModManager__ModModule}) + +set(Source_Files__Resources + "GameVersions.h" + "Resource.cpp" + "Resource.h" + "ResourceMgr.cpp" + "ResourceMgr.h" +) +source_group("Source Files\\Resources" FILES ${Source_Files__Resources}) + +set(Source_Files__Resources__Factories + "Factories/AnimationFactory.cpp" + "Factories/ArrayFactory.cpp" + "Factories/BlobFactory.cpp" + "Factories/CollisionHeaderFactory.cpp" + "Factories/CutsceneFactory.cpp" + "Factories/DisplayListFactory.cpp" + "Factories/MaterialFactory.cpp" + "Factories/MtxFactory.cpp" + "Factories/PathFactory.cpp" + "Factories/PlayerAnimationFactory.cpp" + "Factories/ResourceLoader.cpp" + "Factories/SceneFactory.cpp" + "Factories/SkeletonFactory.cpp" + "Factories/SkeletonLimbFactory.cpp" + "Factories/TextFactory.cpp" + "Factories/TextureFactory.cpp" + "Factories/VtxFactory.cpp" +) +source_group("Source Files\\Resources\\Factories" FILES ${Source_Files__Resources__Factories}) + +set(Source_Files__Resources__Files + "Animation.cpp" + "Array.cpp" + "Blob.cpp" + "CollisionHeader.cpp" + "Cutscene.cpp" + "DisplayList.cpp" + "Material.cpp" + "Matrix.cpp" + "Model.cpp" + "Path.cpp" + "PlayerAnimation.cpp" + "Scene.cpp" + "Skeleton.cpp" + "SkeletonLimb.cpp" + "Text.cpp" + "Texture.cpp" + "Vertex.cpp" +) +source_group("Source Files\\Resources\\Files" FILES ${Source_Files__Resources__Files}) + +set(Source_Files__Resources__mpq + "Archive.cpp" + "Archive.h" + "File.cpp" + "File.h" +) +source_group("Source Files\\Resources\\mpq" FILES ${Source_Files__Resources__mpq}) + +set(ALL_FILES + ${Header_Files__Resources__Factories} + ${Header_Files__Resources__Files} + ${Source_Files__Audio} + ${Source_Files__Audio__Windows} + ${Source_Files__Audio__Linux} + ${Source_Files__Config} + ${Source_Files__Controller} + ${Source_Files__Controller__Attachment} + ${Source_Files__CustomImpl} + ${Source_Files__CustomImpl__Environment} + ${Source_Files__CustomImpl__Hooks} + ${Source_Files__CustomImpl__Utils} + ${Source_Files__Globals} + ${Source_Files__Lib} + ${Source_Files__Lib__Fast3D} + ${Source_Files__Lib__ImGui} + ${Source_Files__Lib__ImGui__Windows} + ${Source_Files__Lib__stb} + ${Source_Files__Lib__tinyxml2} + ${Source_Files__Logging} + ${Source_Files__ModManager} + ${Source_Files__ModManager__ModModule} + ${Source_Files__Resources} + ${Source_Files__Resources__Factories} + ${Source_Files__Resources__Files} + ${Source_Files__Resources__mpq} +) + +################################################################################ +# Target +################################################################################ +add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) + +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +set(ROOT_NAMESPACE libultraship) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set_target_properties(${PROJECT_NAME} PROPERTIES + VS_GLOBAL_KEYWORD "Win32Proj" + ) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + endif() +endif() +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() +################################################################################ +# Compile definitions +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "SPDLOG_ACTIVE_LEVEL=0;" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "ENABLE_DX11;" + "ENABLE_OPENGL;" + "UNICODE;" + "_UNICODE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "SPDLOG_ACTIVE_LEVEL=0;" + "WIN32;" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "ENABLE_OPENGL;" + "ENABLE_DX11;" + "%(PreprocessorDefinitions)GLEW_STATIC;" + "UNICODE;" + "_UNICODE" + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "ENABLE_OPENGL;" + ) +endif() +################################################################################ +# Compile and link options +################################################################################ + +target_include_directories(${PROJECT_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/ + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/ + ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + . + ) + +if(MSVC) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /std:c++latest; + /Oi; + /Gy + > + /permissive-; + /MP; + /sdl; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /Od; + /Oi-; + /W2 + > + $<$: + /Oi; + /Gy; + /W3 + > + /permissive-; + /MP; + /sdl; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + endif() + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /OPT:REF; + /OPT:ICF + > + /SUBSYSTEM:CONSOLE + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /OPT:REF; + /OPT:ICF + > + /SUBSYSTEM:CONSOLE + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall + -Wextra + -Wno-error + -Wno-unused-variable + -Wno-unused-parameter + -Wno-unused-function + -Wno-parentheses + -Wno-narrowing + -Wno-missing-field-initializers + ) +endif() +################################################################################ +# Dependencies +################################################################################ +# Link with other targets. + diff --git a/soh/CMake/Default.cmake b/soh/CMake/Default.cmake new file mode 100644 index 00000000000..70bfa903841 --- /dev/null +++ b/soh/CMake/Default.cmake @@ -0,0 +1,65 @@ +################################################################################ +# Command for variable_watch. This command issues error message, if a variable +# is changed. If variable PROPERTY_READER_GUARD_DISABLED is TRUE nothing happens +# variable_watch( property_reader_guard) +################################################################################ +function(property_reader_guard VARIABLE ACCESS VALUE CURRENT_LIST_FILE STACK) + if("${PROPERTY_READER_GUARD_DISABLED}") + return() + endif() + + if("${ACCESS}" STREQUAL "MODIFIED_ACCESS") + message(FATAL_ERROR + " Variable ${VARIABLE} is not supposed to be changed.\n" + " It is used only for reading target property ${VARIABLE}.\n" + " Use\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}\" \"\")\n" + " or\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}_\" \"\")\n" + " instead.\n") + endif() +endfunction() + +################################################################################ +# Create variable with generator expression that expands to value of +# target property _. If property is empty or not set then property +# is used instead. Variable has watcher property_reader_guard that +# doesn't allow to edit it. +# create_property_reader() +# Input: +# name - Name of watched property and output variable +################################################################################ +function(create_property_reader NAME) + set(PROPERTY_READER_GUARD_DISABLED TRUE) + set(CONFIG_VALUE "$>>>") + set(IS_CONFIG_VALUE_EMPTY "$") + set(GENERAL_VALUE "$>") + set("${NAME}" "$" PARENT_SCOPE) + variable_watch("${NAME}" property_reader_guard) +endfunction() + +################################################################################ +# Set property $_${PROPS_CONFIG_U} of ${PROPS_TARGET} to +# set_config_specific_property( ) +# Input: +# name - Prefix of property name +# value - New value +################################################################################ +function(set_config_specific_property NAME VALUE) + set_target_properties("${PROPS_TARGET}" PROPERTIES "${NAME}_${PROPS_CONFIG_U}" "${VALUE}") +endfunction() + +################################################################################ + +create_property_reader("TARGET_NAME") +create_property_reader("OUTPUT_DIRECTORY") + +set_config_specific_property("TARGET_NAME" "${PROPS_TARGET}") +set_config_specific_property("OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("ARCHIVE_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("LIBRARY_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("RUNTIME_OUTPUT_NAME" "${TARGET_NAME}") + +set_config_specific_property("ARCHIVE_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("LIBRARY_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("RUNTIME_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") \ No newline at end of file diff --git a/soh/CMake/DefaultCXX.cmake b/soh/CMake/DefaultCXX.cmake new file mode 100644 index 00000000000..7b052b9cc62 --- /dev/null +++ b/soh/CMake/DefaultCXX.cmake @@ -0,0 +1,12 @@ +include("${CMAKE_CURRENT_LIST_DIR}/Default.cmake") + +set_config_specific_property("OUTPUT_DIRECTORY" "${CMAKE_SOURCE_DIR}$<$>:/${CMAKE_VS_PLATFORM_NAME}>/${PROPS_CONFIG}") + +if(MSVC) + create_property_reader("DEFAULT_CXX_EXCEPTION_HANDLING") + create_property_reader("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT") + + set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") + set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi") +endif() \ No newline at end of file diff --git a/soh/CMake/Linux32bit-toolchain.cmake b/soh/CMake/Linux32bit-toolchain.cmake new file mode 100644 index 00000000000..9dfb1e43771 --- /dev/null +++ b/soh/CMake/Linux32bit-toolchain.cmake @@ -0,0 +1,18 @@ +# the name of the target operating system +set(CMAKE_SYSTEM_NAME Linux) + +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER gcc) +set(CMAKE_C_FLAGS "-m32") +set(CMAKE_CXX_COMPILER g++) +set(CMAKE_CXX_FLAGS -m32) + +# here is the target environment located +#set(CMAKE_FIND_ROOT_PATH /lib/i386-linux-gnu ) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/soh/CMake/Utils.cmake b/soh/CMake/Utils.cmake new file mode 100644 index 00000000000..9e2f961eba9 --- /dev/null +++ b/soh/CMake/Utils.cmake @@ -0,0 +1,234 @@ +# utils file for projects came from visual studio solution with cmake-converter. + +################################################################################ +# Wrap each token of the command with condition +################################################################################ +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) +macro(prepare_commands) + unset(TOKEN_ROLE) + unset(COMMANDS) + foreach(TOKEN ${ARG_COMMANDS}) + if("${TOKEN}" STREQUAL "COMMAND") + set(TOKEN_ROLE "KEYWORD") + elseif("${TOKEN_ROLE}" STREQUAL "KEYWORD") + set(TOKEN_ROLE "CONDITION") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(TOKEN_ROLE "COMMAND") + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + set(TOKEN_ROLE "ARG") + endif() + + if("${TOKEN_ROLE}" STREQUAL "KEYWORD") + list(APPEND COMMANDS "${TOKEN}") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(CONDITION ${TOKEN}) + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + list(APPEND COMMANDS "$<$:${DUMMY}>$<${CONDITION}:${TOKEN}>") + elseif("${TOKEN_ROLE}" STREQUAL "ARG") + list(APPEND COMMANDS "$<${CONDITION}:${TOKEN}>") + endif() + endforeach() +endmacro() +cmake_policy(POP) + +################################################################################ +# Transform all the tokens to absolute paths +################################################################################ +macro(prepare_output) + unset(OUTPUT) + foreach(TOKEN ${ARG_OUTPUT}) + if(IS_ABSOLUTE ${TOKEN}) + list(APPEND OUTPUT "${TOKEN}") + else() + list(APPEND OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${TOKEN}") + endif() + endforeach() +endmacro() + +################################################################################ +# Parse add_custom_command_if args. +# +# Input: +# PRE_BUILD - Pre build event option +# PRE_LINK - Pre link event option +# POST_BUILD - Post build event option +# TARGET - Target +# OUTPUT - List of output files +# DEPENDS - List of files on which the command depends +# COMMANDS - List of commands(COMMAND condition1 commannd1 args1 COMMAND +# condition2 commannd2 args2 ...) +# Output: +# OUTPUT - Output files +# DEPENDS - Files on which the command depends +# COMMENT - Comment +# PRE_BUILD - TRUE/FALSE +# PRE_LINK - TRUE/FALSE +# POST_BUILD - TRUE/FALSE +# TARGET - Target name +# COMMANDS - Prepared commands(every token is wrapped in CONDITION) +# NAME - Unique name for custom target +# STEP - PRE_BUILD/PRE_LINK/POST_BUILD +################################################################################ +function(add_custom_command_if_parse_arguments) + cmake_parse_arguments("ARG" "PRE_BUILD;PRE_LINK;POST_BUILD" "TARGET;COMMENT" "DEPENDS;OUTPUT;COMMANDS" ${ARGN}) + + if(WIN32) + set(DUMMY "cd.") + elseif(UNIX) + set(DUMMY "true") + endif() + + prepare_commands() + prepare_output() + + set(DEPENDS "${ARG_DEPENDS}") + set(COMMENT "${ARG_COMMENT}") + set(PRE_BUILD "${ARG_PRE_BUILD}") + set(PRE_LINK "${ARG_PRE_LINK}") + set(POST_BUILD "${ARG_POST_BUILD}") + set(TARGET "${ARG_TARGET}") + if(PRE_BUILD) + set(STEP "PRE_BUILD") + elseif(PRE_LINK) + set(STEP "PRE_LINK") + elseif(POST_BUILD) + set(STEP "POST_BUILD") + endif() + set(NAME "${TARGET}_${STEP}") + + set(OUTPUT "${OUTPUT}" PARENT_SCOPE) + set(DEPENDS "${DEPENDS}" PARENT_SCOPE) + set(COMMENT "${COMMENT}" PARENT_SCOPE) + set(PRE_BUILD "${PRE_BUILD}" PARENT_SCOPE) + set(PRE_LINK "${PRE_LINK}" PARENT_SCOPE) + set(POST_BUILD "${POST_BUILD}" PARENT_SCOPE) + set(TARGET "${TARGET}" PARENT_SCOPE) + set(COMMANDS "${COMMANDS}" PARENT_SCOPE) + set(STEP "${STEP}" PARENT_SCOPE) + set(NAME "${NAME}" PARENT_SCOPE) +endfunction() + +################################################################################ +# Add conditional custom command +# +# Generating Files +# The first signature is for adding a custom command to produce an output: +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [DEPENDS [depends...]] +# [COMMENT comment] +# +# Build Events +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [COMMENT comment] +# +# Input: +# output - Output files the command is expected to produce +# condition - Generator expression for wrapping the command +# command - Command-line(s) to execute at build time. +# args - Command`s args +# depends - Files on which the command depends +# comment - Display the given message before the commands are executed at +# build time. +# PRE_BUILD - Run before any other rules are executed within the target +# PRE_LINK - Run after sources have been compiled but before linking the +# binary +# POST_BUILD - Run after all other rules within the target have been +# executed +################################################################################ +function(add_custom_command_if) + add_custom_command_if_parse_arguments(${ARGN}) + + if(OUTPUT AND TARGET) + message(FATAL_ERROR "Wrong syntax. A TARGET and OUTPUT can not both be specified.") + endif() + + if(OUTPUT) + add_custom_command(OUTPUT ${OUTPUT} + ${COMMANDS} + DEPENDS ${DEPENDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + elseif(TARGET) + if(PRE_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio") + add_custom_target( + ${NAME} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + add_dependencies(${TARGET} ${NAME}) + else() + add_custom_command( + TARGET ${TARGET} + ${STEP} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + endif() + else() + message(FATAL_ERROR "Wrong syntax. A TARGET or OUTPUT must be specified.") + endif() +endfunction() + +################################################################################ +# Use props file for a target and configs +# use_props( ) +# Inside there are following variables: +# PROPS_TARGET - +# PROPS_CONFIG - One of +# PROPS_CONFIG_U - Uppercase PROPS_CONFIG +# Input: +# target - Target to apply props file +# configs - Build configurations to apply props file +# props_file - CMake script +################################################################################ +macro(use_props TARGET CONFIGS PROPS_FILE) + set(PROPS_TARGET "${TARGET}") + foreach(PROPS_CONFIG ${CONFIGS}) + string(TOUPPER "${PROPS_CONFIG}" PROPS_CONFIG_U) + + get_filename_component(ABSOLUTE_PROPS_FILE "${PROPS_FILE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") + if(EXISTS "${ABSOLUTE_PROPS_FILE}") + include("${ABSOLUTE_PROPS_FILE}") + else() + message(WARNING "Corresponding cmake file from props \"${ABSOLUTE_PROPS_FILE}\" doesn't exist") + endif() + endforeach() +endmacro() + +################################################################################ +# Add compile options to source file +# source_file_compile_options( [compile_options...]) +# Input: +# source_file - Source file +# compile_options - Options to add to COMPILE_FLAGS property +################################################################################ +function(source_file_compile_options SOURCE_FILE) + if("${ARGC}" LESS_EQUAL "1") + return() + endif() + + get_source_file_property(COMPILE_OPTIONS "${SOURCE_FILE}" COMPILE_OPTIONS) + + if(COMPILE_OPTIONS) + list(APPEND COMPILE_OPTIONS ${ARGN}) + else() + set(COMPILE_OPTIONS "${ARGN}") + endif() + + set_source_files_properties("${SOURCE_FILE}" PROPERTIES COMPILE_OPTIONS "${COMPILE_OPTIONS}") +endfunction() + +################################################################################ +# Default properties of visual studio projects +################################################################################ +set(DEFAULT_CXX_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultCXX.cmake") +set(DEFAULT_Fortran_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultFortran.cmake") diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt new file mode 100644 index 00000000000..bf1feeda985 --- /dev/null +++ b/soh/CMakeLists.txt @@ -0,0 +1,1748 @@ +cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) + +set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) + +project(soh C CXX) +set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") + +set (BUILD_UTILS OFF CACHE STRING "no utilities") +set (BUILD_SHARED_LIBS OFF CACHE STRING "install/link shared instead of static libs") + +################################################################################ +# Set target arch type if empty. Visual studio solution generator provides it. +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(NOT CMAKE_VS_PLATFORM_NAME) + set(CMAKE_VS_PLATFORM_NAME "x64") + endif() + message("${CMAKE_VS_PLATFORM_NAME} architecture in use") + + if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64" + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")) + message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!") + endif() +endif() + +################################################################################ +# Global configuration types +################################################################################ +set(CMAKE_CONFIGURATION_TYPES + "Debug" + "Release" + CACHE STRING "" FORCE +) + +################################################################################ +# Global compiler options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_C_FLAGS "") + set(CMAKE_C_FLAGS_DEBUG "") + set(CMAKE_C_FLAGS_RELEASE "") + set(CMAKE_CXX_FLAGS "") + set(CMAKE_CXX_FLAGS_DEBUG "") + set(CMAKE_CXX_FLAGS_RELEASE "") +endif() + +################################################################################ +# Global linker options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_EXE_LINKER_FLAGS "") + set(CMAKE_MODULE_LINKER_FLAGS "") + set(CMAKE_SHARED_LINKER_FLAGS "") + set(CMAKE_STATIC_LINKER_FLAGS "") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS}") +endif() + +################################################################################ +# Common utils +################################################################################ +include(CMake/Utils.cmake) + +################################################################################ +# Additional Global Settings(add specific info there) +################################################################################ +include(CMake/GlobalSettingsInclude.cmake OPTIONAL) + +################################################################################ +# Use solution folders feature +################################################################################ +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +################################################################################ +# Sub-projects +################################################################################ +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") +add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew) +set_target_properties(glew PROPERTIES EXCLUDE_FROM_ALL TRUE) + +add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) +endif() + +add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) + +set(PROJECT_NAME soh) + + + +################################################################################ +# Source groups +################################################################################ +set(Header_Files + "resource.h" +) +source_group("Header Files" FILES ${Header_Files}) + +set(Header_Files__include + "include/alloca.h" + #"include/bgm.h" + "include/color.h" + "include/command_macros_base.h" + "include/fp.h" + "include/functions.h" + "include/global.h" + "include/ichain.h" + "include/macro.inc" + "include/macros.h" + #"include/math_n64.h" + "include/regs.h" + "include/segment_symbols.h" + "include/sfx.h" + "include/libc/stdarg.h" + #"include/stdbool_n64.h" + #"include/stddef_n64.h" + #"include/stdlib_n64.h" + "include/ultra64.h" + "include/unk.h" + "include/variables.h" + "include/vt.h" + "include/z64.h" + "include/z64actor.h" + "include/z64animation.h" + "include/z64audio.h" + "include/z64bgcheck.h" + "include/z64camera.h" + "include/z64collision_check.h" + "include/z64cutscene.h" + "include/z64cutscene_commands.h" + "include/z64dma.h" + "include/z64effect.h" + "include/z64environment.h" + "include/z64interface.h" + "include/z64item.h" + "include/z64light.h" + "include/z64map_mark.h" + "include/z64math.h" + "include/z64object.h" + "include/z64player.h" + "include/z64save.h" + "include/z64scene.h" + "include/z64transition.h" +) +source_group("Header Files\\include" FILES ${Header_Files__include}) + +set(Header_Files__soh__Enhancements + "soh/Enhancements/bootcommands.h" + #"soh/Enhancements/cvar.h" + "soh/Enhancements/debugconsole.h" + "soh/Enhancements/gameconsole.h" + "soh/Enhancements/savestates.h" + "soh/Enhancements/savestates_extern.inc" +) +source_group("Header Files\\soh\\Enhancements" FILES ${Header_Files__soh__Enhancements}) + +set(Header_Files__soh__Enhancements__debugger + "soh/Enhancements/debugger/colViewer.h" + "soh/Enhancements/debugger/debugger.h" + "soh/Enhancements/debugger/debugSaveEditor.h" + "soh/Enhancements/debugger/ImGuiHelpers.h" +) +source_group("Header Files\\soh\\Enhancements\\debugger" FILES ${Header_Files__soh__Enhancements__debugger}) + +set(Source_Files__soh + "soh/GbiWrap.cpp" + "soh/gu_pc.c" + "soh/OTRGlobals.cpp" + "soh/OTRGlobals.h" + "soh/stubs.c" + "soh/util.h" + "soh/util.cpp" + "soh/z_message_OTR.cpp" + "soh/z_play_otr.cpp" + "soh/z_scene_otr.cpp" + "soh/OTRAudio.h" + "soh/frame_interpolation.h" + "soh/frame_interpolation.cpp" +) +source_group("Source Files\\soh" FILES ${Source_Files__soh}) + +set(Source_Files__soh__Enhancements + "soh/Enhancements/bootcommands.c" + "soh/Enhancements/debugconsole.cpp" + "soh/Enhancements/gameconsole.c" + "soh/Enhancements/savestates.cpp" +) +source_group("Source Files\\soh\\Enhancements" FILES ${Source_Files__soh__Enhancements}) + +set(Source_Files__soh__Enhancements__debugger + "soh/Enhancements/debugger/colViewer.cpp" + "soh/Enhancements/debugger/debugger.cpp" + "soh/Enhancements/debugger/debugSaveEditor.cpp" + "soh/Enhancements/debugger/ImGuiHelpers.cpp" +) +source_group("Source Files\\soh\\Enhancements\\debugger" FILES ${Source_Files__soh__Enhancements__debugger}) + +set(Source_Files__src__boot + "src/boot/assert.c" + "src/boot/boot_main.c" + "src/boot/build.c" + "src/boot/idle.c" + "src/boot/is_debug.c" + "src/boot/logutils.c" + "src/boot/missing_gcc_functions.c" + "src/boot/stackcheck.c" + "src/boot/viconfig.c" + "src/boot/yaz0.c" + "src/boot/z_locale.c" + "src/boot/z_std_dma.c" +) +source_group("Source Files\\src\\boot" FILES ${Source_Files__src__boot}) + +set(Source_Files__src__buffers + "src/buffers/gfxbuffers.c" + "src/buffers/heaps.c" + "src/buffers/zbuffer.c" +) +source_group("Source Files\\src\\buffers" FILES ${Source_Files__src__buffers}) + +set(Source_Files__src__code + "src/code/__osMalloc.c" + "src/code/audio_data.c" + "src/code/audio_effects.c" + "src/code/audio_heap.c" + "src/code/audio_init_params.c" + "src/code/audio_load.c" + "src/code/audio_playback.c" + "src/code/audio_seqplayer.c" + "src/code/audio_sound_params.c" + "src/code/audio_synthesis.c" + "src/code/audioMgr.c" + "src/code/code_800430A0.c" + "src/code/code_80043480.c" + "src/code/code_8006C3A0.c" + "src/code/code_8006C510.c" + "src/code/code_80097A00.c" + "src/code/code_800A9F30.c" + "src/code/code_800ACE70.c" + "src/code/code_800AD920.c" + "src/code/code_800BB0A0.c" + "src/code/code_800C3C20.c" + "src/code/code_800D2E30.c" + "src/code/code_800D31A0.c" + "src/code/code_800E4FE0.c" + "src/code/code_800E6840.c" + "src/code/code_800EC960.c" + "src/code/code_800F7260.c" + "src/code/code_800F9280.c" + "src/code/code_800FBCE0.c" + "src/code/code_800FC620.c" + "src/code/code_800FCE80.c" + "src/code/code_800FD970.c" + "src/code/code_801067F0.c" + "src/code/code_801068B0.c" + "src/code/db_camera.c" + "src/code/debug_malloc.c" + "src/code/fault.c" + "src/code/fault_drawer.c" + "src/code/flg_set.c" + "src/code/game.c" + "src/code/gamealloc.c" + "src/code/gfxprint.c" + "src/code/graph.c" + "src/code/irqmgr.c" + "src/code/jpegdecoder.c" + "src/code/jpegutils.c" + "src/code/listalloc.c" + "src/code/loadfragment2.c" + "src/code/logseverity.c" + "src/code/main.c" + "src/code/mempak.c" + "src/code/mtxuty-cvt.c" + "src/code/padmgr.c" + "src/code/padsetup.c" + "src/code/padutils.c" + "src/code/PreRender.c" + "src/code/printutils.c" + "src/code/relocation.c" + "src/code/sched.c" + "src/code/shrink_window.c" + "src/code/sleep.c" + "src/code/speed_meter.c" + "src/code/sys_cfb.c" + "src/code/sys_math.c" + "src/code/sys_math3d.c" + "src/code/sys_math_atan.c" + "src/code/sys_matrix.c" + "src/code/sys_ucode.c" + "src/code/system_malloc.c" + "src/code/title_setup.c" + "src/code/TwoHeadArena.c" + "src/code/ucode_disas.c" + "src/code/z_actor.c" + "src/code/z_actor_dlftbls.c" + "src/code/z_bgcheck.c" + "src/code/z_camera.c" + "src/code/z_cheap_proc.c" + "src/code/z_collision_btltbls.c" + "src/code/z_collision_check.c" + "src/code/z_common_data.c" + "src/code/z_construct.c" + "src/code/z_debug.c" + "src/code/z_debug_display.c" + "src/code/z_demo.c" + "src/code/z_DLF.c" + "src/code/z_draw.c" + "src/code/z_eff_blure.c" + "src/code/z_eff_shield_particle.c" + "src/code/z_eff_spark.c" + "src/code/z_eff_ss_dead.c" + "src/code/z_effect.c" + "src/code/z_effect_soft_sprite.c" + "src/code/z_effect_soft_sprite_dlftbls.c" + "src/code/z_effect_soft_sprite_old_init.c" + "src/code/z_elf_message.c" + "src/code/z_en_a_keep.c" + "src/code/z_en_item00.c" + "src/code/z_face_reaction.c" + "src/code/z_fbdemo.c" + "src/code/z_fbdemo_circle.c" + "src/code/z_fbdemo_fade.c" + "src/code/z_fbdemo_triforce.c" + "src/code/z_fbdemo_wipe1.c" + "src/code/z_fcurve_data_skelanime.c" + "src/code/z_frame_advance.c" + "src/code/z_game_dlftbls.c" + "src/code/z_game_over.c" + "src/code/z_horse.c" + "src/code/z_jpeg.c" + "src/code/z_kaleido_manager.c" + "src/code/z_kaleido_scope_call.c" + "src/code/z_kaleido_setup.c" + "src/code/z_kanfont.c" + "src/code/z_kankyo.c" + "src/code/z_lib.c" + "src/code/z_lifemeter.c" + "src/code/z_lights.c" + "src/code/z_malloc.c" + "src/code/z_map_data.c" + "src/code/z_map_exp.c" + "src/code/z_map_mark.c" + "src/code/z_message_PAL.c" + "src/code/z_moji.c" + "src/code/z_msgevent.c" + "src/code/z_olib.c" + "src/code/z_onepointdemo.c" + "src/code/z_onepointdemo_data.inc" + "src/code/z_parameter.c" + "src/code/z_path.c" + "src/code/z_play.c" + "src/code/z_player_call.c" + "src/code/z_player_lib.c" + "src/code/z_prenmi.c" + "src/code/z_prenmi_buff.c" + "src/code/z_quake.c" + "src/code/z_rcp.c" + "src/code/z_room.c" + "src/code/z_sample.c" + "src/code/z_scene.c" + "src/code/z_scene_table.c" + "src/code/z_skelanime.c" + "src/code/z_skin.c" + "src/code/z_skin_awb.c" + "src/code/z_skin_matrix.c" + "src/code/z_sound_source.c" + "src/code/z_sram.c" + "src/code/z_ss_sram.c" + "src/code/z_view.c" + "src/code/z_vimode.c" + "src/code/z_vismono.c" + "src/code/z_vr_box.c" + "src/code/z_vr_box_draw.c" +) +source_group("Source Files\\src\\code" FILES ${Source_Files__src__code}) + +set(Source_Files__src__libultra + "src/libultra/gu/coss.c" + "src/libultra/gu/guLookAt.c" + "src/libultra/gu/guLookAtHilite.c" + "src/libultra/gu/guPerspectiveF.c" + "src/libultra/gu/guPosition.c" + "src/libultra/gu/guS2DInitBg.c" + "src/libultra/gu/ortho.c" + "src/libultra/gu/rotate.c" + "src/libultra/gu/sins.c" + "src/libultra/gu/sintable.c" + "src/libultra/libc/sprintf.c" +) +source_group("Source Files\\src\\libultra" FILES ${Source_Files__src__libultra}) + +set(Source_Files__src__overlays__actors + "src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c" + "src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h" + "src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c" + "src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h" + "src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c" + "src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h" + "src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c" + "src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h" + "src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c" + "src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h" + "src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c" + "src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h" + "src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c" + "src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h" + "src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c" + "src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h" + "src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c" + "src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h" + "src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c" + "src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.h" + "src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c" + "src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.h" + "src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c" + "src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h" + "src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c" + "src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h" + "src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c" + "src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h" + "src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c" + "src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h" + "src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c" + "src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h" + "src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c" + "src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.h" + "src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c" + "src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.h" + "src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c" + "src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.h" + "src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c" + "src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.h" + "src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c" + "src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.h" + "src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c" + "src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.h" + "src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c" + "src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h" + "src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c" + "src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.h" + "src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c" + "src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h" + "src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c" + "src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h" + "src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c" + "src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h" + "src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c" + "src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h" + "src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c" + "src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.h" + "src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c" + "src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h" + "src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c" + "src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h" + "src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c" + "src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.h" + "src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c" + "src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.h" + "src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c" + "src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h" + "src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c" + "src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h" + "src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c" + "src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h" + "src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c" + "src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.h" + "src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c" + "src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h" + "src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c" + "src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.h" + "src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c" + "src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h" + "src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c" + "src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h" + "src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c" + "src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h" + "src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c" + "src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h" + "src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c" + "src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.h" + "src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c" + "src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h" + "src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c" + "src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h" + "src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c" + "src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h" + "src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c" + "src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.h" + "src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c" + "src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.h" + "src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c" + "src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.h" + "src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c" + "src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.h" + "src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c" + "src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h" + "src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c" + "src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.h" + "src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c" + "src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.h" + "src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c" + "src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.h" + "src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c" + "src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h" + "src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c" + "src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.h" + "src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c" + "src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h" + "src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c" + "src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h" + "src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c" + "src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h" + "src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c" + "src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h" + "src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c" + "src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h" + "src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c" + "src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h" + "src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c" + "src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.h" + "src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c" + "src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.h" + "src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c" + "src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h" + "src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c" + "src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.h" + "src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c" + "src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h" + "src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c" + "src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.h" + "src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c" + "src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.h" + "src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c" + "src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h" + "src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c" + "src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.h" + "src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c" + "src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h" + "src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c" + "src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.h" + "src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c" + "src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" + "src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c" + "src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.h" + "src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c" + "src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h" + "src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c" + "src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.h" + "src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c" + "src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h" + "src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c" + "src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h" + "src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c" + "src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h" + "src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c" + "src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h" + "src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c" + "src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h" + "src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c" + "src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h" + "src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c" + "src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h" + "src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c" + "src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h" + "src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c" + "src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h" + "src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c" + "src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h" + "src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c" + "src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h" + "src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c" + "src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h" + "src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c" + "src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h" + "src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c" + "src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h" + "src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c" + "src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h" + "src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c" + "src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h" + "src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c" + "src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h" + "src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c" + "src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h" + "src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c" + "src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h" + "src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c" + "src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h" + "src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c" + "src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h" + "src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c" + "src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h" + "src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c" + "src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h" + "src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c" + "src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.h" + "src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c" + "src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h" + "src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c" + "src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h" + "src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c" + "src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h" + "src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c" + "src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h" + "src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c" + "src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h" + "src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c" + "src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h" + "src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c" + "src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h" + "src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c" + "src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h" + "src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c" + "src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h" + "src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c" + "src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h" + "src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c" + "src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h" + "src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c" + "src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h" + "src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c" + "src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h" + "src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c" + "src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h" + "src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c" + "src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h" + "src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c" + "src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h" + "src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c" + "src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h" + "src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c" + "src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h" + "src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c" + "src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c" + "src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c" + "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c" + "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h" + "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c" + "src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c" + "src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h" + "src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c" + "src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h" + "src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c" + "src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h" + "src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c" + "src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h" + "src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c" + "src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h" + "src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c" + "src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h" + "src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c" + "src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h" + "src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.c" + "src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c" + "src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h" + "src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.c" + "src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c" + "src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h" + "src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2_colchk.c" + "src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c" + "src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" + "src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c" + "src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h" + "src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.c" + "src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c" + "src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" + "src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c" + "src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h" + "src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c" + "src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h" + "src/overlays/actors/ovl_Boss_Mo/z_boss_mo_colchk.c" + "src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c" + "src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h" + "src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.c" + "src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c" + "src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h" + "src/overlays/actors/ovl_Boss_Va/z_boss_va.c" + "src/overlays/actors/ovl_Boss_Va/z_boss_va.h" + "src/overlays/actors/ovl_Demo_6K/z_demo_6k.c" + "src/overlays/actors/ovl_Demo_6K/z_demo_6k.h" + "src/overlays/actors/ovl_Demo_Du/z_demo_du.c" + "src/overlays/actors/ovl_Demo_Du/z_demo_du.h" + "src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c" + "src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c" + "src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h" + "src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c" + "src/overlays/actors/ovl_Demo_Effect/z_demo_effect.h" + "src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c" + "src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h" + "src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c" + "src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h" + "src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c" + "src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h" + "src/overlays/actors/ovl_Demo_Go/z_demo_go.c" + "src/overlays/actors/ovl_Demo_Go/z_demo_go.h" + "src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c" + "src/overlays/actors/ovl_Demo_Gt/z_demo_gt.h" + "src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c" + "src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h" + "src/overlays/actors/ovl_Demo_Im/z_demo_im.c" + "src/overlays/actors/ovl_Demo_Im/z_demo_im.h" + "src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c" + "src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c" + "src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c" + "src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h" + "src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c" + "src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h" + "src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c" + "src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c" + "src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h" + "src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c" + "src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h" + "src/overlays/actors/ovl_Door_Ana/z_door_ana.c" + "src/overlays/actors/ovl_Door_Ana/z_door_ana.h" + "src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c" + "src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h" + "src/overlays/actors/ovl_Door_Killer/z_door_killer.c" + "src/overlays/actors/ovl_Door_Killer/z_door_killer.h" + "src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c" + "src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h" + "src/overlays/actors/ovl_Door_Toki/z_door_toki.c" + "src/overlays/actors/ovl_Door_Toki/z_door_toki.h" + "src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c" + "src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + "src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c" + "src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h" + "src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c" + "src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h" + "src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c" + "src/overlays/actors/ovl_Elf_Msg/z_elf_msg.h" + "src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c" + "src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h" + "src/overlays/actors/ovl_En_Am/z_en_am.c" + "src/overlays/actors/ovl_En_Am/z_en_am.h" + "src/overlays/actors/ovl_En_Ani/z_en_ani.c" + "src/overlays/actors/ovl_En_Ani/z_en_ani.h" + "src/overlays/actors/ovl_En_Anubice/z_en_anubice.c" + "src/overlays/actors/ovl_En_Anubice/z_en_anubice.h" + "src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c" + "src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h" + "src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c" + "src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h" + "src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c" + "src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h" + "src/overlays/actors/ovl_En_Arrow/z_en_arrow.c" + "src/overlays/actors/ovl_En_Arrow/z_en_arrow.h" + "src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c" + "src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h" + "src/overlays/actors/ovl_En_Ba/z_en_ba.c" + "src/overlays/actors/ovl_En_Ba/z_en_ba.h" + "src/overlays/actors/ovl_En_Bb/z_en_bb.c" + "src/overlays/actors/ovl_En_Bb/z_en_bb.h" + "src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c" + "src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h" + "src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c" + "src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h" + "src/overlays/actors/ovl_En_Bili/z_en_bili.c" + "src/overlays/actors/ovl_En_Bili/z_en_bili.h" + "src/overlays/actors/ovl_En_Bird/z_en_bird.c" + "src/overlays/actors/ovl_En_Bird/z_en_bird.h" + "src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c" + "src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h" + "src/overlays/actors/ovl_En_Bom/z_en_bom.c" + "src/overlays/actors/ovl_En_Bom/z_en_bom.h" + "src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c" + "src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h" + "src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c" + "src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h" + "src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c" + "src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h" + "src/overlays/actors/ovl_En_Bombf/z_en_bombf.c" + "src/overlays/actors/ovl_En_Bombf/z_en_bombf.h" + "src/overlays/actors/ovl_En_Boom/z_en_boom.c" + "src/overlays/actors/ovl_En_Boom/z_en_boom.h" + "src/overlays/actors/ovl_En_Box/z_en_box.c" + "src/overlays/actors/ovl_En_Box/z_en_box.h" + "src/overlays/actors/ovl_En_Brob/z_en_brob.c" + "src/overlays/actors/ovl_En_Brob/z_en_brob.h" + "src/overlays/actors/ovl_En_Bubble/z_en_bubble.c" + "src/overlays/actors/ovl_En_Bubble/z_en_bubble.h" + "src/overlays/actors/ovl_En_Butte/z_en_butte.c" + "src/overlays/actors/ovl_En_Butte/z_en_butte.h" + "src/overlays/actors/ovl_En_Bw/z_en_bw.c" + "src/overlays/actors/ovl_En_Bw/z_en_bw.h" + "src/overlays/actors/ovl_En_Bx/z_en_bx.c" + "src/overlays/actors/ovl_En_Bx/z_en_bx.h" + "src/overlays/actors/ovl_En_Changer/z_en_changer.c" + "src/overlays/actors/ovl_En_Changer/z_en_changer.h" + "src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c" + "src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h" + "src/overlays/actors/ovl_En_Cow/z_en_cow.c" + "src/overlays/actors/ovl_En_Cow/z_en_cow.h" + "src/overlays/actors/ovl_En_Crow/z_en_crow.c" + "src/overlays/actors/ovl_En_Crow/z_en_crow.h" + "src/overlays/actors/ovl_En_Cs/z_en_cs.c" + "src/overlays/actors/ovl_En_Cs/z_en_cs.h" + "src/overlays/actors/ovl_En_Daiku/z_en_daiku.c" + "src/overlays/actors/ovl_En_Daiku/z_en_daiku.h" + "src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c" + "src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h" + "src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c" + "src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h" + "src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c" + "src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.h" + "src/overlays/actors/ovl_En_Dh/z_en_dh.c" + "src/overlays/actors/ovl_En_Dh/z_en_dh.h" + "src/overlays/actors/ovl_En_Dha/z_en_dha.c" + "src/overlays/actors/ovl_En_Dha/z_en_dha.h" + "src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c" + "src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h" + "src/overlays/actors/ovl_En_Dns/z_en_dns.c" + "src/overlays/actors/ovl_En_Dns/z_en_dns.h" + "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c" + "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h" + "src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c" + "src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h" + "src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c" + "src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h" + "src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c" + "src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h" + "src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c" + "src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h" + "src/overlays/actors/ovl_En_Dog/z_en_dog.c" + "src/overlays/actors/ovl_En_Dog/z_en_dog.h" + "src/overlays/actors/ovl_En_Door/z_en_door.c" + "src/overlays/actors/ovl_En_Door/z_en_door.h" + "src/overlays/actors/ovl_En_Ds/z_en_ds.c" + "src/overlays/actors/ovl_En_Ds/z_en_ds.h" + "src/overlays/actors/ovl_En_Du/z_en_du.c" + "src/overlays/actors/ovl_En_Du/z_en_du.h" + "src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c" + "src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h" + "src/overlays/actors/ovl_En_Eg/z_en_eg.c" + "src/overlays/actors/ovl_En_Eg/z_en_eg.h" + "src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c" + "src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.h" + "src/overlays/actors/ovl_En_Elf/z_en_elf.c" + "src/overlays/actors/ovl_En_Elf/z_en_elf.h" + "src/overlays/actors/ovl_En_Encount1/z_en_encount1.c" + "src/overlays/actors/ovl_En_Encount1/z_en_encount1.h" + "src/overlays/actors/ovl_En_Encount2/z_en_encount2.c" + "src/overlays/actors/ovl_En_Encount2/z_en_encount2.h" + "src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c" + "src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" + "src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c" + "src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h" + "src/overlays/actors/ovl_En_Fd/z_en_fd.c" + "src/overlays/actors/ovl_En_Fd/z_en_fd.h" + "src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c" + "src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h" + "src/overlays/actors/ovl_En_fHG/z_en_fhg.c" + "src/overlays/actors/ovl_En_fHG/z_en_fhg.h" + "src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c" + "src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h" + "src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c" + "src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h" + "src/overlays/actors/ovl_En_Firefly/z_en_firefly.c" + "src/overlays/actors/ovl_En_Firefly/z_en_firefly.h" + "src/overlays/actors/ovl_En_Fish/z_en_fish.c" + "src/overlays/actors/ovl_En_Fish/z_en_fish.h" + "src/overlays/actors/ovl_En_Floormas/z_en_floormas.c" + "src/overlays/actors/ovl_En_Floormas/z_en_floormas.h" + "src/overlays/actors/ovl_En_Fr/z_en_fr.c" + "src/overlays/actors/ovl_En_Fr/z_en_fr.h" + "src/overlays/actors/ovl_En_Fu/z_en_fu.c" + "src/overlays/actors/ovl_En_Fu/z_en_fu.h" + "src/overlays/actors/ovl_En_Fw/z_en_fw.c" + "src/overlays/actors/ovl_En_Fw/z_en_fw.h" + "src/overlays/actors/ovl_En_Fz/z_en_fz.c" + "src/overlays/actors/ovl_En_Fz/z_en_fz.h" + "src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c" + "src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h" + "src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c" + "src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h" + "src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c" + "src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h" + "src/overlays/actors/ovl_En_Gb/z_en_gb.c" + "src/overlays/actors/ovl_En_Gb/z_en_gb.h" + "src/overlays/actors/ovl_En_Ge1/z_en_ge1.c" + "src/overlays/actors/ovl_En_Ge1/z_en_ge1.h" + "src/overlays/actors/ovl_En_Ge2/z_en_ge2.c" + "src/overlays/actors/ovl_En_Ge2/z_en_ge2.h" + "src/overlays/actors/ovl_En_Ge3/z_en_ge3.c" + "src/overlays/actors/ovl_En_Ge3/z_en_ge3.h" + "src/overlays/actors/ovl_En_GeldB/z_en_geldb.c" + "src/overlays/actors/ovl_En_GeldB/z_en_geldb.h" + "src/overlays/actors/ovl_En_GirlA/z_en_girla.c" + "src/overlays/actors/ovl_En_GirlA/z_en_girla.h" + "src/overlays/actors/ovl_En_Gm/z_en_gm.c" + "src/overlays/actors/ovl_En_Gm/z_en_gm.h" + "src/overlays/actors/ovl_En_Go/z_en_go.c" + "src/overlays/actors/ovl_En_Go/z_en_go.h" + "src/overlays/actors/ovl_En_Go2/z_en_go2.c" + "src/overlays/actors/ovl_En_Go2/z_en_go2.h" + "src/overlays/actors/ovl_En_Goma/z_en_goma.c" + "src/overlays/actors/ovl_En_Goma/z_en_goma.h" + "src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c" + "src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h" + "src/overlays/actors/ovl_En_Gs/z_en_gs.c" + "src/overlays/actors/ovl_En_Gs/z_en_gs.h" + "src/overlays/actors/ovl_En_Guest/z_en_guest.c" + "src/overlays/actors/ovl_En_Guest/z_en_guest.h" + "src/overlays/actors/ovl_En_Hata/z_en_hata.c" + "src/overlays/actors/ovl_En_Hata/z_en_hata.h" + "src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c" + "src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.h" + "src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c" + "src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h" + "src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c" + "src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h" + "src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c" + "src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h" + "src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c" + "src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h" + "src/overlays/actors/ovl_En_Holl/z_en_holl.c" + "src/overlays/actors/ovl_En_Holl/z_en_holl.h" + "src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c" + "src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.h" + "src/overlays/actors/ovl_En_Horse/z_en_horse.c" + "src/overlays/actors/ovl_En_Horse/z_en_horse.h" + "src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c" + "src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h" + "src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c" + "src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h" + "src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c" + "src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h" + "src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c" + "src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h" + "src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c" + "src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h" + "src/overlays/actors/ovl_En_Hs/z_en_hs.c" + "src/overlays/actors/ovl_En_Hs/z_en_hs.h" + "src/overlays/actors/ovl_En_Hs2/z_en_hs2.c" + "src/overlays/actors/ovl_En_Hs2/z_en_hs2.h" + "src/overlays/actors/ovl_En_Hy/z_en_hy.c" + "src/overlays/actors/ovl_En_Hy/z_en_hy.h" + "src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c" + "src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h" + "src/overlays/actors/ovl_En_Ik/z_en_ik.c" + "src/overlays/actors/ovl_En_Ik/z_en_ik.h" + "src/overlays/actors/ovl_En_In/z_en_in.c" + "src/overlays/actors/ovl_En_In/z_en_in.h" + "src/overlays/actors/ovl_En_Insect/z_en_insect.c" + "src/overlays/actors/ovl_En_Insect/z_en_insect.h" + "src/overlays/actors/ovl_En_Ishi/z_en_ishi.c" + "src/overlays/actors/ovl_En_Ishi/z_en_ishi.h" + "src/overlays/actors/ovl_En_It/z_en_it.c" + "src/overlays/actors/ovl_En_It/z_en_it.h" + "src/overlays/actors/ovl_En_Jj/z_en_jj.c" + "src/overlays/actors/ovl_En_Jj/z_en_jj.h" + "src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.c" + "src/overlays/actors/ovl_En_Js/z_en_js.c" + "src/overlays/actors/ovl_En_Js/z_en_js.h" + "src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c" + "src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h" + "src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c" + "src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h" + "src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c" + "src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.h" + "src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c" + "src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h" + "src/overlays/actors/ovl_En_Kanban/z_en_kanban.c" + "src/overlays/actors/ovl_En_Kanban/z_en_kanban.h" + "src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.c" + "src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c" + "src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h" + "src/overlays/actors/ovl_En_Ko/z_en_ko.c" + "src/overlays/actors/ovl_En_Ko/z_en_ko.h" + "src/overlays/actors/ovl_En_Kusa/z_en_kusa.c" + "src/overlays/actors/ovl_En_Kusa/z_en_kusa.h" + "src/overlays/actors/ovl_En_Kz/z_en_kz.c" + "src/overlays/actors/ovl_En_Kz/z_en_kz.h" + "src/overlays/actors/ovl_En_Light/z_en_light.c" + "src/overlays/actors/ovl_En_Light/z_en_light.h" + "src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c" + "src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h" + "src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c" + "src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h" + "src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c" + "src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h" + "src/overlays/actors/ovl_En_Ma1/z_en_ma1.c" + "src/overlays/actors/ovl_En_Ma1/z_en_ma1.h" + "src/overlays/actors/ovl_En_Ma2/z_en_ma2.c" + "src/overlays/actors/ovl_En_Ma2/z_en_ma2.h" + "src/overlays/actors/ovl_En_Ma3/z_en_ma3.c" + "src/overlays/actors/ovl_En_Ma3/z_en_ma3.h" + "src/overlays/actors/ovl_En_Mag/z_en_mag.c" + "src/overlays/actors/ovl_En_Mag/z_en_mag.h" + "src/overlays/actors/ovl_En_Mb/z_en_mb.c" + "src/overlays/actors/ovl_En_Mb/z_en_mb.h" + "src/overlays/actors/ovl_En_Md/z_en_md.c" + "src/overlays/actors/ovl_En_Md/z_en_md.h" + "src/overlays/actors/ovl_En_Mk/z_en_mk.c" + "src/overlays/actors/ovl_En_Mk/z_en_mk.h" + "src/overlays/actors/ovl_En_Mm/z_en_mm.c" + "src/overlays/actors/ovl_En_Mm/z_en_mm.h" + "src/overlays/actors/ovl_En_Mm2/z_en_mm2.c" + "src/overlays/actors/ovl_En_Mm2/z_en_mm2.h" + "src/overlays/actors/ovl_En_Ms/z_en_ms.c" + "src/overlays/actors/ovl_En_Ms/z_en_ms.h" + "src/overlays/actors/ovl_En_Mu/z_en_mu.c" + "src/overlays/actors/ovl_En_Mu/z_en_mu.h" + "src/overlays/actors/ovl_En_Nb/z_en_nb.c" + "src/overlays/actors/ovl_En_Nb/z_en_nb.h" + "src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c" + "src/overlays/actors/ovl_En_Niw/z_en_niw.c" + "src/overlays/actors/ovl_En_Niw/z_en_niw.h" + "src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c" + "src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h" + "src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c" + "src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h" + "src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c" + "src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.h" + "src/overlays/actors/ovl_En_Nwc/z_en_nwc.c" + "src/overlays/actors/ovl_En_Nwc/z_en_nwc.h" + "src/overlays/actors/ovl_En_Ny/z_en_ny.c" + "src/overlays/actors/ovl_En_Ny/z_en_ny.h" + "src/overlays/actors/ovl_En_OE2/z_en_oe2.c" + "src/overlays/actors/ovl_En_OE2/z_en_oe2.h" + "src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c" + "src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.h" + "src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c" + "src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.h" + "src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c" + "src/overlays/actors/ovl_En_Okuta/z_en_okuta.c" + "src/overlays/actors/ovl_En_Okuta/z_en_okuta.h" + "src/overlays/actors/ovl_En_Ossan/z_en_ossan.c" + "src/overlays/actors/ovl_En_Ossan/z_en_ossan.h" + "src/overlays/actors/ovl_En_Owl/z_en_owl.c" + "src/overlays/actors/ovl_En_Owl/z_en_owl.h" + "src/overlays/actors/ovl_En_Part/z_en_part.c" + "src/overlays/actors/ovl_En_Part/z_en_part.h" + "src/overlays/actors/ovl_En_Peehat/z_en_peehat.c" + "src/overlays/actors/ovl_En_Peehat/z_en_peehat.h" + "src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c" + "src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h" + "src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c" + "src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h" + "src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c" + "src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h" + "src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c" + "src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h" + "src/overlays/actors/ovl_En_Poh/z_en_poh.c" + "src/overlays/actors/ovl_En_Poh/z_en_poh.h" + "src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c" + "src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h" + "src/overlays/actors/ovl_En_Rd/z_en_rd.c" + "src/overlays/actors/ovl_En_Rd/z_en_rd.h" + "src/overlays/actors/ovl_En_Reeba/z_en_reeba.c" + "src/overlays/actors/ovl_En_Reeba/z_en_reeba.h" + "src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c" + "src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h" + "src/overlays/actors/ovl_En_Rl/z_en_rl.c" + "src/overlays/actors/ovl_En_Rl/z_en_rl.h" + "src/overlays/actors/ovl_En_Rr/z_en_rr.c" + "src/overlays/actors/ovl_En_Rr/z_en_rr.h" + "src/overlays/actors/ovl_En_Ru1/z_en_ru1.c" + "src/overlays/actors/ovl_En_Ru1/z_en_ru1.h" + "src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.c" + "src/overlays/actors/ovl_En_Ru2/z_en_ru2.c" + "src/overlays/actors/ovl_En_Ru2/z_en_ru2.h" + "src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.c" + "src/overlays/actors/ovl_En_Sa/z_en_sa.c" + "src/overlays/actors/ovl_En_Sa/z_en_sa.h" + "src/overlays/actors/ovl_En_Sb/z_en_sb.c" + "src/overlays/actors/ovl_En_Sb/z_en_sb.h" + "src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c" + "src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h" + "src/overlays/actors/ovl_En_Sda/z_en_sda.c" + "src/overlays/actors/ovl_En_Sda/z_en_sda.h" + "src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c" + "src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h" + "src/overlays/actors/ovl_En_Si/z_en_si.c" + "src/overlays/actors/ovl_En_Si/z_en_si.h" + "src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c" + "src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h" + "src/overlays/actors/ovl_En_Skb/z_en_skb.c" + "src/overlays/actors/ovl_En_Skb/z_en_skb.h" + "src/overlays/actors/ovl_En_Skj/z_en_skj.c" + "src/overlays/actors/ovl_En_Skj/z_en_skj.h" + "src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c" + "src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h" + "src/overlays/actors/ovl_En_Ssh/z_en_ssh.c" + "src/overlays/actors/ovl_En_Ssh/z_en_ssh.h" + "src/overlays/actors/ovl_En_St/z_en_st.c" + "src/overlays/actors/ovl_En_St/z_en_st.h" + "src/overlays/actors/ovl_En_Sth/z_en_sth.c" + "src/overlays/actors/ovl_En_Sth/z_en_sth.h" + "src/overlays/actors/ovl_En_Stream/z_en_stream.c" + "src/overlays/actors/ovl_En_Stream/z_en_stream.h" + "src/overlays/actors/ovl_En_Sw/z_en_sw.c" + "src/overlays/actors/ovl_En_Sw/z_en_sw.h" + "src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c" + "src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h" + "src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c" + "src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h" + "src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c" + "src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h" + "src/overlays/actors/ovl_En_Ta/z_en_ta.c" + "src/overlays/actors/ovl_En_Ta/z_en_ta.h" + "src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c" + "src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h" + "src/overlays/actors/ovl_En_Tana/z_en_tana.c" + "src/overlays/actors/ovl_En_Tana/z_en_tana.h" + "src/overlays/actors/ovl_En_Test/z_en_test.c" + "src/overlays/actors/ovl_En_Test/z_en_test.h" + "src/overlays/actors/ovl_En_Tg/z_en_tg.c" + "src/overlays/actors/ovl_En_Tg/z_en_tg.h" + "src/overlays/actors/ovl_En_Tite/z_en_tite.c" + "src/overlays/actors/ovl_En_Tite/z_en_tite.h" + "src/overlays/actors/ovl_En_Tk/z_en_tk.c" + "src/overlays/actors/ovl_En_Tk/z_en_tk.h" + "src/overlays/actors/ovl_En_Torch/z_en_torch.c" + "src/overlays/actors/ovl_En_Torch/z_en_torch.h" + "src/overlays/actors/ovl_En_Torch2/z_en_torch2.c" + "src/overlays/actors/ovl_En_Torch2/z_en_torch2.h" + "src/overlays/actors/ovl_En_Toryo/z_en_toryo.c" + "src/overlays/actors/ovl_En_Toryo/z_en_toryo.h" + "src/overlays/actors/ovl_En_Tp/z_en_tp.c" + "src/overlays/actors/ovl_En_Tp/z_en_tp.h" + "src/overlays/actors/ovl_En_Tr/z_en_tr.c" + "src/overlays/actors/ovl_En_Tr/z_en_tr.h" + "src/overlays/actors/ovl_En_Trap/z_en_trap.c" + "src/overlays/actors/ovl_En_Trap/z_en_trap.h" + "src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c" + "src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.h" + "src/overlays/actors/ovl_En_Vali/z_en_vali.c" + "src/overlays/actors/ovl_En_Vali/z_en_vali.h" + "src/overlays/actors/ovl_En_Vase/z_en_vase.c" + "src/overlays/actors/ovl_En_Vase/z_en_vase.h" + "src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c" + "src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h" + "src/overlays/actors/ovl_En_Viewer/z_en_viewer.c" + "src/overlays/actors/ovl_En_Viewer/z_en_viewer.h" + "src/overlays/actors/ovl_En_Vm/z_en_vm.c" + "src/overlays/actors/ovl_En_Vm/z_en_vm.h" + "src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c" + "src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h" + "src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c" + "src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.h" + "src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c" + "src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h" + "src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c" + "src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h" + "src/overlays/actors/ovl_En_Wf/z_en_wf.c" + "src/overlays/actors/ovl_En_Wf/z_en_wf.h" + "src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c" + "src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.h" + "src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c" + "src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h" + "src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c" + "src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.h" + "src/overlays/actors/ovl_En_Wood02/z_en_wood02.c" + "src/overlays/actors/ovl_En_Wood02/z_en_wood02.h" + "src/overlays/actors/ovl_En_Xc/z_en_xc.c" + "src/overlays/actors/ovl_En_Xc/z_en_xc.h" + "src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c" + "src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.h" + "src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c" + "src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h" + "src/overlays/actors/ovl_En_Zf/z_en_zf.c" + "src/overlays/actors/ovl_En_Zf/z_en_zf.h" + "src/overlays/actors/ovl_En_Zl1/z_en_zl1.c" + "src/overlays/actors/ovl_En_Zl1/z_en_zl1.h" + "src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.c" + "src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c" + "src/overlays/actors/ovl_En_Zl2/z_en_zl2.c" + "src/overlays/actors/ovl_En_Zl2/z_en_zl2.h" + "src/overlays/actors/ovl_En_Zl3/z_en_zl3.c" + "src/overlays/actors/ovl_En_Zl3/z_en_zl3.h" + "src/overlays/actors/ovl_En_Zl4/z_en_zl4.c" + "src/overlays/actors/ovl_En_Zl4/z_en_zl4.h" + "src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.c" + "src/overlays/actors/ovl_En_Zo/z_en_zo.c" + "src/overlays/actors/ovl_En_Zo/z_en_zo.h" + "src/overlays/actors/ovl_End_Title/z_end_title.c" + "src/overlays/actors/ovl_End_Title/z_end_title.h" + "src/overlays/actors/ovl_Fishing/z_fishing.c" + "src/overlays/actors/ovl_Fishing/z_fishing.h" + "src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c" + "src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h" + "src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c" + "src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h" + "src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c" + "src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h" + "src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c" + "src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h" + "src/overlays/actors/ovl_Item_Shield/z_item_shield.c" + "src/overlays/actors/ovl_Item_Shield/z_item_shield.h" + "src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c" + "src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h" + "src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c" + "src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h" + "src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c" + "src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h" + "src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c" + "src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h" + "src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c" + "src/overlays/actors/ovl_Obj_Bean/z_obj_bean.h" + "src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c" + "src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h" + "src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c" + "src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h" + "src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c" + "src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h" + "src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c" + "src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h" + "src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c" + "src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h" + "src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c" + "src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h" + "src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c" + "src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h" + "src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c" + "src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h" + "src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c" + "src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h" + "src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c" + "src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.h" + "src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c" + "src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.h" + "src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c" + "src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h" + "src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c" + "src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h" + "src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c" + "src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h" + "src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c" + "src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h" + "src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c" + "src/overlays/actors/ovl_Obj_Mure/z_obj_mure.h" + "src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c" + "src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h" + "src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c" + "src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.h" + "src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c" + "src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" + "src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c" + "src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h" + "src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c" + "src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h" + "src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c" + "src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h" + "src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c" + "src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h" + "src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c" + "src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h" + "src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c" + "src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h" + "src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c" + "src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h" + "src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c" + "src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h" + "src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c" + "src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.h" + "src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c" + "src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h" + "src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c" + "src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h" + "src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c" + "src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h" + "src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c" + "src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h" + "src/overlays/actors/ovl_player_actor/z_player.c" + "src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c" + "src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h" +) +source_group("Source Files\\src\\overlays\\actors" FILES ${Source_Files__src__overlays__actors}) + +set(Source_Files__src__overlays__effects + "src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c" + "src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h" + "src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c" + "src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h" + "src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c" + "src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h" + "src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c" + "src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h" + "src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c" + "src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h" + "src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c" + "src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h" + "src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c" + "src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h" + "src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c" + "src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h" + "src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c" + "src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" + "src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c" + "src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h" + "src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c" + "src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h" + "src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c" + "src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h" + "src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c" + "src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h" + "src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c" + "src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h" + "src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c" + "src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h" + "src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c" + "src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" + "src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c" + "src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h" + "src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c" + "src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h" + "src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.c" + "src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h" + "src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c" + "src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h" + "src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c" + "src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h" + "src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c" + "src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h" + "src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c" + "src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h" + "src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c" + "src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" + "src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c" + "src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h" + "src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c" + "src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h" + "src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c" + "src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h" + "src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c" + "src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h" + "src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c" + "src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + "src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c" + "src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h" + "src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c" + "src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h" + "src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c" + "src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h" + "src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c" + "src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h" + "src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c" + "src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h" + "src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c" + "src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h" + "src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c" + "src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h" +) +source_group("Source Files\\src\\overlays\\effects" FILES ${Source_Files__src__overlays__effects}) + +set(Source_Files__src__overlays__gamestates__ovl_file_choose + "src/overlays/gamestates/ovl_file_choose/z_file_choose.c" + "src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c" + "src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.c" + "src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c" +) +source_group("Source Files\\src\\overlays\\gamestates\\ovl_file_choose" FILES ${Source_Files__src__overlays__gamestates__ovl_file_choose}) + +set(Source_Files__src__overlays__gamestates__ovl_opening + "src/overlays/gamestates/ovl_opening/z_opening.c" +) +source_group("Source Files\\src\\overlays\\gamestates\\ovl_opening" FILES ${Source_Files__src__overlays__gamestates__ovl_opening}) + +set(Source_Files__src__overlays__gamestates__ovl_select + "src/overlays/gamestates/ovl_select/z_select.c" +) +source_group("Source Files\\src\\overlays\\gamestates\\ovl_select" FILES ${Source_Files__src__overlays__gamestates__ovl_select}) + +set(Source_Files__src__overlays__gamestates__ovl_title + "src/overlays/gamestates/ovl_title/z_title.c" +) +source_group("Source Files\\src\\overlays\\gamestates\\ovl_title" FILES ${Source_Files__src__overlays__gamestates__ovl_title}) + +set(Source_Files__src__overlays__misc__ovl_kaleido_scope + #"src/overlays/actors/ovl_kaleido_scope/z_kaleido_scope.h" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_map_PAL.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h" + "src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c" + "src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c" + "src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.c" +) +source_group("Source Files\\src\\overlays\\misc\\ovl_kaleido_scope" FILES ${Source_Files__src__overlays__misc__ovl_kaleido_scope}) + +set(Source_Files__src__overlays__misc__ovl_map_mark_data + "src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c" +) +source_group("Source Files\\src\\overlays\\misc\\ovl_map_mark_data" FILES ${Source_Files__src__overlays__misc__ovl_map_mark_data}) + +set(ALL_FILES + ${Header_Files} + ${Header_Files__include} + ${Header_Files__soh__Enhancements} + ${Header_Files__soh__Enhancements__debugger} + ${Source_Files__soh} + ${Source_Files__soh__Enhancements} + ${Source_Files__soh__Enhancements__debugger} + ${Source_Files__src__boot} + ${Source_Files__src__buffers} + ${Source_Files__src__code} + ${Source_Files__src__libultra} + ${Source_Files__src__overlays__actors} + ${Source_Files__src__overlays__effects} + ${Source_Files__src__overlays__gamestates__ovl_file_choose} + ${Source_Files__src__overlays__gamestates__ovl_opening} + ${Source_Files__src__overlays__gamestates__ovl_select} + ${Source_Files__src__overlays__gamestates__ovl_title} + ${Source_Files__src__overlays__misc__ovl_kaleido_scope} + ${Source_Files__src__overlays__misc__ovl_map_mark_data} +) + +################################################################################ +# Target +################################################################################ +add_executable(${PROJECT_NAME} ${ALL_FILES}) + +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +set(ROOT_NAMESPACE soh) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set_target_properties(${PROJECT_NAME} PROPERTIES + VS_GLOBAL_KEYWORD "Win32Proj" + ) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + set_target_properties(${PROJECT_NAME} PROPERTIES + INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" + ) + endif() +else() + set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME "soh.elf" + ) +endif() +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + endif() + set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() +################################################################################ +# Compile definitions +################################################################################ + +target_include_directories(${PROJECT_NAME} PRIVATE assets + ${PROJECT_SOURCE_DIR}/include/ + ${PROJECT_SOURCE_DIR}/src/ + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/libjpeg/include/ + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/ + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ + ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL + ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/ + ${PROJECT_SOURCE_DIR}/assets/ + . +) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG;" + "_CRT_SECURE_NO_WARNINGS;" + "ENABLE_DX11" + ">" + "$<$:" + "NDEBUG" + ">" + "INCLUDE_GAME_PRINTF;" + "_CONSOLE;" + "%(PreprocessorDefinitions)GLEW_STATIC;" + "UNICODE;" + "_UNICODE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "NOINCLUDE_GAME_PRINTF;" + "_DEBUG;" + "_CRT_SECURE_NO_WARNINGS;" + "ENABLE_OPENGL" + ">" + "$<$:" + "INCLUDE_GAME_PRINTF;" + "NDEBUG;" + "%(PreprocessorDefinitions)GLEW_STATIC" + ">" + "WIN32;" + "_CONSOLE;" + "UNICODE;" + "_UNICODE" + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_DEBUG" + ">" + "$<$:" + "NDEBUG" + ">" + "SPDLOG_ACTIVE_LEVEL=0;" + "_CONSOLE;" + "_CRT_SECURE_NO_WARNINGS;" + "ENABLE_OPENGL;" + "UNICODE;" + "_UNICODE" + ) +endif() +################################################################################ +# Compile and link options +################################################################################ +if(MSVC) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /sdl-; + /w + > + $<$: + /Oi; + /sdl; + /Gy; + /W3 + > + /permissive-; + /MP; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /RTCs + > + $<$: + /O2; + /Oi; + /Gy + > + /permissive-; + /MP; + /sdl-; + /w; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + endif() + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /INCREMENTAL + > + $<$: + /OPT:REF; + /OPT:ICF; + /INCREMENTAL:NO + > + /DEBUG; + /SUBSYSTEM:CONSOLE; + /FORCE:MULTIPLE + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /STACK:8777216 + > + $<$: + /OPT:REF; + /OPT:ICF; + /INCREMENTAL:NO; + /FORCE:MULTIPLE + > + /DEBUG; + /SUBSYSTEM:CONSOLE + ) + endif() +endif() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread + ) + + target_link_options(${PROJECT_NAME} PRIVATE + -pthread + -Wl,-export-dynamic + ) +endif() +################################################################################ +# Pre build events +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + add_custom_command_if( + TARGET ${PROJECT_NAME} + PRE_BUILD + COMMANDS + COMMAND $ copy /b $src\\boot\\build.c +,, + ) + endif() +endif() +################################################################################ +# Dependencies +################################################################################ +add_dependencies(${PROJECT_NAME} + ZAPDUtils + libultraship + storm + glew_s +) +find_library(SDL2_LIB SDL2) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "$<$:" + "libultraship;" + "ZAPDUtils;" + "opengl32;" + "glu32;" + "SDL2;" + "SDL2main;" + "glfw3dll;" + "glew32s;" + "winmm;" + "imm32;" + "version;" + "setupapi" + ">" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "libultraship;" + "ZAPDUtils;" + "opengl32;" + "glu32;" + "SDL2;" + "SDL2main;" + "glfw3dll;" + "glew32s;" + "StormLibRUS32;" + "winmm;" + "imm32;" + "version;" + "setupapi" + ) + endif() +else() + find_package(SDL2) + find_package(PulseAudio) +set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "libultraship;" + "ZAPDUtils;" + "storm;" + SDL2::SDL2 + ${PULSEAUDIO_LIBRARY} + glew_s + ${OPENGL_glx_LIBRARY} + ${OPENGL_opengl_LIBRARY} + Threads::Threads + ) +endif() + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + add_library( SDL2 STATIC IMPORTED ) + set_property(TARGET SDL2 PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib ) + set_property(TARGET SDL2 PROPERTY + IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib) + + add_library( SDL2main STATIC IMPORTED ) + set_property(TARGET SDL2main PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib ) + set_property(TARGET SDL2main PROPERTY + IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib) + + add_library(glfw3dll STATIC IMPORTED ) + set_property(TARGET glfw3dll PROPERTY + IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib ) + set_property(TARGET glfw3dll PROPERTY + IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib) + + add_library(glew32s STATIC IMPORTED ) + set_property(TARGET glew32s PROPERTY + IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x86/glew32s.lib ) + set_property(TARGET glew32s PROPERTY + IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x86/glew32s.lib) + + add_library(StormLibRUS32 STATIC IMPORTED ) + set_property(TARGET StormLibRUS32 PROPERTY + IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) + set_property(TARGET StormLibRUS32 PROPERTY + IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") + From 31321bd3cbff374d49f2f1994a250ba7c4da432a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 16 May 2022 18:01:51 +0200 Subject: [PATCH 002/155] fix some compilation issues --- ZAPDTR/ZAPDUtils/Utils/Directory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZAPDTR/ZAPDUtils/Utils/Directory.h b/ZAPDTR/ZAPDUtils/Utils/Directory.h index 1ced139be6b..194f709547f 100644 --- a/ZAPDTR/ZAPDUtils/Utils/Directory.h +++ b/ZAPDTR/ZAPDUtils/Utils/Directory.h @@ -21,7 +21,7 @@ class Directory { public: #ifndef PATH_HACK - static std::string GetCurrentDirectory() { return fs::current_path().u8string().c_str(); } + static std::string GetCurrentDirectory() { return fs::current_path().string(); } #endif static bool Exists(const fs::path& path) { return fs::exists(path); } From e0c0c55e144e969c8f6ed3ae6869064e61ad432d Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 16 May 2022 18:16:37 +0200 Subject: [PATCH 003/155] add libdl --- soh/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index bf1feeda985..270d94d2930 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1710,6 +1710,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) glew_s ${OPENGL_glx_LIBRARY} ${OPENGL_opengl_LIBRARY} + ${CMAKE_DL_LIBS} Threads::Threads ) endif() From a7b0b08e69d5d274e71b9827bf20dbeec5497bfe Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 22 May 2022 09:28:59 +0200 Subject: [PATCH 004/155] rename ZAPD to ZAPD.out for compatibility with OTRGui --- BUILDING-cmake.md | 2 +- ZAPDTR/ZAPD/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index bb78cbdf7c7..583cf547077 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -47,7 +47,7 @@ git clone https://github.com/Perlmint/glew-cmake.git external/glew cd OTRExporter # change the path to ZAPD in extract_assets.py -sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD%" < extract_assets.py > extract_assets_cmake.py +sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD.out%" < extract_assets.py > extract_assets_cmake.py chmod +x extract_assets_cmake.py cmake -S . -B build-cmake diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 1fa567d5cc4..9265f5a4196 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -273,6 +273,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" ) endif() +else() + set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME "ZAPD.out" + ) endif() ################################################################################ # MSVC runtime library From a1318016a17506d435518ea483be2fdeee1d1657 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:03:58 +0200 Subject: [PATCH 005/155] add utility functions --- OTRGui/CMake/Default.cmake | 65 ++++++++++ OTRGui/CMake/DefaultCXX.cmake | 12 ++ OTRGui/CMake/Utils.cmake | 234 ++++++++++++++++++++++++++++++++++ 3 files changed, 311 insertions(+) create mode 100644 OTRGui/CMake/Default.cmake create mode 100644 OTRGui/CMake/DefaultCXX.cmake create mode 100644 OTRGui/CMake/Utils.cmake diff --git a/OTRGui/CMake/Default.cmake b/OTRGui/CMake/Default.cmake new file mode 100644 index 00000000000..70bfa903841 --- /dev/null +++ b/OTRGui/CMake/Default.cmake @@ -0,0 +1,65 @@ +################################################################################ +# Command for variable_watch. This command issues error message, if a variable +# is changed. If variable PROPERTY_READER_GUARD_DISABLED is TRUE nothing happens +# variable_watch( property_reader_guard) +################################################################################ +function(property_reader_guard VARIABLE ACCESS VALUE CURRENT_LIST_FILE STACK) + if("${PROPERTY_READER_GUARD_DISABLED}") + return() + endif() + + if("${ACCESS}" STREQUAL "MODIFIED_ACCESS") + message(FATAL_ERROR + " Variable ${VARIABLE} is not supposed to be changed.\n" + " It is used only for reading target property ${VARIABLE}.\n" + " Use\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}\" \"\")\n" + " or\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}_\" \"\")\n" + " instead.\n") + endif() +endfunction() + +################################################################################ +# Create variable with generator expression that expands to value of +# target property _. If property is empty or not set then property +# is used instead. Variable has watcher property_reader_guard that +# doesn't allow to edit it. +# create_property_reader() +# Input: +# name - Name of watched property and output variable +################################################################################ +function(create_property_reader NAME) + set(PROPERTY_READER_GUARD_DISABLED TRUE) + set(CONFIG_VALUE "$>>>") + set(IS_CONFIG_VALUE_EMPTY "$") + set(GENERAL_VALUE "$>") + set("${NAME}" "$" PARENT_SCOPE) + variable_watch("${NAME}" property_reader_guard) +endfunction() + +################################################################################ +# Set property $_${PROPS_CONFIG_U} of ${PROPS_TARGET} to +# set_config_specific_property( ) +# Input: +# name - Prefix of property name +# value - New value +################################################################################ +function(set_config_specific_property NAME VALUE) + set_target_properties("${PROPS_TARGET}" PROPERTIES "${NAME}_${PROPS_CONFIG_U}" "${VALUE}") +endfunction() + +################################################################################ + +create_property_reader("TARGET_NAME") +create_property_reader("OUTPUT_DIRECTORY") + +set_config_specific_property("TARGET_NAME" "${PROPS_TARGET}") +set_config_specific_property("OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("ARCHIVE_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("LIBRARY_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("RUNTIME_OUTPUT_NAME" "${TARGET_NAME}") + +set_config_specific_property("ARCHIVE_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("LIBRARY_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("RUNTIME_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") \ No newline at end of file diff --git a/OTRGui/CMake/DefaultCXX.cmake b/OTRGui/CMake/DefaultCXX.cmake new file mode 100644 index 00000000000..eff0e569b2c --- /dev/null +++ b/OTRGui/CMake/DefaultCXX.cmake @@ -0,0 +1,12 @@ +include("${CMAKE_CURRENT_LIST_DIR}/Default.cmake") + +set_config_specific_property("OUTPUT_DIRECTORY" "${CMAKE_SOURCE_DIR}$<$>:/${CMAKE_VS_PLATFORM_NAME}>/${PROPS_CONFIG}") + +if(MSVC) + create_property_reader("DEFAULT_CXX_EXCEPTION_HANDLING") + create_property_reader("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT") + + set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") + set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi") +endif() diff --git a/OTRGui/CMake/Utils.cmake b/OTRGui/CMake/Utils.cmake new file mode 100644 index 00000000000..9e2f961eba9 --- /dev/null +++ b/OTRGui/CMake/Utils.cmake @@ -0,0 +1,234 @@ +# utils file for projects came from visual studio solution with cmake-converter. + +################################################################################ +# Wrap each token of the command with condition +################################################################################ +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) +macro(prepare_commands) + unset(TOKEN_ROLE) + unset(COMMANDS) + foreach(TOKEN ${ARG_COMMANDS}) + if("${TOKEN}" STREQUAL "COMMAND") + set(TOKEN_ROLE "KEYWORD") + elseif("${TOKEN_ROLE}" STREQUAL "KEYWORD") + set(TOKEN_ROLE "CONDITION") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(TOKEN_ROLE "COMMAND") + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + set(TOKEN_ROLE "ARG") + endif() + + if("${TOKEN_ROLE}" STREQUAL "KEYWORD") + list(APPEND COMMANDS "${TOKEN}") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(CONDITION ${TOKEN}) + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + list(APPEND COMMANDS "$<$:${DUMMY}>$<${CONDITION}:${TOKEN}>") + elseif("${TOKEN_ROLE}" STREQUAL "ARG") + list(APPEND COMMANDS "$<${CONDITION}:${TOKEN}>") + endif() + endforeach() +endmacro() +cmake_policy(POP) + +################################################################################ +# Transform all the tokens to absolute paths +################################################################################ +macro(prepare_output) + unset(OUTPUT) + foreach(TOKEN ${ARG_OUTPUT}) + if(IS_ABSOLUTE ${TOKEN}) + list(APPEND OUTPUT "${TOKEN}") + else() + list(APPEND OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${TOKEN}") + endif() + endforeach() +endmacro() + +################################################################################ +# Parse add_custom_command_if args. +# +# Input: +# PRE_BUILD - Pre build event option +# PRE_LINK - Pre link event option +# POST_BUILD - Post build event option +# TARGET - Target +# OUTPUT - List of output files +# DEPENDS - List of files on which the command depends +# COMMANDS - List of commands(COMMAND condition1 commannd1 args1 COMMAND +# condition2 commannd2 args2 ...) +# Output: +# OUTPUT - Output files +# DEPENDS - Files on which the command depends +# COMMENT - Comment +# PRE_BUILD - TRUE/FALSE +# PRE_LINK - TRUE/FALSE +# POST_BUILD - TRUE/FALSE +# TARGET - Target name +# COMMANDS - Prepared commands(every token is wrapped in CONDITION) +# NAME - Unique name for custom target +# STEP - PRE_BUILD/PRE_LINK/POST_BUILD +################################################################################ +function(add_custom_command_if_parse_arguments) + cmake_parse_arguments("ARG" "PRE_BUILD;PRE_LINK;POST_BUILD" "TARGET;COMMENT" "DEPENDS;OUTPUT;COMMANDS" ${ARGN}) + + if(WIN32) + set(DUMMY "cd.") + elseif(UNIX) + set(DUMMY "true") + endif() + + prepare_commands() + prepare_output() + + set(DEPENDS "${ARG_DEPENDS}") + set(COMMENT "${ARG_COMMENT}") + set(PRE_BUILD "${ARG_PRE_BUILD}") + set(PRE_LINK "${ARG_PRE_LINK}") + set(POST_BUILD "${ARG_POST_BUILD}") + set(TARGET "${ARG_TARGET}") + if(PRE_BUILD) + set(STEP "PRE_BUILD") + elseif(PRE_LINK) + set(STEP "PRE_LINK") + elseif(POST_BUILD) + set(STEP "POST_BUILD") + endif() + set(NAME "${TARGET}_${STEP}") + + set(OUTPUT "${OUTPUT}" PARENT_SCOPE) + set(DEPENDS "${DEPENDS}" PARENT_SCOPE) + set(COMMENT "${COMMENT}" PARENT_SCOPE) + set(PRE_BUILD "${PRE_BUILD}" PARENT_SCOPE) + set(PRE_LINK "${PRE_LINK}" PARENT_SCOPE) + set(POST_BUILD "${POST_BUILD}" PARENT_SCOPE) + set(TARGET "${TARGET}" PARENT_SCOPE) + set(COMMANDS "${COMMANDS}" PARENT_SCOPE) + set(STEP "${STEP}" PARENT_SCOPE) + set(NAME "${NAME}" PARENT_SCOPE) +endfunction() + +################################################################################ +# Add conditional custom command +# +# Generating Files +# The first signature is for adding a custom command to produce an output: +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [DEPENDS [depends...]] +# [COMMENT comment] +# +# Build Events +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [COMMENT comment] +# +# Input: +# output - Output files the command is expected to produce +# condition - Generator expression for wrapping the command +# command - Command-line(s) to execute at build time. +# args - Command`s args +# depends - Files on which the command depends +# comment - Display the given message before the commands are executed at +# build time. +# PRE_BUILD - Run before any other rules are executed within the target +# PRE_LINK - Run after sources have been compiled but before linking the +# binary +# POST_BUILD - Run after all other rules within the target have been +# executed +################################################################################ +function(add_custom_command_if) + add_custom_command_if_parse_arguments(${ARGN}) + + if(OUTPUT AND TARGET) + message(FATAL_ERROR "Wrong syntax. A TARGET and OUTPUT can not both be specified.") + endif() + + if(OUTPUT) + add_custom_command(OUTPUT ${OUTPUT} + ${COMMANDS} + DEPENDS ${DEPENDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + elseif(TARGET) + if(PRE_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio") + add_custom_target( + ${NAME} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + add_dependencies(${TARGET} ${NAME}) + else() + add_custom_command( + TARGET ${TARGET} + ${STEP} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + endif() + else() + message(FATAL_ERROR "Wrong syntax. A TARGET or OUTPUT must be specified.") + endif() +endfunction() + +################################################################################ +# Use props file for a target and configs +# use_props( ) +# Inside there are following variables: +# PROPS_TARGET - +# PROPS_CONFIG - One of +# PROPS_CONFIG_U - Uppercase PROPS_CONFIG +# Input: +# target - Target to apply props file +# configs - Build configurations to apply props file +# props_file - CMake script +################################################################################ +macro(use_props TARGET CONFIGS PROPS_FILE) + set(PROPS_TARGET "${TARGET}") + foreach(PROPS_CONFIG ${CONFIGS}) + string(TOUPPER "${PROPS_CONFIG}" PROPS_CONFIG_U) + + get_filename_component(ABSOLUTE_PROPS_FILE "${PROPS_FILE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") + if(EXISTS "${ABSOLUTE_PROPS_FILE}") + include("${ABSOLUTE_PROPS_FILE}") + else() + message(WARNING "Corresponding cmake file from props \"${ABSOLUTE_PROPS_FILE}\" doesn't exist") + endif() + endforeach() +endmacro() + +################################################################################ +# Add compile options to source file +# source_file_compile_options( [compile_options...]) +# Input: +# source_file - Source file +# compile_options - Options to add to COMPILE_FLAGS property +################################################################################ +function(source_file_compile_options SOURCE_FILE) + if("${ARGC}" LESS_EQUAL "1") + return() + endif() + + get_source_file_property(COMPILE_OPTIONS "${SOURCE_FILE}" COMPILE_OPTIONS) + + if(COMPILE_OPTIONS) + list(APPEND COMPILE_OPTIONS ${ARGN}) + else() + set(COMPILE_OPTIONS "${ARGN}") + endif() + + set_source_files_properties("${SOURCE_FILE}" PROPERTIES COMPILE_OPTIONS "${COMPILE_OPTIONS}") +endfunction() + +################################################################################ +# Default properties of visual studio projects +################################################################################ +set(DEFAULT_CXX_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultCXX.cmake") +set(DEFAULT_Fortran_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultFortran.cmake") From 69bf03532b53490ca9d3514ef8c74dd85ec36890 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:04:36 +0200 Subject: [PATCH 006/155] ad OTRGui --- BUILDING-cmake.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 583cf547077..d9c17701d78 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -58,4 +58,9 @@ cmake --build build-cmake cd ../soh cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=CMake/Linux32bit-toolchain.cmake cmake --build build-cmake + +cd ../OTRGui +cmake -H. -Bbuild-cmake -GNinja -DOpenGL_GL_PREFERENCE="GLVND" -DCMAKE_BUILD_TYPE="Release" +cmake --build build-cmake +cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor ~~~ From e7b363900507e1847361ba1957f548930791eb60 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:05:23 +0200 Subject: [PATCH 007/155] fix for Linux --- OTRGui/CMakeLists.txt | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 532e24d2d18..9a3434b281e 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -3,27 +3,39 @@ project(OTRGui) set(PLATFORM "Desktop") set(CMAKE_CXX_STANDARD 20) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build) +#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build) set(APP_ICON_RESOURCE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/appicon.rc) +include(CMake/Utils.cmake) + add_subdirectory(libs/raylib) include_directories(src) include_directories(src/game) include_directories(include) -include_external_msproject(ZAPD ../../ZAPDTR/ZAPD/ZAPD.vcproj) -include_external_msproject(ZAPDUtils ../../ZAPDTR/ZAPDUtils/ZAPDUtils.vcproj) -include_external_msproject(libultraship ../../libultraship/libultraship/libultraship.vcproj) -include_external_msproject(OTRExporter ../../OTRExporter/OTRExporter/OTRExporter.vcproj) +#include_external_msproject(ZAPD ../../ZAPDTR/ZAPD/ZAPD.vcproj) +#include_external_msproject(ZAPDUtils ../../ZAPDTR/ZAPDUtils/ZAPDUtils.vcproj) +#include_external_msproject(libultraship ../../libultraship/libultraship/libultraship.vcproj) +#include_external_msproject(OTRExporter ../../OTRExporter/OTRExporter/OTRExporter.vcproj) +add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) +add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +add_subdirectory(../OTRExporter/OTRExporter ${CMAKE_BINARY_DIR}/OTRExporter) + +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") +add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) +endif() file(GLOB_RECURSE HEADERS src/*.h) file(GLOB_RECURSE SOURCES src/*.cpp) file(GLOB_RECURSE C_SOURCES src/*.c) add_executable(${PROJECT_NAME} ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) -add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets1 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets2 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets3 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") + +add_dependencies(${PROJECT_NAME} Assets1 Assets2 Assets3) target_link_libraries(${PROJECT_NAME} PUBLIC raylib) From a409457bf0ee20b998eb1040c8cb4acfc6d9616c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:06:02 +0200 Subject: [PATCH 008/155] fix embedded escaped space --- OTRGui/Overwrite.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OTRGui/Overwrite.cmake b/OTRGui/Overwrite.cmake index d3f3c4bcdb1..285a42fce3d 100644 --- a/OTRGui/Overwrite.cmake +++ b/OTRGui/Overwrite.cmake @@ -1,8 +1,13 @@ -file(GLOB_RECURSE _file_list RELATIVE "${src_dir}" "${src_dir}/*") +include(CMakePrintHelpers) + +string(REPLACE "\\ " " " sources_dir "${src_dir}") +string(REPLACE "\\ " " " destination_dir "${dst_dir}") + +file(GLOB_RECURSE _file_list RELATIVE "${sources_dir}" "${sources_dir}/*") foreach( each_file ${_file_list} ) - set(destinationfile "${dst_dir}/${each_file}") - set(sourcefile "${src_dir}/${each_file}") + set(destinationfile "${destination_dir}/${each_file}") + set(sourcefile "${sources_dir}/${each_file}") if(NOT EXISTS ${destinationfile} OR ${sourcefile} IS_NEWER_THAN ${destinationfile}) get_filename_component(destinationdir ${destinationfile} DIRECTORY) file(COPY ${sourcefile} DESTINATION ${destinationdir}) From 92080e2ba0cf610f5272b36c6aa4b81b1164ae06 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:06:43 +0200 Subject: [PATCH 009/155] fix dependencies; add language standard --- ZAPDTR/ZAPD/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 9265f5a4196..0bef8ecb82e 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -1,5 +1,8 @@ set(PROJECT_NAME ZAPD) +set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") +set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") + ################################################################################ # Source groups ################################################################################ @@ -341,7 +344,6 @@ if(MSVC) /Gy > /permissive-; - /std:c++17; /sdl; /W3; ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; @@ -350,7 +352,6 @@ if(MSVC) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") target_compile_options(${PROJECT_NAME} PRIVATE $<$: - /std:c++17; /Od > $<$: @@ -427,14 +428,16 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "ZAPDUtils;" "-WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib" "libultraship;" - PNG::PNG ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS64.lib + PNG::PNG ) endif() else() find_package(BZip2 REQUIRED) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) + find_package(X11 REQUIRED) + find_package(SDL2) set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" -Wl,--whole-archive ${PROJECT_BINARY_DIR}/OTRExporter/libOTRExporter.a -Wl,--no-whole-archive From 75bf1d4f3b6dde3599412cc066061bbb4cbf88b4 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 4 Jun 2022 13:07:26 +0200 Subject: [PATCH 010/155] correct dependencies; add floating options for Linux --- soh/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 270d94d2930..56f511075f7 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1630,6 +1630,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") -Wno-narrowing $<$:-Wno-deprecated-enum-enum-conversion> -pthread + -msse2 -mfpmath=sse ) target_link_options(${PROJECT_NAME} PRIVATE @@ -1653,12 +1654,20 @@ endif() ################################################################################ # Dependencies ################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +add_dependencies(${PROJECT_NAME} + ZAPDUtils + libultraship +) +else() add_dependencies(${PROJECT_NAME} ZAPDUtils libultraship storm glew_s ) +endif() + find_library(SDL2_LIB SDL2) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") From 978b3ecf5592e1fae391fa389f49dec449e5de7f Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 19 Jun 2022 14:22:45 +0200 Subject: [PATCH 011/155] sync with main repo --- OTRExporter/CMakeLists.txt | 4 +--- OTRExporter/OTRExporter/CMakeLists.txt | 5 +++++ ZAPDTR/ZAPD/CMakeLists.txt | 8 +++++++- ZAPDTR/ZAPDUtils/CMakeLists.txt | 2 ++ libultraship/libultraship/CMakeLists.txt | 7 +++++++ soh/CMakeLists.txt | 7 +++++-- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 39e2f344ba8..7ae0cc649e1 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -80,9 +80,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") -add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) -endif() +add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index 03fac4438a7..1ce1e242bd3 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -5,6 +5,7 @@ set(PROJECT_NAME OTRExporter) ################################################################################ set(Header_Files "AnimationExporter.h" + "AudioExporter.h" "ArrayExporter.h" "BackgroundExporter.h" "BlobExporter.h" @@ -32,6 +33,7 @@ source_group("Header Files" FILES ${Header_Files}) set(Source_Files "AnimationExporter.cpp" "ArrayExporter.cpp" + "AudioExporter.cpp" "BackgroundExporter.cpp" "BlobExporter.cpp" "CollisionExporter.cpp" @@ -113,6 +115,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_CRT_SECURE_NO_WARNINGS;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -127,6 +130,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_CONSOLE;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) endif() endif() @@ -156,6 +160,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../libultraship/libultraship ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 + ${PROJECT_SOURCE_DIR}/../StormLib/src . ) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 0bef8ecb82e..baf6544ec91 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -59,6 +59,7 @@ set(Header_Files__Z64 "OtherStructs/SkinLimbStructs.h" "Overlays/ZOverlay.h" "ZAnimation.h" + "ZAudio.h" "ZArray.h" "ZBackground.h" "ZBlob.h" @@ -166,6 +167,8 @@ set(Source_Files__Z64 "Overlays/ZOverlay.cpp" "ZAnimation.cpp" "ZArray.cpp" + "ZAudio.cpp" + "ZAudioDecode.cpp" "ZBackground.cpp" "ZBlob.cpp" "ZCollision.cpp" @@ -307,6 +310,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") target_compile_definitions(${PROJECT_NAME} PRIVATE "_CRT_SECURE_NO_WARNINGS;" "_MBCS" + STORMLIB_NO_AUTO_LINK ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -314,6 +318,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_CRT_SECURE_NO_WARNINGS" ">" "_MBCS" + STORMLIB_NO_AUTO_LINK ) endif() endif() @@ -418,6 +423,7 @@ add_dependencies(${PROJECT_NAME} OTRExporter ZAPDUtils libultraship + storm ) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") @@ -428,7 +434,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "ZAPDUtils;" "-WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib" "libultraship;" - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS64.lib + storm PNG::PNG ) endif() diff --git a/ZAPDTR/ZAPDUtils/CMakeLists.txt b/ZAPDTR/ZAPDUtils/CMakeLists.txt index 5c9cd87e4c6..73e10700e58 100644 --- a/ZAPDTR/ZAPDUtils/CMakeLists.txt +++ b/ZAPDTR/ZAPDUtils/CMakeLists.txt @@ -106,6 +106,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") ">" "_CONSOLE;" "_CRT_SECURE_NO_WARNINGS" + STORMLIB_NO_AUTO_LINK ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -120,6 +121,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_CRT_SECURE_NO_WARNINGS;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) endif() endif() diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 1c110770d0e..ecb6d936bf4 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -6,6 +6,7 @@ set(PROJECT_NAME libultraship) set(Header_Files__Resources__Factories "Factories/AnimationFactory.h" "Factories/ArrayFactory.h" + "Factories/AudioFactory.h" "Factories/BlobFactory.h" "Factories/CollisionHeaderFactory.h" "Factories/CutsceneFactory.h" @@ -26,6 +27,7 @@ source_group("Header Files\\Resources\\Factories" FILES ${Header_Files__Resource set(Header_Files__Resources__Files "Animation.h" "Array.h" + "Audio.h" "Blob.h" "CollisionHeader.h" "Cutscene.h" @@ -244,6 +246,7 @@ source_group("Source Files\\Resources" FILES ${Source_Files__Resources}) set(Source_Files__Resources__Factories "Factories/AnimationFactory.cpp" "Factories/ArrayFactory.cpp" + "Factories/AudioFactory.cpp" "Factories/BlobFactory.cpp" "Factories/CollisionHeaderFactory.cpp" "Factories/CutsceneFactory.cpp" @@ -265,6 +268,7 @@ source_group("Source Files\\Resources\\Factories" FILES ${Source_Files__Resource set(Source_Files__Resources__Files "Animation.cpp" "Array.cpp" + "Audio.cpp" "Blob.cpp" "CollisionHeader.cpp" "Cutscene.cpp" @@ -389,6 +393,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "ENABLE_OPENGL;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -407,6 +412,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "%(PreprocessorDefinitions)GLEW_STATIC;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) endif() endif() @@ -433,6 +439,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/ ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + ${PROJECT_SOURCE_DIR}/../StormLib/src . ) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 56f511075f7..422b90c880c 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -85,10 +85,9 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew) set_target_properties(glew PROPERTIES EXCLUDE_FROM_ALL TRUE) - -add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) endif() +add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) @@ -163,6 +162,7 @@ set(Header_Files__soh__Enhancements source_group("Header Files\\soh\\Enhancements" FILES ${Header_Files__soh__Enhancements}) set(Header_Files__soh__Enhancements__debugger + "soh/Enhancements/debugger/actorViewer.h" "soh/Enhancements/debugger/colViewer.h" "soh/Enhancements/debugger/debugger.h" "soh/Enhancements/debugger/debugSaveEditor.h" @@ -196,6 +196,7 @@ set(Source_Files__soh__Enhancements source_group("Source Files\\soh\\Enhancements" FILES ${Source_Files__soh__Enhancements}) set(Source_Files__soh__Enhancements__debugger + "soh/Enhancements/debugger/actorViewer.cpp" "soh/Enhancements/debugger/colViewer.cpp" "soh/Enhancements/debugger/debugger.cpp" "soh/Enhancements/debugger/debugSaveEditor.cpp" @@ -1511,6 +1512,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "%(PreprocessorDefinitions)GLEW_STATIC;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -1529,6 +1531,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "_CONSOLE;" "UNICODE;" "_UNICODE" + STORMLIB_NO_AUTO_LINK ) endif() endif() From 209844ab0a94f72fb050f80fe174847101efe77e Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 22 Jun 2022 10:51:44 +0200 Subject: [PATCH 012/155] add CMakeLists.txt --- StormLib/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/StormLib/CMakeLists.txt b/StormLib/CMakeLists.txt index 243dea5782e..3278603ab42 100644 --- a/StormLib/CMakeLists.txt +++ b/StormLib/CMakeLists.txt @@ -1,8 +1,9 @@ -project(StormLib) +set(PROJECT_NAME StormLib) +#project(StormLib) cmake_minimum_required(VERSION 3.10) set(LIBRARY_NAME storm) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -333,6 +334,38 @@ if(WIN32) set_target_properties(${LIBRARY_NAME} PROPERTIES OUTPUT_NAME "StormLib") endif() +use_props(${LIBRARY_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") + +################################################################################ +# MSVC runtime library +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${LIBRARY_NAME} PROPERTY MSVC_RUNTIME_LIBRARY) + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreadedDebug + > + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + ) + endif() + set_target_properties(${LIBRARY_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR}) +endif() + + target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS}) target_compile_definitions(${LIBRARY_NAME} INTERFACE STORMLIB_NO_AUTO_LINK) #CMake will take care of the linking target_include_directories(${LIBRARY_NAME} PUBLIC src/) From 8c1651a68fb59d3f4e31cdeb1a032c3792052f11 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 19 Jun 2022 14:42:22 +0200 Subject: [PATCH 013/155] fix stormlib --- OTRGui/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 9a3434b281e..0ef2344724a 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -22,10 +22,7 @@ add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) add_subdirectory(../OTRExporter/OTRExporter ${CMAKE_BINARY_DIR}/OTRExporter) - -if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") -add_subdirectory(../external/StormLib ${CMAKE_BINARY_DIR}/StormLib) -endif() +add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) file(GLOB_RECURSE HEADERS src/*.h) file(GLOB_RECURSE SOURCES src/*.cpp) From 71873f2a4507556e3a03a2e148bfd9eb4edd1f76 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 19 Jun 2022 14:57:39 +0200 Subject: [PATCH 014/155] fix stormlib --- soh/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 422b90c880c..ce21e304dba 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1661,6 +1661,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") add_dependencies(${PROJECT_NAME} ZAPDUtils libultraship + storm ) else() add_dependencies(${PROJECT_NAME} @@ -1685,6 +1686,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "SDL2main;" "glfw3dll;" "glew32s;" + "storm;" "winmm;" "imm32;" "version;" @@ -1701,7 +1703,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "SDL2main;" "glfw3dll;" "glew32s;" - "StormLibRUS32;" + "storm;" "winmm;" "imm32;" "version;" From ccb90c57a259f3430bfbe101cfca001fd8efd0c0 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 22 Jun 2022 11:02:42 +0200 Subject: [PATCH 015/155] add SaveManager --- soh/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index ce21e304dba..99961e5681a 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -172,18 +172,20 @@ source_group("Header Files\\soh\\Enhancements\\debugger" FILES ${Header_Files__s set(Source_Files__soh "soh/GbiWrap.cpp" - "soh/gu_pc.c" + "soh/OTRAudio.h" "soh/OTRGlobals.cpp" "soh/OTRGlobals.h" + "soh/SaveManager.h" + "soh/SaveManager.cpp" + "soh/frame_interpolation.h" + "soh/frame_interpolation.cpp" + "soh/gu_pc.c" "soh/stubs.c" - "soh/util.h" - "soh/util.cpp" + "soh/util.h" + "soh/util.cpp" "soh/z_message_OTR.cpp" "soh/z_play_otr.cpp" "soh/z_scene_otr.cpp" - "soh/OTRAudio.h" - "soh/frame_interpolation.h" - "soh/frame_interpolation.cpp" ) source_group("Source Files\\soh" FILES ${Source_Files__soh}) From 16dceb8bbf2f5e1b6ccedf4bb65b45846d6381d0 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 23 Jun 2022 07:27:30 +0200 Subject: [PATCH 016/155] remove git clone StormLib --- BUILDING-cmake.md | 1 - 1 file changed, 1 deletion(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index d9c17701d78..a70452a1c6a 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -37,7 +37,6 @@ using native build (not docker) ~~~ cd ShipWright -git clone https://github.com/ladislav-zezula/StormLib external/StormLib git clone https://github.com/Perlmint/glew-cmake.git external/glew ~~~ From 28c05ef3a4904962339a209859c137759e43389c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 23 Jun 2022 11:55:08 +0200 Subject: [PATCH 017/155] enable Clang (first step) --- OTRExporter/OTRExporter/CMakeLists.txt | 2 +- libultraship/libultraship/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index 1ce1e242bd3..81105deb06c 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -135,7 +135,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$:" "_DEBUG" diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index ecb6d936bf4..f974910684b 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -417,7 +417,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$:" "_DEBUG" From 71eb54d0cbd8a2db2d9c4dbb9ddf4a4411b3c9c6 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:47:12 +0200 Subject: [PATCH 018/155] Fix cmake files for macos --- BUILDING-cmake.md | 22 ++++++ ZAPDTR/ZAPD/CMakeLists.txt | 29 ++++++- libultraship/libultraship/CMakeLists.txt | 2 +- .../libultraship/Lib/Fast3D/gfx_opengl.cpp | 2 +- libultraship/libultraship/SDLAudioPlayer.h | 4 - libultraship/libultraship/SDLController.h | 4 - libultraship/libultraship/Window.cpp | 4 - soh/CMake/Mac-gnu-toolchain.cmake | 10 +++ soh/CMakeLists.txt | 77 +++++++++++++++---- 9 files changed, 120 insertions(+), 34 deletions(-) create mode 100644 soh/CMake/Mac-gnu-toolchain.cmake diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index a70452a1c6a..3a7daa1edd8 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -63,3 +63,25 @@ cmake -H. -Bbuild-cmake -GNinja -DOpenGL_GL_PREFERENCE="GLVND" -DCMAKE_BUILD_TYP cmake --build build-cmake cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor ~~~ + +macOS (M1): + +using native build (not docker) +(will be built with below cmake commands) - no extra build needed + +~~~ +cd OTRExporter + +# change the path to ZAPD in extract_assets.py +sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD.out%" < extract_assets.py > extract_assets_cmake.py +chmod +x extract_assets_cmake.py + +cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=../soh/CMake/Mac-gnu-toolchain.cmake +cmake --build build-cmake + +./extract_assets_cmake.py + +cd ../soh +cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=CMake/Mac-gnu-toolchain.cmake +cmake --build build-cmake +~~~ diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index baf6544ec91..5dbc34f6706 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -409,10 +409,16 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") -pthread ) - target_link_options(${PROJECT_NAME} PRIVATE - -pthread - -Wl,-export-dynamic - ) + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + target_link_options(${PROJECT_NAME} PRIVATE + -pthread + ) + else() + target_link_options(${PROJECT_NAME} PRIVATE + -pthread + -Wl,-export-dynamic + ) + endif() endif() @@ -438,6 +444,21 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") PNG::PNG ) endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_package(BZip2 REQUIRED) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + find_package(SDL2) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "ZAPDUtils;" + -Wl,-force_load ${PROJECT_BINARY_DIR}/OTRExporter/libOTRExporter.a + "libultraship;" + storm + PNG::PNG + BZip2::BZip2 + ${CMAKE_DL_LIBS} + Threads::Threads + ) else() find_package(BZip2 REQUIRED) set(THREADS_PREFER_PTHREAD_FLAG ON) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index f974910684b..d5170a0b1d6 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -61,7 +61,7 @@ set(Source_Files__Audio__Windows "WasapiAudioPlayer.cpp" "WasapiAudioPlayer.h" ) -else() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(Source_Files__Audio__Linux "PulseAudioPlayer.cpp" "PulseAudioPlayer.h" diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp index 3d199ef7140..7b70ba11b0c 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_opengl.cpp @@ -29,7 +29,7 @@ #define GL_GLEXT_PROTOTYPES 1 #include "SDL_opengl.h" #elif __APPLE__ -#include +#include #include #elif __SWITCH__ #include diff --git a/libultraship/libultraship/SDLAudioPlayer.h b/libultraship/libultraship/SDLAudioPlayer.h index 0bb6d3665f1..05e4befd3d7 100644 --- a/libultraship/libultraship/SDLAudioPlayer.h +++ b/libultraship/libultraship/SDLAudioPlayer.h @@ -1,10 +1,6 @@ #pragma once #include "AudioPlayer.h" -#if __APPLE__ -#include -#else #include -#endif namespace Ship { class SDLAudioPlayer : public AudioPlayer { diff --git a/libultraship/libultraship/SDLController.h b/libultraship/libultraship/SDLController.h index e5d24c946e8..b5005e32378 100644 --- a/libultraship/libultraship/SDLController.h +++ b/libultraship/libultraship/SDLController.h @@ -1,10 +1,6 @@ #pragma once #include "Controller.h" -#if __APPLE__ -#include -#else #include -#endif namespace Ship { class SDLController : public Controller { diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index 9c11f2d6d5c..44a78131cfd 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -18,11 +18,7 @@ #include "Lib/Fast3D/gfx_sdl.h" #include "Lib/Fast3D/gfx_opengl.h" #include "stox.h" -#if __APPLE__ -#include -#else #include -#endif #include #include #include diff --git a/soh/CMake/Mac-gnu-toolchain.cmake b/soh/CMake/Mac-gnu-toolchain.cmake new file mode 100644 index 00000000000..b4f27a2a06b --- /dev/null +++ b/soh/CMake/Mac-gnu-toolchain.cmake @@ -0,0 +1,10 @@ +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER gcc) +set(CMAKE_CXX_COMPILER g++) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 99961e5681a..59bdcc7c639 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -82,7 +82,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") +if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew) set_target_properties(glew PROPERTIES EXCLUDE_FROM_ALL TRUE) endif() @@ -1624,24 +1624,44 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - target_compile_options(${PROJECT_NAME} PRIVATE - -Wall -Wextra -Wno-error - -Wno-unused-parameter - -Wno-unused-function - -Wno-unused-variable - -Wno-missing-field-initializers - -Wno-parentheses - -Wno-narrowing - $<$:-Wno-deprecated-enum-enum-conversion> +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + -fpermissive + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread + ) + + target_link_options(${PROJECT_NAME} PRIVATE -pthread - -msse2 -mfpmath=sse - ) + ) + else() + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + -fpermissive + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread + -msse2 -mfpmath=sse + ) - target_link_options(${PROJECT_NAME} PRIVATE + target_link_options(${PROJECT_NAME} PRIVATE -pthread -Wl,-export-dynamic ) + endif() endif() ################################################################################ # Pre build events @@ -1665,6 +1685,12 @@ add_dependencies(${PROJECT_NAME} libultraship storm ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +add_dependencies(${PROJECT_NAME} + ZAPDUtils + libultraship + storm +) else() add_dependencies(${PROJECT_NAME} ZAPDUtils @@ -1674,7 +1700,11 @@ add_dependencies(${PROJECT_NAME} ) endif() +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +find_library(SDL2_LIB SDL2 GLEW) +else() find_library(SDL2_LIB SDL2) +endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") @@ -1712,11 +1742,26 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "setupapi" ) endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_package(SDL2) + find_package(GLEW) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "libultraship;" + "ZAPDUtils;" + "storm;" + SDL2::SDL2 + GLEW::GLEW + ${OPENGL_opengl_LIBRARY} + ${CMAKE_DL_LIBS} + Threads::Threads + ) else() find_package(SDL2) find_package(PulseAudio) -set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) set(ADDITIONAL_LIBRARY_DEPENDENCIES "libultraship;" "ZAPDUtils;" From f5dd34aa6f5514488fab0c979c5fb29f137cef9a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 26 Jun 2022 11:40:58 +0200 Subject: [PATCH 019/155] fix Windows build --- StormLib/CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/StormLib/CMakeLists.txt b/StormLib/CMakeLists.txt index 3278603ab42..762b826940e 100644 --- a/StormLib/CMakeLists.txt +++ b/StormLib/CMakeLists.txt @@ -336,6 +336,42 @@ endif() use_props(${LIBRARY_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +################################################################################ +# Compile definitions +################################################################################ + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_compile_definitions(${LIBRARY_NAME} PRIVATE + "$<$:" + "_DEBUG;" + "_CRT_SECURE_NO_WARNINGS;" + ">" + "$<$:" + "NDEBUG" + ">" + WIN32 + _LIB + "UNICODE;" + "_UNICODE" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_compile_definitions(${LIBRARY_NAME} PRIVATE + "$<$:" + "_DEBUG;" + "_CRT_SECURE_NO_WARNINGS;" + ">" + "$<$:" + "NDEBUG;" + ">" + "WIN32;" + _LIB + "UNICODE;" + "_UNICODE" + ) + endif() +endif() + ################################################################################ # MSVC runtime library ################################################################################ From 48306bae7e9662f2c60f4d96604bd9708006a800 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 26 Jun 2022 11:41:39 +0200 Subject: [PATCH 020/155] cleanup --- OTRExporter/OTRExporter/CMakeLists.txt | 6 +----- ZAPDTR/ZAPD/CMakeLists.txt | 2 +- libultraship/libultraship/CMakeLists.txt | 9 ++++++++- soh/CMake/Linux32bit-toolchain.cmake | 3 --- soh/CMakeLists.txt | 16 ++++++++-------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index 81105deb06c..ca062afc571 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -5,8 +5,8 @@ set(PROJECT_NAME OTRExporter) ################################################################################ set(Header_Files "AnimationExporter.h" - "AudioExporter.h" "ArrayExporter.h" + "AudioExporter.h" "BackgroundExporter.h" "BlobExporter.h" "CollisionExporter.h" @@ -172,7 +172,6 @@ if(MSVC) /Gy > /permissive-; - /std:c++17; /sdl; /W3; ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; @@ -180,9 +179,6 @@ if(MSVC) ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86") target_compile_options(${PROJECT_NAME} PRIVATE - $<$: - /std:c++17 - > $<$: /Oi; /Gy diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 5dbc34f6706..c55b38f75ee 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -59,8 +59,8 @@ set(Header_Files__Z64 "OtherStructs/SkinLimbStructs.h" "Overlays/ZOverlay.h" "ZAnimation.h" - "ZAudio.h" "ZArray.h" + "ZAudio.h" "ZBackground.h" "ZBlob.h" "ZCollision.h" diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index d5170a0b1d6..d937c7e2f66 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -15,6 +15,7 @@ set(Header_Files__Resources__Factories "Factories/MtxFactory.h" "Factories/PathFactory.h" "Factories/PlayerAnimationFactory.h" + "Factories/ResourceLoader.h" "Factories/SceneFactory.h" "Factories/SkeletonFactory.h" "Factories/SkeletonLimbFactory.h" @@ -32,7 +33,6 @@ set(Header_Files__Resources__Files "CollisionHeader.h" "Cutscene.h" "DisplayList.h" - "Factories/ResourceLoader.h" "Material.h" "Matrix.h" "Model.h" @@ -210,6 +210,12 @@ set(Source_Files__Lib__stb ) source_group("Source Files\\Lib\\stb" FILES ${Source_Files__Lib__stb}) +set(Source_Files__Lib__dr_libs + "Lib/dr_libs/mp3.h" + "Lib/dr_libs/wav.h" +) +source_group("Source Files\\Lib\\dr_libs" FILES ${Source_Files__Lib__dr_libs}) + set(Source_Files__Lib__tinyxml2 "Lib/tinyxml2/tinyxml2.h" ) @@ -314,6 +320,7 @@ set(ALL_FILES ${Source_Files__Lib__ImGui} ${Source_Files__Lib__ImGui__Windows} ${Source_Files__Lib__stb} + ${Source_Files__Lib__dr_libs} ${Source_Files__Lib__tinyxml2} ${Source_Files__Logging} ${Source_Files__ModManager} diff --git a/soh/CMake/Linux32bit-toolchain.cmake b/soh/CMake/Linux32bit-toolchain.cmake index 9dfb1e43771..824f632630a 100644 --- a/soh/CMake/Linux32bit-toolchain.cmake +++ b/soh/CMake/Linux32bit-toolchain.cmake @@ -1,6 +1,3 @@ -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Linux) - # which compilers to use for C and C++ set(CMAKE_C_COMPILER gcc) set(CMAKE_C_FLAGS "-m32") diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 59bdcc7c639..9c49cd6ed65 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -156,8 +156,8 @@ set(Header_Files__soh__Enhancements #"soh/Enhancements/cvar.h" "soh/Enhancements/debugconsole.h" "soh/Enhancements/gameconsole.h" - "soh/Enhancements/savestates.h" - "soh/Enhancements/savestates_extern.inc" + "soh/Enhancements/savestates.h" + "soh/Enhancements/savestates_extern.inc" ) source_group("Header Files\\soh\\Enhancements" FILES ${Header_Files__soh__Enhancements}) @@ -193,7 +193,7 @@ set(Source_Files__soh__Enhancements "soh/Enhancements/bootcommands.c" "soh/Enhancements/debugconsole.cpp" "soh/Enhancements/gameconsole.c" - "soh/Enhancements/savestates.cpp" + "soh/Enhancements/savestates.cpp" ) source_group("Source Files\\soh\\Enhancements" FILES ${Source_Files__soh__Enhancements}) @@ -1799,11 +1799,11 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_property(TARGET glew32s PROPERTY IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x86/glew32s.lib) - add_library(StormLibRUS32 STATIC IMPORTED ) - set_property(TARGET StormLibRUS32 PROPERTY - IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) - set_property(TARGET StormLibRUS32 PROPERTY - IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) + #add_library(StormLibRUS32 STATIC IMPORTED ) + # set_property(TARGET StormLibRUS32 PROPERTY + # IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) + # set_property(TARGET StormLibRUS32 PROPERTY + # IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") From 46a2ca7c07289ce1126950d456416f91765dbf3c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 27 Jun 2022 11:37:29 +0200 Subject: [PATCH 021/155] cleanup --- StormLib/CMakeLists.txt | 8 +++++ libultraship/libultraship/CMakeLists.txt | 44 ++++++++++++++---------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/StormLib/CMakeLists.txt b/StormLib/CMakeLists.txt index 762b826940e..15bc32443a0 100644 --- a/StormLib/CMakeLists.txt +++ b/StormLib/CMakeLists.txt @@ -16,6 +16,13 @@ option(STORM_BUILD_TESTS # "BUILD_TESTING" OFF # Stay coherent with CTest variables ) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +set(Source_Files__Windows + src/lzma/C/LzFindMt.c + src/lzma/C/Threads.c +) +endif() + set(SRC_FILES src/adpcm/adpcm.cpp src/huffman/huff.cpp @@ -47,6 +54,7 @@ set(SRC_FILES src/SFileVerify.cpp src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c src/libtomcrypt/src/misc/crypt_libc.c + ${Source_Files__Windows} ) if(MSVC) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index d937c7e2f66..7e5bcfe6618 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -57,18 +57,18 @@ set(Source_Files__Audio ) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") -set(Source_Files__Audio__Windows +set(Source_Files__Audio__extra "WasapiAudioPlayer.cpp" "WasapiAudioPlayer.h" ) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") -set(Source_Files__Audio__Linux +else() +set(Source_Files__Audio__extra "PulseAudioPlayer.cpp" "PulseAudioPlayer.h" ) endif () -source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__Windows} ${Source_Files__Audio__Linux}) +source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__extra}) set(Source_Files__Config "ConfigFile.cpp" @@ -153,17 +153,6 @@ source_group("Source Files\\Lib" FILES ${Source_Files__Lib}) set(Source_Files__Lib__Fast3D "Lib/Fast3D/gfx_cc.cpp" "Lib/Fast3D/gfx_cc.h" - "Lib/Fast3D/gfx_direct3d11.cpp" - "Lib/Fast3D/gfx_direct3d11.h" - "Lib/Fast3D/gfx_direct3d12.cpp" - "Lib/Fast3D/gfx_direct3d12.h" - "Lib/Fast3D/gfx_direct3d12_guids.h" - "Lib/Fast3D/gfx_direct3d_common.cpp" - "Lib/Fast3D/gfx_direct3d_common.h" - "Lib/Fast3D/gfx_dxgi.cpp" - "Lib/Fast3D/gfx_dxgi.h" - "Lib/Fast3D/gfx_glx.cpp" - "Lib/Fast3D/gfx_glx.h" "Lib/Fast3D/gfx_opengl.cpp" "Lib/Fast3D/gfx_opengl.h" "Lib/Fast3D/gfx_pc.cpp" @@ -176,6 +165,25 @@ set(Source_Files__Lib__Fast3D ) source_group("Source Files\\Lib\\Fast3D" FILES ${Source_Files__Lib__Fast3D}) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +set(Source_Files__Lib__Fast3D__extra + "Lib/Fast3D/gfx_direct3d11.cpp" + "Lib/Fast3D/gfx_direct3d11.h" + "Lib/Fast3D/gfx_direct3d12.cpp" + "Lib/Fast3D/gfx_direct3d12.h" + "Lib/Fast3D/gfx_direct3d12_guids.h" + "Lib/Fast3D/gfx_direct3d_common.cpp" + "Lib/Fast3D/gfx_direct3d_common.h" + "Lib/Fast3D/gfx_dxgi.cpp" + "Lib/Fast3D/gfx_dxgi.h" +) +else() +set(Source_Files__Lib__Fast3D__extra + "Lib/Fast3D/gfx_glx.cpp" + "Lib/Fast3D/gfx_glx.h" +endif() +source_group("Source Files\\Lib\\Fast3D\\extra" FILES ${Source_Files__Lib__Fast3D__extra}) + set(Source_Files__Lib__ImGui "Lib/ImGui/backends/imgui_impl_opengl3.cpp" "Lib/ImGui/backends/imgui_impl_opengl3.h" @@ -305,8 +313,7 @@ set(ALL_FILES ${Header_Files__Resources__Factories} ${Header_Files__Resources__Files} ${Source_Files__Audio} - ${Source_Files__Audio__Windows} - ${Source_Files__Audio__Linux} + ${Source_Files__Audio__extra} ${Source_Files__Config} ${Source_Files__Controller} ${Source_Files__Controller__Attachment} @@ -317,8 +324,9 @@ set(ALL_FILES ${Source_Files__Globals} ${Source_Files__Lib} ${Source_Files__Lib__Fast3D} + ${Source_Files__Lib__Fast3D__extra} ${Source_Files__Lib__ImGui} - ${Source_Files__Lib__ImGui__Windows} + ${Source_Files__Lib__ImGui__Windows} ${Source_Files__Lib__stb} ${Source_Files__Lib__dr_libs} ${Source_Files__Lib__tinyxml2} From 9b1b383a91f1589daccbba2b11e181a4267ac0e6 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 27 Jun 2022 11:40:36 +0200 Subject: [PATCH 022/155] fix typo --- libultraship/libultraship/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 7e5bcfe6618..5c5c1bb54ec 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -181,6 +181,7 @@ else() set(Source_Files__Lib__Fast3D__extra "Lib/Fast3D/gfx_glx.cpp" "Lib/Fast3D/gfx_glx.h" +) endif() source_group("Source Files\\Lib\\Fast3D\\extra" FILES ${Source_Files__Lib__Fast3D__extra}) From c5410095a910cd277fc8f23e0d35e88aba224135 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Tue, 28 Jun 2022 06:38:50 +0200 Subject: [PATCH 023/155] add Linux to Fast3D extra --- libultraship/libultraship/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 5c5c1bb54ec..12da2f8a95c 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -177,7 +177,7 @@ set(Source_Files__Lib__Fast3D__extra "Lib/Fast3D/gfx_dxgi.cpp" "Lib/Fast3D/gfx_dxgi.h" ) -else() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") set(Source_Files__Lib__Fast3D__extra "Lib/Fast3D/gfx_glx.cpp" "Lib/Fast3D/gfx_glx.h" From 12a396deaac03aa04551a4d71976b7ab7a16fc49 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Tue, 28 Jun 2022 07:38:35 +0200 Subject: [PATCH 024/155] renamed some files --- libultraship/libultraship/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 12da2f8a95c..a234f5a9ee3 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -102,10 +102,10 @@ set(Source_Files__CustomImpl "GameOverlay.h" "GameSettings.cpp" "GameSettings.h" - "SohConsole.cpp" - "SohConsole.h" - "SohImGuiImpl.cpp" - "SohImGuiImpl.h" + "Console.cpp" + "Console.h" + "ImGuiImpl.cpp" + "ImGuiImpl.h" ) source_group("Source Files\\CustomImpl" FILES ${Source_Files__CustomImpl}) @@ -116,8 +116,8 @@ set(Source_Files__CustomImpl__Environment source_group("Source Files\\CustomImpl\\Environment" FILES ${Source_Files__CustomImpl__Environment}) set(Source_Files__CustomImpl__Hooks - "SohHooks.cpp" - "SohHooks.h" + "Hooks.cpp" + "Hooks.h" ) source_group("Source Files\\CustomImpl\\Hooks" FILES ${Source_Files__CustomImpl__Hooks}) From ff89a32673f00f743597ae87df2adb58e17c609a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 06:42:10 +0200 Subject: [PATCH 025/155] more cleanup --- OTRExporter/CMakeLists.txt | 26 +++++++++++--- OTRExporter/OTRExporter/CMakeLists.txt | 14 ++++---- OTRGui/CMakeLists.txt | 45 ++++++++++++++++-------- ZAPDTR/ZAPD/CMakeLists.txt | 12 +++---- libultraship/libultraship/CMakeLists.txt | 14 ++++---- soh/CMakeLists.txt | 16 ++++++--- 6 files changed, 84 insertions(+), 43 deletions(-) diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 7ae0cc649e1..8443e04e938 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -80,8 +80,26 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) -add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) -add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) -add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +if (NOT TARGET storm) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib)^M +endif() + +if (NOT TARGET libultraship) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship)^M +endif() + +if (NOT TARGET ZAPD) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD)^M +endif() + +if (NOT TARGET ZAPDUtils) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)^M +endif() + add_subdirectory(OTRExporter) + +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/extract_assets.py filedata) +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "build-cmake/ZAPD/ZAPD.out" filedata "${filedata}") +file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake.py" "${filedata}") +file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index ca062afc571..90b53c0a02c 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -154,13 +154,13 @@ endif() ################################################################################ target_include_directories(${PROJECT_NAME} PRIVATE - ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPD/ - ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils - ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/tinyxml2 - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 - ${PROJECT_SOURCE_DIR}/../StormLib/src + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPD/ + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2 + ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship + ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship/Lib/spdlog/include + ${CMAKE_CURRENT_SOURCE_DIR}/../../libultraship/libultraship/Lib/Fast3D/U64 + ${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src . ) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 0ef2344724a..f501c8ead98 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -6,33 +6,50 @@ set(CMAKE_CXX_STANDARD 20) #set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build) set(APP_ICON_RESOURCE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/appicon.rc) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(OpenGL_GL_PREFERENCE "GLVND") +endif() + include(CMake/Utils.cmake) -add_subdirectory(libs/raylib) +add_subdirectory(libs/raylib EXCLUDE_FROM_ALL) include_directories(src) include_directories(src/game) include_directories(include) -#include_external_msproject(ZAPD ../../ZAPDTR/ZAPD/ZAPD.vcproj) -#include_external_msproject(ZAPDUtils ../../ZAPDTR/ZAPDUtils/ZAPDUtils.vcproj) -#include_external_msproject(libultraship ../../libultraship/libultraship/libultraship.vcproj) -#include_external_msproject(OTRExporter ../../OTRExporter/OTRExporter/OTRExporter.vcproj) -add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) -add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) -add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) -add_subdirectory(../OTRExporter/OTRExporter ${CMAKE_BINARY_DIR}/OTRExporter) -add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) +if (NOT TARGET libultraship) + add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +endif() +if (NOT TARGET ZAPD) + add_subdirectory(../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) +endif() +if (NOT TARGET ZAPDUtils) + add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +endif() +if (NOT TARGET OTRExporter) + add_subdirectory(../OTRExporter/OTRExporter ${CMAKE_BINARY_DIR}/OTRExporter) +endif() +if (NOT TARGET storm) + add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) +endif() file(GLOB_RECURSE HEADERS src/*.h) file(GLOB_RECURSE SOURCES src/*.cpp) file(GLOB_RECURSE C_SOURCES src/*.c) add_executable(${PROJECT_NAME} ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) -add_custom_target(Assets1 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_target(Assets2 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_target(Assets3 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") - +add_custom_target(Assets1 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets2 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets3 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") + add_dependencies(${PROJECT_NAME} Assets1 Assets2 Assets3) target_link_libraries(${PROJECT_NAME} PUBLIC raylib) + +INSTALL(TARGETS OTRGui DESTINATION bin) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets + DESTINATION bin +) ++INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out DESTINATION bin/assets/extractor) + diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index c55b38f75ee..28db02f6894 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -330,9 +330,9 @@ endif() find_package(PNG REQUIRED) target_include_directories(${PROJECT_NAME} PRIVATE - ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils - ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/tinyxml2 - ${PROJECT_SOURCE_DIR}/../ZAPDTR/lib/libgfxd + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/tinyxml2 + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/lib/libgfxd ${PNG_PNG_INCLUDE_DIR}/ . ) @@ -438,7 +438,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") #set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib") set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" - "-WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib" + "-WHOLEARCHIVE:$/$" "libultraship;" storm PNG::PNG @@ -451,7 +451,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") find_package(SDL2) set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" - -Wl,-force_load ${PROJECT_BINARY_DIR}/OTRExporter/libOTRExporter.a + -Wl,-force_load $/$ "libultraship;" storm PNG::PNG @@ -467,7 +467,7 @@ else() find_package(SDL2) set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" - -Wl,--whole-archive ${PROJECT_BINARY_DIR}/OTRExporter/libOTRExporter.a -Wl,--no-whole-archive + -Wl,--whole-archive $/$ -Wl,--no-whole-archive "libultraship;" storm PNG::PNG diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index a234f5a9ee3..759e86e7ac7 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -449,13 +449,13 @@ endif() ################################################################################ target_include_directories(${PROJECT_NAME} PRIVATE - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/ - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/ - ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils - ${PROJECT_SOURCE_DIR}/../StormLib/src + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/spdlog/include/ + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/ + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/PR + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/ + ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils + ${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src . ) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 9c49cd6ed65..068dca8a25c 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -83,17 +83,23 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Sub-projects ################################################################################ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") -add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew) + add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) set_target_properties(glew PROPERTIES EXCLUDE_FROM_ALL TRUE) endif() -add_subdirectory(../StormLib ${CMAKE_BINARY_DIR}/StormLib) -add_subdirectory(../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) -add_subdirectory(../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +if (NOT TARGET storm) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) +endif() -set(PROJECT_NAME soh) +if (NOT TARGET libultraship) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +endif() +if (NOT TARGET ZAPDUtils) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +endif() +set(PROJECT_NAME soh) ################################################################################ # Source groups From 856cff5136d36e717491da4f510570a6954fa0d2 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 06:45:31 +0200 Subject: [PATCH 026/155] add install target --- soh/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 068dca8a25c..3ebab7c52fc 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1814,3 +1814,4 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") +INSTALL(TARGETS soh DESTINATION bin) From e5dd950890409d150912dbd2e0872e937c0a0fe5 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 07:48:54 +0200 Subject: [PATCH 027/155] fix typos --- OTRExporter/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 8443e04e938..5759bf62c72 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -81,19 +81,19 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Sub-projects ################################################################################ if (NOT TARGET storm) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib)^M + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib) endif() if (NOT TARGET libultraship) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship)^M + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) endif() if (NOT TARGET ZAPD) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD)^M + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) endif() if (NOT TARGET ZAPDUtils) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils)^M + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) endif() add_subdirectory(OTRExporter) From cdc8d4a79dc7c932bd5f54c69cd581b5bed06e30 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 07:52:49 +0200 Subject: [PATCH 028/155] fix typos --- OTRGui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index f501c8ead98..4c113e17d78 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -51,5 +51,5 @@ INSTALL(TARGETS OTRGui DESTINATION bin) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets DESTINATION bin ) -+INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out DESTINATION bin/assets/extractor) +INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out DESTINATION bin/assets/extractor) From b40bfe65d7a92efe597a6d0a6cf294a61a6eb8fc Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 08:21:38 +0200 Subject: [PATCH 029/155] fix spaces --- libultraship/libultraship/CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 759e86e7ac7..849b56a4225 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -167,20 +167,20 @@ source_group("Source Files\\Lib\\Fast3D" FILES ${Source_Files__Lib__Fast3D}) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set(Source_Files__Lib__Fast3D__extra - "Lib/Fast3D/gfx_direct3d11.cpp" - "Lib/Fast3D/gfx_direct3d11.h" - "Lib/Fast3D/gfx_direct3d12.cpp" - "Lib/Fast3D/gfx_direct3d12.h" - "Lib/Fast3D/gfx_direct3d12_guids.h" - "Lib/Fast3D/gfx_direct3d_common.cpp" - "Lib/Fast3D/gfx_direct3d_common.h" - "Lib/Fast3D/gfx_dxgi.cpp" - "Lib/Fast3D/gfx_dxgi.h" + "Lib/Fast3D/gfx_direct3d11.cpp" + "Lib/Fast3D/gfx_direct3d11.h" + "Lib/Fast3D/gfx_direct3d12.cpp" + "Lib/Fast3D/gfx_direct3d12.h" + "Lib/Fast3D/gfx_direct3d12_guids.h" + "Lib/Fast3D/gfx_direct3d_common.cpp" + "Lib/Fast3D/gfx_direct3d_common.h" + "Lib/Fast3D/gfx_dxgi.cpp" + "Lib/Fast3D/gfx_dxgi.h" ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") set(Source_Files__Lib__Fast3D__extra - "Lib/Fast3D/gfx_glx.cpp" - "Lib/Fast3D/gfx_glx.h" + "Lib/Fast3D/gfx_glx.cpp" + "Lib/Fast3D/gfx_glx.h" ) endif() source_group("Source Files\\Lib\\Fast3D\\extra" FILES ${Source_Files__Lib__Fast3D__extra}) From 833cef4791b7717d0a9730744d67f8a3d2d2e8ec Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 08:24:38 +0200 Subject: [PATCH 030/155] remove Fortran --- soh/CMake/Utils.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/soh/CMake/Utils.cmake b/soh/CMake/Utils.cmake index 9e2f961eba9..5bce7d48814 100644 --- a/soh/CMake/Utils.cmake +++ b/soh/CMake/Utils.cmake @@ -231,4 +231,3 @@ endfunction() # Default properties of visual studio projects ################################################################################ set(DEFAULT_CXX_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultCXX.cmake") -set(DEFAULT_Fortran_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultFortran.cmake") From 9f69eb384140a299ffae96c6830ec4336ecfcb4a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 08:36:21 +0200 Subject: [PATCH 031/155] cleanup --- OTRGui/Overwrite.cmake | 2 +- soh/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/OTRGui/Overwrite.cmake b/OTRGui/Overwrite.cmake index 285a42fce3d..8eeaf6889c5 100644 --- a/OTRGui/Overwrite.cmake +++ b/OTRGui/Overwrite.cmake @@ -12,4 +12,4 @@ foreach( each_file ${_file_list} ) get_filename_component(destinationdir ${destinationfile} DIRECTORY) file(COPY ${sourcefile} DESTINATION ${destinationdir}) endif() -endforeach(each_file) \ No newline at end of file +endforeach(each_file) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 3ebab7c52fc..e1a8651b9b6 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -84,7 +84,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) -set_target_properties(glew PROPERTIES EXCLUDE_FROM_ALL TRUE) endif() if (NOT TARGET storm) From 0ca56959c6ce512b73b93ebeb6b4bc8d1a0a21e2 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 13:40:08 +0200 Subject: [PATCH 032/155] add top-level file --- CMake/Default.cmake | 65 +++++++++ CMake/DefaultCXX.cmake | 12 ++ CMake/Mac-gnu-toolchain.cmake | 10 ++ CMake/Packaging.cmake | 90 ++++++++++++ CMake/Utils.cmake | 248 ++++++++++++++++++++++++++++++++++ CMakeLists.txt | 107 +++++++++++++++ 6 files changed, 532 insertions(+) create mode 100644 CMake/Default.cmake create mode 100644 CMake/DefaultCXX.cmake create mode 100644 CMake/Mac-gnu-toolchain.cmake create mode 100644 CMake/Packaging.cmake create mode 100644 CMake/Utils.cmake create mode 100644 CMakeLists.txt diff --git a/CMake/Default.cmake b/CMake/Default.cmake new file mode 100644 index 00000000000..f4d0ba084be --- /dev/null +++ b/CMake/Default.cmake @@ -0,0 +1,65 @@ +################################################################################ +# Command for variable_watch. This command issues error message, if a variable +# is changed. If variable PROPERTY_READER_GUARD_DISABLED is TRUE nothing happens +# variable_watch( property_reader_guard) +################################################################################ +function(property_reader_guard VARIABLE ACCESS VALUE CURRENT_LIST_FILE STACK) + if("${PROPERTY_READER_GUARD_DISABLED}") + return() + endif() + + if("${ACCESS}" STREQUAL "MODIFIED_ACCESS") + message(FATAL_ERROR + " Variable ${VARIABLE} is not supposed to be changed.\n" + " It is used only for reading target property ${VARIABLE}.\n" + " Use\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}\" \"\")\n" + " or\n" + " set_target_properties(\"\" PROPERTIES \"${VARIABLE}_\" \"\")\n" + " instead.\n") + endif() +endfunction() + +################################################################################ +# Create variable with generator expression that expands to value of +# target property _. If property is empty or not set then property +# is used instead. Variable has watcher property_reader_guard that +# doesn't allow to edit it. +# create_property_reader() +# Input: +# name - Name of watched property and output variable +################################################################################ +function(create_property_reader NAME) + set(PROPERTY_READER_GUARD_DISABLED TRUE) + set(CONFIG_VALUE "$>>>") + set(IS_CONFIG_VALUE_EMPTY "$") + set(GENERAL_VALUE "$>") + set("${NAME}" "$" PARENT_SCOPE) + variable_watch("${NAME}" property_reader_guard) +endfunction() + +################################################################################ +# Set property $_${PROPS_CONFIG_U} of ${PROPS_TARGET} to +# set_config_specific_property( ) +# Input: +# name - Prefix of property name +# value - New value +################################################################################ +function(set_config_specific_property NAME VALUE) + set_target_properties("${PROPS_TARGET}" PROPERTIES "${NAME}_${PROPS_CONFIG_U}" "${VALUE}") +endfunction() + +################################################################################ + +create_property_reader("TARGET_NAME") +create_property_reader("OUTPUT_DIRECTORY") + +set_config_specific_property("TARGET_NAME" "${PROPS_TARGET}") +set_config_specific_property("OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("ARCHIVE_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("LIBRARY_OUTPUT_NAME" "${TARGET_NAME}") +set_config_specific_property("RUNTIME_OUTPUT_NAME" "${TARGET_NAME}") + +set_config_specific_property("ARCHIVE_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("LIBRARY_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") +set_config_specific_property("RUNTIME_OUTPUT_DIRECTORY" "${OUTPUT_DIRECTORY}") \ No newline at end of file diff --git a/CMake/DefaultCXX.cmake b/CMake/DefaultCXX.cmake new file mode 100644 index 00000000000..e87721511d1 --- /dev/null +++ b/CMake/DefaultCXX.cmake @@ -0,0 +1,12 @@ +include("${CMAKE_CURRENT_LIST_DIR}/Default.cmake") + +set_config_specific_property("OUTPUT_DIRECTORY" "${CMAKE_SOURCE_DIR}$<$>:/${CMAKE_VS_PLATFORM_NAME}>/${PROPS_CONFIG}") + +if(MSVC) + create_property_reader("DEFAULT_CXX_EXCEPTION_HANDLING") + create_property_reader("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT") + + set_target_properties("${PROPS_TARGET}" PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set_config_specific_property("DEFAULT_CXX_EXCEPTION_HANDLING" "/EHsc") + set_config_specific_property("DEFAULT_CXX_DEBUG_INFORMATION_FORMAT" "/Zi") +endif() \ No newline at end of file diff --git a/CMake/Mac-gnu-toolchain.cmake b/CMake/Mac-gnu-toolchain.cmake new file mode 100644 index 00000000000..b4f27a2a06b --- /dev/null +++ b/CMake/Mac-gnu-toolchain.cmake @@ -0,0 +1,10 @@ +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER gcc) +set(CMAKE_CXX_COMPILER g++) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake new file mode 100644 index 00000000000..139ed370e52 --- /dev/null +++ b/CMake/Packaging.cmake @@ -0,0 +1,90 @@ +# these are cache variables, so they could be overwritten with -D, + +set(CPACK_PACKAGE_NAME "${PROJECT_NAME}" + CACHE STRING "The resulting package name" +) + +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simple C++ application" + CACHE STRING "Package description for the package metadata" +) +set(CPACK_PACKAGE_VENDOR "Some Company") + +set(CPACK_VERBATIM_VARIABLES YES) + +set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) +SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages") + +#if (CPACK_GENERATOR MATCHES "DEB|RPM") +# https://unix.stackexchange.com/a/11552/254512 +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship")#/${CMAKE_PROJECT_VERSION}") +#endif() + +set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) +set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + +set(CPACK_PACKAGE_CONTACT "YOUR@E-MAIL.net") +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "YOUR NAME") + +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") + +# package name for deb +# if set, then instead of some-application-0.9.2-Linux.deb +# you'll get some-application_0.9.2_amd64.deb (note the underscores too) +#set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) +execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) +set( CPACK_DEBIAN_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-${ARCHITECTURE}.deb ) +# if you want every group to have its own package, +# although the same happens if this is not sent (so it defaults to ONE_PER_GROUP) +# and CPACK_DEB_COMPONENT_INSTALL is set to YES +set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)#ONE_PER_GROUP) +# without this you won't be able to pack only specified component +set(CPACK_DEB_COMPONENT_INSTALL YES) + +set(CPACK_EXTERNAL_ENABLE_STAGING YES) +set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${PROJECT_BINARY_DIR}/appimage-generate.cmake") + +file(GENERATE + OUTPUT "${PROJECT_BINARY_DIR}/appimage-generate.cmake" + CONTENT [[ +include(CMakePrintHelpers) +cmake_print_variables(CPACK_TEMPORARY_DIRECTORY) +cmake_print_variables(CPACK_TOPLEVEL_DIRECTORY) +cmake_print_variables(CPACK_PACKAGE_DIRECTORY) +cmake_print_variables(CPACK_PACKAGE_FILE_NAME) + +find_program(LINUXDEPLOY_EXECUTABLE + NAMES linuxdeploy linuxdeploy-x86_64.AppImage + PATHS ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy) + +if (NOT LINUXDEPLOY_EXECUTABLE) + message(STATUS "Downloading linuxdeploy") + set(LINUXDEPLOY_EXECUTABLE ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/linuxdeploy) + file(DOWNLOAD + https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + ${LINUXDEPLOY_EXECUTABLE} + INACTIVITY_TIMEOUT 10 + LOG ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/download.log + STATUS LINUXDEPLOY_DOWNLOAD) + execute_process(COMMAND chmod +x ${LINUXDEPLOY_EXECUTABLE} COMMAND_ECHO STDOUT) +endif() + +execute_process( + COMMAND + ${CMAKE_COMMAND} -E env + OUTPUT=${CPACK_PACKAGE_FILE_NAME}.appimage + VERSION=$,${CPACK_PACKAGE_VERSION},0.1.0> + ${LINUXDEPLOY_EXECUTABLE} + --appdir=${CPACK_TEMPORARY_DIRECTORY} + --executable=$ + $<$>:--desktop-file=$> + $<$>:--icon-file=$> + --output=appimage + # --verbosity=2 +) +]]) + +include(CPack) + diff --git a/CMake/Utils.cmake b/CMake/Utils.cmake new file mode 100644 index 00000000000..c691eefc6f7 --- /dev/null +++ b/CMake/Utils.cmake @@ -0,0 +1,248 @@ +# utils file for projects came from visual studio solution with cmake-converter. + +################################################################################ +# Wrap each token of the command with condition +################################################################################ +cmake_policy(PUSH) +cmake_policy(SET CMP0054 NEW) +macro(prepare_commands) + unset(TOKEN_ROLE) + unset(COMMANDS) + foreach(TOKEN ${ARG_COMMANDS}) + if("${TOKEN}" STREQUAL "COMMAND") + set(TOKEN_ROLE "KEYWORD") + elseif("${TOKEN_ROLE}" STREQUAL "KEYWORD") + set(TOKEN_ROLE "CONDITION") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(TOKEN_ROLE "COMMAND") + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + set(TOKEN_ROLE "ARG") + endif() + + if("${TOKEN_ROLE}" STREQUAL "KEYWORD") + list(APPEND COMMANDS "${TOKEN}") + elseif("${TOKEN_ROLE}" STREQUAL "CONDITION") + set(CONDITION ${TOKEN}) + elseif("${TOKEN_ROLE}" STREQUAL "COMMAND") + list(APPEND COMMANDS "$<$:${DUMMY}>$<${CONDITION}:${TOKEN}>") + elseif("${TOKEN_ROLE}" STREQUAL "ARG") + list(APPEND COMMANDS "$<${CONDITION}:${TOKEN}>") + endif() + endforeach() +endmacro() +cmake_policy(POP) + +################################################################################ +# Transform all the tokens to absolute paths +################################################################################ +macro(prepare_output) + unset(OUTPUT) + foreach(TOKEN ${ARG_OUTPUT}) + if(IS_ABSOLUTE ${TOKEN}) + list(APPEND OUTPUT "${TOKEN}") + else() + list(APPEND OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${TOKEN}") + endif() + endforeach() +endmacro() + +################################################################################ +# Parse add_custom_command_if args. +# +# Input: +# PRE_BUILD - Pre build event option +# PRE_LINK - Pre link event option +# POST_BUILD - Post build event option +# TARGET - Target +# OUTPUT - List of output files +# DEPENDS - List of files on which the command depends +# COMMANDS - List of commands(COMMAND condition1 commannd1 args1 COMMAND +# condition2 commannd2 args2 ...) +# Output: +# OUTPUT - Output files +# DEPENDS - Files on which the command depends +# COMMENT - Comment +# PRE_BUILD - TRUE/FALSE +# PRE_LINK - TRUE/FALSE +# POST_BUILD - TRUE/FALSE +# TARGET - Target name +# COMMANDS - Prepared commands(every token is wrapped in CONDITION) +# NAME - Unique name for custom target +# STEP - PRE_BUILD/PRE_LINK/POST_BUILD +################################################################################ +function(add_custom_command_if_parse_arguments) + cmake_parse_arguments("ARG" "PRE_BUILD;PRE_LINK;POST_BUILD" "TARGET;COMMENT" "DEPENDS;OUTPUT;COMMANDS" ${ARGN}) + + if(WIN32) + set(DUMMY "cd.") + elseif(UNIX) + set(DUMMY "true") + endif() + + prepare_commands() + prepare_output() + + set(DEPENDS "${ARG_DEPENDS}") + set(COMMENT "${ARG_COMMENT}") + set(PRE_BUILD "${ARG_PRE_BUILD}") + set(PRE_LINK "${ARG_PRE_LINK}") + set(POST_BUILD "${ARG_POST_BUILD}") + set(TARGET "${ARG_TARGET}") + if(PRE_BUILD) + set(STEP "PRE_BUILD") + elseif(PRE_LINK) + set(STEP "PRE_LINK") + elseif(POST_BUILD) + set(STEP "POST_BUILD") + endif() + set(NAME "${TARGET}_${STEP}") + + set(OUTPUT "${OUTPUT}" PARENT_SCOPE) + set(DEPENDS "${DEPENDS}" PARENT_SCOPE) + set(COMMENT "${COMMENT}" PARENT_SCOPE) + set(PRE_BUILD "${PRE_BUILD}" PARENT_SCOPE) + set(PRE_LINK "${PRE_LINK}" PARENT_SCOPE) + set(POST_BUILD "${POST_BUILD}" PARENT_SCOPE) + set(TARGET "${TARGET}" PARENT_SCOPE) + set(COMMANDS "${COMMANDS}" PARENT_SCOPE) + set(STEP "${STEP}" PARENT_SCOPE) + set(NAME "${NAME}" PARENT_SCOPE) +endfunction() + +################################################################################ +# Add conditional custom command +# +# Generating Files +# The first signature is for adding a custom command to produce an output: +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [DEPENDS [depends...]] +# [COMMENT comment] +# +# Build Events +# add_custom_command_if( +# +# +# +# [COMMAND condition command2 [args2...]] +# [COMMENT comment] +# +# Input: +# output - Output files the command is expected to produce +# condition - Generator expression for wrapping the command +# command - Command-line(s) to execute at build time. +# args - Command`s args +# depends - Files on which the command depends +# comment - Display the given message before the commands are executed at +# build time. +# PRE_BUILD - Run before any other rules are executed within the target +# PRE_LINK - Run after sources have been compiled but before linking the +# binary +# POST_BUILD - Run after all other rules within the target have been +# executed +################################################################################ +function(add_custom_command_if) + add_custom_command_if_parse_arguments(${ARGN}) + + if(OUTPUT AND TARGET) + message(FATAL_ERROR "Wrong syntax. A TARGET and OUTPUT can not both be specified.") + endif() + + if(OUTPUT) + add_custom_command(OUTPUT ${OUTPUT} + ${COMMANDS} + DEPENDS ${DEPENDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + elseif(TARGET) + if(PRE_BUILD AND NOT ${CMAKE_GENERATOR} MATCHES "Visual Studio") + add_custom_target( + ${NAME} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + add_dependencies(${TARGET} ${NAME}) + else() + add_custom_command( + TARGET ${TARGET} + ${STEP} + ${COMMANDS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT ${COMMENT}) + endif() + else() + message(FATAL_ERROR "Wrong syntax. A TARGET or OUTPUT must be specified.") + endif() +endfunction() + +################################################################################ +# Use props file for a target and configs +# use_props( ) +# Inside there are following variables: +# PROPS_TARGET - +# PROPS_CONFIG - One of +# PROPS_CONFIG_U - Uppercase PROPS_CONFIG +# Input: +# target - Target to apply props file +# configs - Build configurations to apply props file +# props_file - CMake script +################################################################################ +macro(use_props TARGET CONFIGS PROPS_FILE) + set(PROPS_TARGET "${TARGET}") + foreach(PROPS_CONFIG ${CONFIGS}) + string(TOUPPER "${PROPS_CONFIG}" PROPS_CONFIG_U) + + get_filename_component(ABSOLUTE_PROPS_FILE "${PROPS_FILE}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") + if(EXISTS "${ABSOLUTE_PROPS_FILE}") + include("${ABSOLUTE_PROPS_FILE}") + else() + message(WARNING "Corresponding cmake file from props \"${ABSOLUTE_PROPS_FILE}\" doesn't exist") + endif() + endforeach() +endmacro() + +################################################################################ +# Add compile options to source file +# source_file_compile_options( [compile_options...]) +# Input: +# source_file - Source file +# compile_options - Options to add to COMPILE_FLAGS property +################################################################################ +function(source_file_compile_options SOURCE_FILE) + if("${ARGC}" LESS_EQUAL "1") + return() + endif() + + get_source_file_property(COMPILE_OPTIONS "${SOURCE_FILE}" COMPILE_OPTIONS) + + if(COMPILE_OPTIONS) + list(APPEND COMPILE_OPTIONS ${ARGN}) + else() + set(COMPILE_OPTIONS "${ARGN}") + endif() + + set_source_files_properties("${SOURCE_FILE}" PROPERTIES COMPILE_OPTIONS "${COMPILE_OPTIONS}") +endfunction() + +################################################################################ +# Default properties of visual studio projects +################################################################################ +set(DEFAULT_CXX_PROPS "${CMAKE_CURRENT_LIST_DIR}/DefaultCXX.cmake") + +function(get_linux_lsb_release_information) + find_program(LSB_RELEASE_EXEC lsb_release) + if(NOT LSB_RELEASE_EXEC) + message(FATAL_ERROR "Could not detect lsb_release executable, can not gather required information") + endif() + + execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --id OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --release OUTPUT_VARIABLE LSB_RELEASE_VERSION_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "${LSB_RELEASE_EXEC}" --short --codename OUTPUT_VARIABLE LSB_RELEASE_CODENAME_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(LSB_RELEASE_ID_SHORT "${LSB_RELEASE_ID_SHORT}" PARENT_SCOPE) + set(LSB_RELEASE_VERSION_SHORT "${LSB_RELEASE_VERSION_SHORT}" PARENT_SCOPE) + set(LSB_RELEASE_CODENAME_SHORT "${LSB_RELEASE_CODENAME_SHORT}" PARENT_SCOPE) +endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..28d3668cd43 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,107 @@ +cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) + +set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) +set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") +set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") + +project(Ship C CXX) + +set(PROJECT_VERSION_MAJOR "2") +set(PROJECT_VERSION_MINOR "0") +set(PROJECT_VERSION_PATCH "0") + + +################################################################################ +# Set target arch type if empty. Visual studio solution generator provides it. +################################################################################ +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(NOT CMAKE_VS_PLATFORM_NAME) + set(CMAKE_VS_PLATFORM_NAME "x64") + endif() + message("${CMAKE_VS_PLATFORM_NAME} architecture in use") + + if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64" + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")) + message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!") + endif() +endif() + +################################################################################ +# Global configuration types +################################################################################ +set(CMAKE_CONFIGURATION_TYPES + "Debug" + "Release" + CACHE STRING "" FORCE +) + +################################################################################ +# Global compiler options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_C_FLAGS "") + set(CMAKE_C_FLAGS_DEBUG "") + set(CMAKE_C_FLAGS_RELEASE "") + set(CMAKE_CXX_FLAGS "") + set(CMAKE_CXX_FLAGS_DEBUG "") + set(CMAKE_CXX_FLAGS_RELEASE "") +endif() + +################################################################################ +# Global linker options +################################################################################ +if(MSVC) + # remove default flags provided with CMake for MSVC + set(CMAKE_EXE_LINKER_FLAGS "") + set(CMAKE_MODULE_LINKER_FLAGS "") + set(CMAKE_SHARED_LINKER_FLAGS "") + set(CMAKE_STATIC_LINKER_FLAGS "") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS}") +endif() + +################################################################################ +# Common utils +################################################################################ +include(CMake/Utils.cmake) + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + get_linux_lsb_release_information() + message(STATUS "Linux ${LSB_RELEASE_ID_SHORT} ${LSB_RELEASE_VERSION_SHORT} ${LSB_RELEASE_CODENAME_SHORT}") +else() + message(STATUS ${CMAKE_SYSTEM_NAME}) +endif() + +################################################################################ +# Additional Global Settings(add specific info there) +################################################################################ +include(CMake/GlobalSettingsInclude.cmake OPTIONAL) + +################################################################################ +# Use solution folders feature +################################################################################ +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +################################################################################ +# Sub-projects +################################################################################ +add_subdirectory(StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) +add_subdirectory(libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) +add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) +add_subdirectory(ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) +add_subdirectory(OTRExporter) +add_subdirectory(soh) +add_subdirectory(OTRGui) + +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") +set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.png") + +include(CMake/Packaging.cmake) From 371972f173ac0c44c1a0f577e8fdda0f0e238d94 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 14:02:11 +0200 Subject: [PATCH 033/155] add packaging --- BUILDING-cmake.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 3a7daa1edd8..6a69be99c91 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -45,9 +45,6 @@ git clone https://github.com/Perlmint/glew-cmake.git external/glew ~~~ cd OTRExporter -# change the path to ZAPD in extract_assets.py -sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD.out%" < extract_assets.py > extract_assets_cmake.py -chmod +x extract_assets_cmake.py cmake -S . -B build-cmake cmake --build build-cmake @@ -62,6 +59,24 @@ cd ../OTRGui cmake -H. -Bbuild-cmake -GNinja -DOpenGL_GL_PREFERENCE="GLVND" -DCMAKE_BUILD_TYPE="Release" cmake --build build-cmake cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor + +~~~ +Packaging support (experimental - only 64 bit): +execute at top-level: +~~~ +cmake -S . -B build-cmake +cmake --build build-cmake +~~~ + +now in build-cmake: +~~~ +cpack -G DEB +cpack -G ZIP +cpack -G External (does appimage) +~~~ + +Only tested on Linux so far. + ~~~ macOS (M1): From e15633b558168c977b58ca5382ba0afe766b8d11 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 14:06:45 +0200 Subject: [PATCH 034/155] formatting --- BUILDING-cmake.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 6a69be99c91..8fbe942baa6 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -1,3 +1,6 @@ +Windows +======= + libpng and zlib will be used from VCPKG. My vcpkg is located at d:/VCPKG I also created a new triplet to be used. @@ -31,7 +34,8 @@ cd ../soh & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release ~~~ -Linux (Ubuntu 22.04): +Linux (Ubuntu 22.04) +==================== using native build (not docker) @@ -77,9 +81,9 @@ cpack -G External (does appimage) Only tested on Linux so far. -~~~ -macOS (M1): +macOS (M1) +========== using native build (not docker) (will be built with below cmake commands) - no extra build needed @@ -87,10 +91,6 @@ using native build (not docker) ~~~ cd OTRExporter -# change the path to ZAPD in extract_assets.py -sed "s%../ZAPDTR/ZAPD.out%build-cmake/ZAPD/ZAPD.out%" < extract_assets.py > extract_assets_cmake.py -chmod +x extract_assets_cmake.py - cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=../soh/CMake/Mac-gnu-toolchain.cmake cmake --build build-cmake From 6ce51c75de0639764fbbdf32d385319b9bd7aa44 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 14:07:58 +0200 Subject: [PATCH 035/155] correct Windows lineage --- BUILDING-cmake.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 8fbe942baa6..2fbeded359d 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -8,8 +8,8 @@ I also created a new triplet to be used. ~~~ x64-windows-v142: set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_PLATFORM_TOOLSET v142) ~~~ From 54f343af58ea6a17094630eeca3dd14929078536 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 29 Jun 2022 14:44:07 +0200 Subject: [PATCH 036/155] add gamecontrollerdb.txt --- soh/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index e1a8651b9b6..3a90c72d7fb 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1814,3 +1814,7 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") INSTALL(TARGETS soh DESTINATION bin) + +execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) +INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin) + From 423760088a0a23dde01e88d23196249fd83b63fb Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 30 Jun 2022 10:26:03 +0200 Subject: [PATCH 037/155] fixes for Windows 64 bit and packaging --- CMake/Packaging.cmake | 3 ++ CMakeLists.txt | 17 +++++++ libultraship/libultraship/CMakeLists.txt | 2 + soh/CMakeLists.txt | 62 +++++++++++++++++++----- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index 139ed370e52..c240b40559d 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -30,6 +30,7 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "YOUR NAME") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # package name for deb # if set, then instead of some-application-0.9.2-Linux.deb # you'll get some-application_0.9.2_amd64.deb (note the underscores too) @@ -86,5 +87,7 @@ execute_process( ) ]]) +endif() + include(CPack) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28d3668cd43..f60017ae6dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,4 +104,21 @@ set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.png") +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "../build-cmake/ZAPD/ZAPD.out" filedata "${filedata}") +file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") +file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +find_package(Python COMPONENTS Interpreter) + +add_custom_target(ExtractAssets + COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter + COMMENT "Running asset extraction..." + DEPENDS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out +) +add_dependencies(ExtractAssets ZAPD) + +add_dependencies(soh ExtractAssets) + include(CMake/Packaging.cmake) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 849b56a4225..ddf9b75df2d 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -403,10 +403,12 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "NDEBUG" ">" "SPDLOG_ACTIVE_LEVEL=0;" + "WIN32;" "_CONSOLE;" "_CRT_SECURE_NO_WARNINGS;" "ENABLE_DX11;" "ENABLE_OPENGL;" + "%(PreprocessorDefinitions)GLEW_STATIC;" "UNICODE;" "_UNICODE" STORMLIB_NO_AUTO_LINK diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 3a90c72d7fb..4f4631fb709 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1469,7 +1469,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") $<$: MultiThreadedDebug > - $<$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> + $<$: + MultiThreaded + > + $<$,$>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}> ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" @@ -1489,17 +1492,17 @@ endif() ################################################################################ target_include_directories(${PROJECT_NAME} PRIVATE assets - ${PROJECT_SOURCE_DIR}/include/ - ${PROJECT_SOURCE_DIR}/src/ - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/libjpeg/include/ - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/ - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ - ${PROJECT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL - ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/ - ${PROJECT_SOURCE_DIR}/assets/ + ${CMAKE_CURRENT_SOURCE_DIR}/include/ + ${CMAKE_CURRENT_SOURCE_DIR}/src/ + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/libjpeg/include/ + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/ + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/spdlog/include/ + ${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL + ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/ + ${CMAKE_CURRENT_SOURCE_DIR}/assets/ . ) @@ -1520,6 +1523,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "UNICODE;" "_UNICODE" STORMLIB_NO_AUTO_LINK + "_CRT_SECURE_NO_WARNINGS;" ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") target_compile_definitions(${PROJECT_NAME} PRIVATE @@ -1571,7 +1575,7 @@ if(MSVC) > $<$: /Oi; - /sdl; + /sdl-; /Gy; /W3 > @@ -1782,6 +1786,38 @@ else() endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + add_library( SDL2 STATIC IMPORTED ) + set_property(TARGET SDL2 PROPERTY + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x64/SDL2.lib ) + set_property(TARGET SDL2 PROPERTY + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x64/SDL2.lib) + + add_library( SDL2main STATIC IMPORTED ) + set_property(TARGET SDL2main PROPERTY + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x64/SDL2main.lib ) + set_property(TARGET SDL2main PROPERTY + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x64/SDL2main.lib) + + add_library(glfw3dll STATIC IMPORTED ) + set_property(TARGET glfw3dll PROPERTY + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib ) + set_property(TARGET glfw3dll PROPERTY + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib) + + add_library(glew32s STATIC IMPORTED ) + set_property(TARGET glew32s PROPERTY + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x64/glew32s.lib ) + set_property(TARGET glew32s PROPERTY + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x64/glew32s.lib) + + #add_library(StormLibRUS32 STATIC IMPORTED ) + # set_property(TARGET StormLibRUS32 PROPERTY + # IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) + # set_property(TARGET StormLibRUS32 PROPERTY + # IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + add_library( SDL2 STATIC IMPORTED ) set_property(TARGET SDL2 PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib ) set_property(TARGET SDL2 PROPERTY From 2bbea86dec03a14285adfd5a73c3f2785c751083 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 30 Jun 2022 10:35:44 +0200 Subject: [PATCH 038/155] fix typo --- soh/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 4f4631fb709..214a5d9f134 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1845,6 +1845,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") # IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) # set_property(TARGET StormLibRUS32 PROPERTY # IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) + endif() endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") From 2c9f16cc2b5f3b39fb304750afd9812f47ad1c99 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 30 Jun 2022 11:04:19 +0200 Subject: [PATCH 039/155] no LICENSE --- CMake/Packaging.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index c240b40559d..410d9a9c592 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -27,7 +27,7 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO set(CPACK_PACKAGE_CONTACT "YOUR@E-MAIL.net") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "YOUR NAME") -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") if (CMAKE_SYSTEM_NAME STREQUAL "Linux") From a94776120c8b03b6862c7c06211b2481c84441f4 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 30 Jun 2022 11:20:25 +0200 Subject: [PATCH 040/155] remove Debug clause --- soh/CMakeLists.txt | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 214a5d9f134..48aa1f88d67 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1718,21 +1718,19 @@ endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") set(ADDITIONAL_LIBRARY_DEPENDENCIES - "$<$:" - "libultraship;" - "ZAPDUtils;" - "opengl32;" - "glu32;" - "SDL2;" - "SDL2main;" - "glfw3dll;" - "glew32s;" - "storm;" - "winmm;" - "imm32;" - "version;" - "setupapi" - ">" + "libultraship;" + "ZAPDUtils;" + "opengl32;" + "glu32;" + "SDL2;" + "SDL2main;" + "glfw3dll;" + "glew32s;" + "storm;" + "winmm;" + "imm32;" + "version;" + "setupapi" ) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") set(ADDITIONAL_LIBRARY_DEPENDENCIES From 77c4ba8426f8b3e85381a1cc6f2ff97ca904b1aa Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 6 Jul 2022 09:42:15 +0200 Subject: [PATCH 041/155] fix win64 build --- CMake/Packaging-2.cmake | 7 +++++++ CMake/Packaging.cmake | 8 ++------ CMakeLists.txt | 14 +++++++++++--- OTRExporter/CMakeLists.txt | 3 ++- OTRGui/CMakeLists.txt | 2 +- ZAPDTR/ZAPD/CMakeLists.txt | 3 ++- soh/CMakeLists.txt | 2 +- 7 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 CMake/Packaging-2.cmake diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake new file mode 100644 index 00000000000..e52d28b8bec --- /dev/null +++ b/CMake/Packaging-2.cmake @@ -0,0 +1,7 @@ +if (CPACK_GENERATOR MATCHES "DEB|RPM") +# https://unix.stackexchange.com/a/11552/254512 +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship")#/${CMAKE_PROJECT_VERSION}") +elseif (CPACK_GENERATOR MATCHES "ZIP") +set(CPACK_PACKAGING_INSTALL_PREFIX "") +endif() + diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index 410d9a9c592..bac5f669d9a 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -14,11 +14,6 @@ set(CPACK_VERBATIM_VARIABLES YES) set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages") -#if (CPACK_GENERATOR MATCHES "DEB|RPM") -# https://unix.stackexchange.com/a/11552/254512 -set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship")#/${CMAKE_PROJECT_VERSION}") -#endif() - set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) @@ -28,9 +23,10 @@ set(CPACK_PACKAGE_CONTACT "YOUR@E-MAIL.net") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "YOUR NAME") #set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") -set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") +set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md") if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +set(CPACK_SYSTEM_NAME ${LSB_RELEASE_CODENAME_SHORT}) # package name for deb # if set, then instead of some-application-0.9.2-Linux.deb # you'll get some-application_0.9.2_amd64.deb (note the underscores too) diff --git a/CMakeLists.txt b/CMakeLists.txt index f60017ae6dd..2d44c67662d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") -set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") +#set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") - issue with soh compile project(Ship C CXX) @@ -92,6 +92,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ +set (STORM_SKIP_INSTALL true) add_subdirectory(StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) add_subdirectory(libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) @@ -121,4 +122,11 @@ add_dependencies(ExtractAssets ZAPD) add_dependencies(soh ExtractAssets) -include(CMake/Packaging.cmake) +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(CPACK_GENERATOR "DEB;ZIP") +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(CPACK_GENERATOR "ZIP") +endif() + +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake)^M +include(CMake/Packaging.cmake) diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 5759bf62c72..5ffdbd9e64f 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") -set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") +#set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") +set(CMAKE_C_STANDARD 11) project(OTRExporter C CXX) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 4c113e17d78..21c7908bbb1 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -51,5 +51,5 @@ INSTALL(TARGETS OTRGui DESTINATION bin) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets DESTINATION bin ) -INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out DESTINATION bin/assets/extractor) +INSTALL(TARGETS ZAPD DESTINATION bin/assets/extractor) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 28db02f6894..a181e11e1a8 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -1,7 +1,8 @@ set(PROJECT_NAME ZAPD) set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") -set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") +#set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") +set(CMAKE_C_STANDARD 11) ################################################################################ # Source groups diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 48aa1f88d67..f803fdf005f 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1643,7 +1643,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") -Wno-missing-field-initializers -Wno-parentheses -Wno-narrowing - -fpermissive + $<$:-fpermissive> $<$:-Wno-deprecated-enum-enum-conversion> -pthread ) From ed80aa5eba76773e69f1c67b286eebc6b9acce87 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 6 Jul 2022 09:46:59 +0200 Subject: [PATCH 042/155] fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d44c67662d..70798056206 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,5 +128,5 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") set(CPACK_GENERATOR "ZIP") endif() -set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake)^M +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) include(CMake/Packaging.cmake) From ee851e6b4287fc0fc8001307ee68680537519925 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 6 Jul 2022 09:50:04 +0200 Subject: [PATCH 043/155] add include dir --- libultraship/libultraship/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index ddf9b75df2d..e6aff87a85f 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -456,6 +456,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/PR ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/ + ${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImGui/ ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src . From d1b135644d4a9a818c77cd45dc590de0098983b4 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 6 Jul 2022 09:58:57 +0200 Subject: [PATCH 044/155] add CosmeticsEditor --- soh/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index f803fdf005f..eff0b8fabc0 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -166,6 +166,11 @@ set(Header_Files__soh__Enhancements ) source_group("Header Files\\soh\\Enhancements" FILES ${Header_Files__soh__Enhancements}) +set(Header_Files__soh__Enhancements__cosmetics + "soh/Enhancements/cosmetics/CosmeticsEditor.h" +) +source_group("Header Files\\soh\\Enhancements\\cosmetics" FILES ${Header_Files__soh__Enhancements__cosmetics}) + set(Header_Files__soh__Enhancements__debugger "soh/Enhancements/debugger/actorViewer.h" "soh/Enhancements/debugger/colViewer.h" @@ -202,6 +207,11 @@ set(Source_Files__soh__Enhancements ) source_group("Source Files\\soh\\Enhancements" FILES ${Source_Files__soh__Enhancements}) +set(Source_Files__soh__Enhancements__cosmetics + "soh/Enhancements/cosmetics/CosmeticsEditor.cpp" +) +source_group("Source Files\\soh\\Enhancements\\cosmetics" FILES ${Source_Files__soh__Enhancements__cosmetics}) + set(Source_Files__soh__Enhancements__debugger "soh/Enhancements/debugger/actorViewer.cpp" "soh/Enhancements/debugger/colViewer.cpp" @@ -1416,8 +1426,10 @@ set(ALL_FILES ${Header_Files__include} ${Header_Files__soh__Enhancements} ${Header_Files__soh__Enhancements__debugger} + ${Header_Files__soh__Enhancements__cosmetics} ${Source_Files__soh} ${Source_Files__soh__Enhancements} + ${Source_Files__soh__Enhancements__cosmetics} ${Source_Files__soh__Enhancements__debugger} ${Source_Files__src__boot} ${Source_Files__src__buffers} From 6183e739296248a9d67b8abc0bb71d6050edf13d Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 6 Jul 2022 10:22:16 +0200 Subject: [PATCH 045/155] update --- BUILDING-cmake.md | 52 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 2fbeded359d..f80585a90a5 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -20,6 +20,22 @@ D:\vcpkg\vcpkg.exe install libpng --triple=x86-windows-v142 ~~~ git clone https://github.com/th-2021/Shipwright-cmake.git +~~~ + +All-in-One with packaging (64 bit only) +--------------------------------------- +copy your ROM into Shipwright-cmake/OTRExporter +~~~ +cd Shipwright-cmake +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release +cd .\build\x64 +& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP +~~~ + +Classical build +--------------- +~~~ # # build SoH # @@ -32,12 +48,32 @@ cd OTRExporter cd ../soh & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/Win32" -G "Visual Studio 17 2022" -T v142 -A Win32 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-v142" & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release +cd ../OTRGui +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release ~~~ Linux (Ubuntu 22.04) ==================== +All-in-One with packaging support (only 64 bit): +------------------------------------------------ + +execute at top-level: +~~~ +cmake -S . -B build-cmake +cmake --build build-cmake +~~~ + +now in build-cmake: +~~~ +cpack -G DEB +cpack -G ZIP +cpack -G External (does appimage - experimental) +~~~ + using native build (not docker) +------------------------------- ~~~ cd ShipWright @@ -65,22 +101,6 @@ cmake --build build-cmake cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor ~~~ -Packaging support (experimental - only 64 bit): -execute at top-level: -~~~ -cmake -S . -B build-cmake -cmake --build build-cmake -~~~ - -now in build-cmake: -~~~ -cpack -G DEB -cpack -G ZIP -cpack -G External (does appimage) -~~~ - -Only tested on Linux so far. - macOS (M1) ========== From 7c099efdfaed9597f71e592677a4fa0f54de639f Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 7 Jul 2022 08:23:08 +0200 Subject: [PATCH 046/155] fix extract asses on Windows --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70798056206..4b163f4a06f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${PROJECT_SOURCE_DIR}/appim file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "../build-cmake/ZAPD/ZAPD.out" filedata "${filedata}") +string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) From 558b439e11818a266990eab7ed328690b4da4b84 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 7 Jul 2022 18:30:40 +0200 Subject: [PATCH 047/155] replace build-cmake with CMAKE_BINARY_DIR --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b163f4a06f..68ac6047902 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,7 +106,7 @@ set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/ap set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.png") file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) -string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "../build-cmake/ZAPD/ZAPD.out" filedata "${filedata}") +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) From 54fdec3c7ca0968af75db63bfcea93f50b38f35e Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 8 Jul 2022 08:27:38 +0200 Subject: [PATCH 048/155] change Linux build to Ninja --- BUILDING-cmake.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index f80585a90a5..db4f2282b1d 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -61,7 +61,9 @@ All-in-One with packaging support (only 64 bit): execute at top-level: ~~~ -cmake -S . -B build-cmake +git clone https://github.com/Perlmint/glew-cmake.git external/glew + +cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake ~~~ @@ -86,13 +88,13 @@ git clone https://github.com/Perlmint/glew-cmake.git external/glew cd OTRExporter -cmake -S . -B build-cmake +cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake ./extract_assets_cmake.py cd ../soh -cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=CMake/Linux32bit-toolchain.cmake +cmake -H. -Bbuild-cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=CMake/Linux32bit-toolchain.cmake cmake --build build-cmake cd ../OTRGui From fbf50d3c4308dc331f639eec5c845141586fde38 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 11 Jul 2022 11:39:16 +0200 Subject: [PATCH 049/155] glew update, appimage update --- CMake/Packaging-2.cmake | 9 ++ CMake/Packaging.cmake | 2 +- CMakeLists.txt | 103 +++++++------- OTRExporter/CMakeLists.txt | 6 +- ZAPDTR/ZAPD/CMakeLists.txt | 24 +--- libultraship/libultraship/CMakeLists.txt | 102 +++++++++++++- scripts/linux/soh.desktop | 4 +- soh/CMakeLists.txt | 167 ++++++----------------- 8 files changed, 220 insertions(+), 197 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index e52d28b8bec..aa205aa5851 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -1,3 +1,7 @@ +if (NOT CPACK_GENERATOR STREQUAL "External") + list(REMOVE_ITEM CPACK_COMPONENTS_ALL "appimage") +endif() + if (CPACK_GENERATOR MATCHES "DEB|RPM") # https://unix.stackexchange.com/a/11552/254512 set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship")#/${CMAKE_PROJECT_VERSION}") @@ -5,3 +9,8 @@ elseif (CPACK_GENERATOR MATCHES "ZIP") set(CPACK_PACKAGING_INSTALL_PREFIX "") endif() +if (CPACK_GENERATOR MATCHES "External") +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) +SET(CPACK_MONOLITHIC_INSTALL 1) +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") +endif() diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index bac5f669d9a..65d7950771d 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -71,7 +71,7 @@ endif() execute_process( COMMAND ${CMAKE_COMMAND} -E env - OUTPUT=${CPACK_PACKAGE_FILE_NAME}.appimage + OUTPUT=${CPACK_OUTPUT_FILE_PREFIX}/${CPACK_PACKAGE_FILE_NAME}.appimage VERSION=$,${CPACK_PACKAGE_VERSION},0.1.0> ${LINUXDEPLOY_EXECUTABLE} --appdir=${CPACK_TEMPORARY_DIRECTORY} diff --git a/CMakeLists.txt b/CMakeLists.txt index 68ac6047902..cae8d5d367d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") -#set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") - issue with soh compile - +#set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") - issue with soh compile with MSVC + project(Ship C CXX) - -set(PROJECT_VERSION_MAJOR "2") -set(PROJECT_VERSION_MINOR "0") -set(PROJECT_VERSION_PATCH "0") - + +set(PROJECT_VERSION_MAJOR "2") +set(PROJECT_VERSION_MINOR "0") +set(PROJECT_VERSION_PATCH "0") + ################################################################################ # Set target arch type if empty. Visual studio solution generator provides it. @@ -71,13 +71,13 @@ endif() # Common utils ################################################################################ include(CMake/Utils.cmake) - -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - get_linux_lsb_release_information() - message(STATUS "Linux ${LSB_RELEASE_ID_SHORT} ${LSB_RELEASE_VERSION_SHORT} ${LSB_RELEASE_CODENAME_SHORT}") -else() - message(STATUS ${CMAKE_SYSTEM_NAME}) -endif() + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + get_linux_lsb_release_information() + message(STATUS "Linux ${LSB_RELEASE_ID_SHORT} ${LSB_RELEASE_VERSION_SHORT} ${LSB_RELEASE_CODENAME_SHORT}") +else() + message(STATUS ${CMAKE_SYSTEM_NAME}) +endif() ################################################################################ # Additional Global Settings(add specific info there) @@ -92,42 +92,51 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -set (STORM_SKIP_INSTALL true) -add_subdirectory(StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) add_subdirectory(libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) add_subdirectory(ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) add_subdirectory(OTRExporter) add_subdirectory(soh) add_subdirectory(OTRGui) - -set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) -set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") -set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.png") - -file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) -string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") -string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") -file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") -file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) - -find_package(Python COMPONENTS Interpreter) - -add_custom_target(ExtractAssets - COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter - COMMENT "Running asset extraction..." - DEPENDS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out -) -add_dependencies(ExtractAssets ZAPD) - -add_dependencies(soh ExtractAssets) - -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(CPACK_GENERATOR "DEB;ZIP") -elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") - set(CPACK_GENERATOR "ZIP") -endif() - -set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) -include(CMake/Packaging.cmake) + +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") +set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") +INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION bin COMPONENT appimage) + +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") +string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") +file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") +file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +find_package(Python COMPONENTS Interpreter) + +add_custom_target(ExtractAssets + COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter + COMMENT "Running asset extraction..." + DEPENDS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out +) +add_dependencies(ExtractAssets ZAPD) + +add_dependencies(soh ExtractAssets) + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + find_package(ImageMagick COMPONENTS convert) + if (ImageMagick_FOUND) + execute_process ( + COMMAND ${ImageMagick_convert_EXECUTABLE} soh/macosx/sohIcon.png -resize 512x512 ${CMAKE_BINARY_DIR}/sohIcon.png + OUTPUT_VARIABLE outVar + ) + endif() +endif() + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(CPACK_GENERATOR "DEB;ZIP") +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(CPACK_GENERATOR "ZIP") +endif() + +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) +include(CMake/Packaging.cmake) diff --git a/OTRExporter/CMakeLists.txt b/OTRExporter/CMakeLists.txt index 5ffdbd9e64f..5f314926e2e 100644 --- a/OTRExporter/CMakeLists.txt +++ b/OTRExporter/CMakeLists.txt @@ -81,10 +81,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -if (NOT TARGET storm) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib) -endif() - if (NOT TARGET libultraship) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) endif() @@ -100,7 +96,7 @@ endif() add_subdirectory(OTRExporter) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/extract_assets.py filedata) -string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "build-cmake/ZAPD/ZAPD.out" filedata "${filedata}") +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/extract_assets_cmake.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index a181e11e1a8..9ae47a3f93f 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -266,7 +266,6 @@ use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") ################################################################################ # Includes for CMake from *.props ################################################################################ -#use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "../../OTRExporter/packages/YY.NuGet.Import.Helper.1.0.0.4/build/native/YY.NuGet.Import.Helper.cmake") set(ROOT_NAMESPACE ZAPD) @@ -400,13 +399,13 @@ endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error - -Wno-unused-parameter - -Wno-unused-function - -Wno-unused-variable + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable -Wno-missing-field-initializers - -Wno-parentheses - -Wno-narrowing - $<$:-Wno-deprecated-enum-enum-conversion> + -Wno-parentheses + -Wno-narrowing + $<$:-Wno-deprecated-enum-enum-conversion> -pthread ) @@ -430,13 +429,11 @@ add_dependencies(${PROJECT_NAME} OTRExporter ZAPDUtils libultraship - storm ) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - #set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/WHOLEARCHIVE:${PROJECT_SOURCE_DIR}/x64/Release/OTRExporter.lib") set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" "-WHOLEARCHIVE:$/$" @@ -446,33 +443,24 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") ) endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - find_package(BZip2 REQUIRED) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) - find_package(SDL2) set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" -Wl,-force_load $/$ "libultraship;" - storm PNG::PNG - BZip2::BZip2 ${CMAKE_DL_LIBS} Threads::Threads ) else() - find_package(BZip2 REQUIRED) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) - find_package(X11 REQUIRED) - find_package(SDL2) set(ADDITIONAL_LIBRARY_DEPENDENCIES "ZAPDUtils;" -Wl,--whole-archive $/$ -Wl,--no-whole-archive "libultraship;" - storm PNG::PNG - BZip2::BZip2 ${CMAKE_DL_LIBS} Threads::Threads ) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index e6aff87a85f..2827fef251d 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -345,6 +345,10 @@ set(ALL_FILES ################################################################################ add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) +if (NOT TARGET storm) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) +endif() + use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") set(ROOT_NAMESPACE libultraship) @@ -449,13 +453,39 @@ endif() ################################################################################ # Compile and link options ################################################################################ +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + find_package(SDL2) + find_package(GLEW) + if (NOT GLEW_FOUND) + if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") + include (FetchContent) + FetchContent_Declare( + glew + GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git + SOURCE_DIR ../../external/glew + ) + FetchContent_MakeAvailable(glew) + add_subdirectory(../../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) + endif() + endif() + + if (NOT GLEW_FOUND) + set(GLEW-INCLUDE ../../external/glew/include) + else() + set(GLEW-INCLUDE ${GLEW_INCLUDE_DIRS}) + endif() + set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS}) +else() + set(GLEW-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/) + set(SDL2-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL/) +endif() target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/spdlog/include/ ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/ ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/PR - ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL - ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/ + ${SDL2-INCLUDE} + ${GLEW-INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImGui/ ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src @@ -533,3 +563,71 @@ endif() ################################################################################ # Link with other targets. +find_package(OpenGL QUIET) +find_package(X11) + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + find_package(PulseAudio) +endif() + +if (NOT GLEW_FOUND) + set(GLEW-LIB glew_s) +else() + set(GLEW-LIB GLEW::GLEW) +endif() + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + target_link_libraries(${PROJECT_NAME} + "glew32s;" + "opengl32;" + "storm;" + ) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + target_link_libraries(${PROJECT_NAME} + "glew32s;" + "opengl32;" + "storm;" + ) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_package(SDL2) + find_package(GLEW) + find_package(OpenGL QUIET) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(${PROJECT_NAME} + "storm;" + SDL2::SDL2 + GLEW::GLEW + ${OPENGL_opengl_LIBRARY} + ${CMAKE_DL_LIBS} + Threads::Threads + ) +else() + target_link_libraries(${PROJECT_NAME} + SDL2::SDL2 + ${PULSEAUDIO_LIBRARY} + ${GLEW-LIB} + ${OPENGL_glx_LIBRARY} + ${OPENGL_opengl_LIBRARY} + ${X11_LIBRARIES} + storm + ) +endif() + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") + add_library(glew32s STATIC IMPORTED ) + set_property(TARGET glew32s PROPERTY + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x64/glew32s.lib ) + set_property(TARGET glew32s PROPERTY + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x64/glew32s.lib) + elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + add_library(glew32s STATIC IMPORTED ) + set_property(TARGET glew32s PROPERTY + IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib ) + set_property(TARGET glew32s PROPERTY + IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib) + endif() +endif() diff --git a/scripts/linux/soh.desktop b/scripts/linux/soh.desktop index a637d03c3b2..b1fc2696bbb 100644 --- a/scripts/linux/soh.desktop +++ b/scripts/linux/soh.desktop @@ -1,9 +1,9 @@ [Desktop Entry] Version=1.0 Name=SOH -Exec=AppRun +Exec=soh.sh Terminal=false -Icon=soh +Icon=sohIcon Type=Application Categories=Game; Name[en_US]= diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index eff0b8fabc0..0b031b190d2 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -82,14 +82,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Sub-projects ################################################################################ -if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") - add_subdirectory(../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) -endif() - -if (NOT TARGET storm) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) -endif() - if (NOT TARGET libultraship) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship ${CMAKE_BINARY_DIR}/libultraship) endif() @@ -1502,6 +1494,12 @@ endif() ################################################################################ # Compile definitions ################################################################################ +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + find_package(SDL2) + set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS}) +else() + set(SDL2-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/) +endif() target_include_directories(${PROJECT_NAME} PRIVATE assets ${CMAKE_CURRENT_SOURCE_DIR}/include/ @@ -1512,7 +1510,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets ${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64 ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR - ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL + ${SDL2-INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/ ${CMAKE_CURRENT_SOURCE_DIR}/assets/ . @@ -1649,38 +1647,38 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error - -Wno-unused-parameter - -Wno-unused-function - -Wno-unused-variable + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable -Wno-missing-field-initializers - -Wno-parentheses - -Wno-narrowing - $<$:-fpermissive> - $<$:-Wno-deprecated-enum-enum-conversion> - -pthread + -Wno-parentheses + -Wno-narrowing + $<$:-fpermissive> + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread ) target_link_options(${PROJECT_NAME} PRIVATE - -pthread + -pthread ) else() target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error - -Wno-unused-parameter - -Wno-unused-function - -Wno-unused-variable + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable -Wno-missing-field-initializers - -Wno-parentheses - -Wno-narrowing - -fpermissive - $<$:-Wno-deprecated-enum-enum-conversion> - -pthread + -Wno-parentheses + -Wno-narrowing + $<$:-fpermissive> + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread -msse2 -mfpmath=sse ) target_link_options(${PROJECT_NAME} PRIVATE - -pthread - -Wl,-export-dynamic + -pthread + -Wl,-export-dynamic ) endif() endif() @@ -1688,57 +1686,30 @@ endif() # Pre build events ################################################################################ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") - add_custom_command_if( - TARGET ${PROJECT_NAME} - PRE_BUILD - COMMANDS - COMMAND $ copy /b $src\\boot\\build.c +,, - ) - endif() + add_custom_command_if( + TARGET ${PROJECT_NAME} + PRE_BUILD + COMMANDS + COMMAND $ copy /b $src\\boot\\build.c +,, + ) endif() ################################################################################ # Dependencies ################################################################################ -if (CMAKE_SYSTEM_NAME STREQUAL "Windows") -add_dependencies(${PROJECT_NAME} - ZAPDUtils - libultraship - storm -) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") -add_dependencies(${PROJECT_NAME} - ZAPDUtils - libultraship - storm -) -else() add_dependencies(${PROJECT_NAME} ZAPDUtils libultraship - storm - glew_s ) -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") -find_library(SDL2_LIB SDL2 GLEW) -else() -find_library(SDL2_LIB SDL2) -endif() if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") set(ADDITIONAL_LIBRARY_DEPENDENCIES "libultraship;" "ZAPDUtils;" - "opengl32;" "glu32;" "SDL2;" "SDL2main;" "glfw3dll;" - "glew32s;" - "storm;" "winmm;" "imm32;" "version;" @@ -1748,48 +1719,24 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set(ADDITIONAL_LIBRARY_DEPENDENCIES "libultraship;" "ZAPDUtils;" - "opengl32;" "glu32;" "SDL2;" "SDL2main;" "glfw3dll;" - "glew32s;" - "storm;" "winmm;" "imm32;" "version;" "setupapi" ) endif() -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - find_package(SDL2) - find_package(GLEW) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads REQUIRED) - set(ADDITIONAL_LIBRARY_DEPENDENCIES - "libultraship;" - "ZAPDUtils;" - "storm;" - SDL2::SDL2 - GLEW::GLEW - ${OPENGL_opengl_LIBRARY} - ${CMAKE_DL_LIBS} - Threads::Threads - ) else() find_package(SDL2) - find_package(PulseAudio) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) set(ADDITIONAL_LIBRARY_DEPENDENCIES "libultraship;" "ZAPDUtils;" - "storm;" SDL2::SDL2 - ${PULSEAUDIO_LIBRARY} - glew_s - ${OPENGL_glx_LIBRARY} - ${OPENGL_opengl_LIBRARY} ${CMAKE_DL_LIBS} Threads::Threads ) @@ -1815,47 +1762,24 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_property(TARGET glfw3dll PROPERTY IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib) - add_library(glew32s STATIC IMPORTED ) - set_property(TARGET glew32s PROPERTY - IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x64/glew32s.lib ) - set_property(TARGET glew32s PROPERTY - IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x64/glew32s.lib) - - #add_library(StormLibRUS32 STATIC IMPORTED ) - # set_property(TARGET StormLibRUS32 PROPERTY - # IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) - # set_property(TARGET StormLibRUS32 PROPERTY - # IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") + add_library( SDL2 STATIC IMPORTED ) + set_property(TARGET SDL2 PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib ) + set_property(TARGET SDL2 PROPERTY + IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib) - add_library( SDL2 STATIC IMPORTED ) - set_property(TARGET SDL2 PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib ) - set_property(TARGET SDL2 PROPERTY - IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib) + add_library( SDL2main STATIC IMPORTED ) + set_property(TARGET SDL2main PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib ) + set_property(TARGET SDL2main PROPERTY + IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib) - add_library( SDL2main STATIC IMPORTED ) - set_property(TARGET SDL2main PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib ) - set_property(TARGET SDL2main PROPERTY - IMPORTED_IMPLIB ../libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib) - - add_library(glfw3dll STATIC IMPORTED ) - set_property(TARGET glfw3dll PROPERTY + add_library(glfw3dll STATIC IMPORTED ) + set_property(TARGET glfw3dll PROPERTY IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib ) - set_property(TARGET glfw3dll PROPERTY - IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib) - - add_library(glew32s STATIC IMPORTED ) - set_property(TARGET glew32s PROPERTY - IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x86/glew32s.lib ) - set_property(TARGET glew32s PROPERTY - IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLEW/x86/glew32s.lib) + set_property(TARGET glfw3dll PROPERTY + IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/Lib/GLFW/glfw3dll.lib) - #add_library(StormLibRUS32 STATIC IMPORTED ) - # set_property(TARGET StormLibRUS32 PROPERTY - # IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib ) - # set_property(TARGET StormLibRUS32 PROPERTY - # IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/../libultraship/libultraship/StormLibRUS32.lib) - endif() + endif() endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") @@ -1864,4 +1788,3 @@ INSTALL(TARGETS soh DESTINATION bin) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin) - From cd12ad4b3dd5baf892710d6ce948ab45b3c2605a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 11 Jul 2022 11:41:02 +0200 Subject: [PATCH 050/155] update BUILDING-cmake.md --- BUILDING-cmake.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index db4f2282b1d..57b12c91c65 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -44,7 +44,7 @@ cd OTRExporter & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release # copy ROM for asset extraction -#.\extract_assets.py +.\extract_assets.py cd ../soh & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/Win32" -G "Visual Studio 17 2022" -T v142 -A Win32 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-v142" & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release @@ -61,8 +61,6 @@ All-in-One with packaging support (only 64 bit): execute at top-level: ~~~ -git clone https://github.com/Perlmint/glew-cmake.git external/glew - cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake ~~~ @@ -79,7 +77,6 @@ using native build (not docker) ~~~ cd ShipWright -git clone https://github.com/Perlmint/glew-cmake.git external/glew ~~~ (will be built with below cmake commands) - no extra build needed From 2fda3fcf9e30f5b345e2bec813ad24bb36249266 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 11 Jul 2022 12:28:29 +0200 Subject: [PATCH 051/155] fix win32 lib path --- libultraship/libultraship/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 2827fef251d..1c8dc38b61a 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -626,8 +626,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") add_library(glew32s STATIC IMPORTED ) set_property(TARGET glew32s PROPERTY - IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib ) + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib ) set_property(TARGET glew32s PROPERTY - IMPORTED_IMPLIB ${PROJECT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib) + IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib) endif() endif() From 07014bc0e44db27db45a4bdfa7f08137f9bcd93c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 11 Jul 2022 15:29:25 +0200 Subject: [PATCH 052/155] fix linuxdeploy in container; added CMAKE_SOURCE_DIR to glew --- CMake/Packaging.cmake | 1 + libultraship/libultraship/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index 65d7950771d..bf89574e46e 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -74,6 +74,7 @@ execute_process( OUTPUT=${CPACK_OUTPUT_FILE_PREFIX}/${CPACK_PACKAGE_FILE_NAME}.appimage VERSION=$,${CPACK_PACKAGE_VERSION},0.1.0> ${LINUXDEPLOY_EXECUTABLE} + --appimage-extract-and-run --appdir=${CPACK_TEMPORARY_DIRECTORY} --executable=$ $<$>:--desktop-file=$> diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 1c8dc38b61a..7c76f21bdc4 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -462,15 +462,15 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") FetchContent_Declare( glew GIT_REPOSITORY https://github.com/Perlmint/glew-cmake.git - SOURCE_DIR ../../external/glew + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../external/glew ) FetchContent_MakeAvailable(glew) - add_subdirectory(../../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/glew/build/cmake ${CMAKE_BINARY_DIR}/glew EXCLUDE_FROM_ALL) endif() endif() if (NOT GLEW_FOUND) - set(GLEW-INCLUDE ../../external/glew/include) + set(GLEW-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/../../external/glew/include) else() set(GLEW-INCLUDE ${GLEW_INCLUDE_DIRS}) endif() From d510ae4a262b9e4e849634252ee19ab35e050dc7 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 16 Jul 2022 12:14:29 +0200 Subject: [PATCH 053/155] update to 3.0.0 --- CMakeLists.txt | 2 +- libultraship/libultraship/CMakeLists.txt | 20 +++- soh/CMakeLists.txt | 122 ++++++++++++++++++++++- 3 files changed, 137 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cae8d5d367d..c5c27d331b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") project(Ship C CXX) -set(PROJECT_VERSION_MAJOR "2") +set(PROJECT_VERSION_MAJOR "3") set(PROJECT_VERSION_MINOR "0") set(PROJECT_VERSION_PATCH "0") diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 7c76f21bdc4..058c3a17c57 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -70,15 +70,18 @@ endif () source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__extra}) -set(Source_Files__Config - "ConfigFile.cpp" - "ConfigFile.h" -) source_group("Source Files\\Config" FILES ${Source_Files__Config}) set(Source_Files__Controller + "ControlDeck.cpp" + "ControlDeck.h" "Controller.cpp" "Controller.h" + "ControllerAttachment.cpp" + "ControllerAttachment.h" + "DisconnectedController.h" + "InputEditor.cpp" + "InputEditor.h" "KeyboardController.cpp" "KeyboardController.h" "SDLController.cpp" @@ -212,6 +215,12 @@ set(Source_Files__Lib__ImGui__Windows endif () source_group("Source Files\\Lib\\ImGui" FILES ${Source_Files__Lib__ImGui} ${Source_Files__Lib__ImGui__Windows}) +set(Source_Files__Lib__Mercury + "Lib/Mercury/Mercury.cpp" + "Lib/Mercury/Mercury.h" +) +source_group("Source Files\\Lib\\Mercury" FILES ${Source_Files__Lib__Mercury}) + set(Source_Files__Lib__stb "Lib/stb/stb_image.h" "Lib/stb/stb_image_write.h" @@ -315,7 +324,6 @@ set(ALL_FILES ${Header_Files__Resources__Files} ${Source_Files__Audio} ${Source_Files__Audio__extra} - ${Source_Files__Config} ${Source_Files__Controller} ${Source_Files__Controller__Attachment} ${Source_Files__CustomImpl} @@ -328,6 +336,7 @@ set(ALL_FILES ${Source_Files__Lib__Fast3D__extra} ${Source_Files__Lib__ImGui} ${Source_Files__Lib__ImGui__Windows} + ${Source_Files__Lib__Mercury} ${Source_Files__Lib__stb} ${Source_Files__Lib__dr_libs} ${Source_Files__Lib__tinyxml2} @@ -456,6 +465,7 @@ endif() if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") find_package(SDL2) find_package(GLEW) + find_package(X11) if (NOT GLEW_FOUND) if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin") include (FetchContent) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 0b031b190d2..5ca8e49fad7 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -172,6 +172,50 @@ set(Header_Files__soh__Enhancements__debugger ) source_group("Header Files\\soh\\Enhancements\\debugger" FILES ${Header_Files__soh__Enhancements__debugger}) +set(Header_Files__soh__Enhancements__randomizer + "soh/Enhancements/randomizer/randomizer.h" + "soh/Enhancements/randomizer/randomizer_item_tracker.h" +) +source_group("Header Files\\soh\\Enhancements\\randomizer" FILES ${Header_Files__soh__Enhancements__randomizer}) + +set(Header_Files__soh__Enhancements__randomizer__3drando + "soh/Enhancements/randomizer/3drando/category.hpp" + "soh/Enhancements/randomizer/3drando/cosmetics.hpp" + "soh/Enhancements/randomizer/3drando/custom_messages.hpp" + "soh/Enhancements/randomizer/3drando/debug.hpp" + "soh/Enhancements/randomizer/3drando/dungeon.hpp" + "soh/Enhancements/randomizer/3drando/entrance.hpp" + "soh/Enhancements/randomizer/3drando/fill.hpp" + "soh/Enhancements/randomizer/3drando/hint_list.hpp" + "soh/Enhancements/randomizer/3drando/hints.hpp" + "soh/Enhancements/randomizer/3drando/item.hpp" + "soh/Enhancements/randomizer/3drando/item_list.hpp" + "soh/Enhancements/randomizer/3drando/item_location.hpp" + "soh/Enhancements/randomizer/3drando/item_pool.hpp" + "soh/Enhancements/randomizer/3drando/keys.hpp" + "soh/Enhancements/randomizer/3drando/location_access.hpp" + "soh/Enhancements/randomizer/3drando/logic.hpp" + "soh/Enhancements/randomizer/3drando/menu.hpp" + "soh/Enhancements/randomizer/3drando/music.hpp" + "soh/Enhancements/randomizer/3drando/patch.hpp" + "soh/Enhancements/randomizer/3drando/playthrough.hpp" + "soh/Enhancements/randomizer/3drando/pool_functions.hpp" + "soh/Enhancements/randomizer/3drando/preset.hpp" + "soh/Enhancements/randomizer/3drando/rando_main.hpp" + "soh/Enhancements/randomizer/3drando/random.hpp" + "soh/Enhancements/randomizer/3drando/setting_descriptions.hpp" + "soh/Enhancements/randomizer/3drando/settings.hpp" + "soh/Enhancements/randomizer/3drando/shops.hpp" + "soh/Enhancements/randomizer/3drando/sound_effects.hpp" + "soh/Enhancements/randomizer/3drando/spoiler_log.hpp" + "soh/Enhancements/randomizer/3drando/starting_inventory.hpp" + "soh/Enhancements/randomizer/3drando/text.hpp" + "soh/Enhancements/randomizer/3drando/tinyxml2.h" + "soh/Enhancements/randomizer/3drando/trial.hpp" + "soh/Enhancements/randomizer/3drando/utils.hpp" +) +source_group("Header Files\\soh\\Enhancements\\randomizer\\3drando" FILES ${Header_Files__soh__Enhancements__randomizer__3drando}) + set(Source_Files__soh "soh/GbiWrap.cpp" "soh/OTRAudio.h" @@ -213,6 +257,76 @@ set(Source_Files__soh__Enhancements__debugger ) source_group("Source Files\\soh\\Enhancements\\debugger" FILES ${Source_Files__soh__Enhancements__debugger}) +set(Source_Files__soh__Enhancements__randomizer + "soh/Enhancements/randomizer/randomizer.cpp" + "soh/Enhancements/randomizer/randomizer_item_tracker.cpp" +) +source_group("Source Files\\soh\\Enhancements\\randomizer" FILES ${Source_Files__soh__Enhancements__randomizer}) + +set(Source_Files__soh__Enhancements__randomizer__3drando + "soh/Enhancements/randomizer/3drando/cosmetics.cpp" + "soh/Enhancements/randomizer/3drando/custom_messages.cpp" + "soh/Enhancements/randomizer/3drando/debug.cpp" + "soh/Enhancements/randomizer/3drando/dungeon.cpp" + "soh/Enhancements/randomizer/3drando/entrance.cpp" + "soh/Enhancements/randomizer/3drando/fill.cpp" + "soh/Enhancements/randomizer/3drando/hint_list.cpp" + "soh/Enhancements/randomizer/3drando/hints.cpp" + "soh/Enhancements/randomizer/3drando/item.cpp" + "soh/Enhancements/randomizer/3drando/item_list.cpp" + "soh/Enhancements/randomizer/3drando/item_location.cpp" + "soh/Enhancements/randomizer/3drando/item_pool.cpp" + "soh/Enhancements/randomizer/3drando/location_access.cpp" + "soh/Enhancements/randomizer/3drando/logic.cpp" + "soh/Enhancements/randomizer/3drando/menu.cpp" + "soh/Enhancements/randomizer/3drando/music.cpp" + "soh/Enhancements/randomizer/3drando/patch.cpp" + "soh/Enhancements/randomizer/3drando/playthrough.cpp" + "soh/Enhancements/randomizer/3drando/preset.cpp" + "soh/Enhancements/randomizer/3drando/rando_main.cpp" + "soh/Enhancements/randomizer/3drando/random.cpp" + "soh/Enhancements/randomizer/3drando/setting_descriptions.cpp" + "soh/Enhancements/randomizer/3drando/settings.cpp" + "soh/Enhancements/randomizer/3drando/shops.cpp" + "soh/Enhancements/randomizer/3drando/sound_effects.cpp" + "soh/Enhancements/randomizer/3drando/spoiler_log.cpp" + "soh/Enhancements/randomizer/3drando/starting_inventory.cpp" + "soh/Enhancements/randomizer/3drando/tinyxml2.cpp" + "soh/Enhancements/randomizer/3drando/trial.cpp" + "soh/Enhancements/randomizer/3drando/utils.cpp" +) +source_group("Source Files\\soh\\Enhancements\\randomizer\\3drando" FILES ${Source_Files__soh__Enhancements__randomizer__3drando}) + +set(Source_Files__soh__Enhancements__randomizer__3drando__hint_list + "soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_dungeon.cpp" + "soh/Enhancements/randomizer/3drando/hint_list/hint_list_exclude_overworld.cpp" + "soh/Enhancements/randomizer/3drando/hint_list/hint_list_item.cpp" +) +source_group("Source Files\\soh\\Enhancements\\randomizer\\3drando\\hint_list" FILES ${Source_Files__soh__Enhancements__randomizer__3drando__hint_list}) + +set(Source_Files__soh__Enhancements__randomizer__3drando__location_access + "soh/Enhancements/randomizer/3drando/location_access/locacc_bottom_of_the_well.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_castle_town.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_death_mountain.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_deku_tree.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_fire_temple.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_forest_temple.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_gerudo_training_grounds.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_gerudo_valley.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_hyrule_field.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_ice_cavern.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_jabujabus_belly.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_kakariko.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_lost_woods.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_shadow_temple.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_water_temple.cpp" + "soh/Enhancements/randomizer/3drando/location_access/locacc_zoras_domain.cpp" +) +source_group("Source Files\\soh\\Enhancements\\randomizer\\3drando\\location_access" FILES ${Source_Files__soh__Enhancements__randomizer__3drando__location_access}) + set(Source_Files__src__boot "src/boot/assert.c" "src/boot/boot_main.c" @@ -1417,12 +1531,18 @@ set(ALL_FILES ${Header_Files} ${Header_Files__include} ${Header_Files__soh__Enhancements} - ${Header_Files__soh__Enhancements__debugger} ${Header_Files__soh__Enhancements__cosmetics} + ${Header_Files__soh__Enhancements__debugger} + ${Header_Files__soh__Enhancements__randomizer} + ${Header_Files__soh__Enhancements__randomizer__3drando} ${Source_Files__soh} ${Source_Files__soh__Enhancements} ${Source_Files__soh__Enhancements__cosmetics} ${Source_Files__soh__Enhancements__debugger} + ${Source_Files__soh__Enhancements__randomizer} + ${Source_Files__soh__Enhancements__randomizer__3drando} + ${Source_Files__soh__Enhancements__randomizer__3drando__hint_list} + ${Source_Files__soh__Enhancements__randomizer__3drando__location_access} ${Source_Files__src__boot} ${Source_Files__src__buffers} ${Source_Files__src__code} From 5559ebba65dae2f812e3e0f8863a4800c0bd582d Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 22 Jul 2022 07:56:27 +0200 Subject: [PATCH 054/155] updated Windows part --- BUILDING-cmake.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index 57b12c91c65..d3c554fba08 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -1,10 +1,11 @@ Windows ======= -libpng and zlib will be used from VCPKG. +libpng, zlib and bzip2 will be used from VCPKG. My vcpkg is located at d:/VCPKG -I also created a new triplet to be used. +I also created a new triplets to be used. +For 64 bit: ~~~ x64-windows-v142: set(VCPKG_TARGET_ARCHITECTURE x64) @@ -12,10 +13,22 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_PLATFORM_TOOLSET v142) ~~~ - -prepare libpng: +same for 32 bit (only required for classical build): +~~~ +x86-windows-v142: +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_PLATFORM_TOOLSET v142) +~~~ +prepare libs: ~~~ -D:\vcpkg\vcpkg.exe install libpng --triple=x86-windows-v142 +D:\vcpkg\vcpkg.exe install libpng --triple=x86-windows-v142 (only required for classical build) +D:\vcpkg\vcpkg.exe install libpng --triple=x64-windows-v142 +D:\vcpkg\vcpkg.exe install zlib --triple=x86-windows-v142 (only required for classical build) +D:\vcpkg\vcpkg.exe install zlib --triple=x64-windows-v142 +D:\vcpkg\vcpkg.exe install bzip2 --triple=x86-windows-v142 (only required for classical build) +D:\vcpkg\vcpkg.exe install bzip2 --triple=x64-windows-v142 ~~~ ~~~ @@ -50,7 +63,7 @@ cd ../soh & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release cd ../OTRGui & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release ~~~ Linux (Ubuntu 22.04) From d15563ce8b02b3d314d78c32a77867a20c6342a6 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 22 Jul 2022 11:24:43 +0200 Subject: [PATCH 055/155] clarify classical build --- BUILDING-cmake.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index d3c554fba08..d454cbfb31a 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -46,8 +46,8 @@ cd .\build\x64 & 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP ~~~ -Classical build ---------------- +Classical build (soh 32 bit) +---------------------------- ~~~ # # build SoH @@ -85,8 +85,8 @@ cpack -G ZIP cpack -G External (does appimage - experimental) ~~~ -using native build (not docker) -------------------------------- +Classical build (soh 32 bit) +---------------------------- ~~~ cd ShipWright From e0545baa8bc5544b031caf85e3a4230c95e6683c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 22 Jul 2022 15:25:53 +0200 Subject: [PATCH 056/155] update to main; add MacOS --- CMake/Mac-gnu-toolchain.cmake | 5 ++-- CMake/Packaging-2.cmake | 8 +++++++ CMakeLists.txt | 28 +++++++++++++++++++++++ OTRExporter/CMake/Mac-gnu-toolchain.cmake | 11 +++++++++ libultraship/libultraship/CMakeLists.txt | 20 +++++++++++++--- soh/CMake/Mac-gnu-toolchain.cmake | 5 ++-- 6 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 OTRExporter/CMake/Mac-gnu-toolchain.cmake diff --git a/CMake/Mac-gnu-toolchain.cmake b/CMake/Mac-gnu-toolchain.cmake index b4f27a2a06b..5a1c690394a 100644 --- a/CMake/Mac-gnu-toolchain.cmake +++ b/CMake/Mac-gnu-toolchain.cmake @@ -1,6 +1,7 @@ # which compilers to use for C and C++ -set(CMAKE_C_COMPILER gcc) -set(CMAKE_CXX_COMPILER g++) +set(CMAKE_C_COMPILER gcc-12) +set(CMAKE_CXX_COMPILER g++-12) +set(CMAKE_OBJCXX_COMPILER clang++) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index aa205aa5851..2c9fb816d20 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -14,3 +14,11 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) SET(CPACK_MONOLITHIC_INSTALL 1) set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") endif() + +if (CPACK_GENERATOR MATCHES "Bundle") + set(CPACK_BUNDLE_NAME "soh") + set(CPACK_BUNDLE_PLIST "../soh/macosx/Info.plist") + set(CPACK_BUNDLE_ICON "macosx/soh.icns") + set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh.app") +endif() + diff --git a/CMakeLists.txt b/CMakeLists.txt index c5c27d331b4..8720461afe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,10 @@ set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") #set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") - issue with soh compile with MSVC +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") +set(MACOSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) +endif() + project(Ship C CXX) set(PROJECT_VERSION_MAJOR "3") @@ -97,7 +101,9 @@ add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) add_subdirectory(ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) add_subdirectory(OTRExporter) add_subdirectory(soh) +if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") add_subdirectory(OTRGui) +endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") @@ -132,10 +138,32 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") endif() endif() +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +add_custom_target(CreateOSXIcons + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset^M + COMMAND sips -z 16 16 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png + COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png + COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png + COMMAND sips -z 64 64 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32@2x.png + COMMAND sips -z 128 128 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128.png + COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128@2x.png + COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256.png + COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256@2x.png + COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512.png + COMMAND cp soh/macosx/sohIcon.png ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512@2x.png + COMMAND iconutil -c icns -o ${CMAKE_BINARY_DIR}/macosx/soh.icns ${CMAKE_BINARY_DIR}/macosx/soh.iconset + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Creating OSX icons ..." + ) +add_dependencies(soh CreateOSXIcons) +endif() + if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CPACK_GENERATOR "DEB;ZIP") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") set(CPACK_GENERATOR "ZIP") +elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(CPACK_GENERATOR "Bundle") endif() set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) diff --git a/OTRExporter/CMake/Mac-gnu-toolchain.cmake b/OTRExporter/CMake/Mac-gnu-toolchain.cmake new file mode 100644 index 00000000000..5a1c690394a --- /dev/null +++ b/OTRExporter/CMake/Mac-gnu-toolchain.cmake @@ -0,0 +1,11 @@ +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER gcc-12) +set(CMAKE_CXX_COMPILER g++-12) +set(CMAKE_OBJCXX_COMPILER clang++) + +# adjust the default behaviour of the FIND_XXX() commands: +# search headers and libraries in the target environment, search +# programs in the host environment +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 058c3a17c57..304c6417371 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -1,5 +1,10 @@ set(PROJECT_NAME libultraship) +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + enable_language(OBJCXX) + #set(CMAKE_OBJCXX_FLAGS "-Wno-deprecated-declarations -ObjC++") +endif() + ################################################################################ # Source groups ################################################################################ @@ -70,8 +75,6 @@ endif () source_group("Source Files\\Audio" FILES ${Source_Files__Audio} ${Source_Files__Audio__extra}) -source_group("Source Files\\Config" FILES ${Source_Files__Config}) - set(Source_Files__Controller "ControlDeck.cpp" "ControlDeck.h" @@ -79,7 +82,6 @@ set(Source_Files__Controller "Controller.h" "ControllerAttachment.cpp" "ControllerAttachment.h" - "DisconnectedController.h" "InputEditor.cpp" "InputEditor.h" "KeyboardController.cpp" @@ -87,6 +89,7 @@ set(Source_Files__Controller "SDLController.cpp" "SDLController.h" "UltraController.h" + "VirtualController.h" ) source_group("Source Files\\Controller" FILES ${Source_Files__Controller}) @@ -319,6 +322,14 @@ set(Source_Files__Resources__mpq ) source_group("Source Files\\Resources\\mpq" FILES ${Source_Files__Resources__mpq}) +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") +set(Source_Files__Darwin + "OSXFolderManager.mm" + "OSXFolderManager.h" +) +source_group("Source Files\\Darwin" FILES ${Source_Files__Darwin}) +endif() + set(ALL_FILES ${Header_Files__Resources__Factories} ${Header_Files__Resources__Files} @@ -347,6 +358,7 @@ set(ALL_FILES ${Source_Files__Resources__Factories} ${Source_Files__Resources__Files} ${Source_Files__Resources__mpq} + ${Source_Files__Resources__Darwin} ) ################################################################################ @@ -604,6 +616,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") find_package(SDL2) find_package(GLEW) find_package(OpenGL QUIET) + find_Library(OSX_FOUNDATION Foundation) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) target_link_libraries(${PROJECT_NAME} @@ -613,6 +626,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ${OPENGL_opengl_LIBRARY} ${CMAKE_DL_LIBS} Threads::Threads + ${OSX_FOUNDATION} ) else() target_link_libraries(${PROJECT_NAME} diff --git a/soh/CMake/Mac-gnu-toolchain.cmake b/soh/CMake/Mac-gnu-toolchain.cmake index b4f27a2a06b..5a1c690394a 100644 --- a/soh/CMake/Mac-gnu-toolchain.cmake +++ b/soh/CMake/Mac-gnu-toolchain.cmake @@ -1,6 +1,7 @@ # which compilers to use for C and C++ -set(CMAKE_C_COMPILER gcc) -set(CMAKE_CXX_COMPILER g++) +set(CMAKE_C_COMPILER gcc-12) +set(CMAKE_CXX_COMPILER g++-12) +set(CMAKE_OBJCXX_COMPILER clang++) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search From c5fae24bfca9438c319a05872736d7e78dae3cfd Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 22 Jul 2022 19:39:15 +0200 Subject: [PATCH 057/155] fix typo --- libultraship/libultraship/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 304c6417371..65868fd332a 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -358,7 +358,7 @@ set(ALL_FILES ${Source_Files__Resources__Factories} ${Source_Files__Resources__Files} ${Source_Files__Resources__mpq} - ${Source_Files__Resources__Darwin} + ${Source_Files__Darwin} ) ################################################################################ From 413c667d07b1df010efdc3018cc24318f0978c5b Mon Sep 17 00:00:00 2001 From: David Chavez Date: Fri, 22 Jul 2022 20:44:15 +0200 Subject: [PATCH 058/155] Get macOS to compile --- OTRExporter/OTRExporter/CMakeLists.txt | 2 +- ZAPDTR/ZAPD/CMakeLists.txt | 2 +- ZAPDTR/ZAPDUtils/CMakeLists.txt | 4 ++-- soh/CMakeLists.txt | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index 90b53c0a02c..13a7cba55eb 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -211,7 +211,7 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error -Wno-unused-parameter diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 9ae47a3f93f..c0a3f80a19e 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -396,7 +396,7 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error -Wno-unused-parameter diff --git a/ZAPDTR/ZAPDUtils/CMakeLists.txt b/ZAPDTR/ZAPDUtils/CMakeLists.txt index 73e10700e58..ba090ddd7f6 100644 --- a/ZAPDTR/ZAPDUtils/CMakeLists.txt +++ b/ZAPDTR/ZAPDUtils/CMakeLists.txt @@ -126,7 +126,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$:" "_DEBUG" @@ -195,7 +195,7 @@ if(MSVC) endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error -Wno-unused-parameter diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 5ca8e49fad7..9a7a38fbbeb 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1677,7 +1677,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|AppleClang") target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$:" "_DEBUG" @@ -1763,16 +1763,19 @@ if(MSVC) endif() endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error + -Wno-return-type -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wno-missing-field-initializers -Wno-parentheses -Wno-narrowing + -Wno-c++11-narrowing + -Wno-implicit-function-declaration $<$:-fpermissive> $<$:-Wno-deprecated-enum-enum-conversion> -pthread From 7f8f775fa995b4a25fda45916f3155245b26baaf Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Fri, 22 Jul 2022 21:38:06 +0200 Subject: [PATCH 059/155] small fixes --- CMakeLists.txt | 2 +- soh/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8720461afe6..e54a6d1fbe2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,7 +140,7 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "Darwin") add_custom_target(CreateOSXIcons - COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset^M + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset COMMAND sips -z 16 16 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 9a7a38fbbeb..8759d697771 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1582,6 +1582,10 @@ else() set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "soh.elf" ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME "soh.app" + ) endif() ################################################################################ # MSVC runtime library From 932d82794daa0cdcec539843136be700fa7e043b Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sat, 23 Jul 2022 11:39:25 +0200 Subject: [PATCH 060/155] [macos] intermediate binary with arch name --- CMake/Packaging-2.cmake | 2 +- soh/CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index 2c9fb816d20..3f2f815087f 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -19,6 +19,6 @@ if (CPACK_GENERATOR MATCHES "Bundle") set(CPACK_BUNDLE_NAME "soh") set(CPACK_BUNDLE_PLIST "../soh/macosx/Info.plist") set(CPACK_BUNDLE_ICON "macosx/soh.icns") - set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh.app") + set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh-${CMAKE_SYSTEM_PROCESSOR}") endif() diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 8759d697771..47f5bc826fc 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1578,14 +1578,14 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" ) endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME "soh-${CMAKE_SYSTEM_PROCESSOR}" + ) else() set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "soh.elf" ) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set_target_properties(${PROJECT_NAME} PROPERTIES - OUTPUT_NAME "soh.app" - ) endif() ################################################################################ # MSVC runtime library From c39b858e26a2e45b9d0c94ff6f3430ac9791f062 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 12:48:34 +0200 Subject: [PATCH 061/155] more packaging fixes --- CMake/Packaging-2.cmake | 10 +++++++++- OTRGui/CMakeLists.txt | 5 +++-- soh/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index 3f2f815087f..ea9a6efea72 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -1,10 +1,18 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) +set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1) +set(CPACK_COMPONENTS_ALL "ship" "appimage") + if (NOT CPACK_GENERATOR STREQUAL "External") list(REMOVE_ITEM CPACK_COMPONENTS_ALL "appimage") endif() +set(CPACK_BUNDLE_COMPONENT_INSTALL ON) +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) + if (CPACK_GENERATOR MATCHES "DEB|RPM") # https://unix.stackexchange.com/a/11552/254512 -set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship")#/${CMAKE_PROJECT_VERSION}") +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship/bin")#/${CMAKE_PROJECT_VERSION}") +set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 0) elseif (CPACK_GENERATOR MATCHES "ZIP") set(CPACK_PACKAGING_INSTALL_PREFIX "") endif() diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 21c7908bbb1..730d5c3cf7a 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -47,9 +47,10 @@ add_dependencies(${PROJECT_NAME} Assets1 Assets2 Assets3) target_link_libraries(${PROJECT_NAME} PUBLIC raylib) -INSTALL(TARGETS OTRGui DESTINATION bin) +INSTALL(TARGETS OTRGui DESTINATION bin COMPONENT ship) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets DESTINATION bin + COMPONENT ship ) -INSTALL(TARGETS ZAPD DESTINATION bin/assets/extractor) +INSTALL(TARGETS ZAPD DESTINATION bin/assets/extractor COMPONENT ship) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 47f5bc826fc..f78073a28a4 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1911,7 +1911,7 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") -INSTALL(TARGETS soh DESTINATION bin) +INSTALL(TARGETS soh DESTINATION bin COMPONENT ship) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin) From 3a4926255e503aeead636c1a65c79db6d264486e Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 12:52:59 +0200 Subject: [PATCH 062/155] more packaging fixes --- soh/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index f78073a28a4..3eb014fb858 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1914,4 +1914,11 @@ target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES INSTALL(TARGETS soh DESTINATION bin COMPONENT ship) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) -INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin) +INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin COMPONENT ship) + +install(CODE " + include(InstallRequiredSystemLibraries) + include(BundleUtilities) + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-\${CMAKE_SYSTEM_PROCESSOR}\" \"\" \"${dirs}\") + ") + From ece42f9641bdc2aeb3ed2e5f7806a8422f444b13 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 13:10:32 +0200 Subject: [PATCH 063/155] more packaging fixes --- OTRGui/CMakeLists.txt | 6 +++--- soh/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 730d5c3cf7a..c2027ee424a 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -47,10 +47,10 @@ add_dependencies(${PROJECT_NAME} Assets1 Assets2 Assets3) target_link_libraries(${PROJECT_NAME} PUBLIC raylib) -INSTALL(TARGETS OTRGui DESTINATION bin COMPONENT ship) +INSTALL(TARGETS OTRGui DESTINATION . COMPONENT ship) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/assets - DESTINATION bin + DESTINATION . COMPONENT ship ) -INSTALL(TARGETS ZAPD DESTINATION bin/assets/extractor COMPONENT ship) +INSTALL(TARGETS ZAPD DESTINATION assets/extractor COMPONENT ship) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 3eb014fb858..26b1b34111a 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1911,10 +1911,10 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") -INSTALL(TARGETS soh DESTINATION bin COMPONENT ship) +INSTALL(TARGETS soh DESTINATION . COMPONENT ship) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) -INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION bin COMPONENT ship) +INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION . COMPONENT ship) install(CODE " include(InstallRequiredSystemLibraries) From d0a2b1bae8f0376f678e3fb8ee864e1ec834c788 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 13:20:11 +0200 Subject: [PATCH 064/155] fixup_bundle only on MacOS --- soh/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 26b1b34111a..f6f3c2d8e67 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1916,9 +1916,10 @@ INSTALL(TARGETS soh DESTINATION . COMPONENT ship) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION . COMPONENT ship) +if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Darwin") install(CODE " include(InstallRequiredSystemLibraries) include(BundleUtilities) fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-\${CMAKE_SYSTEM_PROCESSOR}\" \"\" \"${dirs}\") ") - +endif() From 76f8c825102375dc088263593c07531595df3cda Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 13:29:16 +0200 Subject: [PATCH 065/155] small appimage fix --- CMake/Packaging-2.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index ea9a6efea72..a33d70e2814 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -20,7 +20,7 @@ endif() if (CPACK_GENERATOR MATCHES "External") set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) SET(CPACK_MONOLITHIC_INSTALL 1) -set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/bin") endif() if (CPACK_GENERATOR MATCHES "Bundle") From 45cc3e00ab62c3cd59d70561d395f33fef7145a4 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 13:35:10 +0200 Subject: [PATCH 066/155] small appimage fix --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e54a6d1fbe2..acb147eec27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") -INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION bin COMPONENT appimage) +INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION . COMPONENT appimage) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") From f6a35e413c56cdbd986511876911dd27f47bbd2b Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sat, 23 Jul 2022 17:00:53 +0200 Subject: [PATCH 067/155] Fix macos bundling and lib bundling --- CMake/Packaging-2.cmake | 2 +- soh/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index a33d70e2814..e2d17ffb291 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -27,6 +27,6 @@ if (CPACK_GENERATOR MATCHES "Bundle") set(CPACK_BUNDLE_NAME "soh") set(CPACK_BUNDLE_PLIST "../soh/macosx/Info.plist") set(CPACK_BUNDLE_ICON "macosx/soh.icns") - set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh-${CMAKE_SYSTEM_PROCESSOR}") + set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh-macos") endif() diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index f6f3c2d8e67..c1acee2000b 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1580,7 +1580,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(${PROJECT_NAME} PROPERTIES - OUTPUT_NAME "soh-${CMAKE_SYSTEM_PROCESSOR}" + OUTPUT_NAME "soh-macos" ) else() set_target_properties(${PROJECT_NAME} PROPERTIES @@ -1916,10 +1916,10 @@ INSTALL(TARGETS soh DESTINATION . COMPONENT ship) execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION . COMPONENT ship) -if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Darwin") +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") install(CODE " include(InstallRequiredSystemLibraries) include(BundleUtilities) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-\${CMAKE_SYSTEM_PROCESSOR}\" \"\" \"${dirs}\") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-macos\" \"\" \"${dirs}\") ") endif() From 1af2a93352aedd60e14522c5166674120a9ccf5e Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sat, 23 Jul 2022 18:06:27 +0200 Subject: [PATCH 068/155] =?UTF-8?q?[macos]=20don=E2=80=99t=20include=20lin?= =?UTF-8?q?ux=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 +++ soh/CMakeLists.txt | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index acb147eec27..55b3af80970 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,10 @@ endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") + +if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION . COMPONENT appimage) +endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index c1acee2000b..381844ef521 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1911,10 +1911,17 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") +if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") INSTALL(TARGETS soh DESTINATION . COMPONENT ship) +endif() execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) + +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") +INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION ../MacOS COMPONENT ship) +else() INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION . COMPONENT ship) +endif() if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") install(CODE " From f41baad7bec47e945952596d7f8c87914c753261 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 19:21:31 +0200 Subject: [PATCH 069/155] use startup script for MacOS bundle --- CMake/Packaging-2.cmake | 2 +- soh/macosx/soh-macos.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 soh/macosx/soh-macos.sh diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index e2d17ffb291..d9ecd3c105a 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -27,6 +27,6 @@ if (CPACK_GENERATOR MATCHES "Bundle") set(CPACK_BUNDLE_NAME "soh") set(CPACK_BUNDLE_PLIST "../soh/macosx/Info.plist") set(CPACK_BUNDLE_ICON "macosx/soh.icns") - set(CPACK_BUNDLE_STARTUP_COMMAND "soh/soh-macos") + set(CPACK_BUNDLE_STARTUP_COMMAND "../soh/macosx/soh-macos.sh") endif() diff --git a/soh/macosx/soh-macos.sh b/soh/macosx/soh-macos.sh new file mode 100755 index 00000000000..6ce17f55d99 --- /dev/null +++ b/soh/macosx/soh-macos.sh @@ -0,0 +1,8 @@ +#!/bin/sh +BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/.*//'`" +RESOURCES="$BUNDLE/Contents/Resources" + +export DYLD_FRAMEWORK_PATH=$RESOURCES/Frameworks +export DYLD_LIBRARY_PATH=$RESOURCES/bin + +exec "$RESOURCES/soh-macos" From 921be85a3ac2bc8031ee6554b45035531f847b49 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 11:05:26 -0700 Subject: [PATCH 070/155] fix packaging on MacOS --- CMakeLists.txt | 2 ++ soh/CMakeLists.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55b3af80970..8f34af670f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,8 @@ file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PE find_package(Python COMPONENTS Interpreter) +file(REMOVE OTRExporter/oot.otr) + add_custom_target(ExtractAssets COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 381844ef521..a45397df8e5 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1911,9 +1911,7 @@ endif() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") -if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") INSTALL(TARGETS soh DESTINATION . COMPONENT ship) -endif() execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) From e2fd092c7a20449abf937e67da8e3aefa11b4bb0 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 21:50:17 +0200 Subject: [PATCH 071/155] adjust Windows zip --- CMake/Packaging-2.cmake | 5 +---- CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index d9ecd3c105a..6e51eec9f1d 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -1,14 +1,11 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) -set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1) +set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 0) set(CPACK_COMPONENTS_ALL "ship" "appimage") if (NOT CPACK_GENERATOR STREQUAL "External") list(REMOVE_ITEM CPACK_COMPONENTS_ALL "appimage") endif() -set(CPACK_BUNDLE_COMPONENT_INSTALL ON) -set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) - if (CPACK_GENERATOR MATCHES "DEB|RPM") # https://unix.stackexchange.com/a/11552/254512 set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship/bin")#/${CMAKE_PROJECT_VERSION}") diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f34af670f2..35056905d7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,10 @@ add_custom_target(CreateOSXIcons add_dependencies(soh CreateOSXIcons) endif() +if(CMAKE_SYSTEM_NAME MATCHES "Windows") +INSTALL(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION . COMPONENT ship RENAME readme.txt ) +endif() + if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CPACK_GENERATOR "DEB;ZIP") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") From 61f73b5bcb520c32c3faa6b8e78185613a7e4b02 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sat, 23 Jul 2022 12:02:56 -0700 Subject: [PATCH 072/155] delete oot.otr before generating new --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35056905d7b..0a419979521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,9 +121,8 @@ file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PE find_package(Python COMPONENTS Interpreter) -file(REMOVE OTRExporter/oot.otr) - add_custom_target(ExtractAssets + COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter COMMENT "Running asset extraction..." From c3a94dab445110353103afc893cff4858a0fe592 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 24 Jul 2022 13:36:16 +0200 Subject: [PATCH 073/155] integrate vcpkg build --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a419979521..7ec945a4a34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,12 @@ set(PROJECT_VERSION_MAJOR "3") set(PROJECT_VERSION_MINOR "0") set(PROJECT_VERSION_PATCH "0") +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +include(cmake/automate-vcpkg.cmake) + +vcpkg_bootstrap() +vcpkg_install_packages(zlib bzip2 libpng) +endif() ################################################################################ # Set target arch type if empty. Visual studio solution generator provides it. @@ -109,7 +115,7 @@ set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") -if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION . COMPONENT appimage) endif() From ea164d7d7f3fb851240d2b776292be7e9612d473 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Sun, 24 Jul 2022 13:38:05 +0200 Subject: [PATCH 074/155] integrate vcpkg build --- CMake/automate-vcpkg.cmake | 191 +++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 CMake/automate-vcpkg.cmake diff --git a/CMake/automate-vcpkg.cmake b/CMake/automate-vcpkg.cmake new file mode 100644 index 00000000000..ee07f6bfb4d --- /dev/null +++ b/CMake/automate-vcpkg.cmake @@ -0,0 +1,191 @@ +#------------------------------------------------------------------------------------------------------------ +# +# Automate-VCPKG by Andre Taulien +# =============================== +# +# Project Repository: https://github.com/REGoth-project/Automate-VCPKG +# License ..........: MIT, see end of file. +# +# Based on: https://github.com/sutambe/cpptruths/blob/vcpkg_cmake_blog/cpp0x/vcpkg_test/CMakeLists.txt +# +# +# While [Vcpkg](https://github.com/microsoft/vcpkg) on it's own is awesome, it does add +# a little bit of complexity to getting a project to build. Even more if the one trying +# to compile your application is not too fond of the commandline. Additionally, CMake +# commands tend to get rather long with the toolchain path. +# +# To keep things simple for new users who just want to get the project to build, this +# script offers a solution. +# +# Lets assume your main `CMakelists.txt` looks something like this: +# +# cmake_minimum_required (VERSION 3.12.0) +# project (MyProject) +# +# add_executable(MyExecutable main.c) +# +# To integrate Vcpkg into that `CMakelists.txt`, simple put the following lines before the +# call to `project(MyProject)`: +# +# include(cmake/automate-vcpkg.cmake) +# +# vcpkg_bootstrap() +# vcpkg_install_packages(libsquish physfs) +# +# The call to `vcpkg_bootstrap()` will clone the official Vcpkg repository and bootstrap it. +# If it detected an existing environment variable defining a valid `VCPKG_ROOT`, it will +# update the existing installation of Vcpkg. +# +# Arguments to `vcpkg_install_packages()` are the packages you want to install using Vcpkg. +# +# If you want to keep the possibility for users to chose their own copy of Vcpkg, you can +# simply not run the code snippet mentioned above, something like this will work: +# +# option(SKIP_AUTOMATE_VCPKG "When ON, you will need to built the packages +# required by MyProject on your own or supply your own vcpkg toolchain.") +# +# if (NOT SKIP_AUTOMATE_VCPKG) +# include(cmake/automate-vcpkg.cmake) +# +# vcpkg_bootstrap() +# vcpkg_install_packages(libsquish physfs) +# endif() +# +# Then, the user has to supply the packages on their own, be it through Vcpkg or manually +# specifying their locations. +#------------------------------------------------------------------------------------------------------------ + +cmake_minimum_required (VERSION 3.12) + +if(WIN32) + set(VCPKG_FALLBACK_ROOT ${CMAKE_CURRENT_BINARY_DIR}/vcpkg CACHE STRING "vcpkg configuration directory to use if vcpkg was not installed on the system before") +else() + set(VCPKG_FALLBACK_ROOT ${CMAKE_CURRENT_BINARY_DIR}/.vcpkg CACHE STRING "vcpkg configuration directory to use if vcpkg was not installed on the system before") +endif() + +# On Windows, Vcpkg defaults to x86, even on x64 systems. If we're +# doing a 64-bit build, we need to fix that. +if (WIN32) + + # Since the compiler checks haven't run yet, we need to figure + # out the value of CMAKE_SIZEOF_VOID_P ourselfs + + include(CheckTypeSize) + enable_language(C) + check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY) + + if (SIZEOF_VOID_P EQUAL 8) + message(STATUS "Using Vcpkg triplet 'x64-windows'") + + set(VCPKG_TRIPLET x64-windows) + endif() +endif() + +if(NOT DEFINED VCPKG_ROOT) + if(NOT DEFINED ENV{VCPKG_ROOT}) + set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT}) + else() + set(VCPKG_ROOT $ENV{VCPKG_ROOT}) + endif() +endif() + +# Installs a new copy of Vcpkg or updates an existing one +macro(vcpkg_bootstrap) + _install_or_update_vcpkg() + + # Find out whether the user supplied their own VCPKG toolchain file + if(NOT DEFINED ${CMAKE_TOOLCHAIN_FILE}) + # We know this wasn't set before so we need point the toolchain file to the newly found VCPKG_ROOT + set(CMAKE_TOOLCHAIN_FILE ${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake CACHE STRING "") + + # Just setting vcpkg.cmake as toolchain file does not seem to actually pull in the code + include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake) + + set(AUTOMATE_VCPKG_USE_SYSTEM_VCPKG OFF) + else() + # VCPKG_ROOT has been defined by the toolchain file already + set(AUTOMATE_VCPKG_USE_SYSTEM_VCPKG ON) + endif() + + message(STATUS "Automate VCPKG status:") + message(STATUS " VCPKG_ROOT.....: ${VCPKG_ROOT}") + message(STATUS " VCPKG_EXEC.....: ${VCPKG_EXEC}") + message(STATUS " VCPKG_BOOTSTRAP: ${VCPKG_BOOTSTRAP}") +endmacro() + +macro(_install_or_update_vcpkg) + if(NOT EXISTS ${VCPKG_ROOT}) + message(STATUS "Cloning vcpkg in ${VCPKG_ROOT}") + execute_process(COMMAND git clone https://github.com/Microsoft/vcpkg.git ${VCPKG_ROOT}) + + # If a reproducible build is desired (and potentially old libraries are # ok), uncomment the + # following line and pin the vcpkg repository to a specific githash. + # execute_process(COMMAND git checkout 745a0aea597771a580d0b0f4886ea1e3a94dbca6 WORKING_DIRECTORY ${VCPKG_ROOT}) + else() + # The following command has no effect if the vcpkg repository is in a detached head state. + message(STATUS "Auto-updating vcpkg in ${VCPKG_ROOT}") + execute_process(COMMAND git pull WORKING_DIRECTORY ${VCPKG_ROOT}) + endif() + + if(NOT EXISTS ${VCPKG_ROOT}/README.md) + message(FATAL_ERROR "***** FATAL ERROR: Could not clone vcpkg *****") + endif() + + if(WIN32) + set(VCPKG_EXEC ${VCPKG_ROOT}/vcpkg.exe) + set(VCPKG_BOOTSTRAP ${VCPKG_ROOT}/bootstrap-vcpkg.bat) + else() + set(VCPKG_EXEC ${VCPKG_ROOT}/vcpkg) + set(VCPKG_BOOTSTRAP ${VCPKG_ROOT}/bootstrap-vcpkg.sh) + endif() + + if(NOT EXISTS ${VCPKG_EXEC}) + message("Bootstrapping vcpkg in ${VCPKG_ROOT}") + execute_process(COMMAND ${VCPKG_BOOTSTRAP} WORKING_DIRECTORY ${VCPKG_ROOT}) + endif() + + if(NOT EXISTS ${VCPKG_EXEC}) + message(FATAL_ERROR "***** FATAL ERROR: Could not bootstrap vcpkg *****") + endif() + +endmacro() + +# Installs the list of packages given as parameters using Vcpkg +macro(vcpkg_install_packages) + + # Need the given list to be space-separated + #string (REPLACE ";" " " PACKAGES_LIST_STR "${ARGN}") + + message(STATUS "Installing/Updating the following vcpkg-packages: ${PACKAGES_LIST_STR}") + + if (VCPKG_TRIPLET) + set(ENV{VCPKG_DEFAULT_TRIPLET} "${VCPKG_TRIPLET}") + endif() + + execute_process( + COMMAND ${VCPKG_EXEC} install ${ARGN} + WORKING_DIRECTORY ${VCPKG_ROOT} + ) +endmacro() + +# MIT License +# +# Copyright (c) 2019 REGoth-project +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. From 18b714ac99f3858d9e1d61212301a49339a0a196 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 25 Jul 2022 06:17:22 +0200 Subject: [PATCH 075/155] search python also at {env.PYTHON} --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ec945a4a34..bf53f28de60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -find_package(Python COMPONENTS Interpreter) +find_package(Python COMPONENTS Interpreter PATHS $ENV{env.PYTHON}) add_custom_target(ExtractAssets COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr From 0380388dea4b70f3127849738ba44e9ecb88bc7d Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 25 Jul 2022 14:44:48 +0200 Subject: [PATCH 076/155] need to check for Python3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf53f28de60..e6fa76cf211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -find_package(Python COMPONENTS Interpreter PATHS $ENV{env.PYTHON}) +find_package(Python3 COMPONENTS Interpreter PATHS $ENV{env.PYTHON}) add_custom_target(ExtractAssets COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr From 46eb4a0ad5082278c35142b3d99a01b174cac7a8 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:56:02 +0200 Subject: [PATCH 077/155] Add distribution of LInux & macOS --- .ci/linux/build.sh | 6 +++ {scripts => .ci}/linux/soh.desktop | 0 {scripts => .ci}/linux/soh.sh | 0 CMakeLists.txt | 6 +-- Dockerfile | 52 ++++++++++++++---------- Jenkinsfile | 32 +++++++-------- libultraship/libultraship/CMakeLists.txt | 2 +- scripts/linux/build-appimage.sh | 34 ---------------- 8 files changed, 57 insertions(+), 75 deletions(-) create mode 100755 .ci/linux/build.sh rename {scripts => .ci}/linux/soh.desktop (100%) rename {scripts => .ci}/linux/soh.sh (100%) delete mode 100755 scripts/linux/build-appimage.sh diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh new file mode 100755 index 00000000000..ef03df406f0 --- /dev/null +++ b/.ci/linux/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cmake -H. -Bbuild-cmake -GNinja +cmake --build build-cmake + +cpack -G External diff --git a/scripts/linux/soh.desktop b/.ci/linux/soh.desktop similarity index 100% rename from scripts/linux/soh.desktop rename to .ci/linux/soh.desktop diff --git a/scripts/linux/soh.sh b/.ci/linux/soh.sh similarity index 100% rename from scripts/linux/soh.sh rename to .ci/linux/soh.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index e6fa76cf211..6516fe47fbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,11 +112,11 @@ add_subdirectory(OTRGui) endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) -set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/appimage/soh.desktop") +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/.ci/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") -if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") -INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/appimage/soh.sh" DESTINATION . COMPONENT appimage) +if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") +INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/.ci/soh.sh" DESTINATION . COMPONENT appimage) endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) diff --git a/Dockerfile b/Dockerfile index bf7d49ad551..3df2b44dcb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,28 +5,38 @@ ARG DEBIAN_FRONTEND=noninteractive ENV GCCVER=10 RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y \ - binutils \ - gcc-${GCCVER} \ - g++-${GCCVER} \ - p7zip-full \ - python3 \ - make \ - cmake \ - curl \ - git \ - lld \ - wget \ - libglew-dev \ - libsdl2-dev \ - zlib1g-dev \ - libbz2-dev \ - libpng-dev \ - libgles2-mesa-dev && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCCVER} 10 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCCVER} 10 + apt-get upgrade -y && \ + apt-get install -y \ + binutils \ + gcc-10 \ + g++-10 \ + patchelf \ + p7zip-full \ + python3.9 \ + make \ + curl \ + git \ + lld \ + libsdl2-dev \ + zlib1g-dev \ + libbz2-dev \ + libpng-dev \ + libgles2-mesa-dev && \ + ln -s /usr/bin/g++-10 /usr/bin/g++ && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 && \ + gcc --version && \ + g++ --version + +RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/cache /var/lib/log +RUN curl https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-Linux-x86_64.sh \ + -s -o /tmp/cmake-install.sh \ + && chmod u+x /tmp/cmake-install.sh \ + && mkdir /usr/bin/cmake \ + && /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \ + && rm /tmp/cmake-install.sh +ENV PATH="/usr/bin/cmake/bin:${PATH}" + RUN git clone https://github.com/Perlmint/glew-cmake.git && \ cmake glew-cmake && \ make -j$(nproc) && \ diff --git a/Jenkinsfile b/Jenkinsfile index 60f02225306..9dad9e8627a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,18 +97,12 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 docker build . -t soh docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash - docker exec sohcont scripts/linux/build.sh + docker exec sohcont .ci/linux/build.sh - mkdir build - mv soh/soh.elf build/ - mv OTRGui/build/OTRGui build/ - mv OTRGui/build/assets build/ - mv ZAPDTR/ZAPD.out build/assets/extractor/ - mv README.md readme.txt - - docker exec sohcont scripts/linux/build-appimage.sh - - 7z a soh-linux.7z SOH-Linux.AppImage readme.txt + mv README.md readme.txt + mv _packages/*.appimage SoH.AppImage + + 7z a soh-linux.7z SoH.AppImage readme.txt ''' } @@ -125,11 +119,6 @@ pipeline { agent { label "SoH-Mac-Builders" } - environment { - CC = 'clang -arch arm64 -arch x86_64' - CXX = 'clang++ -arch arm64 -arch x86_64' - MACOSX_DEPLOYMENT_TARGET = 10.15 - } steps { checkout([ $class: 'GitSCM', @@ -141,12 +130,23 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { sh ''' cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 +<<<<<<< HEAD cd soh make setup -j$(sysctl -n hw.physicalcpu) OPTFLAGS=-O2 DEBUG=0 LD="ld" make -j$(sysctl -n hw.physicalcpu) DEBUG=0 OPTFLAGS=-O2 LD="ld" make appbundle mv ../README.md readme.txt 7z a soh-mac.7z soh.app readme.txt +======= + + cmake -H. -Bbuild-cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_OBJCXX_COMPILER=clang++ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" + (cd build-cmake && cpack) + + mv README.md readme.txt + mv _packages/*.dmg SoH.dmg + + 7z a soh-mac.7z SoH.dmg readme.txt +>>>>>>> aaa1da15 (Add distribution of LInux & macOS) ''' } archiveArtifacts artifacts: 'soh/soh-mac.7z', followSymlinks: false, onlyIfSuccessful: true diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 65868fd332a..4cdde1bcf3d 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -586,9 +586,9 @@ endif() # Link with other targets. find_package(OpenGL QUIET) -find_package(X11) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + find_package(X11) find_package(PulseAudio) endif() diff --git a/scripts/linux/build-appimage.sh b/scripts/linux/build-appimage.sh deleted file mode 100755 index 053ce580a82..00000000000 --- a/scripts/linux/build-appimage.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -chmod a+x linuxdeploy*.AppImage -curl -sSfL https://github.com$(curl https://github.com/probonopd/go-appimage/releases | grep "mkappimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -o mkappimage.AppImage -chmod a+x mkappimage.AppImage - -mkdir -p AppDir/usr/bin -cp scripts/linux/{soh.desktop,soh.sh} AppDir/ -cp soh/macosx/sohIcon.png AppDir/soh.png -curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o AppDir/usr/bin/gamecontrollerdb.txt - -mkdir -p AppDir/usr/share/applications -mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps -mkdir -p AppDir/usr/lib - -mv AppDir/soh.sh AppDir/usr/bin -cp -r build/* AppDir/usr/bin - -chmod +x AppDir/usr/bin/{soh.elf,OTRGui,soh.sh} - -cd AppDir && ln -s ./usr/bin/soh.sh ./AppRun && cd .. - -export UPD_INFO="gh-releases-zsync|HarbourMasters|Shipwright-linux|develop|SOH-Linux.AppImage.zsync" -./linuxdeploy-x86_64.AppImage --appimage-extract-and-run \ - --appdir=./AppDir/ \ - -d ./AppDir/soh.desktop \ - -i ./AppDir/soh.png \ - -e ./AppDir/usr/bin/soh.elf - -cd /soh - -VERSION=Linux ./mkappimage.AppImage --appimage-extract-and-run ./AppDir # "SOH-Linux-x86_64.AppImage" -mv SOH-Linux-x86_64.AppImage SOH-Linux.AppImage # Keep Original Name From ce71896c0e8d0385647dc0470b050ce08b27dacc Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:57:18 +0200 Subject: [PATCH 078/155] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3df2b44dcb3..99830e8e965 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,9 @@ FROM ubuntu:20.04 as build ENV LANG C.UTF-8 ARG DEBIAN_FRONTEND=noninteractive -ENV GCCVER=10 -RUN apt-get update && \ +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ + apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ + apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ binutils \ From 0fc4bbe1f01c250af26dbc41569a93a586c2effe Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:32:09 +0200 Subject: [PATCH 079/155] Update Dockerfile --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99830e8e965..c7ac484d110 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,13 +30,13 @@ RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/nu RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/cache /var/lib/log -RUN curl https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-Linux-x86_64.sh \ - -s -o /tmp/cmake-install.sh \ - && chmod u+x /tmp/cmake-install.sh \ - && mkdir /usr/bin/cmake \ - && /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \ - && rm /tmp/cmake-install.sh -ENV PATH="/usr/bin/cmake/bin:${PATH}" +#RUN curl https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-Linux-x86_64.sh \ +# -s -o /tmp/cmake-install.sh \ +# && chmod u+x /tmp/cmake-install.sh \ +# && mkdir /usr/bin/cmake \ +# && /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \ +# && rm /tmp/cmake-install.sh +#ENV PATH="/usr/bin/cmake/bin:${PATH}" RUN git clone https://github.com/Perlmint/glew-cmake.git && \ cmake glew-cmake && \ From bdf8b989f63fe7e2ff218306833ba8e3c5577d47 Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:41:01 +0200 Subject: [PATCH 080/155] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c7ac484d110..fe4b3fcff92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ FROM ubuntu:20.04 as build ENV LANG C.UTF-8 ARG DEBIAN_FRONTEND=noninteractive -RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ +RUN apt-get install -y software-properties-common gpg && \ + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ apt-get update && \ apt-get upgrade -y && \ From a9d839719d26361108b110774f94a9a9141743bc Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:59:34 +0200 Subject: [PATCH 081/155] Update Dockerfile --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe4b3fcff92..14142846a60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,13 @@ RUN apt-get install -y software-properties-common gpg && \ zlib1g-dev \ libbz2-dev \ libpng-dev \ - libgles2-mesa-dev && \ + libgles2-mesa-dev \ + wget \ + gpg && \ + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ + apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ + apt-get update && \ + apt-get upgrade -y && \ ln -s /usr/bin/g++-10 /usr/bin/g++ && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 && \ gcc --version && \ From b72ee3d56d95cd22e4bc0811ecb4113f6f3d024e Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 12:19:06 +0200 Subject: [PATCH 082/155] Update Dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14142846a60..2ea8380647e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,7 @@ FROM ubuntu:20.04 as build ENV LANG C.UTF-8 ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get install -y software-properties-common gpg && \ - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ - apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ - apt-get update && \ +RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ binutils \ @@ -26,6 +23,7 @@ RUN apt-get install -y software-properties-common gpg && \ libgles2-mesa-dev \ wget \ gpg && \ + apt-get install -y software-properties-common && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ apt-get update && \ From a394e8617feed696d906794191c76f5051c612ba Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 12:55:59 +0200 Subject: [PATCH 083/155] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ea8380647e..3fa5151244a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ RUN apt-get update && \ patchelf \ p7zip-full \ python3.9 \ + cmake \ make \ curl \ git \ @@ -22,7 +23,8 @@ RUN apt-get update && \ libpng-dev \ libgles2-mesa-dev \ wget \ - gpg && \ + gpg \ + imagemagick && \ apt-get install -y software-properties-common && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ From 3d6be6bbe6d7afaa654cb746520df8df3af49dcb Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 13:27:56 +0200 Subject: [PATCH 084/155] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3fa5151244a..8e1a49e9df6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ RUN apt-get update && \ libgles2-mesa-dev \ wget \ gpg \ - imagemagick && \ + imagemagick \ + ninja && \ apt-get install -y software-properties-common && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ From aae221e73e32013a7668f18ac636b1ffd9606b96 Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Sun, 24 Jul 2022 14:13:14 +0200 Subject: [PATCH 085/155] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e1a49e9df6..49b15ecb7b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update && \ wget \ gpg \ imagemagick \ - ninja && \ + ninja-build && \ apt-get install -y software-properties-common && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ From e8cf13ce50fc7b400cf2e000feae1f3d9de1f177 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:58:03 +0200 Subject: [PATCH 086/155] Update Dockerfile --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 49b15ecb7b6..310f3425b7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,6 +53,7 @@ RUN git clone https://github.com/Perlmint/glew-cmake.git && \ ENV SDL2VER=2.0.22 RUN curl -sLO https://libsdl.org/release/SDL2-${SDL2VER}.tar.gz && \ +<<<<<<< HEAD tar -xzf SDL2-${SDL2VER}.tar.gz && \ cd SDL2-${SDL2VER} && \ ./configure --build=x86_64-linux-gnu && \ @@ -72,6 +73,15 @@ ENV DEVKITPRO=/opt/devkitpro ENV DEVKITARM=/opt/devkitpro/devkitARM ENV DEVKITPPC=/opt/devkitpro/devkitPPC ENV PATH=$PATH:/opt/devkitpro/portlibs/switch/bin/ +======= + tar -xzf SDL2-${SDL2VER}.tar.gz && \ + cd SDL2-${SDL2VER} && \ + ./configure --prefix=/usr && \ + make && make install && \ + rm ../SDL2-${SDL2VER}.tar.gz && \ + cp -av /lib/libSDL* /lib/x86_64-linux-gnu/ && \ + cp /usr/lib/cmake/SDL2/sdl2-config.cmake /lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake +>>>>>>> 4cb742d4 (Update Dockerfile) RUN mkdir /soh WORKDIR /soh From 545780e633bb940fa5225f5bb1dc6c3f493e56fb Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:59:23 +0200 Subject: [PATCH 087/155] Update Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 310f3425b7f..40b002a3b25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,12 +76,16 @@ ENV PATH=$PATH:/opt/devkitpro/portlibs/switch/bin/ ======= tar -xzf SDL2-${SDL2VER}.tar.gz && \ cd SDL2-${SDL2VER} && \ - ./configure --prefix=/usr && \ + ./configure --prefix=/usr --libdir=/lib/x86_64-linux-gnu/ && \ make && make install && \ +<<<<<<< HEAD rm ../SDL2-${SDL2VER}.tar.gz && \ cp -av /lib/libSDL* /lib/x86_64-linux-gnu/ && \ cp /usr/lib/cmake/SDL2/sdl2-config.cmake /lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake >>>>>>> 4cb742d4 (Update Dockerfile) +======= + rm ../SDL2-${SDL2VER}.tar.gz +>>>>>>> c387e457 (Update Dockerfile) RUN mkdir /soh WORKDIR /soh From 959e05b2e815acd0f5a7021eda0de6aac1d3443a Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 19:39:11 +0200 Subject: [PATCH 088/155] Update Jenkinsfile to cd into build folder --- .ci/linux/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index ef03df406f0..8f7f03aa687 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -3,4 +3,5 @@ cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake +(cd build-cmake && cpack) cpack -G External From 91160ce4ffbcdf04a9dabdafa538db3db414c12a Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 19:59:40 +0200 Subject: [PATCH 089/155] Fix cpack command --- .ci/linux/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index 8f7f03aa687..fdebd038488 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -3,5 +3,4 @@ cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake -(cd build-cmake && cpack) -cpack -G External +(cd build-cmake && cpack -G External) From c47b48fcd16b38f0ed97baf8d8fcb96e6e282f48 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:00:02 +0200 Subject: [PATCH 090/155] Update the appimage scripts --- .ci/linux/build.sh | 6 ------ CMakeLists.txt | 4 ++-- Jenkinsfile | 2 +- scripts/linux/build.sh | 7 +++++++ {.ci => scripts}/linux/soh.desktop | 0 {.ci => scripts}/linux/soh.sh | 0 6 files changed, 10 insertions(+), 9 deletions(-) delete mode 100755 .ci/linux/build.sh rename {.ci => scripts}/linux/soh.desktop (100%) rename {.ci => scripts}/linux/soh.sh (100%) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh deleted file mode 100755 index fdebd038488..00000000000 --- a/.ci/linux/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake - -(cd build-cmake && cpack -G External) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6516fe47fbb..1a65b622ce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,11 +112,11 @@ add_subdirectory(OTRGui) endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) -set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${PROJECT_SOURCE_DIR}/.ci/soh.desktop") +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${CMAKE_SOURCE_DIR}/scripts/linux/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") -INSTALL(PROGRAMS "${PROJECT_SOURCE_DIR}/.ci/soh.sh" DESTINATION . COMPONENT appimage) +INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/scripts/linux/soh.sh" DESTINATION . COMPONENT appimage) endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) diff --git a/Jenkinsfile b/Jenkinsfile index 9dad9e8627a..9cb858b359b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,7 +97,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 docker build . -t soh docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash - docker exec sohcont .ci/linux/build.sh + docker exec sohcont scripts/linux/build.sh mv README.md readme.txt mv _packages/*.appimage SoH.AppImage diff --git a/scripts/linux/build.sh b/scripts/linux/build.sh index f9d1f9e2cb6..c06ebd9bc75 100755 --- a/scripts/linux/build.sh +++ b/scripts/linux/build.sh @@ -1,5 +1,6 @@ #!/bin/bash +<<<<<<< HEAD cd soh make setup -j$(nproc) OPTFLAGS=-O2 DEBUG=0 make -j$(nproc) OPTFLAGS=-O2 DEBUG=0 @@ -9,3 +10,9 @@ mkdir build cd build cmake .. cmake --build . --config Release +======= +cmake -H. -Bbuild-cmake -GNinja +cmake --build build-cmake + +(cd build-cmake && cpack -G External) +>>>>>>> b0af4f65 (Update the appimage scripts) diff --git a/.ci/linux/soh.desktop b/scripts/linux/soh.desktop similarity index 100% rename from .ci/linux/soh.desktop rename to scripts/linux/soh.desktop diff --git a/.ci/linux/soh.sh b/scripts/linux/soh.sh similarity index 100% rename from .ci/linux/soh.sh rename to scripts/linux/soh.sh From 536ef684a47c0047403acd5ae94a87249dae5d38 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 22:14:08 +0200 Subject: [PATCH 091/155] Build windows cmake on Jenkins --- Jenkinsfile | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9cb858b359b..281e1a2df5f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,13 +15,9 @@ pipeline { timeout(time: 20) } environment { - MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe' - CONFIG='Release' - OTRPLATFORM='x64' PLATFORM='x64' - ZIP='C:\\Program Files\\7-Zip\\7z.exe' - PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe' + CPACK='C:\\Program Files\\CMake\\bin\\cpack.exe' TOOLSET='v142' } agent { @@ -39,35 +35,15 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - "${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /restore /nodeReuse:false /m - - xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" - - cd "OTRExporter" - "${env.PYTHON}" ".\\extract_assets.py" - cd "..\\" - - "${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false /m - - cd OTRGui - mkdir build - cd build - - "${env.CMAKE}" .. - "${env.CMAKE}" --build . --config Release - + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} + "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release + cd ".\\build\\${env.PLATFORM}" + "${env.CPACK}" -G ZIP cd "..\\..\\" - - move "soh\\x64\\Release\\soh.exe" ".\\" - move "OTRGui\\build\\assets" ".\\" - move ".\\OTRExporter\\x64\\Release\\ZAPD.exe" ".\\assets\\extractor\\" - move ".\\OTRGui\\build\\Release\\OTRGui.exe" ".\\" - rename README.md readme.txt - - "${env.ZIP}" a soh.7z soh.exe OTRGui.exe assets readme.txt - + + move "_packages/*.zip" "soh.zip" """ - archiveArtifacts artifacts: 'soh.7z', followSymlinks: false, onlyIfSuccessful: true + archiveArtifacts artifacts: 'soh.zip', followSymlinks: false, onlyIfSuccessful: true } } post { From 5d5388ed10d1e9becfd2f2eceee97678bb8ad8cf Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 22:48:40 +0200 Subject: [PATCH 092/155] set python path for Windows --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 281e1a2df5f..a7301c3a00a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,6 +16,7 @@ pipeline { } environment { PLATFORM='x64' + PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe' CPACK='C:\\Program Files\\CMake\\bin\\cpack.exe' TOOLSET='v142' @@ -35,13 +36,13 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D PYTHON_LIBRARIES=${env.PYTHON} "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP cd "..\\..\\" - move "_packages/*.zip" "soh.zip" + move "_packages\\*.zip" "soh.zip" """ archiveArtifacts artifacts: 'soh.zip', followSymlinks: false, onlyIfSuccessful: true } From 65f8ec4e0ee5af592d0046482c060f82902cc6ff Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 23:07:40 +0200 Subject: [PATCH 093/155] install python via vcpkg --- CMakeLists.txt | 2 +- Jenkinsfile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a65b622ce0..5148e03153b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") include(cmake/automate-vcpkg.cmake) vcpkg_bootstrap() -vcpkg_install_packages(zlib bzip2 libpng) +vcpkg_install_packages(zlib bzip2 libpng python3) endif() ################################################################################ diff --git a/Jenkinsfile b/Jenkinsfile index a7301c3a00a..85a60beb0fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,6 @@ pipeline { } environment { PLATFORM='x64' - PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe' CPACK='C:\\Program Files\\CMake\\bin\\cpack.exe' TOOLSET='v142' @@ -36,7 +35,7 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D PYTHON_LIBRARIES=${env.PYTHON} + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP From acd5e67b786bcaefeb9ff13007071a005b6742cc Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 23:29:51 +0200 Subject: [PATCH 094/155] Try to fix python path --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85a60beb0fe..741fc89f49f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,6 +16,7 @@ pipeline { } environment { PLATFORM='x64' + PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe' CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe' CPACK='C:\\Program Files\\CMake\\bin\\cpack.exe' TOOLSET='v142' @@ -35,7 +36,7 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D PYTHON_LIBRARY=${env.PYTHON} "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP From 2054ad5911550c0f38c166051e4ae98fc6cd31ae Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 23:42:25 +0200 Subject: [PATCH 095/155] Try new flag for windows python spec --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 741fc89f49f..24120bb0192 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D PYTHON_LIBRARY=${env.PYTHON} + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP From c45a960c1d1fe3bbaf135f93b54f38dea75b732a Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 23:45:45 +0200 Subject: [PATCH 096/155] Remove installation of python3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5148e03153b..1a65b622ce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") include(cmake/automate-vcpkg.cmake) vcpkg_bootstrap() -vcpkg_install_packages(zlib bzip2 libpng python3) +vcpkg_install_packages(zlib bzip2 libpng) endif() ################################################################################ From a9d5030acd24452f84a3ca1b923d9cb6e78444a4 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Sun, 24 Jul 2022 23:49:39 +0200 Subject: [PATCH 097/155] windows: COPY rom file --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 24120bb0192..6bd004661b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,6 +36,8 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ + xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" From 97518353d3d851f8cdaeeeb949b50c45f271c4c8 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 25 Jul 2022 00:54:57 +0200 Subject: [PATCH 098/155] Use ninja on macOS --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6bd004661b6..a8a80fa7dd9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { bat """ - + xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} @@ -118,7 +118,8 @@ pipeline { 7z a soh-mac.7z soh.app readme.txt ======= - cmake -H. -Bbuild-cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_OBJCXX_COMPILER=clang++ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" + cmake -H. -Bbuild-cmake -GNinja + cmake --build build-cmake (cd build-cmake && cpack) mv README.md readme.txt From 896198d78ebd18e11fce3f6206f60fe9ef45747c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Mon, 25 Jul 2022 15:15:40 +0200 Subject: [PATCH 099/155] rename scripts/linux to scripts/linux/appimage --- scripts/linux/{ => appimage}/build.sh | 0 scripts/linux/{ => appimage}/soh.desktop | 0 scripts/linux/{ => appimage}/soh.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename scripts/linux/{ => appimage}/build.sh (100%) rename scripts/linux/{ => appimage}/soh.desktop (100%) rename scripts/linux/{ => appimage}/soh.sh (100%) diff --git a/scripts/linux/build.sh b/scripts/linux/appimage/build.sh similarity index 100% rename from scripts/linux/build.sh rename to scripts/linux/appimage/build.sh diff --git a/scripts/linux/soh.desktop b/scripts/linux/appimage/soh.desktop similarity index 100% rename from scripts/linux/soh.desktop rename to scripts/linux/appimage/soh.desktop diff --git a/scripts/linux/soh.sh b/scripts/linux/appimage/soh.sh similarity index 100% rename from scripts/linux/soh.sh rename to scripts/linux/appimage/soh.sh From dce60c1cd7d40c15e103e0c6aa235f38cb5c27b1 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:01:05 +0200 Subject: [PATCH 100/155] rename scripts/linux to scripts/linux/appimage --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a65b622ce0..2ef81c78fb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,11 +112,11 @@ add_subdirectory(OTRGui) endif() set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) -set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${CMAKE_SOURCE_DIR}/scripts/linux/soh.desktop") +set_property(TARGET soh PROPERTY APPIMAGE_DESKTOP_FILE "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/soh.desktop") set_property(TARGET soh PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/sohIcon.png") -if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") -INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/scripts/linux/soh.sh" DESTINATION . COMPONENT appimage) +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") +INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/soh.sh" DESTINATION . COMPONENT appimage) endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) From 64ca3ebfbce5706713db7fd88b9d0e69f43718c1 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Tue, 26 Jul 2022 07:52:00 +0200 Subject: [PATCH 101/155] BULDING-cmake update --- BUILDING-cmake.md | 60 ++++++++++++++++++++++++++++++----------------- CMakeLists.txt | 4 ++-- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md index d454cbfb31a..333dec28aa9 100644 --- a/BUILDING-cmake.md +++ b/BUILDING-cmake.md @@ -1,6 +1,24 @@ Windows ======= +~~~ +git clone https://github.com/th-2021/Shipwright-cmake.git +~~~ + +All-in-One with packaging (64 bit only) +--------------------------------------- +copy your ROM into Shipwright-cmake/OTRExporter +~~~ +cd Shipwright-cmake +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release +cd .\build\x64 +& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP +~~~ + +Classical build (soh 32 bit) +---------------------------- + libpng, zlib and bzip2 will be used from VCPKG. My vcpkg is located at d:/VCPKG I also created a new triplets to be used. @@ -30,24 +48,7 @@ D:\vcpkg\vcpkg.exe install zlib --triple=x64-windows-v142 D:\vcpkg\vcpkg.exe install bzip2 --triple=x86-windows-v142 (only required for classical build) D:\vcpkg\vcpkg.exe install bzip2 --triple=x64-windows-v142 ~~~ - -~~~ -git clone https://github.com/th-2021/Shipwright-cmake.git -~~~ - -All-in-One with packaging (64 bit only) ---------------------------------------- -copy your ROM into Shipwright-cmake/OTRExporter -~~~ -cd Shipwright-cmake -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release -cd .\build\x64 -& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP -~~~ - -Classical build (soh 32 bit) ----------------------------- +building it: ~~~ # # build SoH @@ -82,11 +83,11 @@ now in build-cmake: ~~~ cpack -G DEB cpack -G ZIP -cpack -G External (does appimage - experimental) +cpack -G External (creates appimage) ~~~ -Classical build (soh 32 bit) ----------------------------- +Legacy build (soh 32 bit) +------------------------- ~~~ cd ShipWright @@ -117,6 +118,23 @@ cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor macOS (M1) ========== +All-in-One with packaging support +--------------------------------- + +execute at top-level: +~~~ +cmake -H. -Bbuild-cmake -GNinja +cmake --build build-cmake +~~~ + +now in build-cmake: +~~~ +cpack -G Bundle (creates dmg) +~~~ + +Legacy build +------------ + using native build (not docker) (will be built with below cmake commands) - no extra build needed diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ef81c78fb8..d147fff61dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -find_package(Python3 COMPONENTS Interpreter PATHS $ENV{env.PYTHON}) +find_package(Python3 COMPONENTS Interpreter) add_custom_target(ExtractAssets COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr @@ -173,7 +173,7 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION . COMPONENT ship RENAME endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(CPACK_GENERATOR "DEB;ZIP") + set(CPACK_GENERATOR "External") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") set(CPACK_GENERATOR "ZIP") elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") From 858a855f93189857914e2f7c476c4b558943a864 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Tue, 26 Jul 2022 08:06:38 +0200 Subject: [PATCH 102/155] correct path to linux build script --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a8a80fa7dd9..e0918942be5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 docker build . -t soh docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash - docker exec sohcont scripts/linux/build.sh + docker exec sohcont scripts/linux/appimage/build.sh mv README.md readme.txt mv _packages/*.appimage SoH.AppImage From e7a83d238b908b2be765fc1097a93df99915b445 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Tue, 26 Jul 2022 11:17:43 +0200 Subject: [PATCH 103/155] set VS startup project --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d147fff61dd..c8b18b77a29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ set(PROJECT_VERSION_MAJOR "3") set(PROJECT_VERSION_MINOR "0") set(PROJECT_VERSION_PATCH "0") +set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh) + if (CMAKE_SYSTEM_NAME STREQUAL "Windows") include(cmake/automate-vcpkg.cmake) From 3deea36bfb3aee549c47f71b0dd69fd998d5cbf6 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 27 Jul 2022 09:32:15 +0200 Subject: [PATCH 104/155] create assets only once --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8b18b77a29..34f2dfae423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,14 +129,22 @@ file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PE find_package(Python3 COMPONENTS Interpreter) -add_custom_target(ExtractAssets +add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/assets_created COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py + COMMAND cmake -E touch ${CMAKE_BINARY_DIR}/assets_created WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter COMMENT "Running asset extraction..." - DEPENDS ${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out + DEPENDS ZAPD ) -add_dependencies(ExtractAssets ZAPD) +add_custom_target(ExtractAssets DEPENDS ${CMAKE_BINARY_DIR}/assets_created) + +file(GLOB_RECURSE asset_h ${CMAKE_SOURCE_DIR}/soh/assets/*.h) +list(LENGTH asset_h asset_h_length) +if (${asset_h_length} EQUAL 0) + file(REMOVE ${CMAKE_BINARY_DIR}/assets_created) +endif() add_dependencies(soh ExtractAssets) From 909e5b70a26fbb49dc0e3dbc39db5594c13c10e1 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 27 Jul 2022 10:25:33 +0200 Subject: [PATCH 105/155] only copy assets for OTRGui --- OTRGui/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index c2027ee424a..31958ef8663 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -39,11 +39,13 @@ file(GLOB_RECURSE SOURCES src/*.cpp) file(GLOB_RECURSE C_SOURCES src/*.c) add_executable(${PROJECT_NAME} ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) -add_custom_target(Assets1 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_target(Assets2 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") -add_custom_target(Assets3 ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake") +add_custom_target(Assets ALL + COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake" + COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake" + COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../soh/assets/xml" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/extractor/xmls" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake" + ) -add_dependencies(${PROJECT_NAME} Assets1 Assets2 Assets3) +add_dependencies(OTRGui Assets) target_link_libraries(${PROJECT_NAME} PUBLIC raylib) From 394afd793f0ce894ce3b476f1f3dc375c0377c82 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Tue, 26 Jul 2022 11:44:48 +0200 Subject: [PATCH 106/155] Fix macos artififact path --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e0918942be5..b83605d8c13 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -129,7 +129,7 @@ pipeline { >>>>>>> aaa1da15 (Add distribution of LInux & macOS) ''' } - archiveArtifacts artifacts: 'soh/soh-mac.7z', followSymlinks: false, onlyIfSuccessful: true + archiveArtifacts artifacts: 'soh-mac.7z', followSymlinks: false, onlyIfSuccessful: true } post { always { From af389cfcb59e3756b20de6adfc4acbc53c46fe26 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Tue, 26 Jul 2022 11:58:22 +0200 Subject: [PATCH 107/155] Add verbosity for further logging --- CMake/Packaging.cmake | 2 +- Jenkinsfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index bf89574e46e..b013243ee01 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -80,7 +80,7 @@ execute_process( $<$>:--desktop-file=$> $<$>:--icon-file=$> --output=appimage - # --verbosity=2 + --verbosity=2 ) ]]) diff --git a/Jenkinsfile b/Jenkinsfile index b83605d8c13..d680d1e6693 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -79,9 +79,9 @@ pipeline { docker exec sohcont scripts/linux/appimage/build.sh mv README.md readme.txt - mv _packages/*.appimage SoH.AppImage + mv _packages/*.appimage soh.appimage - 7z a soh-linux.7z SoH.AppImage readme.txt + 7z a soh-linux.7z soh.appimage readme.txt ''' } From 41fd1cdd1c5c58517fd4fe44a29da8bca3cef9e6 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 1 Aug 2022 11:02:08 +0200 Subject: [PATCH 108/155] Try changing output path --- CMake/Packaging.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index b013243ee01..f528619f092 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -71,7 +71,7 @@ endif() execute_process( COMMAND ${CMAKE_COMMAND} -E env - OUTPUT=${CPACK_OUTPUT_FILE_PREFIX}/${CPACK_PACKAGE_FILE_NAME}.appimage + OUTPUT=${CPACK_PACKAGE_FILE_NAME}.appimage VERSION=$,${CPACK_PACKAGE_VERSION},0.1.0> ${LINUXDEPLOY_EXECUTABLE} --appimage-extract-and-run From 4090b6ac4c85151cc227b7898c3aea4ad2e53290 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 1 Aug 2022 12:20:40 +0200 Subject: [PATCH 109/155] Fix path of appimge --- CMake/Packaging.cmake | 2 +- Jenkinsfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index f528619f092..907f8da76c6 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -80,7 +80,7 @@ execute_process( $<$>:--desktop-file=$> $<$>:--icon-file=$> --output=appimage - --verbosity=2 + # --verbosity=2 ) ]]) diff --git a/Jenkinsfile b/Jenkinsfile index d680d1e6693..3dfe1907189 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,8 +78,8 @@ pipeline { docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash docker exec sohcont scripts/linux/appimage/build.sh - mv README.md readme.txt - mv _packages/*.appimage soh.appimage + mv README.md readme.txt + mv build-cmake/*.appimage soh.appimage 7z a soh-linux.7z soh.appimage readme.txt From 55e57e522d025a9a8ec0a54c52ad51ffb8074a51 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:37:20 +0200 Subject: [PATCH 110/155] pathconf for NintendoSwitch --- ZAPDTR/ZAPD/pathconf.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ZAPDTR/ZAPD/pathconf.c diff --git a/ZAPDTR/ZAPD/pathconf.c b/ZAPDTR/ZAPD/pathconf.c new file mode 100644 index 00000000000..8ef448999e1 --- /dev/null +++ b/ZAPDTR/ZAPD/pathconf.c @@ -0,0 +1,6 @@ +#include + +long pathconf(const char *path, int name) { + return -1; +} + From bd5e4be66ca0ad268fa4949093d6d9ca0ba7b832 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 09:46:03 +0200 Subject: [PATCH 111/155] add Nintendo Switch --- CMakeLists.txt | 10 +++++++--- ZAPDTR/ZAPD/CMakeLists.txt | 17 ++++++++++++++++- libultraship/libultraship/CMakeLists.txt | 22 +++++++++++++++++++++- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34f2dfae423..9daf60a4f49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ add_subdirectory(ZAPDTR/ZAPD ${CMAKE_BINARY_DIR}/ZAPD) add_subdirectory(ZAPDTR/ZAPDUtils ${CMAKE_BINARY_DIR}/ZAPDUtils) add_subdirectory(OTRExporter) add_subdirectory(soh) -if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") +if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|NintendoSwitch") add_subdirectory(OTRGui) endif() @@ -144,9 +144,13 @@ file(GLOB_RECURSE asset_h ${CMAKE_SOURCE_DIR}/soh/assets/*.h) list(LENGTH asset_h asset_h_length) if (${asset_h_length} EQUAL 0) file(REMOVE ${CMAKE_BINARY_DIR}/assets_created) +else() + file(TOUCH ${CMAKE_BINARY_DIR}/assets_created) endif() +if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch") add_dependencies(soh ExtractAssets) +endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_package(ImageMagick COMPONENTS convert) @@ -178,13 +182,13 @@ add_custom_target(CreateOSXIcons add_dependencies(soh CreateOSXIcons) endif() -if(CMAKE_SYSTEM_NAME MATCHES "Windows") +if(CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch") INSTALL(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION . COMPONENT ship RENAME readme.txt ) endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CPACK_GENERATOR "External") -elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch") set(CPACK_GENERATOR "ZIP") elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CPACK_GENERATOR "Bundle") diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index c0a3f80a19e..5b64f8e957d 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -279,7 +279,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" ) endif() -else() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")() set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "ZAPD.out" ) @@ -453,6 +453,16 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ${CMAKE_DL_LIBS} Threads::Threads ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "ZAPDUtils;" + -Wl,--whole-archive $/$ -Wl,--no-whole-archive + "libultraship;" + PNG::PNG + Threads::Threads + ) else() set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) @@ -466,4 +476,9 @@ else() ) endif() +if(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") +add_library(pathconf OBJECT pathconf.c) +target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}" $ ) +else() target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") +endif() diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 4cdde1bcf3d..d37f8947221 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -330,6 +330,14 @@ set(Source_Files__Darwin source_group("Source Files\\Darwin" FILES ${Source_Files__Darwin}) endif() +if (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") +set(Source_Files__NintendoSwitch + "SwitchImpl.cpp" + "SwitchImpl.h" +) +source_group("Source Files\\NintendoSwitch" FILES ${Source_Files__NintendoSwitch}) +endif() + set(ALL_FILES ${Header_Files__Resources__Factories} ${Header_Files__Resources__Files} @@ -359,6 +367,7 @@ set(ALL_FILES ${Source_Files__Resources__Files} ${Source_Files__Resources__mpq} ${Source_Files__Darwin} + ${Source_Files__NintendoSwitch} ) ################################################################################ @@ -474,7 +483,7 @@ endif() ################################################################################ # Compile and link options ################################################################################ -if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows|NintendoSwitch") find_package(SDL2) find_package(GLEW) find_package(X11) @@ -497,6 +506,8 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") set(GLEW-INCLUDE ${GLEW_INCLUDE_DIRS}) endif() set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS}) +elseif (CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch") + find_package(SDL2) else() set(GLEW-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/) set(SDL2-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL/) @@ -508,6 +519,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/Fast3D/U64/PR ${SDL2-INCLUDE} ${GLEW-INCLUDE} + ${SWITCH-INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImGui/ ${CMAKE_CURRENT_SOURCE_DIR}/../../ZAPDTR/ZAPDUtils ${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib/src @@ -628,6 +640,14 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") Threads::Threads ${OSX_FOUNDATION} ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(${PROJECT_NAME} + storm + SDL2::SDL2 + Threads::Threads + ) else() target_link_libraries(${PROJECT_NAME} SDL2::SDL2 From e9b74dbaad14d42f6fe7a40cd426b9de88e8ab0b Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:18:06 +0200 Subject: [PATCH 112/155] fix typo --- ZAPDTR/ZAPD/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index 5b64f8e957d..f3ce4d6e01d 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -279,7 +279,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" ) endif() -elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "ZAPD.out" ) From a2723546f2538d16ffc184916c258016a56f0828 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:27:28 +0200 Subject: [PATCH 113/155] remove Environment --- libultraship/libultraship/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index d37f8947221..dda31f17e8b 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -115,12 +115,6 @@ set(Source_Files__CustomImpl ) source_group("Source Files\\CustomImpl" FILES ${Source_Files__CustomImpl}) -set(Source_Files__CustomImpl__Environment - "Environment.cpp" - "Environment.h" -) -source_group("Source Files\\CustomImpl\\Environment" FILES ${Source_Files__CustomImpl__Environment}) - set(Source_Files__CustomImpl__Hooks "Hooks.cpp" "Hooks.h" @@ -346,7 +340,6 @@ set(ALL_FILES ${Source_Files__Controller} ${Source_Files__Controller__Attachment} ${Source_Files__CustomImpl} - ${Source_Files__CustomImpl__Environment} ${Source_Files__CustomImpl__Hooks} ${Source_Files__CustomImpl__Utils} ${Source_Files__Globals} From 453f6e0bd5c60d6390859120f8982e5c79a62e1a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:28:02 +0200 Subject: [PATCH 114/155] remove color.h --- soh/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index a45397df8e5..72c18a63260 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -103,7 +103,6 @@ source_group("Header Files" FILES ${Header_Files}) set(Header_Files__include "include/alloca.h" #"include/bgm.h" - "include/color.h" "include/command_macros_base.h" "include/fp.h" "include/functions.h" From 3029cb0c0ef0a20dba8d9a2484a078c75fb1bfbf Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:35:14 +0200 Subject: [PATCH 115/155] fix MATCHES --- libultraship/libultraship/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index dda31f17e8b..e897a8f3779 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -476,7 +476,7 @@ endif() ################################################################################ # Compile and link options ################################################################################ -if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows|NintendoSwitch") +if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch") find_package(SDL2) find_package(GLEW) find_package(X11) From 1d431f7ae4674060aac187fe6c745e0239561dcf Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:41:44 +0200 Subject: [PATCH 116/155] comment out Intel sse2 option --- soh/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 72c18a63260..1350383bec1 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1799,7 +1799,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") $<$:-fpermissive> $<$:-Wno-deprecated-enum-enum-conversion> -pthread - -msse2 -mfpmath=sse + #-msse2 -mfpmath=sse ) target_link_options(${PROJECT_NAME} PRIVATE From 09221695ad5c57b51bdf9ab0e1e69bf1b05e477f Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:54:57 +0200 Subject: [PATCH 117/155] add switch support --- soh/CMakeLists.txt | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 1350383bec1..8418b257f71 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1581,7 +1581,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "soh-macos" ) -else() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "soh.elf" ) @@ -1855,6 +1855,17 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") "setupapi" ) endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") + find_package(SDL2) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + set(ADDITIONAL_LIBRARY_DEPENDENCIES + "libultraship;" + "ZAPDUtils;" + SDL2::SDL2 + -lglad + Threads::Threads + ) else() find_package(SDL2) set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -1908,15 +1919,15 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() -target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") - +if(NOT CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") INSTALL(TARGETS soh DESTINATION . COMPONENT ship) +endif() execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION ../MacOS COMPONENT ship) -else() +elseif(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "NintendoSwitch") INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION . COMPONENT ship) endif() @@ -1927,3 +1938,26 @@ install(CODE " fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-macos\" \"\" \"${dirs}\") ") endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") + if (NOT TARGET pathconf) + add_library(pathconf OBJECT switch/pathconf.c) + endif() + target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}" $ ) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE "${ADDITIONAL_LIBRARY_DEPENDENCIES}") +endif() + +if(CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch") + +set_target_properties(soh PROPERTIES + APP_TITLE "Ship of Harkirian" + APP_AUTHOR "Ship" + APP_VERSION "3.0.0" + ICON "icon.jpg") + +nx_create_nro(soh) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/soh.nro DESTINATION . COMPONENT ship) + +endif() From 9ee88ff0a5c73e7e45ac5e8cec5dfad426f77d02 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 10:56:52 +0200 Subject: [PATCH 118/155] ZAPD.out also on Darwin --- ZAPDTR/ZAPD/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index f3ce4d6e01d..a19cbb34e00 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -279,7 +279,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE" ) endif() -elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") +elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin") set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "ZAPD.out" ) From 38ef459cb337770b07bfc376d0e294c089f30187 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 11:33:59 +0200 Subject: [PATCH 119/155] use instead of cmake --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9daf60a4f49..a59f7a824ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,7 +133,7 @@ add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/assets_created COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py - COMMAND cmake -E touch ${CMAKE_BINARY_DIR}/assets_created + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/assets_created WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter COMMENT "Running asset extraction..." DEPENDS ZAPD From 62a6d7673cf5e140536abc2a877f45c2811001ec Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 11:54:48 +0200 Subject: [PATCH 120/155] check for curl --- soh/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 8418b257f71..e3fbb6e37bb 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1923,7 +1923,8 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") INSTALL(TARGETS soh DESTINATION . COMPONENT ship) endif() -execute_process(COMMAND curl -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) +find_program(CURL NAMES curl DOC "Path to the curl program. Used to download files.") +execute_process(COMMAND ${CURL} -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION ../MacOS COMPONENT ship) From a70077d22c36ebba2be49ec701f8e1ce3640a705 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 14:40:48 +0200 Subject: [PATCH 121/155] conditionally add Intel CPU option SSE2 --- soh/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index e3fbb6e37bb..49b9794337a 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1788,6 +1788,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") -pthread ) else() + if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + set(CPU_OPTION -msse2 -mfpmath=sse) + endif() + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-error -Wno-unused-parameter @@ -1799,7 +1803,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") $<$:-fpermissive> $<$:-Wno-deprecated-enum-enum-conversion> -pthread - #-msse2 -mfpmath=sse + ${CPU_OPTION} ) target_link_options(${PROJECT_NAME} PRIVATE From 2128926a1966d005ce7587fac433abc6dc89b0df Mon Sep 17 00:00:00 2001 From: David Chavez Date: Wed, 3 Aug 2022 16:08:30 +0200 Subject: [PATCH 122/155] Fix Dockerfile & Jenkins (#5) --- CMake/Packaging-2.cmake | 1 + Dockerfile | 69 +++++++++++---------------------- Jenkinsfile | 11 +----- scripts/linux/appimage/build.sh | 12 ------ scripts/switch/build.sh | 7 +++- 5 files changed, 29 insertions(+), 71 deletions(-) diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index 6e51eec9f1d..2e118319012 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -25,5 +25,6 @@ if (CPACK_GENERATOR MATCHES "Bundle") set(CPACK_BUNDLE_PLIST "../soh/macosx/Info.plist") set(CPACK_BUNDLE_ICON "macosx/soh.icns") set(CPACK_BUNDLE_STARTUP_COMMAND "../soh/macosx/soh-macos.sh") + set(CPACK_BUNDLE_APPLE_CERT_APP "-") endif() diff --git a/Dockerfile b/Dockerfile index 40b002a3b25..e44a0828696 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,16 @@ FROM ubuntu:20.04 as build ENV LANG C.UTF-8 ARG DEBIAN_FRONTEND=noninteractive +ENV GCCVER=10 RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ binutils \ - gcc-10 \ - g++-10 \ + gcc-${GCCVER} \ + g++-${GCCVER} \ patchelf \ p7zip-full \ - python3.9 \ + python3 \ cmake \ make \ curl \ @@ -30,62 +31,36 @@ RUN apt-get update && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" && \ apt-get update && \ - apt-get upgrade -y && \ - ln -s /usr/bin/g++-10 /usr/bin/g++ && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 && \ - gcc --version && \ - g++ --version - -RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/cache /var/lib/log - -#RUN curl https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-Linux-x86_64.sh \ -# -s -o /tmp/cmake-install.sh \ -# && chmod u+x /tmp/cmake-install.sh \ -# && mkdir /usr/bin/cmake \ -# && /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \ -# && rm /tmp/cmake-install.sh -#ENV PATH="/usr/bin/cmake/bin:${PATH}" + apt-get upgrade -y && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCCVER} 10 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCCVER} 10 RUN git clone https://github.com/Perlmint/glew-cmake.git && \ - cmake glew-cmake && \ - make -j$(nproc) && \ - make install + cmake glew-cmake && \ + make -j$(nproc) && \ + make install ENV SDL2VER=2.0.22 RUN curl -sLO https://libsdl.org/release/SDL2-${SDL2VER}.tar.gz && \ -<<<<<<< HEAD - tar -xzf SDL2-${SDL2VER}.tar.gz && \ - cd SDL2-${SDL2VER} && \ - ./configure --build=x86_64-linux-gnu && \ - make -j$(nproc) && make install && \ - rm ../SDL2-${SDL2VER}.tar.gz + tar -xzf SDL2-${SDL2VER}.tar.gz && \ + cd SDL2-${SDL2VER} && \ + ./configure --build=x86_64-linux-gnu && \ + make -j$(nproc) && make install && \ + rm ../SDL2-${SDL2VER}.tar.gz RUN \ - ln -sf /proc/self/mounts /etc/mtab && \ - mkdir -p /usr/local/share/keyring/ && \ - wget -O /usr/local/share/keyring/devkitpro-pub.gpg https://apt.devkitpro.org/devkitpro-pub.gpg && \ - echo "deb [signed-by=/usr/local/share/keyring/devkitpro-pub.gpg] https://apt.devkitpro.org stable main" > /etc/apt/sources.list.d/devkitpro.list && \ - apt-get update -y && \ - apt-get install -y devkitpro-pacman && \ - yes | dkp-pacman -Syu switch-dev switch-portlibs --noconfirm + ln -sf /proc/self/mounts /etc/mtab && \ + mkdir -p /usr/local/share/keyring/ && \ + wget -O /usr/local/share/keyring/devkitpro-pub.gpg https://apt.devkitpro.org/devkitpro-pub.gpg && \ + echo "deb [signed-by=/usr/local/share/keyring/devkitpro-pub.gpg] https://apt.devkitpro.org stable main" > /etc/apt/sources.list.d/devkitpro.list && \ + apt-get update -y && \ + apt-get install -y devkitpro-pacman && \ + yes | dkp-pacman -Syu switch-dev switch-portlibs --noconfirm ENV DEVKITPRO=/opt/devkitpro ENV DEVKITARM=/opt/devkitpro/devkitARM ENV DEVKITPPC=/opt/devkitpro/devkitPPC ENV PATH=$PATH:/opt/devkitpro/portlibs/switch/bin/ -======= - tar -xzf SDL2-${SDL2VER}.tar.gz && \ - cd SDL2-${SDL2VER} && \ - ./configure --prefix=/usr --libdir=/lib/x86_64-linux-gnu/ && \ - make && make install && \ -<<<<<<< HEAD - rm ../SDL2-${SDL2VER}.tar.gz && \ - cp -av /lib/libSDL* /lib/x86_64-linux-gnu/ && \ - cp /usr/lib/cmake/SDL2/sdl2-config.cmake /lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake ->>>>>>> 4cb742d4 (Update Dockerfile) -======= - rm ../SDL2-${SDL2VER}.tar.gz ->>>>>>> c387e457 (Update Dockerfile) RUN mkdir /soh WORKDIR /soh diff --git a/Jenkinsfile b/Jenkinsfile index 3dfe1907189..10297043951 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -109,14 +109,6 @@ pipeline { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { sh ''' cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 -<<<<<<< HEAD - cd soh - make setup -j$(sysctl -n hw.physicalcpu) OPTFLAGS=-O2 DEBUG=0 LD="ld" - make -j$(sysctl -n hw.physicalcpu) DEBUG=0 OPTFLAGS=-O2 LD="ld" - make appbundle - mv ../README.md readme.txt - 7z a soh-mac.7z soh.app readme.txt -======= cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake @@ -126,7 +118,6 @@ pipeline { mv _packages/*.dmg SoH.dmg 7z a soh-mac.7z SoH.dmg readme.txt ->>>>>>> aaa1da15 (Add distribution of LInux & macOS) ''' } archiveArtifacts artifacts: 'soh-mac.7z', followSymlinks: false, onlyIfSuccessful: true @@ -160,7 +151,7 @@ pipeline { docker run --name sohcont -dit --rm -v $(pwd):/soh sohswitch /bin/bash docker exec sohcont scripts/switch/build.sh - mv soh/soh.nro . + mv build-switch/soh/*.nro soh.nro mv README.md readme.txt 7z a soh-switch.7z soh.nro readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index c06ebd9bc75..fdebd038488 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,18 +1,6 @@ #!/bin/bash -<<<<<<< HEAD -cd soh -make setup -j$(nproc) OPTFLAGS=-O2 DEBUG=0 -make -j$(nproc) OPTFLAGS=-O2 DEBUG=0 - -cd ../OTRGui -mkdir build -cd build -cmake .. -cmake --build . --config Release -======= cmake -H. -Bbuild-cmake -GNinja cmake --build build-cmake (cd build-cmake && cpack -G External) ->>>>>>> b0af4f65 (Update the appimage scripts) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index e5d65d99dbb..f07e5c99b41 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,4 +1,7 @@ #!/bin/bash -make setup -C soh -j$(nproc) OPTFLAGS=-O2 DEBUG=0 -make -f Makefile.switch -j$(nproc) +cmake -H. -Bbuild-linux -GNinja +cmake --build build-linux --target ExtractAssets + +cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake +cmake --build build-switch --target soh_nro From 243f8be8ad22f6db02f4581e34f2149819e82498 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 16:22:49 +0200 Subject: [PATCH 123/155] add -O3 -ffast-math for Nintendo Switch --- soh/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 49b9794337a..842e13439a0 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1784,6 +1784,27 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") -pthread ) + target_link_options(${PROJECT_NAME} PRIVATE + -pthread + ) + elseif (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wno-error + -Wno-return-type + -Wno-unused-parameter + -Wno-unused-function + -Wno-unused-variable + -Wno-missing-field-initializers + -Wno-parentheses + -Wno-narrowing + -Wno-c++11-narrowing + -Wno-implicit-function-declaration + $<$:-fpermissive> + $<$:-Wno-deprecated-enum-enum-conversion> + -pthread + -O3 -ffast-math + ) + target_link_options(${PROJECT_NAME} PRIVATE -pthread ) From 0ca184370650e174c3d5cdda9813e9363ce601f9 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Wed, 3 Aug 2022 17:05:38 +0200 Subject: [PATCH 124/155] Build universally on macOS --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 10297043951..fc9df819673 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,7 +110,7 @@ pipeline { sh ''' cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 - cmake -H. -Bbuild-cmake -GNinja + cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" cmake --build build-cmake (cd build-cmake && cpack) From 79cc45aa448bb79a05a0ec52da9dd3f227357e46 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 17:29:18 +0200 Subject: [PATCH 125/155] use CMAKE_BUILD_TYPE --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a59f7a824ce..15f6c266a56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,10 @@ set(CMAKE_CONFIGURATION_TYPES CACHE STRING "" FORCE ) +if(NOT CMAKE_BUILD_TYPE ) +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) +endif() + ################################################################################ # Global compiler options ################################################################################ @@ -122,7 +126,7 @@ INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/soh.sh" DESTINATION endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) -string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/ZAPD" filedata "${filedata}") string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) From 5fdb2cd239444b8f37f2448c0d45b840c86e7815 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Wed, 3 Aug 2022 17:34:25 +0200 Subject: [PATCH 126/155] Update building instructions --- BUILDING-cmake.md | 152 ---------------------------------------------- BUILDING.md | 111 ++++++++++++++++++++++----------- 2 files changed, 76 insertions(+), 187 deletions(-) delete mode 100644 BUILDING-cmake.md diff --git a/BUILDING-cmake.md b/BUILDING-cmake.md deleted file mode 100644 index 333dec28aa9..00000000000 --- a/BUILDING-cmake.md +++ /dev/null @@ -1,152 +0,0 @@ -Windows -======= - -~~~ -git clone https://github.com/th-2021/Shipwright-cmake.git -~~~ - -All-in-One with packaging (64 bit only) ---------------------------------------- -copy your ROM into Shipwright-cmake/OTRExporter -~~~ -cd Shipwright-cmake -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release -cd .\build\x64 -& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP -~~~ - -Classical build (soh 32 bit) ----------------------------- - -libpng, zlib and bzip2 will be used from VCPKG. -My vcpkg is located at d:/VCPKG -I also created a new triplets to be used. - -For 64 bit: -~~~ -x64-windows-v142: -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v142) -~~~ -same for 32 bit (only required for classical build): -~~~ -x86-windows-v142: -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_PLATFORM_TOOLSET v142) -~~~ -prepare libs: -~~~ -D:\vcpkg\vcpkg.exe install libpng --triple=x86-windows-v142 (only required for classical build) -D:\vcpkg\vcpkg.exe install libpng --triple=x64-windows-v142 -D:\vcpkg\vcpkg.exe install zlib --triple=x86-windows-v142 (only required for classical build) -D:\vcpkg\vcpkg.exe install zlib --triple=x64-windows-v142 -D:\vcpkg\vcpkg.exe install bzip2 --triple=x86-windows-v142 (only required for classical build) -D:\vcpkg\vcpkg.exe install bzip2 --triple=x64-windows-v142 -~~~ -building it: -~~~ -# -# build SoH -# -cd shipwright-cmake -cd OTRExporter -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release -# copy ROM for asset extraction -.\extract_assets.py -cd ../soh -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/Win32" -G "Visual Studio 17 2022" -T v142 -A Win32 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-v142" -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\Win32 --config Release -cd ../OTRGui -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 "-DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-v142" -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --config Release -~~~ - -Linux (Ubuntu 22.04) -==================== - -All-in-One with packaging support (only 64 bit): ------------------------------------------------- - -execute at top-level: -~~~ -cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake -~~~ - -now in build-cmake: -~~~ -cpack -G DEB -cpack -G ZIP -cpack -G External (creates appimage) -~~~ - -Legacy build (soh 32 bit) -------------------------- - -~~~ -cd ShipWright -~~~ - -(will be built with below cmake commands) - no extra build needed - -~~~ -cd OTRExporter - - -cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake - -./extract_assets_cmake.py - -cd ../soh -cmake -H. -Bbuild-cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=CMake/Linux32bit-toolchain.cmake -cmake --build build-cmake - -cd ../OTRGui -cmake -H. -Bbuild-cmake -GNinja -DOpenGL_GL_PREFERENCE="GLVND" -DCMAKE_BUILD_TYPE="Release" -cmake --build build-cmake -cp build-cmake/ZAPD/ZAPD.out build-cmake/assets/extractor - -~~~ - -macOS (M1) -========== - -All-in-One with packaging support ---------------------------------- - -execute at top-level: -~~~ -cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake -~~~ - -now in build-cmake: -~~~ -cpack -G Bundle (creates dmg) -~~~ - -Legacy build ------------- - -using native build (not docker) -(will be built with below cmake commands) - no extra build needed - -~~~ -cd OTRExporter - -cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=../soh/CMake/Mac-gnu-toolchain.cmake -cmake --build build-cmake - -./extract_assets_cmake.py - -cd ../soh -cmake -S . -B build-cmake -DCMAKE_TOOLCHAIN_FILE=CMake/Mac-gnu-toolchain.cmake -cmake --build build-cmake -~~~ diff --git a/BUILDING.md b/BUILDING.md index 2a52e3f58a9..4977178733f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -2,20 +2,30 @@ ## Windows - 1. Requires [Python](https://www.python.org/downloads/) >= 3.6. - 2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/) - 3. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`. - 4. Clone the Ship of Harkinian repository. - 5. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice. - 6. Run `OTRExporter/OTRExporter.sln`. - 7. Switch the solution to `Release x64`. - 8. Build the solution. - 9. Launching `OTRExporter/extract_assets.py` will generate an `oot.otr` archive file in `OTRExporter/oot.otr`. - 10. Run `soh/soh.sln` - 11. Switch the solution to `Release x86` or `Release x64`. - 12. Build the solution. - 13. Copy the `OTRExporter/oot.otr` archive file to `soh/Release`. - 14. Launch `soh.exe`. +1. Requires Visual Studio 2022 Community Edition && `python3, cmake, git` (can be installed via chocolatey or manually) +2. Clone the Ship of Harkinian repository +3. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice + +_Note: Instructions assume using powershell_ +```powershell +cd Shipwright +# Setup cmake project +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 +# Compile project +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging) + +# Now you can run the executable in .\build\x64 +# To develop the project you can open the generated Ship.sln (or use VSCode or another editor) +``` + +### Generating the distributable +After compiling the project you can generate the distributable by running: +```powershell +# Go to build folder +cd "build/x64" +# Generate +& 'C:\Program Files\CMake\bin\cpack.exe' -G ZIP +``` ## Linux @@ -25,22 +35,27 @@ git clone https://github.com/HarbourMasters/Shipwright.git cd Shipwright # Copy the baserom to the OTRExporter folder cp OTRExporter -# Build the docker image -sudo docker build . -t soh -# Run the docker image with the working directory mounted to /soh -sudo docker run --rm -it -v $(pwd):/soh soh /bin/bash +# Generate Ninja project +cmake -H. -Bbuild-cmake -GNinja +# Compile the project +cmake --build build-cmake # --config Release (if you're packaging) + +# Now you can run the executable in ./build-cmake/soh/soh.elf +# To develop the project open the repository in VSCode (or your preferred editor) ``` -Inside the Docker container: + +### Generating a distributable +After compiling the project you can generate a distributable by running of the following: ```bash -cd soh -# Extract the assets/Compile the exporter/Run the exporter -make setup -j$(nproc) OPTFLAGS=-O2 DEBUG=0 -# Compile the code -make -j $(nproc) OPTFLAGS=-O2 DEBUG=0 +# Go to build folder +cd build-cmake +# Generate +cpack -G DEB +cpack -G ZIP +cpack -G External (creates appimage) ``` ## macOS - 1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, cmake, pkgconfig, dylibbundler` (can be installed via homebrew, macports, etc) ```bash # Clone the repo @@ -48,18 +63,44 @@ git clone https://github.com/HarbourMasters/Shipwright.git cd ShipWright # Copy the baserom to the OTRExporter folder cp OTRExporter +# Generate Ninja project +cmake -H. -Bbuild-cmake -GNinja +# Compile the project +cmake --build build-cmake # --config Release (if you're packaging) + +# Now you can run the executable in ./build-cmake/soh/soh-macos +# To develop the project open the repository in VSCode (or your preferred editor) +``` + +### Generating a distributable +After compiling the project you can generate a distributable by running of the following: +```bash +# Go to build folder +cd build-cmake +# Generate +cpack +``` + +## Switch +1. Requires that your build machine is setup with the tools necessary for your platform above +2. Requires that you have the switch build tools installed +3. Clone the Ship of Harkinian repository +4. Place one or more [compatible](#compatible-roms) roms in the `OTRExporter` directory with namings of your choice + +```bash +cd Shipwright +# Setup cmake project for your host machine +cmake -H. -Bbuild-macos -GNinja # Linux: cmake -H. -Bbuild-linux -GNinja +# Extract necessary assets +cmake --build build-cmake --target ExtractAssets +# Setup cmake project for building for Switch +cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake +# Build project and generate nro +cmake --build build-switch --target soh_nro -cd soh -# Extract the assets/Compile the exporter/Run the exporter -# -jX defines number of cores to use for compilation - lower or remove entirely if having issues -make setup -j8 DEBUG=0 -# Compile the code (watch the -j parameter as above) -make -j8 DEBUG=0 -# Create macOS app bundle -make appbundle +# Now you can run the executable in ./build-switch/soh/soh.nro +# To develop the project open the repository in VSCode (or your preferred editor) ``` -9. Copy your OTR file to ~/Library/Application\ Support/com.shipofharkinian.soh -10. Launch soh app in the soh folder! # Compatible Roms ``` From 6057ad68dd56cfe95cdb8cfc7028288abaf47993 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 17:39:42 +0200 Subject: [PATCH 127/155] set default to Debug --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f6c266a56..148783db017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ set(CMAKE_CONFIGURATION_TYPES ) if(NOT CMAKE_BUILD_TYPE ) -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) endif() ################################################################################ From f0a99df8b74fb5746d5317d3fa15d26e5ed3d55a Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Wed, 3 Aug 2022 19:01:47 +0200 Subject: [PATCH 128/155] use_props only on Windows - for now --- CMakeLists.txt | 2 +- OTRExporter/OTRExporter/CMakeLists.txt | 3 +++ OTRGui/CMakeLists.txt | 5 +++++ StormLib/CMakeLists.txt | 2 ++ ZAPDTR/ZAPD/CMakeLists.txt | 2 ++ ZAPDTR/ZAPDUtils/CMakeLists.txt | 3 +++ libultraship/libultraship/CMakeLists.txt | 3 +++ soh/CMakeLists.txt | 3 +++ 8 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 148783db017..49a51e9f933 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/soh.sh" DESTINATION endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) -string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/ZAPD" filedata "${filedata}") +string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/OTRExporter/OTRExporter/CMakeLists.txt b/OTRExporter/OTRExporter/CMakeLists.txt index 13a7cba55eb..e3209e1982b 100644 --- a/OTRExporter/OTRExporter/CMakeLists.txt +++ b/OTRExporter/OTRExporter/CMakeLists.txt @@ -64,7 +64,10 @@ set(ALL_FILES ################################################################################ add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() + set(ROOT_NAMESPACE OTRExporter) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index 31958ef8663..a1562beb4f8 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -39,6 +39,11 @@ file(GLOB_RECURSE SOURCES src/*.cpp) file(GLOB_RECURSE C_SOURCES src/*.c) add_executable(${PROJECT_NAME} ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) + +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") +use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() + add_custom_target(Assets ALL COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake" COMMAND ${CMAKE_COMMAND} -Dsrc_dir="${CMAKE_CURRENT_SOURCE_DIR}/../OTRExporter/assets" -Ddst_dir="${CMAKE_CURRENT_BINARY_DIR}/assets/game" -P "${CMAKE_CURRENT_SOURCE_DIR}/Overwrite.cmake" diff --git a/StormLib/CMakeLists.txt b/StormLib/CMakeLists.txt index 15bc32443a0..1469e841def 100644 --- a/StormLib/CMakeLists.txt +++ b/StormLib/CMakeLists.txt @@ -342,7 +342,9 @@ if(WIN32) set_target_properties(${LIBRARY_NAME} PROPERTIES OUTPUT_NAME "StormLib") endif() +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${LIBRARY_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() ################################################################################ # Compile definitions diff --git a/ZAPDTR/ZAPD/CMakeLists.txt b/ZAPDTR/ZAPD/CMakeLists.txt index a19cbb34e00..74879388560 100644 --- a/ZAPDTR/ZAPD/CMakeLists.txt +++ b/ZAPDTR/ZAPD/CMakeLists.txt @@ -262,7 +262,9 @@ set(ALL_FILES ################################################################################ add_executable(${PROJECT_NAME} ${ALL_FILES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() ################################################################################ # Includes for CMake from *.props ################################################################################ diff --git a/ZAPDTR/ZAPDUtils/CMakeLists.txt b/ZAPDTR/ZAPDUtils/CMakeLists.txt index ba090ddd7f6..68e83591e8b 100644 --- a/ZAPDTR/ZAPDUtils/CMakeLists.txt +++ b/ZAPDTR/ZAPDUtils/CMakeLists.txt @@ -50,7 +50,10 @@ set(ALL_FILES ################################################################################ add_library(${PROJECT_NAME} STATIC ${ALL_FILES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() + set(ROOT_NAMESPACE ZAPDUtils) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index e897a8f3779..49b3621a171 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -372,7 +372,10 @@ if (NOT TARGET storm) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../StormLib ${CMAKE_BINARY_DIR}/StormLib EXCLUDE_FROM_ALL) endif() +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() + set(ROOT_NAMESPACE libultraship) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index 842e13439a0..faf28ed5cdd 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -1561,7 +1561,10 @@ set(ALL_FILES ################################################################################ add_executable(${PROJECT_NAME} ${ALL_FILES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") +endif() + set(ROOT_NAMESPACE soh) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") From ca96b05230076f5694e745650e54ba6148f49b68 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Wed, 3 Aug 2022 21:52:12 +0200 Subject: [PATCH 129/155] Add ninja to macOS requirements --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 4977178733f..0cae105e672 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -56,7 +56,7 @@ cpack -G External (creates appimage) ``` ## macOS -1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, cmake, pkgconfig, dylibbundler` (can be installed via homebrew, macports, etc) +1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake, pkgconfig, dylibbundler` (can be installed via homebrew, macports, etc) ```bash # Clone the repo git clone https://github.com/HarbourMasters/Shipwright.git From 5e8168fc9252ad3f3eab75a06fe0df42d1c3df0c Mon Sep 17 00:00:00 2001 From: David Chavez Date: Wed, 3 Aug 2022 17:37:37 +0200 Subject: [PATCH 130/155] Remove Makefiles & VS solutions --- .gitignore | 4 + Makefile.switch | 36 - OTRExporter/OTRExporter.sln | 79 - OTRExporter/OTRExporter/Makefile | 72 - OTRExporter/OTRExporter/OTRExporter.vcxproj | 216 - .../OTRExporter/OTRExporter.vcxproj.filters | 150 - ZAPDTR/Makefile | 146 - ZAPDTR/ZAPDTR.sln | 82 - ZAPDTR/ZAPDUtils/Makefile | 29 - ZAPDTR/ZAPDUtils/Makefile.switch | 171 - libultraship/Makefile | 149 - libultraship/Makefile.switch | 192 - libultraship/libultraship.sln | 64 - .../libultraship/libultraship.vcxproj | 455 -- .../libultraship/libultraship.vcxproj.filters | 681 --- soh/Makefile | 235 - soh/Makefile.switch | 280 -- soh/soh.sln | 66 - soh/soh.vcxproj | 1522 ------ soh/soh.vcxproj.filters | 4091 ----------------- soh/soh.vcxproj.user | 26 - 21 files changed, 4 insertions(+), 8742 deletions(-) delete mode 100644 Makefile.switch delete mode 100644 OTRExporter/OTRExporter.sln delete mode 100644 OTRExporter/OTRExporter/Makefile delete mode 100644 OTRExporter/OTRExporter/OTRExporter.vcxproj delete mode 100644 OTRExporter/OTRExporter/OTRExporter.vcxproj.filters delete mode 100644 ZAPDTR/Makefile delete mode 100644 ZAPDTR/ZAPDTR.sln delete mode 100644 ZAPDTR/ZAPDUtils/Makefile delete mode 100644 ZAPDTR/ZAPDUtils/Makefile.switch delete mode 100644 libultraship/Makefile delete mode 100644 libultraship/Makefile.switch delete mode 100644 libultraship/libultraship.sln delete mode 100644 libultraship/libultraship/libultraship.vcxproj delete mode 100644 libultraship/libultraship/libultraship.vcxproj.filters delete mode 100644 soh/Makefile delete mode 100644 soh/Makefile.switch delete mode 100644 soh/soh.sln delete mode 100644 soh/soh.vcxproj delete mode 100644 soh/soh.vcxproj.filters delete mode 100644 soh/soh.vcxproj.user diff --git a/.gitignore b/.gitignore index e4e07589bf3..c9a95a7dc03 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,10 @@ docs/doxygen/ *.map *.dump out.txt +*.sln +*.vcxproj +*.vcxproj.user +*.vcxproj.filters # Tool artifacts tools/mipspro7.2_compiler/ diff --git a/Makefile.switch b/Makefile.switch deleted file mode 100644 index 2dd9f5ea23a..00000000000 --- a/Makefile.switch +++ /dev/null @@ -1,36 +0,0 @@ -#------------------------------------------------------------------------------- -.SUFFIXES: -#------------------------------------------------------------------------------- - -export SOH_TOP_DIR := $(CURDIR) - -.PHONY: all clean ZAPDUtils libultraship soh StormLib - -all: soh - @echo "Done!" - -ZAPDUtils: - @echo "Building $@..." - @$(MAKE) --no-print-directory -C $(CURDIR)/ZAPDTR/ZAPDUtils -f $(CURDIR)/ZAPDTR/ZAPDUtils/Makefile.switch - -StormLib: - @echo "Building $@..." - LDFLAGS="" ${DEVKITPRO}/portlibs/switch/bin/aarch64-none-elf-cmake -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/Switch.cmake -DCMAKE_BUILD_TYPE=Release -B $(CURDIR)/StormLib/nxbuild -S $(CURDIR)/StormLib - @$(MAKE) --no-print-directory -C $(CURDIR)/StormLib/nxbuild -f $(CURDIR)/StormLib/nxbuild/Makefile - -libultraship: StormLib ZAPDUtils - @echo "Building $@..." - @$(MAKE) --no-print-directory -C $(CURDIR)/libultraship -f $(CURDIR)/libultraship/Makefile.switch - -soh: libultraship - @echo "Building $@..." - @$(MAKE) --no-print-directory -C $(CURDIR)/soh -f $(CURDIR)/soh/Makefile.switch - -otr: - @echo "Building $@..." - @$(MAKE) --no-print-directory -C $(CURDIR)/soh -f $(CURDIR)/soh/Makefile setup - -clean: - @$(MAKE) --no-print-directory -C $(CURDIR)/ZAPDTR/ZAPDUtils -f $(CURDIR)/ZAPDTR/ZAPDUtils/Makefile.switch clean - @$(MAKE) --no-print-directory -C $(CURDIR)/libultraship -f $(CURDIR)/libultraship/Makefile.switch clean - @$(MAKE) --no-print-directory -C $(CURDIR)/soh -f $(CURDIR)/soh/Makefile.switch clean \ No newline at end of file diff --git a/OTRExporter/OTRExporter.sln b/OTRExporter/OTRExporter.sln deleted file mode 100644 index 5379a92c8bd..00000000000 --- a/OTRExporter/OTRExporter.sln +++ /dev/null @@ -1,79 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30320.27 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OTRExporter", "OTRExporter\OTRExporter.vcxproj", "{A6103FD3-0709-4FC7-B066-1A6E056D6306}" - ProjectSection(ProjectDependencies) = postProject - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} = {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libultraship", "..\libultraship\libultraship\libultraship.vcxproj", "{6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPD", "..\ZAPDTR\ZAPD\ZAPD.vcxproj", "{B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}" - ProjectSection(ProjectDependencies) = postProject - {78424708-1F6E-4D4B-920C-FB6D26847055} = {78424708-1F6E-4D4B-920C-FB6D26847055} - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} = {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} - {A2E01C3E-D647-45D1-9788-043DEBC1A908} = {A2E01C3E-D647-45D1-9788-043DEBC1A908} - {A6103FD3-0709-4FC7-B066-1A6E056D6306} = {A6103FD3-0709-4FC7-B066-1A6E056D6306} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPDUtils", "..\ZAPDTR\ZAPDUtils\ZAPDUtils.vcxproj", "{A2E01C3E-D647-45D1-9788-043DEBC1A908}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StormLib", "..\StormLib\StormLib_vs19.vcxproj", "{78424708-1F6E-4D4B-920C-FB6D26847055}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Debug|x64.ActiveCfg = Debug|x64 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Debug|x64.Build.0 = Debug|x64 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Debug|x86.ActiveCfg = Debug|Win32 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Debug|x86.Build.0 = Debug|Win32 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Release|x64.ActiveCfg = Release|x64 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Release|x64.Build.0 = Release|x64 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Release|x86.ActiveCfg = Release|Win32 - {A6103FD3-0709-4FC7-B066-1A6E056D6306}.Release|x86.Build.0 = Release|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.ActiveCfg = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.Build.0 = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.ActiveCfg = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.Build.0 = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.ActiveCfg = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.Build.0 = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.ActiveCfg = Release|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.Build.0 = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.ActiveCfg = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.Build.0 = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.ActiveCfg = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.Build.0 = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.ActiveCfg = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.Build.0 = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.ActiveCfg = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.Build.0 = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.ActiveCfg = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.Build.0 = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.ActiveCfg = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.Build.0 = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.ActiveCfg = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.Build.0 = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.ActiveCfg = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.Build.0 = Release|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x64.ActiveCfg = DebugUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x64.Build.0 = DebugUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x86.ActiveCfg = DebugAD|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x86.Build.0 = DebugAD|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x64.ActiveCfg = ReleaseUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x64.Build.0 = ReleaseUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x86.ActiveCfg = ReleaseAS|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x86.Build.0 = ReleaseAS|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DCE19FF1-37C0-49CD-915A-DD695E15F00B} - EndGlobalSection -EndGlobal diff --git a/OTRExporter/OTRExporter/Makefile b/OTRExporter/OTRExporter/Makefile deleted file mode 100644 index c3882b5e35a..00000000000 --- a/OTRExporter/OTRExporter/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# Only used for standalone compilation, usually inherits these from the main makefile - -CXX ?= g++ -AR := ar -FORMAT := clang-format-11 - -ASAN ?= 0 -DEBUG ?= 1 -OPTFLAGS ?= -O0 -LTO ?= 0 - -WARN := -Wall -Wextra -Werror \ - -Wno-unused-parameter \ - -Wno-unused-function \ - -Wno-unused-variable \ - -Wno-error=multichar - - -CXXFLAGS := $(WARN) -std=c++17 -CPPFLAGS := -MMD - -ifneq ($(DEBUG),0) - CXXFLAGS += -g -endif - -ifneq ($(ASAN),0) - CXXFLAGS += -fsanitize=address -endif - -ifneq ($(LTO),0) - CXXFLAGS += -flto -endif - -SRC_DIRS := $(shell find . -type d -not -path "*build*") -CXX_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) -H_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h)) - -O_FILES := $(CXX_FILES:%.cpp=build/%.o) -D_FILES := $(O_FILES:%.o=%.d) -LIB := OTRExporter.a - -INC_DIRS := $(addprefix -I, \ - ../../ZAPDTR/ZAPD \ - ../../ZAPDTR/lib/tinyxml2 \ - ../../ZAPDTR/lib/libgfxd \ - ../../ZAPDTR/ZAPDUtils \ - ../../libultraship/libultraship \ - ../../libultraship/libultraship/Lib/spdlog/include \ - ../../libultraship/libultraship/Lib/Fast3D/U64 \ - ../../StormLib/src \ -) - -# create build directories -$(shell mkdir -p $(SRC_DIRS:%=build/%)) - -all: $(LIB) - -clean: - rm -rf build $(LIB) - -format: - $(FORMAT) -i $(CXX_FILES) $(H_FILES) - -.PHONY: all clean format - -build/%.o: %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ - -$(LIB): $(O_FILES) - $(AR) rcs $@ $^ - --include $(D_FILES) diff --git a/OTRExporter/OTRExporter/OTRExporter.vcxproj b/OTRExporter/OTRExporter/OTRExporter.vcxproj deleted file mode 100644 index c39da3df57b..00000000000 --- a/OTRExporter/OTRExporter/OTRExporter.vcxproj +++ /dev/null @@ -1,216 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16.0 - Win32Proj - {a6103fd3-0709-4fc7-b066-1a6e056d6306} - OTRExporter - 10.0 - - - - StaticLibrary - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)otrlib;$(SolutionDir)\ZAPD\ZAPD\;$(SolutionDir)\ZAPD\lib\tinyxml2;$(SolutionDir)\ZAPD\lib\libgfxd;$(SolutionDir)\ZAPD\lib\elfio;$(SolutionDir)\ZAPD\lib\assimp\include;$(SolutionDir)\ZAPD\lib\stb;$(ProjectDir);$(IncludePath) - MinimumRecommendedRules.ruleset - - - - - false - MinimumRecommendedRules.ruleset - - - - - true - $(ProjectDir)..\..\ZAPDTR\ZAPD;$(ProjectDir)..\..\ZAPDTR\lib\tinyxml2;$(ProjectDir)..\..\ZAPDTR\lib\libgfxd;$(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\..\libultraship\libultraship;$(ProjectDir)..\..\libultraship\libultraship\lib\spdlog\include;$(ProjectDir)..\..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)..\..\libultraship\libultraship;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - false - $(ProjectDir)..\..\ZAPDTR\ZAPD;$(ProjectDir)..\..\ZAPDTR\lib\tinyxml2;$(ProjectDir)..\..\ZAPDTR\lib\libgfxd;$(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\..\libultraship\libultraship;$(ProjectDir)..\..\libultraship\libultraship\lib\spdlog\include;$(ProjectDir)..\..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)..\..\libultraship\libultraship;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - stdcpp17 - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - stdcpp17 - stdc11 - MultiThreadedDebug - - - Console - true - ZAPDUtils.lib;OTRLib.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - stdcpp17 - stdc11 - MultiThreaded - - - Console - true - true - true - - - - - - \ No newline at end of file diff --git a/OTRExporter/OTRExporter/OTRExporter.vcxproj.filters b/OTRExporter/OTRExporter/OTRExporter.vcxproj.filters deleted file mode 100644 index a8cf567370b..00000000000 --- a/OTRExporter/OTRExporter/OTRExporter.vcxproj.filters +++ /dev/null @@ -1,150 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/ZAPDTR/Makefile b/ZAPDTR/Makefile deleted file mode 100644 index 660e0469ce4..00000000000 --- a/ZAPDTR/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -# use variables in submakes -export -OPTIMIZATION_ON ?= 1 -ASAN ?= 0 -DEPRECATION_ON ?= 1 -DEBUG ?= 0 -COPYCHECK_ARGS ?= -LLD ?= 0 -WERROR ?= 0 -UNAME := $(shell uname) - -# Use clang++ if available, else use g++ -ifeq ($(shell command -v clang++ >/dev/null 2>&1; echo $$?),0) - CXX ?= clang++ -else - CXX ?= g++ -endif - -INC := -I ZAPD -I lib/elfio -I lib/libgfxd -I lib/tinyxml2 -I ZAPDUtils -CXXFLAGS := -fpic -std=c++17 -Wall -Wextra -fno-omit-frame-pointer -OPTFLAGS := - -ifneq ($(DEBUG),0) - OPTIMIZATION_ON = 0 - CXXFLAGS += -g3 -DDEVELOPMENT -D_DEBUG - COPYCHECK_ARGS += --devel - DEPRECATION_ON = 0 -endif - -ifneq ($(WERROR),0) - CXXFLAGS += -Werror -endif - -ifeq ($(OPTIMIZATION_ON),0) - OPTFLAGS := -O0 -else - OPTFLAGS := -O2 -endif - -ifneq ($(ASAN),0) - CXXFLAGS += -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined -endif -ifneq ($(DEPRECATION_ON),0) - CXXFLAGS += -DDEPRECATION_ON -endif -# CXXFLAGS += -DTEXTURE_DEBUG - -LDFLAGS := -Llib/libgfxd -L../libultraship -L../StormLib/build \ - -pthread -lgfxd -lultraship ZAPDUtils/ZAPDUtils.a -lstorm -lbz2 -lm -ldl - -LDFLAGS += $(shell pkg-config --libs glew libpng zlib) $(shell sdl2-config --libs) -INC += $(shell pkg-config --cflags libpng) - -ifeq ($(UNAME), Darwin) - LDFLAGS += -framework OpenGL -framework Foundation -endif - -ifeq ($(UNAME), Linux) - LDFLAGS += $(shell pkg-config --libs x11 libpulse) -endif - -# Use LLD if available. Set LLD=0 to not use it -ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0) - LLD := 1 -endif - -ifneq ($(LLD),0) - LDFLAGS += -fuse-ld=lld -endif - -UNAMEM := $(shell uname -m) -ifeq ($(UNAME), Linux) - LDFLAGS += -Wl,-export-dynamic -lstdc++fs - EXPORTERS := -Wl,--whole-archive ../OTRExporter/OTRExporter/OTRExporter.a -Wl,--no-whole-archive -endif - -ifeq ($(UNAME), Darwin) - EXPORTERS := -Wl,-force_load ../OTRExporter/OTRExporter/OTRExporter.a -endif - - -ZAPD_SRC_DIRS := $(shell find ZAPD -type d) -SRC_DIRS = $(ZAPD_SRC_DIRS) lib/tinyxml2 - -ZAPD_CPP_FILES := $(foreach dir,$(ZAPD_SRC_DIRS),$(wildcard $(dir)/*.cpp)) -ZAPD_H_FILES := $(foreach dir,$(ZAPD_SRC_DIRS),$(wildcard $(dir)/*.h)) - -CPP_FILES += $(ZAPD_CPP_FILES) lib/tinyxml2/tinyxml2.cpp -O_FILES := $(foreach f,$(CPP_FILES:.cpp=.o),build/$f) -O_FILES += build/ZAPD/BuildInfo.o - -# create build directories -$(shell mkdir -p $(foreach dir,$(SRC_DIRS),build/$(dir))) - - -# Main targets -all: ZAPD.out copycheck - -build/ZAPD/BuildInfo.o: - python3 ZAPD/genbuildinfo.py $(COPYCHECK_ARGS) - $(CXX) $(CXXFLAGS) $(OPTFLAGS) $(INC) -c $(OUTPUT_OPTION) build/ZAPD/BuildInfo.cpp - -copycheck: ZAPD.out - python3 copycheck.py - -clean: - rm -rf build ZAPD.out - $(MAKE) -C lib/libgfxd clean - $(MAKE) -C ZAPDUtils clean - $(MAKE) -C ExporterTest clean - rm -rf ../StormLib/build - -rebuild: clean all - -format: - clang-format-11 -i $(ZAPD_CPP_FILES) $(ZAPD_H_FILES) - $(MAKE) -C ZAPDUtils format - $(MAKE) -C ExporterTest format - -.PHONY: all build/ZAPD/BuildInfo.o copycheck clean rebuild format - -build/%.o: %.cpp - $(CXX) $(CXXFLAGS) $(OPTFLAGS) $(INC) -c $(OUTPUT_OPTION) $< - - -# Submakes -lib/libgfxd/libgfxd.a: - $(MAKE) -C lib/libgfxd - -.PHONY: StormLib -StormLib: - LDFLAGS="" cmake -B ../StormLib/build -S ../StormLib - $(MAKE) -C ../StormLib/build - -.PHONY: ExporterTest -ExporterTest: - $(MAKE) -C ExporterTest - -.PHONY: ZAPDUtils -ZAPDUtils: - $(MAKE) -C ZAPDUtils - - -# Linking -ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils StormLib - $(CXX) $(CXXFLAGS) $(O_FILES) $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION) diff --git a/ZAPDTR/ZAPDTR.sln b/ZAPDTR/ZAPDTR.sln deleted file mode 100644 index 82538dd9f48..00000000000 --- a/ZAPDTR/ZAPDTR.sln +++ /dev/null @@ -1,82 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30320.27 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPD", "ZAPD\ZAPD.vcxproj", "{B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExporterExample", "ExporterTest\ExporterTest.vcxproj", "{65608EB0-1A47-45AD-AB66-192FB64C762C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPDUtils", "ZAPDUtils\ZAPDUtils.vcxproj", "{A2E01C3E-D647-45D1-9788-043DEBC1A908}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - MinSizeRel|x64 = MinSizeRel|x64 - MinSizeRel|x86 = MinSizeRel|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - RelWithDebInfo|x64 = RelWithDebInfo|x64 - RelWithDebInfo|x86 = RelWithDebInfo|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.ActiveCfg = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.Build.0 = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.ActiveCfg = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.Build.0 = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x64.ActiveCfg = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x64.Build.0 = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x86.ActiveCfg = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x86.Build.0 = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.ActiveCfg = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.Build.0 = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.ActiveCfg = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.Build.0 = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x64.Build.0 = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x64.ActiveCfg = Debug|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x64.Build.0 = Debug|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x86.ActiveCfg = Debug|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x86.Build.0 = Debug|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x64.ActiveCfg = Debug|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x64.Build.0 = Debug|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x86.Build.0 = Debug|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x64.ActiveCfg = Release|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x64.Build.0 = Release|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x86.ActiveCfg = Release|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x86.Build.0 = Release|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x64.Build.0 = Release|x64 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x86.Build.0 = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.ActiveCfg = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.Build.0 = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.ActiveCfg = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.Build.0 = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x64.ActiveCfg = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x64.Build.0 = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x86.ActiveCfg = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x86.Build.0 = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.ActiveCfg = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.Build.0 = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.ActiveCfg = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.Build.0 = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x64.ActiveCfg = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x64.Build.0 = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C2E1CC72-7A50-3249-AFD5-DFF6FE25CDCA} - EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection -EndGlobal diff --git a/ZAPDTR/ZAPDUtils/Makefile b/ZAPDTR/ZAPDUtils/Makefile deleted file mode 100644 index b9c4e29ad56..00000000000 --- a/ZAPDTR/ZAPDUtils/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# Only used for standalone compilation, usually inherits these from the main makefile -CXX ?= g++ -CXXFLAGS ?= -Wall -Wextra -O2 -g -std=c++17 - -SRC_DIRS := $(shell find . -type d -not -path "*build*") -CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) -H_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h)) - -O_FILES := $(foreach f,$(CPP_FILES:.cpp=.o),build/$f) -LIB := ZAPDUtils.a - -# create build directories -$(shell mkdir -p $(foreach dir,$(SRC_DIRS),build/$(dir))) - -all: $(LIB) - -clean: - rm -rf build $(LIB) - -format: - clang-format-11 -i $(CPP_FILES) $(H_FILES) - -.PHONY: all clean format - -build/%.o: %.cpp - $(CXX) $(CXXFLAGS) $(OPTFLAGS) -c $(OUTPUT_OPTION) $< - -$(LIB): $(O_FILES) - $(AR) rcs $@ $^ diff --git a/ZAPDTR/ZAPDUtils/Makefile.switch b/ZAPDTR/ZAPDUtils/Makefile.switch deleted file mode 100644 index ed173c44f53..00000000000 --- a/ZAPDTR/ZAPDUtils/Makefile.switch +++ /dev/null @@ -1,171 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- - -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=/devkitpro") -endif - -TOPDIR ?= $(CURDIR) -include $(DEVKITPRO)/libnx/switch_rules - -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# DATA is a list of directories containing data files -# INCLUDES is a list of directories containing header files -# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) -# -# NO_ICON: if set to anything, do not use icon. -# NO_NACP: if set to anything, no .nacp file is generated. -# APP_TITLE is the name of the app stored in the .nacp file (Optional) -# APP_AUTHOR is the author of the app stored in the .nacp file (Optional) -# APP_VERSION is the version of the app stored in the .nacp file (Optional) -# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional) -# ICON is the filename of the icon (.jpg), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .jpg -# - icon.jpg -# - /default_icon.jpg -# -# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .json -# - config.json -# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead -# of a homebrew executable (.nro). This is intended to be used for sysmodules. -# NACP building is skipped as well. -#--------------------------------------------------------------------------------- -TARGET := ZAPDUtils -BUILD := build -SOURCES := Utils -DATA := -INCLUDES := - -#------------------------------------------------------------------------------- -# source files -#------------------------------------------------------------------------------- -SOURCEFILES_C := - -SOURCEFILES_CPP := - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE - -CFLAGS := -g -Wall -O2 -ffunction-sections \ - $(ARCH) $(DEFINES) - -CFLAGS += $(INCLUDE) -D__SWITCH__ - -CXXFLAGS := $(CFLAGS) -fno-rtti -fexceptions -std=gnu++20 -CFLAGS += -std=gnu11 - -ASFLAGS := -g $(ARCH) -LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) - -LIBS := -lnx - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) - - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/lib/lib$(TARGET).a -export TOPDIR := $(CURDIR) - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \ - $(foreach sf,$(SOURCEFILES_C),$(CURDIR)/$(dir $(sf))) \ - $(foreach sf,$(SOURCEFILES_CPP),$(CURDIR)/$(dir $(sf))) - -export DEPSDIR := $(CURDIR)/$(BUILD) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) \ - $(foreach f,$(SOURCEFILES_C),$(notdir $(f))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) \ - $(foreach f,$(SOURCEFILES_CPP),$(notdir $(f))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES_BIN := $(addsuffix .o,$(BINFILES)) -export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) -export OFILES := $(OFILES_BIN) $(OFILES_SRC) -export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) - -.PHONY: $(BUILD) clean all - -#--------------------------------------------------------------------------------- -all: $(BUILD) - -lib: - @[ -d $@ ] || mkdir -p $@ - -$(BUILD) : lib - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.switch - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -rf build lib - -#--------------------------------------------------------------------------------- -else -.PHONY: all - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- - -$(OUTPUT) : $(OFILES) - -$(OFILES_SRC) : $(HFILES) -$(OFILES_SRC) : $(HFILES_BIN) - -#--------------------------------------------------------------------------------- -# you need a rule like this for each extension you use as binary data -#--------------------------------------------------------------------------------- -%.bin.o %_bin.h : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/libultraship/Makefile b/libultraship/Makefile deleted file mode 100644 index 8369126f409..00000000000 --- a/libultraship/Makefile +++ /dev/null @@ -1,149 +0,0 @@ -# Only used for standalone compilation, usually inherits these from the main makefile - -CXX ?= g++ -CC ?= gcc -AR := ar -FORMAT := clang-format-11 -UNAME := $(shell uname) - -ASAN ?= 0 -DEBUG ?= 1 -OPTFLAGS ?= -O0 -X11 ?= 0 -LTO ?= 0 - -# flag to save whether the compiler being used is clang or gcc by checking CXX --version -CXX_IS_CLANG ?= $(shell $(CXX) --version | grep -c clang) -ifeq ($(CXX_IS_CLANG),1) - MXX := $(CXX) -else - MXX ?= clang++ -endif - - -WARN := -Wall -Wextra -Werror \ - -Wno-unused-variable \ - -Wno-unused-parameter \ - -Wno-unused-function \ - -Wno-parentheses \ - -Wno-narrowing \ - -Wno-missing-field-initializers \ - -Wno-error=multichar \ - -Wno-delete-non-abstract-non-virtual-dtor \ - -Wno-unused-private-field \ - -Wno-deprecated-copy-with-user-provided-copy \ - -Wno-deprecated-declarations \ - -Wno-unknown-warning-option - -CWARN := -CXXWARN := -Wno-deprecated-enum-enum-conversion -Wno-deprecated-copy - -ifneq ($(CXX_IS_CLANG),1) - WARN += -Wno-error=stringop-overflow - CXXWARN += -Wno-error=maybe-uninitialized -endif - -CXXFLAGS := $(WARN) $(CXXWARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -CFLAGS := $(WARN) $(CWARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -CPPFLAGS := -MMD $(shell pkg-config --cflags sdl2 glew) - -MMFLAGS := -Wno-deprecated-declarations -ObjC++ -fobjc-weak -fobjc-arc - -ifeq ($(X11), 1) -CXXFLAGS += -DX11_SUPPORTED -CFLAGS += -DX11_SUPPORTED -endif - -# if not using clang, ask clang to use gcc standard library -ifneq ($(CXX_IS_CLANG),1) - STD_ISYSTEM=$(shell ${CXX} -xc++ -E -v - < /dev/null 2>&1 | grep "> search starts here" -A2 | tail -n 2 | head -n 1) - CXX_ISYSTEM=$(shell ${CXX} -xc++ -E -v - < /dev/null 2>&1 | grep "> search starts here" -A2 | tail -n 2 | tail -n 1) - MMFLAGS += -stdlib++-isystem ${STD_ISYSTEM} -cxx-isystem ${CXX_ISYSTEM} -endif - -ifneq ($(DEBUG),0) - CXXFLAGS += -g -D_DEBUG - CFLAGS += -g -D_DEBUG -endif - -ifneq ($(ASAN),0) - CXXFLAGS += -fsanitize=address - CFLAGS += -fsanitize=address -endif - -ifneq ($(LTO),0) - CXXFLAGS += -flto - CFLAGS += -flto -endif - -SRC_DIRS := $(shell find . -type d -not -path "*build*") - -CXX_FILES := \ - $(shell find libultraship/Factories -name "*.cpp") \ - $(shell find libultraship/Lib/Fast3D -name "*.cpp") \ - $(shell find libultraship -maxdepth 1 -name "*.cpp") \ - $(shell find libultraship/Lib/ImGui -maxdepth 1 -name "*.cpp") \ - $(shell find libultraship/Lib/Mercury -maxdepth 1 -name "*.cpp") \ - libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \ - libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \ - libultraship/Lib/StrHash64.cpp \ - libultraship/Lib/tinyxml2/tinyxml2.cpp - -C_FILES := \ - libultraship/mixer.c \ - libultraship/Lib/stb/stb_impl.c - -MM_FILES := \ - libultraship/OSXFolderManager.mm - -FMT_FILES := $(shell find libultraship/ -type f \( -name "*.cpp" -o -name "*.h" \) -a -not -path "libultraship/Lib/*") - -O_FILES := \ - $(CXX_FILES:%.cpp=build/%.o) \ - $(C_FILES:%.c=build/%.o) - -ifeq ($(UNAME), Darwin) #APPLE - O_FILES += $(MM_FILES:%.mm=build/%.o) -endif - -D_FILES := $(O_FILES:%.o=%.d) - -LIB := libultraship.a - -INC_DIRS := $(addprefix -I, \ - ../ZAPDTR/ZAPDUtils \ - libultraship/Lib/Fast3D/U64 \ - libultraship/Lib/spdlog \ - libultraship/Lib/spdlog/include \ - libultraship/Lib/ImGui \ - libultraship/Lib/Mercury \ - libultraship \ - ../StormLib/src \ -) - -# create build directories -$(shell mkdir -p $(SRC_DIRS:%=build/%)) - -all: $(LIB) - -clean: - rm -rf build $(LIB) - -format: - $(FORMAT) -i $(FMT_FILES) - -.PHONY: all clean format - -build/%.o: %.cpp - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ - -build/%.o: %.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ - -build/%.o: %.mm - $(MXX) $(MMFLAGS) $(CXXFLAGS) $(OPTFLAGS) $(INC_DIRS) -c $< -o $@ - -$(LIB): $(O_FILES) - $(AR) rcs $@ $^ - --include $(D_FILES) diff --git a/libultraship/Makefile.switch b/libultraship/Makefile.switch deleted file mode 100644 index 72f0171aa2e..00000000000 --- a/libultraship/Makefile.switch +++ /dev/null @@ -1,192 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- - -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=/devkitpro") -endif - -TOPDIR ?= $(CURDIR) -include $(DEVKITPRO)/libnx/switch_rules - -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# DATA is a list of directories containing data files -# INCLUDES is a list of directories containing header files -# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) -# -# NO_ICON: if set to anything, do not use icon. -# NO_NACP: if set to anything, no .nacp file is generated. -# APP_TITLE is the name of the app stored in the .nacp file (Optional) -# APP_AUTHOR is the author of the app stored in the .nacp file (Optional) -# APP_VERSION is the version of the app stored in the .nacp file (Optional) -# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional) -# ICON is the filename of the icon (.jpg), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .jpg -# - icon.jpg -# - /default_icon.jpg -# -# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .json -# - config.json -# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead -# of a homebrew executable (.nro). This is intended to be used for sysmodules. -# NACP building is skipped as well. -#--------------------------------------------------------------------------------- -TARGET := ultraship -BUILD := build -SOURCES := \ - libultraship/Factories \ - libultraship/Lib/Fast3D \ - libultraship/Lib/ImGui \ - libultraship/Lib/Mercury \ - libultraship -DATA := -INCLUDES := \ - ../ZAPDTR/ZAPDUtils \ - ../StormLib/src \ - libultraship/Lib/Fast3D/U64 \ - libultraship/Lib/ImGui \ - libultraship/Lib/spdlog \ - libultraship/Lib/spdlog/include \ - libultraship - -#------------------------------------------------------------------------------- -# source files -#------------------------------------------------------------------------------- - -SOURCEFILES_C := \ - libultraship/mixer.c \ - libultraship/Lib/stb/stb_impl.c \ - -SOURCEFILES_CPP := \ - libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \ - libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \ - libultraship/Lib/StrHash64.cpp \ - libultraship/Lib/tinyxml2/tinyxml2.cpp - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE -ffast-math -O3 - -CFLAGS := -Wall -ffunction-sections \ - $(ARCH) $(DEFINES) \ - -DSPDLOG_NO_THREAD_ID \ - -DSTBI_NO_THREAD_LOCALS - -CFLAGS += $(INCLUDE) -D__SWITCH__ -DENABLE_OPENGL - -CXXFLAGS := $(CFLAGS) -std=gnu++20 -CFLAGS += -std=gnu11 - -ASFLAGS := -g $(ARCH) -LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) - -LIBS := -lnx - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) - - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/lib/lib$(TARGET).a -export TOPDIR := $(CURDIR) - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \ - $(foreach sf,$(SOURCEFILES_C),$(CURDIR)/$(dir $(sf))) \ - $(foreach sf,$(SOURCEFILES_CPP),$(CURDIR)/$(dir $(sf))) - -export DEPSDIR := $(CURDIR)/$(BUILD) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) \ - $(foreach f,$(SOURCEFILES_C),$(notdir $(f))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) \ - $(foreach f,$(SOURCEFILES_CPP),$(notdir $(f))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES_BIN := $(addsuffix .o,$(BINFILES)) -export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) -export OFILES := $(OFILES_BIN) $(OFILES_SRC) -export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) - -.PHONY: $(BUILD) clean all - -#--------------------------------------------------------------------------------- -all: $(BUILD) - -lib: - @[ -d $@ ] || mkdir -p $@ - -$(BUILD) : lib - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.switch - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... - @rm -rf build lib - -#--------------------------------------------------------------------------------- -else -.PHONY: all - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- - -$(OUTPUT) : $(OFILES) - -$(OFILES_SRC) : $(HFILES) -$(OFILES_SRC) : $(HFILES_BIN) - -#--------------------------------------------------------------------------------- -# you need a rule like this for each extension you use as binary data -#--------------------------------------------------------------------------------- -%.bin.o %_bin.h : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/libultraship/libultraship.sln b/libultraship/libultraship.sln deleted file mode 100644 index b0adce9b9a8..00000000000 --- a/libultraship/libultraship.sln +++ /dev/null @@ -1,64 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30320.27 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libultraship", "libultraship\libultraship.vcxproj", "{6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestApp", "TestApp\TestApp.vcxproj", "{3C4A8151-48D1-4518-BE1A-24016A5B800F}" - ProjectSection(ProjectDependencies) = postProject - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} = {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPD", "..\ZAPDTR\ZAPD\ZAPD.vcxproj", "{B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPDUtils", "..\ZAPDTR\ZAPDUtils\ZAPDUtils.vcxproj", "{A2E01C3E-D647-45D1-9788-043DEBC1A908}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.ActiveCfg = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.Build.0 = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.ActiveCfg = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.Build.0 = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.ActiveCfg = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.Build.0 = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.ActiveCfg = Release|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.Build.0 = Release|Win32 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Debug|x64.ActiveCfg = Debug|x64 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Debug|x64.Build.0 = Debug|x64 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Debug|x86.ActiveCfg = Debug|Win32 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Debug|x86.Build.0 = Debug|Win32 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Release|x64.ActiveCfg = Release|x64 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Release|x64.Build.0 = Release|x64 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Release|x86.ActiveCfg = Release|Win32 - {3C4A8151-48D1-4518-BE1A-24016A5B800F}.Release|x86.Build.0 = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.ActiveCfg = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.Build.0 = Debug|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.ActiveCfg = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.Build.0 = Debug|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.ActiveCfg = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.Build.0 = Release|x64 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.ActiveCfg = Release|Win32 - {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.Build.0 = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.ActiveCfg = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.Build.0 = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.ActiveCfg = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.Build.0 = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.ActiveCfg = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.Build.0 = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.ActiveCfg = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DCE19FF1-37C0-49CD-915A-DD695E15F00B} - EndGlobalSection -EndGlobal diff --git a/libultraship/libultraship/libultraship.vcxproj b/libultraship/libultraship/libultraship.vcxproj deleted file mode 100644 index 52df7d3959d..00000000000 --- a/libultraship/libultraship/libultraship.vcxproj +++ /dev/null @@ -1,455 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - Testing - Win32 - - - Testing - x64 - - - - 16.0 - Win32Proj - {6da9b521-65b7-41e2-8f8a-f0451cc18ed8} - libultraship - 10.0 - libultraship - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\libjpeg\include;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - true - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\libjpeg\include;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - false - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x86;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - true - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - true - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - false - $(ProjectDir)..\..\ZAPDTR\ZAPDUtils;$(ProjectDir)Lib\Fast3D\U64;$(ProjectDir)Lib\ImGui;$(ProjectDir)Lib\spdlog\include;$(ProjectDir)Lib\SDL;$(ProjectDir)Lib\GLEW;$(ProjectDir)..\..\StormLib\src\;$(IncludePath) - $(ProjectDir)Lib\SDL\lib\x64;$(LibraryPath) - MinimumRecommendedRules.ruleset - - - - - - Level2 - true - SPDLOG_ACTIVE_LEVEL=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;ENABLE_DX11;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - stdc17 - MultiThreadedDebug - true - Disabled - Default - false - - - Console - true - - - - - Level2 - true - SPDLOG_ACTIVE_LEVEL=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - stdc17 - MultiThreadedDebug - true - - - Console - true - - - - - Level3 - true - true - true - SPDLOG_ACTIVE_LEVEL=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;ENABLE_DX11;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - stdc17 - MultiThreaded - true - - - Console - true - true - true - - - - - Level3 - true - SPDLOG_ACTIVE_LEVEL=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;ENABLE_DX11;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - stdc17 - MultiThreadedDebug - true - Default - - - Console - true - - - - - Level3 - true - SPDLOG_ACTIVE_LEVEL=0;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - stdc17 - MultiThreadedDebug - true - - - Console - true - - - - - Level3 - true - true - true - SPDLOG_ACTIVE_LEVEL=0;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;ENABLE_DX11;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpplatest - stdc11 - MultiThreaded - true - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/libultraship/libultraship/libultraship.vcxproj.filters b/libultraship/libultraship/libultraship.vcxproj.filters deleted file mode 100644 index f84250c290a..00000000000 --- a/libultraship/libultraship/libultraship.vcxproj.filters +++ /dev/null @@ -1,681 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {50e27c70-2679-4f41-9127-fca2c66989ce} - - - {19d4557f-ea31-4405-88d5-15504070f479} - - - {12c0e217-75b9-47a5-bc2e-a2ea4e5dd992} - - - {bec61d88-f3a8-466d-b3e8-cf2e7d963f1b} - - - {ad191ad0-c9eb-495d-9d45-5d12b9e7c269} - - - {c0f07350-c627-444e-9f66-23e19407ad9a} - - - {2aa34c3b-6148-480f-a4fc-19c4e0f8c822} - - - {6b6658ad-694d-4943-83b8-c9dbd31ca67d} - - - {ef3683ce-934c-44c3-ae84-99cf22764875} - - - {58ff8972-9dba-4719-aec5-6edc5e6b033d} - - - {dde367c4-c14a-4bf3-b6d9-bc0d2d7d34e6} - - - {1f5e0ba2-0f3f-456c-9b66-873ed62e9fbe} - - - {3376a196-8303-4613-9721-62f31e746b0d} - - - {cf7f1b29-bb9a-4844-9ea5-4ac085f942e1} - - - {70cd453d-a4dc-4c56-b64e-e50394fd18ee} - - - {a66f6337-5cde-4e46-8f49-a6c991ea2fe7} - - - {11039197-0b49-4fb9-b9e6-56196220c9d4} - - - {ccd6359f-e357-41ca-9b89-5f509dd30649} - - - {0dca2d94-45ba-4916-b03a-1dd5f949114c} - - - {8e970531-d0cd-4c29-9800-a7e6edc92036} - - - {05f273a3-f147-430e-9853-aeef59e6288d} - - - {cc8de11b-7305-4482-853f-7f0f843eef28} - - - {bd6557f1-9480-413b-b0cd-843f8efc1939} - - - {3285ab8a-06d8-4dac-9af9-efb2a9723ab1} - - - {db6e02cc-fc4c-4138-8219-1d281ad93ec2} - - - {2be7c90f-ba21-455d-8a11-6f99452be15c} - - - {7e415dd2-403b-4d4d-b4f2-3e311f91db19} - - - {010dc29b-d1f6-4793-a4e7-4156aa4fcdd6} - - - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Resources\mpq - - - Source Files\Resources\mpq - - - Source Files\Lib - - - Source Files\Lib - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Controller - - - Source Files\Controller - - - Source Files\Globals - - - Source Files\Globals - - - Source Files\Globals - - - Source Files\Controller\Attachment - - - Source Files\Controller\Attachment - - - Source Files\Controller\Attachment - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources - - - Source Files\Lib - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Resources\Files - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Controller - - - Source Files\Resources\Factories - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Resources - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Resources\Factories - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Resources\Factories - - - Source Files\Resources\Files - - - Source Files\Lib\stb - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\CustomImpl - - - Source Files\CustomImpl - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Audio - - - Source Files\Audio - - - Source Files\CustomImpl\Utils - - - Source Files\Audio - - - Source Files\Globals - - - Source Files\ModManager\ModModule - - - Source Files\ModManager - - - Source Files\CustomImpl\Hooks - - - Source Files\Logging - - - Source Files\CustomImpl - - - Source Files\CustomImpl\Overlay - - - Source Files\Resources\Files - - - Source Files\Resources\Factories - - - Source Files\Controller\InputEditor - - - Source Files\Controller - - - Source Files\Lib\Mercury - - - - - Source Files\Lib\tinyxml2 - - - Source Files\Controller - - - Source Files\Controller - - - Source Files\Globals - - - Source Files\Globals - - - Source Files\Lib - - - Source Files\Controller - - - Source Files\Controller\Attachment - - - Source Files\Controller\Attachment - - - Source Files\Controller\Attachment - - - Source Files\Resources - - - Source Files\Resources\mpq - - - Source Files\Resources\mpq - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib - - - Source Files\Globals - - - Source Files\Lib - - - Source Files\Controller - - - Source Files\Resources - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Globals - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Source Files\Lib\Fast3D - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Factories - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Header Files\Resources\Files - - - Source Files\Lib\stb - - - Header Files\Resources\Files - - - Header Files\Resources\Factories - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\CustomImpl - - - Source Files\CustomImpl - - - Source Files\Lib\ImGui - - - Source Files\Lib\ImGui - - - Source Files\CustomImpl\Utils - - - Source Files\Audio - - - Source Files\Audio - - - Source Files\Audio - - - Source Files\Audio - - - Source Files\Audio - - - Source Files\Globals - - - Source Files\Lib\stb - - - Source Files\ModManager\ModModule - - - Source Files\ModManager - - - Source Files\ModManager\ModModule - - - Source Files\CustomImpl\Hooks - - - Source Files\Logging - - - Source Files\CustomImpl - - - Source Files\Resources - - - Header Files - - - Source Files\CustomImpl\Overlay - - - Header Files\Resources\Files - - - Header Files\Resources\Factories - - - Source Files\Lib\dr_libs - - - Source Files\Lib\dr_libs - - - Source Files\Controller\InputEditor - - - Source Files\Controller - - - Source Files\Lib\nlohmann - - - Source Files\Lib\Mercury - - - Source Files\Controller - - - \ No newline at end of file diff --git a/soh/Makefile b/soh/Makefile deleted file mode 100644 index 24b3c9e8bd4..00000000000 --- a/soh/Makefile +++ /dev/null @@ -1,235 +0,0 @@ -CXX ?= g++ -CC ?= gcc -LD := lld -AR := ar -FORMAT := clang-format-11 -ZAPD := ../ZAPDTR/ZAPD.out -UNAME := $(shell uname) -UNAMEM := $(shell uname -m) - -LIBULTRASHIP := ../libultraship/libultraship.a -ZAPDUTILS := ../ZAPDTR/ZAPDUtils/ZAPDUtils.a -LIBSTORM := ../StormLib/build/libstorm.a - -ASAN ?= 0 -DEBUG ?= 1 -OPTFLAGS ?= -O0 -LTO ?= 0 - -# flag to save whether the compiler being used is clang or gcc by checking CXX --version -CXX_IS_CLANG ?= $(shell $(CXX) --version | grep -c clang) - -WARN := \ - -Wno-return-type \ - -funsigned-char \ - -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-strict-aliasing -fno-inline-functions -fno-inline-small-functions -ffreestanding -fwrapv \ - -ifeq ($(CXX_IS_CLANG),1) - WARN += -Wno-c++11-narrowing -endif - -CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -nostdlib $(shell pkg-config --cflags glew) $(shell sdl2-config --cflags) -CFLAGS := $(WARN) -std=c99 -Wno-implicit-function-declaration -D_GNU_SOURCE -nostdlib $(shell pkg-config --cflags glew) $(shell sdl2-config --cflags) -LDFLAGS := - -ifneq ($(CXX_IS_CLANG),1) - CXXFLAGS += -no-pie - CFLAGS += -no-pie -endif - -ifeq ($(UNAME), Linux) - ifeq ($(UNAMEM), x86_64) - CXXFLAGS += -msse2 -mfpmath=sse -mhard-float - CFLAGS += -msse2 -mfpmath=sse -mhard-float - endif - - CXXFLAGS += $(shell pkg-config --cflags libpulse) - CFLAGS += $(shell pkg-config --cflags libpulse) -endif - -CPPFLAGS := -MMD - -ifneq ($(DEBUG),0) - CXXFLAGS += -g - CFLAGS += -g -endif - -ifneq ($(ASAN),0) - CXXFLAGS += -fsanitize=address - CFLAGS += -fsanitize=address - LDFLAGS += -fsanitize=address -endif - -ifneq ($(LTO),0) - CXXFLAGS += -flto - CFLAGS += -flto - LDFLAGS += -flto -endif - -ifeq ($(UNAME), Linux) -TARGET := soh.elf -endif - -ifeq ($(UNAME), Darwin) -TARGET := soh-$(UNAMEM) -endif - -INC_DIRS := $(addprefix -I, \ - . \ - assets \ - build \ - include \ - src \ - ../ZAPDTR/ZAPDUtils \ - ../libultraship/libultraship \ - ../libultraship/libultraship/Lib/spdlog/include \ - ../libultraship/libultraship/Lib/Fast3D/U64 \ - ../libultraship/libultraship/Lib/Fast3D/U64/PR \ -) - -LDDIRS := $(addprefix -L, \ - ../libultraship/ \ -) - -LDLIBS := \ - $(ZAPDUTILS) \ - $(LIBSTORM) \ - $(shell sdl2-config --libs) \ - $(shell pkg-config --libs glew) \ - $(addprefix -l, \ - dl \ - bz2 \ - z \ - pthread \ - ultraship \ -) - -ifeq ($(UNAME), Linux) -LDLIBS += $(shell pkg-config --libs x11 libpulse) -endif - -ifeq ($(UNAME), Darwin) -LDLIBS += \ - $(addprefix -framework , \ - OpenGL \ - Foundation \ -) -endif - -ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*") -ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml)) -ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin)) -ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \ - $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f) - -TEXTURE_FILES_PNG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.png)) -TEXTURE_FILES_JPG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.jpg)) -TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \ - $(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \ - -CXX_FILES := \ - $(shell find soh -type f -name "*.cpp") - -C_FILES := \ - $(shell find soh -type f -name "*.c") \ - $(shell find src/boot -type f -name "*.c") \ - $(shell find src/buffers -type f -name "*.c") \ - $(shell find src/code -type f -name "*.c") \ - $(shell find src/overlays -type f -name "*.c") \ - src/libultra/gu/coss.c \ - src/libultra/gu/guLookAt.c \ - src/libultra/gu/guLookAtHilite.c \ - src/libultra/gu/guPerspectiveF.c \ - src/libultra/gu/guPosition.c \ - src/libultra/gu/guS2DInitBg.c \ - src/libultra/gu/ortho.c \ - src/libultra/gu/rotate.c \ - src/libultra/gu/sins.c \ - src/libultra/gu/sintable.c \ - src/libultra/libc/sprintf.c - -O_FILES := \ - $(C_FILES:%.c=build/%.o) \ - $(CXX_FILES:%.cpp=build/%.o) -D_FILES := $(O_FILES:%.o=%.d) - -# Apple App Bundle -APPNAME=soh -APPBUNDLE=$(APPNAME).app -APPBUNDLECONTENTS=$(APPBUNDLE)/Contents -APPBUNDLEEXE=$(APPBUNDLECONTENTS)/MacOS -APPBUNDLERESOURCES=$(APPBUNDLECONTENTS)/Resources -APPBUNDLEICON=$(APPBUNDLECONTENTS)/Resources - -# create build directory -SRC_DIRS := $(shell find . -type d -a -not -path "*build*") -$(shell mkdir -p $(SRC_DIRS:%=build/%)) - -all: - $(MAKE) -C ../libultraship - $(MAKE) $(TARGET) - -setup: - cd ../OTRExporter - $(MAKE) mpq - -mpq: - $(MAKE) -C ../libultraship - $(MAKE) -C ../OTRExporter/OTRExporter - $(MAKE) -C ../ZAPDTR - rm -rf ../OTRExporter/oot.otr - cd ../OTRExporter && python3 extract_assets.py - cp ../OTRExporter/oot.otr . - -distclean: clean - $(RM) -r baserom/ - $(MAKE) clean -C ../libultraship - $(MAKE) clean -C ../OTRExporter/OTRExporter - $(MAKE) clean -C ../ZAPDTR - -clean: - rm -rf build $(TARGET) - -.PHONY: all clean distclean setup mpq - -build/%.o: %.cpp - $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) $< -o $@ - -build/%.o: %.c - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPTFLAGS) $(INC_DIRS) $< -o $@ - -# make soh depend on libultraship -$(TARGET): $(LIBULTRASHIP) - -$(TARGET): $(O_FILES) - $(CXX) $^ -o $@ $(LDFLAGS) $(LDDIRS) $(LDLIBS) - --include $(D_FILES) - -appbundle: macosx/$(APPNAME).icns - rm -rf $(APPBUNDLE) - mkdir $(APPBUNDLE) - mkdir $(APPBUNDLE)/Contents - mkdir $(APPBUNDLE)/Contents/MacOS - mkdir $(APPBUNDLE)/Contents/Resources - cp macosx/Info.plist $(APPBUNDLECONTENTS)/ - cp macosx/PkgInfo $(APPBUNDLECONTENTS)/ - cp macosx/$(APPNAME).icns $(APPBUNDLEICON)/ - cp $(TARGET) $(APPBUNDLEEXE)/soh - otool -l $(TARGET) | grep -A 2 LC_RPATH | tail -n 1 | awk '{print $2}' | dylibbundler -od -b -x $(APPBUNDLEEXE)/soh -d $(APPBUNDLECONTENTS)/libs - -macosx/$(APPNAME).icns: macosx/$(APPNAME)Icon.png - rm -rf macosx/$(APPNAME).iconset - mkdir macosx/$(APPNAME).iconset - sips -z 16 16 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_16x16.png - sips -z 32 32 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_16x16@2x.png - sips -z 32 32 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_32x32.png - sips -z 64 64 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_32x32@2x.png - sips -z 128 128 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_128x128.png - sips -z 256 256 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_128x128@2x.png - sips -z 256 256 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_256x256.png - sips -z 512 512 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_256x256@2x.png - sips -z 512 512 macosx/$(APPNAME)Icon.png --out macosx/$(APPNAME).iconset/icon_512x512.png - cp macosx/$(APPNAME)Icon.png macosx/$(APPNAME).iconset/icon_512x512@2x.png - iconutil -c icns -o macosx/$(APPNAME).icns macosx/$(APPNAME).iconset - rm -r macosx/$(APPNAME).iconset diff --git a/soh/Makefile.switch b/soh/Makefile.switch deleted file mode 100644 index 10eaaebab91..00000000000 --- a/soh/Makefile.switch +++ /dev/null @@ -1,280 +0,0 @@ -#--------------------------------------------------------------------------------- -.SUFFIXES: -#--------------------------------------------------------------------------------- - -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=/devkitpro") -endif - -TOPDIR ?= $(CURDIR) -include $(DEVKITPRO)/libnx/switch_rules - -#--------------------------------------------------------------------------------- -# TARGET is the name of the output -# BUILD is the directory where object files & intermediate files will be placed -# SOURCES is a list of directories containing source code -# DATA is a list of directories containing data files -# INCLUDES is a list of directories containing header files -# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) -# -# NO_ICON: if set to anything, do not use icon. -# NO_NACP: if set to anything, no .nacp file is generated. -# APP_TITLE is the name of the app stored in the .nacp file (Optional) -# APP_AUTHOR is the author of the app stored in the .nacp file (Optional) -# APP_VERSION is the version of the app stored in the .nacp file (Optional) -# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional) -# ICON is the filename of the icon (.jpg), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .jpg -# - icon.jpg -# - /default_icon.jpg -# -# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder. -# If not set, it attempts to use one of the following (in this order): -# - .json -# - config.json -# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead -# of a homebrew executable (.nro). This is intended to be used for sysmodules. -# NACP building is skipped as well. -#--------------------------------------------------------------------------------- -TARGET := $(notdir $(CURDIR)) -BUILD := build -SOURCES := switch -DATA := -INCLUDES := \ - . \ - assets \ - build \ - include \ - src \ - ../ZAPDTR/ZAPDUtils \ - ../libultraship/libultraship \ - ../libultraship/libultraship/Lib/spdlog/include \ - ../libultraship/libultraship/Lib/Fast3D/U64 \ - ../libultraship/libultraship/Lib/Fast3D/U64/PR - -#------------------------------------------------------------------------------- -# source files -#------------------------------------------------------------------------------- -SOURCEFILES_C := \ - $(shell find soh -type f -name "*.c") \ - $(shell find src/boot -type f -name "*.c") \ - $(shell find src/buffers -type f -name "*.c") \ - $(shell find src/code -type f -name "*.c") \ - $(shell find src/overlays -type f -name "*.c") \ - src/libultra/gu/coss.c \ - src/libultra/gu/guLookAt.c \ - src/libultra/gu/guLookAtHilite.c \ - src/libultra/gu/guPerspectiveF.c \ - src/libultra/gu/guPosition.c \ - src/libultra/gu/guS2DInitBg.c \ - src/libultra/gu/ortho.c \ - src/libultra/gu/rotate.c \ - src/libultra/gu/sins.c \ - src/libultra/gu/sintable.c \ - src/libultra/libc/sprintf.c - -SOURCEFILES_CPP := \ - $(shell find soh -type f -name "*.cpp") -#--------------------------------------------------------------------------------- -# app info -#--------------------------------------------------------------------------------- - -APP_TITLE := Ship of Harkinian -APP_AUTHOR := Harbour Masters -APP_VERSION := Rachael-Alfa - -#--------------------------------------------------------------------------------- -# options for code generation -#--------------------------------------------------------------------------------- -ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE -ffast-math -O3 - -CFLAGS := -ffunction-sections \ - $(ARCH) $(DEFINES) - -CFLAGS += $(INCLUDE) -D__SWITCH__ \ - -DSPDLOG_NO_THREAD_ID \ - -DSTBI_NO_THREAD_LOCALS \ - `sdl2-config --cflags` - -CXXFLAGS := $(CFLAGS) -std=gnu++20 -fpermissive -CFLAGS += -std=gnu11 - -# disable some warnings -CFLAGS += -Wno-incompatible-pointer-types -Wno-int-conversion \ - -Wno-builtin-declaration-mismatch -Wno-implicit-function-declaration \ - -Wno-stringop-overflow -Wno-discarded-qualifiers -Wno-switch-unreachable - -ASFLAGS := -g $(ARCH) -LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) - -STATIC_LIBS := $(SOH_TOP_DIR)/libultraship/lib/libultraship.a \ - $(SOH_TOP_DIR)/ZAPDTR/ZAPDUtils/lib/libZAPDUtils.a \ - $(SOH_TOP_DIR)/ZAPDTR/ZAPDUtils/lib/libZAPDUtils.a \ - $(SOH_TOP_DIR)/StormLib/nxbuild/libstorm.a \ - -LIBS := -L$(SOH_TOP_DIR)/StormLib/nxbuild/ -lultraship -lZAPDUtils -lstorm -lz -lbz2 -lnx -lglad -lglapi -ldrm_nouveau -lm `sdl2-config --libs` - -#--------------------------------------------------------------------------------- -# list of directories containing libraries, this must be the top level containing -# include and lib -#--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) $(SOH_TOP_DIR)/StormLib/nxbuild $(SOH_TOP_DIR)/libultraship $(SOH_TOP_DIR)/ZAPDTR/ZAPDUtils - -#--------------------------------------------------------------------------------- -# no real need to edit anything past this point unless you need to add additional -# rules for different file extensions -#--------------------------------------------------------------------------------- -ifneq ($(BUILD),$(notdir $(CURDIR))) -#--------------------------------------------------------------------------------- - -export OUTPUT := $(CURDIR)/$(TARGET) -export TOPDIR := $(CURDIR) - -export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ - $(foreach dir,$(DATA),$(CURDIR)/$(dir)) \ - $(foreach sf,$(SOURCEFILES_C),$(CURDIR)/$(dir $(sf))) \ - $(foreach sf,$(SOURCEFILES_CPP),$(CURDIR)/$(dir $(sf))) - -export DEPSDIR := $(CURDIR)/$(BUILD) - -CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) \ - $(foreach f,$(SOURCEFILES_C),$(notdir $(f))) -CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) \ - $(foreach f,$(SOURCEFILES_CPP),$(notdir $(f))) -SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) - -#--------------------------------------------------------------------------------- -# use CXX for linking C++ projects, CC for standard C -#--------------------------------------------------------------------------------- -ifeq ($(strip $(CPPFILES)),) -#--------------------------------------------------------------------------------- - export LD := $(CC) -#--------------------------------------------------------------------------------- -else -#--------------------------------------------------------------------------------- - export LD := $(CXX) -#--------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------- - -export OFILES_BIN := $(addsuffix .o,$(BINFILES)) -export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) -export OFILES := $(OFILES_BIN) $(OFILES_SRC) -export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) - -export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ - $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ - -I$(CURDIR)/$(BUILD) - -export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) - -ifeq ($(strip $(CONFIG_JSON)),) - jsons := $(wildcard *.json) - ifneq (,$(findstring $(TARGET).json,$(jsons))) - export APP_JSON := $(TOPDIR)/$(TARGET).json - else - ifneq (,$(findstring config.json,$(jsons))) - export APP_JSON := $(TOPDIR)/config.json - endif - endif -else - export APP_JSON := $(TOPDIR)/$(CONFIG_JSON) -endif - -ifeq ($(strip $(ICON)),) - icons := $(wildcard *.jpg) - ifneq (,$(findstring $(TARGET).jpg,$(icons))) - export APP_ICON := $(TOPDIR)/$(TARGET).jpg - else - ifneq (,$(findstring icon.jpg,$(icons))) - export APP_ICON := $(TOPDIR)/icon.jpg - endif - endif -else - export APP_ICON := $(TOPDIR)/$(ICON) -endif - -ifeq ($(strip $(NO_ICON)),) - export NROFLAGS += --icon=$(APP_ICON) -endif - -ifeq ($(strip $(NO_NACP)),) - export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp -endif - -ifneq ($(APP_TITLEID),) - export NACPFLAGS += --titleid=$(APP_TITLEID) -endif - -ifneq ($(ROMFS),) - export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) -endif - -.PHONY: $(BUILD) clean all - -#--------------------------------------------------------------------------------- -all: $(BUILD) - -$(BUILD): - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.switch - -#--------------------------------------------------------------------------------- -clean: - @echo clean ... -ifeq ($(strip $(APP_JSON)),) - @rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf -else - @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf -endif - - -#--------------------------------------------------------------------------------- -else -.PHONY: all - -DEPENDS := $(OFILES:.o=.d) - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -ifeq ($(strip $(APP_JSON)),) - -all : $(OUTPUT).nro - -ifeq ($(strip $(NO_NACP)),) -$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp -else -$(OUTPUT).nro : $(OUTPUT).elf -endif - -else - -all : $(OUTPUT).nsp - -$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm - -$(OUTPUT).nso : $(OUTPUT).elf - -endif - -$(OUTPUT).elf : $(OFILES) \ - $(STATIC_LIBS) - -$(OFILES_SRC) : $(HFILES_BIN) - -#--------------------------------------------------------------------------------- -# you need a rule like this for each extension you use as binary data -#--------------------------------------------------------------------------------- -%.bin.o %_bin.h : %.bin -#--------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - --include $(DEPENDS) - -#--------------------------------------------------------------------------------------- -endif -#--------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/soh/soh.sln b/soh/soh.sln deleted file mode 100644 index 596ab27ee21..00000000000 --- a/soh/soh.sln +++ /dev/null @@ -1,66 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31112.23 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soh", "soh.vcxproj", "{31348AA7-8DC5-4FA7-955F-E80855CADE9E}" - ProjectSection(ProjectDependencies) = postProject - {78424708-1F6E-4D4B-920C-FB6D26847055} = {78424708-1F6E-4D4B-920C-FB6D26847055} - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} = {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8} - {A2E01C3E-D647-45D1-9788-043DEBC1A908} = {A2E01C3E-D647-45D1-9788-043DEBC1A908} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libultraship", "..\libultraship\libultraship\libultraship.vcxproj", "{6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPDUtils", "..\ZAPDTR\ZAPDUtils\ZAPDUtils.vcxproj", "{A2E01C3E-D647-45D1-9788-043DEBC1A908}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StormLib", "..\StormLib\StormLib_vs19.vcxproj", "{78424708-1F6E-4D4B-920C-FB6D26847055}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Debug|x64.ActiveCfg = Debug|x64 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Debug|x64.Build.0 = Debug|x64 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Debug|x86.ActiveCfg = Debug|Win32 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Debug|x86.Build.0 = Debug|Win32 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Release|x64.ActiveCfg = Release|x64 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Release|x64.Build.0 = Release|x64 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Release|x86.ActiveCfg = Release|Win32 - {31348AA7-8DC5-4FA7-955F-E80855CADE9E}.Release|x86.Build.0 = Release|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.ActiveCfg = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x64.Build.0 = Debug|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.ActiveCfg = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Debug|x86.Build.0 = Debug|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.ActiveCfg = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x64.Build.0 = Release|x64 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.ActiveCfg = Release|Win32 - {6DA9B521-65B7-41E2-8F8A-F0451CC18ED8}.Release|x86.Build.0 = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.ActiveCfg = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.Build.0 = Debug|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.ActiveCfg = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.Build.0 = Debug|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.ActiveCfg = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.Build.0 = Release|x64 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.ActiveCfg = Release|Win32 - {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.Build.0 = Release|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x64.ActiveCfg = DebugUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x64.Build.0 = DebugUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x86.ActiveCfg = DebugUS|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Debug|x86.Build.0 = DebugUS|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x64.ActiveCfg = ReleaseUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x64.Build.0 = ReleaseUS|x64 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x86.ActiveCfg = ReleaseUS|Win32 - {78424708-1F6E-4D4B-920C-FB6D26847055}.Release|x86.Build.0 = ReleaseUS|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7659B687-4D92-4865-A037-045115E1C783} - EndGlobalSection -EndGlobal diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj deleted file mode 100644 index bc7c4d64623..00000000000 --- a/soh/soh.vcxproj +++ /dev/null @@ -1,1522 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {31348aa7-8dc5-4fa7-955f-e80855cade9e} - soh - 10.0 - - - - Application - true - v142 - Unicode - false - - - Application - false - v142 - true - Unicode - false - - - Application - true - v142 - Unicode - false - - - Application - false - v142 - true - Unicode - false - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)assets;$(ProjectDir)build;$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir);$(ProjectDir)..\libultraship\libultraship\Lib\libjpeg\include;$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\spdlog\include;$(ProjectDir)..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64\PR;$(ProjectDir)..\libultraship\libultraship\Lib\SDL;$(IncludePath) - $(OutDir);$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\SDL\lib\x86;$(ProjectDir)..\libultraship\libultraship\Lib\GLEW\x86;$(ProjectDir)..\libultraship\libultraship\Lib\GLFW;$(ProjectDir)..\StormLib\bin\StormLib\Win32\DebugUS\;$(LibraryPath) - $(Configuration)Obj\ - - - false - $(ProjectDir)assets;$(ProjectDir)build;$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir);$(ProjectDir)..\libultraship\libultraship\Lib\libjpeg\include;$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\spdlog\include;$(ProjectDir)..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64\PR;$(ProjectDir)..\libultraship\libultraship\Lib\SDL;$(IncludePath) - $(OutDir);$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\SDL\lib\x86;$(ProjectDir)..\libultraship\libultraship\Lib\GLEW\x86;$(ProjectDir)..\libultraship\libultraship\Lib\GLFW;$(ProjectDir)..\StormLib\bin\StormLib\Win32\ReleaseUS\;$(LibraryPath) - $(Configuration)Obj\ - - - true - $(ProjectDir)assets;$(ProjectDir)build;$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir);$(ProjectDir)..\libultraship\libultraship\Lib\libjpeg\include;$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\spdlog\include;$(ProjectDir)..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64\PR;$(ProjectDir)..\libultraship\libultraship\Lib\SDL;$(IncludePath) - $(OutDir);$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\SDL\lib\x64;$(ProjectDir)..\libultraship\libultraship\Lib\GLEW\x64;$(ProjectDir)..\libultraship\libultraship\Lib\GLFW;$(ProjectDir)..\StormLib\bin\StormLib\x64\DebugUS\;$(LibraryPath) - $(Platform)\$(Configuration)Obj\ - - - false - $(ProjectDir)assets;$(ProjectDir)build;$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir);$(ProjectDir)..\libultraship\libultraship\Lib\libjpeg\include;$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\spdlog\include;$(ProjectDir)..\ZAPDTR\ZAPDUtils;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64;$(ProjectDir)..\libultraship\libultraship\Lib\Fast3D\U64\PR;$(ProjectDir)..\libultraship\libultraship\Lib\SDL;$(ProjectDir)..\libultraship\libultraship\Lib\dr_libs;$(IncludePath) - $(OutDir);$(ProjectDir)..\libultraship\libultraship;$(ProjectDir)..\libultraship\libultraship\Lib\SDL\lib\x64;$(ProjectDir)..\libultraship\libultraship\Lib\GLEW\x64;$(ProjectDir)..\libultraship\libultraship\Lib\GLFW;$(ProjectDir)..\StormLib\bin\StormLib\x64\ReleaseUS\;$(LibraryPath) - $(Platform)\$(Configuration)Obj\ - - - - TurnOffAllWarnings - false - NOINCLUDE_GAME_PRINTF;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_OPENGL;%(PreprocessorDefinitions) - true - stdcpp20 - MultiThreadedDebug - true - Default - - - Console - true - libultraship.lib;ZAPDUtils.lib;opengl32.lib;glu32.lib;SDL2.lib;SDL2main.lib;glew32s.lib;winmm.lib;imm32.lib;version.lib;setupapi.lib;%(AdditionalDependencies) - 8777216 - true - true - - - - - TurnOffAllWarnings - true - true - false - INCLUDE_GAME_PRINTF;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)GLEW_STATIC - true - stdcpp20 - MultiThreaded - MaxSpeed - true - - - Console - true - true - true - libultraship.lib;ZAPDUtils.lib;opengl32.lib;glu32.lib;SDL2.lib;SDL2main.lib;glew32s.lib;winmm.lib;imm32.lib;version.lib;setupapi.lib;%(AdditionalDependencies) - /FORCE:MULTIPLE %(AdditionalOptions) - - - - - TurnOffAllWarnings - false - _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;ENABLE_DX11;%(PreprocessorDefinitions) - true - stdcpp20 - MultiThreadedDebug - true - Default - - - Console - true - libultraship.lib;ZAPDUtils.lib;opengl32.lib;glu32.lib;SDL2.lib;SDL2main.lib;glew32s.lib;winmm.lib;imm32.lib;version.lib;setupapi.lib;%(AdditionalDependencies) - - - - - - - TurnOffAllWarnings - true - true - false - INCLUDE_GAME_PRINTF;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)GLEW_STATIC - true - true - stdcpp20 - MultiThreaded - - - Console - true - true - true - libultraship.lib;ZAPDUtils.lib;opengl32.lib;glu32.lib;SDL2.lib;SDL2main.lib;glew32s.lib;winmm.lib;imm32.lib;version.lib;setupapi.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters deleted file mode 100644 index 2a29a969d9d..00000000000 --- a/soh/soh.vcxproj.filters +++ /dev/null @@ -1,4091 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {8d479b58-9306-40c3-9728-2cf5b185f5c4} - - - {8ebc52ba-5b1d-4bb3-9848-ba9ea57fc49f} - - - {54c2fe99-a68e-4ce2-813d-bce0ab1ac24f} - - - {0b91ecc8-6f20-4da1-87ca-6c7263aab3db} - - - {2104d3ab-707c-4ab2-bb1a-5cdce5c3d07d} - - - {022552c8-3bb8-4ba5-904c-e2c3eb28ce10} - - - {3ab8c311-cbfb-4eca-88af-2446ce3c89b0} - - - {8f2da1b8-973e-4be0-a036-c79a63bc3067} - - - {1a584bc2-7081-4251-a953-cdc7b611d62b} - - - {49bb84e4-a0b9-4733-9720-1ea120795083} - - - {d4794b4c-ae5d-4bf0-96f4-077f03807f5e} - - - {981df102-b362-4e2b-8efc-62756c28aa60} - - - {f8b2165f-9b32-4be1-a285-49349e09bef5} - - - {fcaae731-4e17-448b-b6c7-36e4c8413838} - - - {264ed8f8-f42b-475f-82ca-c264225ef56c} - - - {5fde6633-a728-4eea-a616-59d413bec476} - - - {3aeae6ac-1340-4a7b-bf34-cd196667fe37} - - - {fe745190-d4ec-4dc3-a9fd-ea553a971b14} - - - {06ba0ec4-2ee7-4454-93b5-5fd804723b6d} - - - {ffe200b9-a955-4843-a1ce-3603c132e591} - - - {18b9727f-30de-4ab8-a317-916090d4a110} - - - {9a4378ec-e30f-47b6-9ad6-5ce738b4cf99} - - - {04fc1c52-49ff-48e2-ae23-2c00867374f8} - - - {fd63976d-64b1-45ee-b3ab-530c636391c3} - - - {ff94f63c-a792-49af-869b-42557318a32b} - - - {1ba82a8d-b7d9-4f79-b80b-389322e189bc} - - - {9e20d69b-6a26-48ef-9aae-09c149b2c459} - - - {d7b4c12f-3876-40ec-a8ec-db435513156c} - - - {38ae4e39-fade-4f81-bfdb-af83bf641df0} - - - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\boot - - - Source Files\src\buffers - - - Source Files\src\buffers - - - Source Files\src\buffers - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\gamestates\ovl_title - - - Source Files\src\overlays\gamestates\ovl_select - - - Source Files\src\overlays\gamestates\ovl_opening - - - Source Files\src\overlays\gamestates\ovl_file_choose - - - Source Files\src\overlays\gamestates\ovl_file_choose - - - Source Files\soh - - - Source Files\soh - - - Source Files\soh - - - Source Files\soh - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\libultra - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Source Files\src\overlays\gamestates\ovl_file_choose - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\code - - - Source Files\src\overlays\gamestates\ovl_file_choose - - - Source Files\src\overlays\misc\ovl_map_mark_data - - - Source Files\soh - - - Source Files\soh\Enhancements - - - Source Files\soh\Enhancements - - - Source Files\soh\Enhancements - - - Source Files\soh - - - Source Files\soh - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\soh\Enhancements\debugger - - - Source Files\soh\Enhancements\debugger - - - Source Files\soh - - - Source Files\soh\Enhancements\debugger - - - Source Files\soh\Enhancements\debugger - - - Source Files\soh\Enhancements\debugger - - - Source Files\soh - - - Source Files - - - Source Files\soh\Enhancements - - - Source Files\soh - - - Header Files\include - - - Source Files\soh\Enhancements\randomizer\3drando\hint_list - - - Source Files\soh\Enhancements\randomizer\3drando\hint_list - - - Source Files\soh\Enhancements\randomizer\3drando\hint_list - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando\location_access - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer\3drando - - - Source Files\soh\Enhancements\randomizer - - - Header Files\soh\Enhancements\randomizer - - - Header Files\soh\Enhancements - - - Source Files\soh\Enhancements\randomizer - - - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Header Files\include - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Source Files\src\overlays\effects - - - Header Files\include - - - Source Files\soh - - - Source Files\src\overlays\misc\ovl_kaleido_scope - - - Header Files\soh\Enhancements - - - Header Files\soh\Enhancements - - - Header Files\soh\Enhancements - - - Header Files\soh\Enhancements - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Source Files\src\overlays\actors - - - Header Files - - - Header Files\soh\Enhancements\debugger - - - Header Files\soh\Enhancements\debugger - - - Header Files\soh - - - Header Files\soh\Enhancements\debugger - - - Header Files\soh\Enhancements\debugger - - - Header Files\soh\Enhancements\debugger - - - Header Files\soh - - - Source Files\soh\Enhancements - - - Source Files\soh - - - Source Files\soh - - - Header Files\include - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer\3drando - - - Header Files\soh\Enhancements\randomizer - - - Header Files\soh\Enhancements - - - Header Files\soh\Enhancements\randomizer - - - - - - - - Resource Files - - - - - - diff --git a/soh/soh.vcxproj.user b/soh/soh.vcxproj.user deleted file mode 100644 index 057370db2bb..00000000000 --- a/soh/soh.vcxproj.user +++ /dev/null @@ -1,26 +0,0 @@ - - - - $(TargetDir) - WindowsLocalDebugger - - - - - $(TargetDir) - WindowsLocalDebugger - - - - - $(TargetDir) - WindowsLocalDebugger - - - false - - - $(TargetDir) - WindowsLocalDebugger - - \ No newline at end of file From 85ddb4d026abbce86b99000ec49401575daf90d2 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 02:32:22 +0200 Subject: [PATCH 131/155] Update instructions to use multiple cores --- BUILDING.md | 12 ++++++------ Jenkinsfile | 2 +- scripts/linux/appimage/build.sh | 2 +- scripts/switch/build.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 0cae105e672..146cd68325f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -36,9 +36,9 @@ cd Shipwright # Copy the baserom to the OTRExporter folder cp OTRExporter # Generate Ninja project -cmake -H. -Bbuild-cmake -GNinja +cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake # --config Release (if you're packaging) +cmake --build build-cmake -- -j$(nproc) # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) @@ -64,9 +64,9 @@ cd ShipWright # Copy the baserom to the OTRExporter folder cp OTRExporter # Generate Ninja project -cmake -H. -Bbuild-cmake -GNinja +cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake # --config Release (if you're packaging) +cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) @@ -90,13 +90,13 @@ cpack ```bash cd Shipwright # Setup cmake project for your host machine -cmake -H. -Bbuild-macos -GNinja # Linux: cmake -H. -Bbuild-linux -GNinja +cmake -H. -Bbuild-cmake -GNinja -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) # Extract necessary assets cmake --build build-cmake --target ExtractAssets # Setup cmake project for building for Switch cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake # Build project and generate nro -cmake --build build-switch --target soh_nro +cmake --build build-switch --target soh_nro -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) # Now you can run the executable in ./build-switch/soh/soh.nro # To develop the project open the repository in VSCode (or your preferred editor) diff --git a/Jenkinsfile b/Jenkinsfile index fc9df819673..732dd190e3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - cmake --build build-cmake + cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) (cd build-cmake && cpack) mv README.md readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index fdebd038488..7d2959bfd33 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,6 @@ #!/bin/bash cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake +cmake --build build-cmake -- -j$(nproc) (cd build-cmake && cpack -G External) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index f07e5c99b41..b064aa26f7c 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,7 +1,7 @@ #!/bin/bash cmake -H. -Bbuild-linux -GNinja -cmake --build build-linux --target ExtractAssets +cmake --build build-linux --target ExtractAssets -- -j$(nproc) cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -cmake --build build-switch --target soh_nro +cmake --build build-switch --target soh_nro -- -j$(nproc) From e49fe0596429fcb9f1e1be0756069d63fe62bf03 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 02:49:49 +0200 Subject: [PATCH 132/155] Remove custom gcc mac toolchain --- CMake/Mac-gnu-toolchain.cmake | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 CMake/Mac-gnu-toolchain.cmake diff --git a/CMake/Mac-gnu-toolchain.cmake b/CMake/Mac-gnu-toolchain.cmake deleted file mode 100644 index 5a1c690394a..00000000000 --- a/CMake/Mac-gnu-toolchain.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER gcc-12) -set(CMAKE_CXX_COMPILER g++-12) -set(CMAKE_OBJCXX_COMPILER clang++) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) From edcd39da9766934d19cf9ca7a7f69528be12a4dd Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 02:52:14 +0200 Subject: [PATCH 133/155] Use ninja to build directly --- BUILDING.md | 10 +++++----- Jenkinsfile | 2 +- scripts/linux/appimage/build.sh | 2 +- scripts/switch/build.sh | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 146cd68325f..7cadd3e6cb9 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -38,7 +38,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake -- -j$(nproc) +(cd build-cmake && ninja) # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) @@ -66,7 +66,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) +(cd build-cmake && ninja) # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) @@ -90,13 +90,13 @@ cpack ```bash cd Shipwright # Setup cmake project for your host machine -cmake -H. -Bbuild-cmake -GNinja -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) +cmake -H. -Bbuild-cmake -GNinja # Extract necessary assets -cmake --build build-cmake --target ExtractAssets +(cd build-cmake && ninja ExtractAssets) # Setup cmake project for building for Switch cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake # Build project and generate nro -cmake --build build-switch --target soh_nro -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) +(cd build-switch && ninja soh_nro) # Now you can run the executable in ./build-switch/soh/soh.nro # To develop the project open the repository in VSCode (or your preferred editor) diff --git a/Jenkinsfile b/Jenkinsfile index 732dd190e3c..5df7339e89f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) + (cd build-cmake && ninja) (cd build-cmake && cpack) mv README.md readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index 7d2959bfd33..225b8162998 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,6 @@ #!/bin/bash cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake -- -j$(nproc) +(cd build-cmake && ninja) (cd build-cmake && cpack -G External) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index b064aa26f7c..be623633276 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,7 +1,7 @@ #!/bin/bash cmake -H. -Bbuild-linux -GNinja -cmake --build build-linux --target ExtractAssets -- -j$(nproc) +(cd build-linux && ninja ExtractAssets) cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -cmake --build build-switch --target soh_nro -- -j$(nproc) +(cd build-switch && ninja soh_nro) From 3d7521f1a790bf39edf7dff908b0fedfba89e590 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 03:15:38 +0200 Subject: [PATCH 134/155] Update macos requirements --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 7cadd3e6cb9..08acbe44ca8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -56,7 +56,7 @@ cpack -G External (creates appimage) ``` ## macOS -1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake, pkgconfig, dylibbundler` (can be installed via homebrew, macports, etc) +1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake` (can be installed via homebrew, macports, etc) ```bash # Clone the repo git clone https://github.com/HarbourMasters/Shipwright.git From db575798ba6df141dafdcad3a112f74c46df9e05 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 03:43:36 +0200 Subject: [PATCH 135/155] Add tip about VSC --- BUILDING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 08acbe44ca8..2f4a4e3f6d3 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -28,6 +28,10 @@ cd "build/x64" ``` ## Linux +1. Requires `gcc, x11, curl, python3, sdl2, libpng, glew, ninja, cmake` + + +_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ ```bash # Clone the repo @@ -57,6 +61,9 @@ cpack -G External (creates appimage) ## macOS 1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake` (can be installed via homebrew, macports, etc) + +_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ + ```bash # Clone the repo git clone https://github.com/HarbourMasters/Shipwright.git From fc66066fb93d245fe909d18cedbcce2452fd2048 Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 4 Aug 2022 08:39:31 +0200 Subject: [PATCH 136/155] remove assets_created; copy oot.otr file --- CMakeLists.txt | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a51e9f933..1e18a06e70a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,28 +133,15 @@ file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PE find_package(Python3 COMPONENTS Interpreter) -add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/assets_created +add_custom_target( + ExtractAssets COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py - COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/assets_created + COMMAND ${CMAKE_COMMAND} -E copy oot.otr ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter COMMENT "Running asset extraction..." DEPENDS ZAPD ) -add_custom_target(ExtractAssets DEPENDS ${CMAKE_BINARY_DIR}/assets_created) - -file(GLOB_RECURSE asset_h ${CMAKE_SOURCE_DIR}/soh/assets/*.h) -list(LENGTH asset_h asset_h_length) -if (${asset_h_length} EQUAL 0) - file(REMOVE ${CMAKE_BINARY_DIR}/assets_created) -else() - file(TOUCH ${CMAKE_BINARY_DIR}/assets_created) -endif() - -if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch") -add_dependencies(soh ExtractAssets) -endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") find_package(ImageMagick COMPONENTS convert) From ad4d58f569f09ce9d4194c5b2ffa7a62655d8786 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 10:04:06 +0200 Subject: [PATCH 137/155] Revert "Use ninja to build directly" This reverts commit edcd39da9766934d19cf9ca7a7f69528be12a4dd. --- BUILDING.md | 10 +++++----- Jenkinsfile | 2 +- scripts/linux/appimage/build.sh | 2 +- scripts/switch/build.sh | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 2f4a4e3f6d3..23d33b8a38b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -42,7 +42,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -(cd build-cmake && ninja) +cmake --build build-cmake -- -j$(nproc) # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) @@ -73,7 +73,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -(cd build-cmake && ninja) +cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) @@ -97,13 +97,13 @@ cpack ```bash cd Shipwright # Setup cmake project for your host machine -cmake -H. -Bbuild-cmake -GNinja +cmake -H. -Bbuild-cmake -GNinja -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) # Extract necessary assets -(cd build-cmake && ninja ExtractAssets) +cmake --build build-cmake --target ExtractAssets # Setup cmake project for building for Switch cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake # Build project and generate nro -(cd build-switch && ninja soh_nro) +cmake --build build-switch --target soh_nro -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) # Now you can run the executable in ./build-switch/soh/soh.nro # To develop the project open the repository in VSCode (or your preferred editor) diff --git a/Jenkinsfile b/Jenkinsfile index 5df7339e89f..732dd190e3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - (cd build-cmake && ninja) + cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) (cd build-cmake && cpack) mv README.md readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index 225b8162998..7d2959bfd33 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,6 @@ #!/bin/bash cmake -H. -Bbuild-cmake -GNinja -(cd build-cmake && ninja) +cmake --build build-cmake -- -j$(nproc) (cd build-cmake && cpack -G External) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index be623633276..b064aa26f7c 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,7 +1,7 @@ #!/bin/bash cmake -H. -Bbuild-linux -GNinja -(cd build-linux && ninja ExtractAssets) +cmake --build build-linux --target ExtractAssets -- -j$(nproc) cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -(cd build-switch && ninja soh_nro) +cmake --build build-switch --target soh_nro -- -j$(nproc) From 92334c949b0dfcce3f04e1b6be582fc4af8168ca Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 10:12:49 +0200 Subject: [PATCH 138/155] =?UTF-8?q?Rely=20on=20Ninja=E2=80=99s=20multithre?= =?UTF-8?q?adedness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BUILDING.md | 8 ++++---- Jenkinsfile | 2 +- scripts/linux/appimage/build.sh | 2 +- scripts/switch/build.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 23d33b8a38b..4133b5fdec8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -42,7 +42,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake -- -j$(nproc) +cmake --build build-cmake # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) @@ -73,7 +73,7 @@ cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) # Compile the project -cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) +cmake --build build-cmake # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) @@ -97,13 +97,13 @@ cpack ```bash cd Shipwright # Setup cmake project for your host machine -cmake -H. -Bbuild-cmake -GNinja -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) +cmake -H. -Bbuild-cmake -GNinja # Extract necessary assets cmake --build build-cmake --target ExtractAssets # Setup cmake project for building for Switch cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake # Build project and generate nro -cmake --build build-switch --target soh_nro -- -j$(sysctl -n hw.ncpu) # Linux: -j$(nproc) +cmake --build build-switch --target soh_nro # Now you can run the executable in ./build-switch/soh/soh.nro # To develop the project open the repository in VSCode (or your preferred editor) diff --git a/Jenkinsfile b/Jenkinsfile index 732dd190e3c..fc9df819673 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -111,7 +111,7 @@ pipeline { cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - cmake --build build-cmake -- -j$(sysctl -n hw.ncpu) + cmake --build build-cmake (cd build-cmake && cpack) mv README.md readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index 7d2959bfd33..fdebd038488 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,6 @@ #!/bin/bash cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake -- -j$(nproc) +cmake --build build-cmake (cd build-cmake && cpack -G External) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index b064aa26f7c..f07e5c99b41 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,7 +1,7 @@ #!/bin/bash cmake -H. -Bbuild-linux -GNinja -cmake --build build-linux --target ExtractAssets -- -j$(nproc) +cmake --build build-linux --target ExtractAssets cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -cmake --build build-switch --target soh_nro -- -j$(nproc) +cmake --build build-switch --target soh_nro From e0329744f19dc3cc237f0dd5898c0566bc3ff308 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 10:15:54 +0200 Subject: [PATCH 139/155] Extra big warning about ninja tools --- BUILDING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 4133b5fdec8..f41d9a5991d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -30,6 +30,7 @@ cd "build/x64" ## Linux 1. Requires `gcc, x11, curl, python3, sdl2, libpng, glew, ninja, cmake` +**Important: For maximum performance make sure you have ninja build tools installed!** _Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ @@ -62,6 +63,8 @@ cpack -G External (creates appimage) ## macOS 1. Requires Xcode (or xcode-tools) && `sdl2, libpng, glew, ninja, cmake` (can be installed via homebrew, macports, etc) +**Important: For maximum performance make sure you have ninja build tools installed!** + _Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ ```bash From c0780c59659a53f492fc865ed855d3c259d597ee Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 10:29:30 +0200 Subject: [PATCH 140/155] Add missing step for generating assets before building --- BUILDING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index f41d9a5991d..a5f4252a474 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -42,6 +42,8 @@ cd Shipwright cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) +# Extract assets & generate OTR (run this anytime you need to regenerate OTR) +cmake --build build-cmake --target ExtractAssets # Compile the project cmake --build build-cmake @@ -75,6 +77,8 @@ cd ShipWright cp OTRExporter # Generate Ninja project cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) +# Extract assets & generate OTR (run this anytime you need to regenerate OTR) +cmake --build build-cmake --target ExtractAssets # Compile the project cmake --build build-cmake @@ -101,7 +105,7 @@ cpack cd Shipwright # Setup cmake project for your host machine cmake -H. -Bbuild-cmake -GNinja -# Extract necessary assets +# Extract assets & generate OTR (run this anytime you need to regenerate OTR) cmake --build build-cmake --target ExtractAssets # Setup cmake project for building for Switch cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake From 07123989440cb88c7d873f12c156f608edc81cb3 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 10:54:46 +0200 Subject: [PATCH 141/155] Document clean command --- BUILDING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index a5f4252a474..bfa511c45ec 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -11,11 +11,16 @@ _Note: Instructions assume using powershell_ cd Shipwright # Setup cmake project & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 +# Extract assets & generate OTR (run this anytime you need to regenerate OTR) +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # Compile project & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging) # Now you can run the executable in .\build\x64 # To develop the project you can open the generated Ship.sln (or use VSCode or another editor) + +# If you need to clean the project you can run +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean ``` ### Generating the distributable @@ -49,6 +54,9 @@ cmake --build build-cmake # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) + +# If you need to clean the project you can run +cmake --build build-cmake --target clean ``` ### Generating a distributable @@ -84,6 +92,9 @@ cmake --build build-cmake # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) + +# If you need to clean the project you can run +cmake --build build-cmake --target clean ``` ### Generating a distributable From 6f678c62551885bb9c199a74d88c618c9404530c Mon Sep 17 00:00:00 2001 From: Thomas Hiller Date: Thu, 4 Aug 2022 13:25:02 +0200 Subject: [PATCH 142/155] replace Release with CMAKE_BUILD_TYPE in ExtractAssets --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e18a06e70a..bbab76ab575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,7 @@ endif() file(READ ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py filedata) string(REGEX REPLACE "../ZAPDTR/ZAPD.out" "${CMAKE_BINARY_DIR}/ZAPD/ZAPD.out" filedata "${filedata}") string(REGEX REPLACE "x64" "..\\\\\\\\x64" filedata "${filedata}") +string(REGEX REPLACE "Release" "${CMAKE_BUILD_TYPE}" filedata "${filedata}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" "${filedata}") file(CHMOD "${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets_cmake2.py" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) @@ -141,6 +142,7 @@ add_custom_target( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter COMMENT "Running asset extraction..." DEPENDS ZAPD + ) if(CMAKE_SYSTEM_NAME MATCHES "Linux") From 655590e55ab5c52dabf253e5bb3526a0c4dd27a3 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 11:01:00 +0200 Subject: [PATCH 143/155] Add release builds in Jenkins --- BUILDING.md | 8 ++++---- Jenkinsfile | 5 +++-- scripts/linux/appimage/build.sh | 5 +++-- scripts/switch/build.sh | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index bfa511c45ec..181a0c482dd 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -46,11 +46,11 @@ cd Shipwright # Copy the baserom to the OTRExporter folder cp OTRExporter # Generate Ninja project -cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) +cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging) # Extract assets & generate OTR (run this anytime you need to regenerate OTR) cmake --build build-cmake --target ExtractAssets # Compile the project -cmake --build build-cmake +cmake --build build-cmake # --config Release (if you're packaging) # Now you can run the executable in ./build-cmake/soh/soh.elf # To develop the project open the repository in VSCode (or your preferred editor) @@ -84,11 +84,11 @@ cd ShipWright # Copy the baserom to the OTRExporter folder cp OTRExporter # Generate Ninja project -cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE=Release (if you're packaging) +cmake -H. -Bbuild-cmake -GNinja # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging) # Extract assets & generate OTR (run this anytime you need to regenerate OTR) cmake --build build-cmake --target ExtractAssets # Compile the project -cmake --build build-cmake +cmake --build build-cmake # --config Release (if you're packaging) # Now you can run the executable in ./build-cmake/soh/soh-macos # To develop the project open the repository in VSCode (or your preferred editor) diff --git a/Jenkinsfile b/Jenkinsfile index fc9df819673..6c5b17d0946 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,8 +110,9 @@ pipeline { sh ''' cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64 - cmake -H. -Bbuild-cmake -GNinja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - cmake --build build-cmake + cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" + cmake --build build-cmake --target ExtractAssets -- + cmake --build build-cmake --config Release -- (cd build-cmake && cpack) mv README.md readme.txt diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index fdebd038488..bad6b00c5e7 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,7 @@ #!/bin/bash -cmake -H. -Bbuild-cmake -GNinja -cmake --build build-cmake +cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release +cmake --build build-cmake --target ExtractAssets -- +cmake --build build-cmake --config Release -- (cd build-cmake && cpack -G External) diff --git a/scripts/switch/build.sh b/scripts/switch/build.sh index f07e5c99b41..b5b13765221 100755 --- a/scripts/switch/build.sh +++ b/scripts/switch/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -cmake -H. -Bbuild-linux -GNinja +cmake --no-warn-unused-cli -H. -Bbuild-linux -GNinja cmake --build build-linux --target ExtractAssets cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake From 08d54b2227e1ec6cab67d1b79b71e2232dbe96ef Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 11:33:47 +0200 Subject: [PATCH 144/155] Fix macOS release build issue --- soh/include/functions.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/soh/include/functions.h b/soh/include/functions.h index b185519f469..61ed091d5aa 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -63,6 +63,9 @@ u32 Locale_IsRegionNative(void); #if !defined(__APPLE__) && !defined(__SWITCH__) void __assert(const char* exp, const char* file, s32 line); #endif +#if defined(__APPLE__) && defined(NDEBUG) +void __assert(const char* exp, const char* file, s32 line); +#endif void isPrintfInit(void); void osSyncPrintfUnused(const char* fmt, ...); //void osSyncPrintf(const char* fmt, ...); From ed506fc67bdfc798b02d156237e2d52a75d371fd Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 12:01:39 +0200 Subject: [PATCH 145/155] [windows] Extract assets before building --- BUILDING.md | 2 +- Jenkinsfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 181a0c482dd..5406f3321d7 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -12,7 +12,7 @@ cd Shipwright # Setup cmake project & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 # Extract assets & generate OTR (run this anytime you need to regenerate OTR) -& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets +& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # --config Release (if you're packaging) # Compile project & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging) diff --git a/Jenkinsfile b/Jenkinsfile index 6c5b17d0946..6b943a429fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,7 @@ pipeline { xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} + "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --target ExtractAssets --config Release "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP From 0d0b516e7180608dda431d546c87ef47673fc2d1 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 13:58:45 +0200 Subject: [PATCH 146/155] Update gitignore --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index c9a95a7dc03..442be304fc3 100644 --- a/.gitignore +++ b/.gitignore @@ -427,3 +427,18 @@ xcuserdata/ !*.xcworkspace/contents.xcworkspacedata /*.gcno **/xcshareddata/WorkspaceSettings.xcsettings + +# cmake +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps +*/extract_assets_cmake* +/build* \ No newline at end of file From ccb49ded90c0db0aa0796d9c3b4d7e470bf78fc7 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 14:10:33 +0200 Subject: [PATCH 147/155] Add more updates --- BUILDING.md | 5 ++++- soh/CMake/Mac-gnu-toolchain.cmake | 11 ----------- 2 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 soh/CMake/Mac-gnu-toolchain.cmake diff --git a/BUILDING.md b/BUILDING.md index 5406f3321d7..175f7a0f794 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -17,7 +17,10 @@ cd Shipwright & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 # --config Release (if you're packaging) # Now you can run the executable in .\build\x64 -# To develop the project you can open the generated Ship.sln (or use VSCode or another editor) + +# To develop the project you can open the generated Ship.sln (.\build\x64) - or use VSCode or another editor +# If you want to generate the solution in the root folder run: +& 'C:\Program Files\CMake\bin\cmake' -S . -G "Visual Studio 17 2022" -T v142 -A x64 # If you need to clean the project you can run & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean diff --git a/soh/CMake/Mac-gnu-toolchain.cmake b/soh/CMake/Mac-gnu-toolchain.cmake deleted file mode 100644 index 5a1c690394a..00000000000 --- a/soh/CMake/Mac-gnu-toolchain.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER gcc-12) -set(CMAKE_CXX_COMPILER g++-12) -set(CMAKE_OBJCXX_COMPILER clang++) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) From 60e0bd8cf465df5d404430614c148f2d1523dafb Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 14:38:42 +0200 Subject: [PATCH 148/155] Add more details on developing SoH --- BUILDING.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 175f7a0f794..f3849cfa23e 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -18,14 +18,26 @@ cd Shipwright # Now you can run the executable in .\build\x64 -# To develop the project you can open the generated Ship.sln (.\build\x64) - or use VSCode or another editor -# If you want to generate the solution in the root folder run: -& 'C:\Program Files\CMake\bin\cmake' -S . -G "Visual Studio 17 2022" -T v142 -A x64 - # If you need to clean the project you can run & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target clean ``` +### Developing SoH +With the cmake build system you have two options for woriking on the project: + +#### Visual Studio +To develop using Visual Studio you only need to use cmake to generate the solution file: +```powershell +# Generates Ship.sln at the root directory +& 'C:\Program Files\CMake\bin\cmake' -S . -G "Visual Studio 17 2022" -T v142 -A x64 +``` + +#### Visual Studio Code or another editor +To develop using Visual Studio Code or another editor you only need to open the repository in it. +To build you'll need to follow the instructions from the building section. +_Experimental: You can also use another build system entirely rathen than MSVC like [Ninja](https://ninja-build.org/) for better performance and compatibility with Visual Studio Code and its CMake plugin._ + + ### Generating the distributable After compiling the project you can generate the distributable by running: ```powershell From 3e75a07cf664add21226f968d229f7034699d979 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 14:48:45 +0200 Subject: [PATCH 149/155] Make navigating more clear for Windows --- BUILDING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index f3849cfa23e..74332960da8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -8,7 +8,9 @@ _Note: Instructions assume using powershell_ ```powershell +# Navigate to the Shipwright repo within powershell. ie: cd "C:\yourpath\Shipwright" cd Shipwright + # Setup cmake project & 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 # Extract assets & generate OTR (run this anytime you need to regenerate OTR) From a2d1783faace1cb52c6b8c94160dc255aa934fe7 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 14:49:19 +0200 Subject: [PATCH 150/155] Try experimental multithreading --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbab76ab575..753c3452359 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(PROJECT_VERSION_MINOR "0") set(PROJECT_VERSION_PATCH "0") set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh) +add_compile_options($<$:/MP>) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") include(cmake/automate-vcpkg.cmake) From 0ec35787f6b04b7b43aa8ff271b2a12dea3a3c59 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 15:00:14 +0200 Subject: [PATCH 151/155] Fix build type --- BUILDING.md | 2 +- Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 74332960da8..cb8ac6eba4a 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -12,7 +12,7 @@ _Note: Instructions assume using powershell_ cd Shipwright # Setup cmake project -& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 +& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 # -DCMAKE_BUILD_TYPE:STRING=Release (if you're packaging) # Extract assets & generate OTR (run this anytime you need to regenerate OTR) & 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64 --target ExtractAssets # --config Release (if you're packaging) # Compile project diff --git a/Jenkinsfile b/Jenkinsfile index 6b943a429fe..a15b2ac12cb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,7 +38,7 @@ pipeline { xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\" - "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} + "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} -D CMAKE_BUILD_TYPE:STRING=Release "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --target ExtractAssets --config Release "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" From 19a35ba173547debd5b089775c77f8532030be62 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 15:22:39 +0200 Subject: [PATCH 152/155] Fix merge issues --- libultraship/libultraship/CMakeLists.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/libultraship/libultraship/CMakeLists.txt b/libultraship/libultraship/CMakeLists.txt index 49b3621a171..f6ed1b1baa0 100644 --- a/libultraship/libultraship/CMakeLists.txt +++ b/libultraship/libultraship/CMakeLists.txt @@ -116,7 +116,6 @@ set(Source_Files__CustomImpl source_group("Source Files\\CustomImpl" FILES ${Source_Files__CustomImpl}) set(Source_Files__CustomImpl__Hooks - "Hooks.cpp" "Hooks.h" ) source_group("Source Files\\CustomImpl\\Hooks" FILES ${Source_Files__CustomImpl__Hooks}) @@ -242,19 +241,6 @@ set(Source_Files__Logging ) source_group("Source Files\\Logging" FILES ${Source_Files__Logging}) -set(Source_Files__ModManager - "ModManager.cpp" - "ModManager.h" -) -source_group("Source Files\\ModManager" FILES ${Source_Files__ModManager}) - -set(Source_Files__ModManager__ModModule - "ModModule.h" - "TextureMod.cpp" - "TextureMod.h" -) -source_group("Source Files\\ModManager\\ModModule" FILES ${Source_Files__ModManager__ModModule}) - set(Source_Files__Resources "GameVersions.h" "Resource.cpp" @@ -353,8 +339,6 @@ set(ALL_FILES ${Source_Files__Lib__dr_libs} ${Source_Files__Lib__tinyxml2} ${Source_Files__Logging} - ${Source_Files__ModManager} - ${Source_Files__ModManager__ModModule} ${Source_Files__Resources} ${Source_Files__Resources__Factories} ${Source_Files__Resources__Files} From 2d97834f5f5bdc6f377028c351f9f4714a2150be Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 23:34:30 +0200 Subject: [PATCH 153/155] Fix typo in BUILDING.md --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index cb8ac6eba4a..8e4773d4ca6 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -25,7 +25,7 @@ cd Shipwright ``` ### Developing SoH -With the cmake build system you have two options for woriking on the project: +With the cmake build system you have two options for working on the project: #### Visual Studio To develop using Visual Studio you only need to use cmake to generate the solution file: From 708fd6141c11cdda2c294a8a842d850fad35738d Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 23:36:16 +0200 Subject: [PATCH 154/155] Delete stray macos toolchain file --- OTRExporter/CMake/Mac-gnu-toolchain.cmake | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 OTRExporter/CMake/Mac-gnu-toolchain.cmake diff --git a/OTRExporter/CMake/Mac-gnu-toolchain.cmake b/OTRExporter/CMake/Mac-gnu-toolchain.cmake deleted file mode 100644 index 5a1c690394a..00000000000 --- a/OTRExporter/CMake/Mac-gnu-toolchain.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER gcc-12) -set(CMAKE_CXX_COMPILER g++-12) -set(CMAKE_OBJCXX_COMPILER clang++) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) From f0d2cf05bffe23c39cbd746b357abb476c49f08b Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 4 Aug 2022 23:44:02 +0200 Subject: [PATCH 155/155] Update windows note on using VSC --- BUILDING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 8e4773d4ca6..0ab0d0d528f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -37,7 +37,10 @@ To develop using Visual Studio you only need to use cmake to generate the soluti #### Visual Studio Code or another editor To develop using Visual Studio Code or another editor you only need to open the repository in it. To build you'll need to follow the instructions from the building section. -_Experimental: You can also use another build system entirely rathen than MSVC like [Ninja](https://ninja-build.org/) for better performance and compatibility with Visual Studio Code and its CMake plugin._ + +_Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) makes it very easy to just press run and debug._ + +_Experimental: You can also use another build system entirely rathen than MSVC like [Ninja](https://ninja-build.org/) for possibly better performance._ ### Generating the distributable