1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Merge pull request #19560 from janisozaur/opensound-skip-download

Automatically download OpenSFX for Linux builds
This commit is contained in:
Michał Janiszewski
2023-03-06 01:26:24 +01:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -163,6 +163,7 @@ endif ()
# If OS is Linux, import OpenSoundEffects and OpenMusic
if(UNIX AND NOT APPLE)
set(DOWNLOAD_OPENMSX ON)
set(DOWNLOAD_OPENSFX ON)
endif()
# LIST of supported flags, use SET_CHECK_CXX_FLAGS() to apply to target.
@@ -456,6 +457,7 @@ if (NOT MACOS_BUNDLE OR (MACOS_BUNDLE AND WITH_TESTS))
include(${ROOT_DIR}/cmake/download.cmake)
download_openrct2_zip(
ZIP_VERSION ${OPENSFX_VERSION}
SKIP_IF_EXISTS ${CMAKE_SOURCE_DIR}/data/assetpack/openrct2.sound.parkap
DOWNLOAD_DIR \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/
ZIP_URL ${OPENSFX_URL}
SHA1 ${OPENSFX_SHA1}

View File

@@ -9,8 +9,8 @@ function(download_openrct2_zip)
if (NOT EXISTS ${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR})
set(DOWNLOAD_ZIP 1)
else ()
if (EXISTS "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion")
file(READ "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion" DOWNLOAD_OPENRCT2_CACHED_VERSION)
if (EXISTS "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion")
file(READ "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion" DOWNLOAD_OPENRCT2_CACHED_VERSION)
if (NOT ${DOWNLOAD_OPENRCT2_CACHED_VERSION} STREQUAL ${DOWNLOAD_OPENRCT2_ZIP_VERSION})
message("Cache ${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR} not up to date")
set(DOWNLOAD_ZIP 1)
@@ -42,7 +42,7 @@ function(download_openrct2_zip)
)
endif()
file(WRITE
"${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion"
"${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion"
"${DOWNLOAD_OPENRCT2_ZIP_VERSION}"
)
file(REMOVE "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}")