mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-18 21:43:48 +01:00
Allow caching title sequences in data/
This commit is contained in:
@@ -199,10 +199,10 @@ list(APPEND DOC_FILES "${ROOT_DIR}/contributors.md"
|
|||||||
# targets, like `install`, so we have to trick it and execute dependency ourselves.
|
# targets, like `install`, so we have to trick it and execute dependency ourselves.
|
||||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)")
|
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_CURRENT_BINARY_DIR}\" --target g2)")
|
||||||
if (DOWNLOAD_TITLE_SEQUENCES)
|
if (DOWNLOAD_TITLE_SEQUENCES)
|
||||||
# If openrct2.parkseq exists, assume all the title sequences are already present
|
# If openrct2.parkseq or data/title/ exists, assume all the title sequences are already present
|
||||||
install(CODE
|
install(CODE
|
||||||
"if (EXISTS \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/openrct2.parkseq\")\n\
|
"if (EXISTS \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/openrct2.parkseq\" OR EXISTS ${CMAKE_SOURCE_DIR}/data/title/)\n\
|
||||||
message(\"Using cache title sequences\")\n\
|
message(\"Using cached title sequences\")\n\
|
||||||
else () \n\
|
else () \n\
|
||||||
file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)\n\
|
file(DOWNLOAD ${TITLE_SEQUENCE_URL} \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/title-sequences.zip EXPECTED_HASH SHA1=${TITLE_SEQUENCE_SHA1} SHOW_PROGRESS)\n\
|
||||||
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)\n\
|
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT}/title/ \"${CMAKE_COMMAND}\" -E tar xvf title-sequences.zip)\n\
|
||||||
|
|||||||
Reference in New Issue
Block a user