Just last little bits of polish
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 03:19:49 -05:00
parent 45ee9a7d11
commit f594ba3889
16 changed files with 128 additions and 33 deletions

View File

@@ -2,6 +2,20 @@ if(NOT DEFINED SRC_DIR OR NOT DEFINED DST_DIR)
message(FATAL_ERROR "SRC_DIR and DST_DIR must be defined")
endif()
set(CHARACTERS_DIR "${SRC_DIR}/characters")
set(CHARACTERS_ZIP_SCRIPT "${CHARACTERS_DIR}/zip")
if(EXISTS "${CHARACTERS_ZIP_SCRIPT}")
execute_process(
COMMAND "${CHARACTERS_ZIP_SCRIPT}"
WORKING_DIRECTORY "${CHARACTERS_DIR}"
RESULT_VARIABLE ZIP_SCRIPT_RESULT
)
if(NOT ZIP_SCRIPT_RESULT EQUAL 0)
message(FATAL_ERROR "Failed running ${CHARACTERS_ZIP_SCRIPT} (exit code ${ZIP_SCRIPT_RESULT})")
endif()
endif()
file(REMOVE_RECURSE "${DST_DIR}")
file(MAKE_DIRECTORY "${DST_DIR}")
@@ -11,7 +25,7 @@ file(COPY "${SRC_DIR}/" DESTINATION "${DST_DIR}"
# Copy only .zip archives from resources/characters.
file(MAKE_DIRECTORY "${DST_DIR}/characters")
file(GLOB CHARACTER_ZIPS "${SRC_DIR}/characters/*.zip")
file(GLOB CHARACTER_ZIPS "${CHARACTERS_DIR}/*.zip")
if(CHARACTER_ZIPS)
file(COPY ${CHARACTER_ZIPS} DESTINATION "${DST_DIR}/characters")
endif()