diff --git a/CMake/CPackSetup.cmake b/CMake/CPackSetup.cmake index 59b07d45c3..58c8b68d2c 100644 --- a/CMake/CPackSetup.cmake +++ b/CMake/CPackSetup.cmake @@ -15,6 +15,7 @@ set(CPACK_RESOURCE_FILE_LICENSE "${SM_CMAKE_DIR}/license_install.txt") if(WIN32) set(CPACK_GENERATOR NSIS) + set(CPACK_SYSTEM_NAME "Windows") # By setting these install keys manually, The default directory of "StepMania # major.minor.patch" is lost. This is currently done to maintain backwards @@ -57,8 +58,24 @@ elseif(MACOSX) set(CPACK_GENERATOR DragNDrop) set(CPACK_DMG_VOLUME_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") set(CPACK_DMG_FORMAT ULMO) # lzma-compressed image + + if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") + set(CPACK_SYSTEM_NAME "macOS-M1") + elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64") + set(CPACK_SYSTEM_NAME "macOS-Intel") + else() + message(FATAL_ERROR + "Unsupported macOS architecture: ${CMAKE_OSX_ARCHITECTURES}, set CMAKE_OSX_ARCHITECTURES to either arm64 or x86_64" + ) + endif() else() - set(CPACK_GENERATOR TGZ TXZ STGZ) + set(CPACK_GENERATOR TGZ) + set(CPACK_SYSTEM_NAME "Linux") +endif() + +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") +if(NOT WITH_CLUB_FANTASTIC) + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-no-songs") endif() include(CPack) diff --git a/CMake/DefineOptions.cmake b/CMake/DefineOptions.cmake index 48ee8c8ef4..90a29309e2 100644 --- a/CMake/DefineOptions.cmake +++ b/CMake/DefineOptions.cmake @@ -15,6 +15,9 @@ option(WITH_SSE2 "Build with SSE2 Optimizations." ON) # Turn this on to set this to a specific release mode. option(WITH_FULL_RELEASE "Build as a proper, full release." OFF) +# Turn this on to include Club Fantastic songs +option(WITH_CLUB_FANTASTIC "Include Club Fantastic songs." OFF) + # Turn this on to compile tomcrypt with no assembly data. This is a portable # mode. option(WITH_PORTABLE_TOMCRYPT diff --git a/Utils/build-release-linux.sh b/Utils/build-release-linux.sh index 25b5d85ab3..f449607d43 100755 --- a/Utils/build-release-linux.sh +++ b/Utils/build-release-linux.sh @@ -6,9 +6,11 @@ cd "$(dirname $0)" docker build -f Dockerfile-linux-amd64 . -t itgmania-linux-build:amd64 docker run -i -v $(pwd)/..:/data itgmania-linux-build:amd64 sh -eux <<'EOF' -cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On +cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On cmake --build /tmp/Build -j $(nproc) cmake --build /tmp/Build --target package +cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=Off +cmake --build /tmp/Build --target package mkdir -p /data/Build/release cp /tmp/Build/ITGmania-* /data/Build/release/ EOF diff --git a/Utils/build-release-macos.sh b/Utils/build-release-macos.sh index 34a3fbe2b7..5bb93acfa2 100755 --- a/Utils/build-release-macos.sh +++ b/Utils/build-release-macos.sh @@ -3,10 +3,14 @@ set -eux cd "$(dirname $0)/.." -cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64 +cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_CLUB_FANTASTIC=On cmake --build Build/release-arm64 -j $(sysctl -n hw.logicalcpu) cmake --build Build/release-arm64 --target package +cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_CLUB_FANTASTIC=Off +cmake --build Build/release-arm64 --target package -cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64 +cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_CLUB_FANTASTIC=On cmake --build Build/release-x86_64 -j $(sysctl -n hw.logicalcpu) cmake --build Build/release-x86_64 --target package +cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_CLUB_FANTASTIC=Off +cmake --build Build/release-x86_64 --target package diff --git a/Utils/build-release-windows.bat b/Utils/build-release-windows.bat index f5e9bf70c9..809b2fcf1d 100644 --- a/Utils/build-release-windows.bat +++ b/Utils/build-release-windows.bat @@ -1,5 +1,7 @@ cd %~dp0.. -cmake -B Build\release -DWITH_FULL_RELEASE=On || exit /b +cmake -B Build\release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On || exit /b cmake --build Build\release --config Release -j %NUMBER_OF_PROCESSORS% || exit /b cmake --build Build\release --config Release --target package || exit /b +cmake -B Build\release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=Off || exit /b +cmake --build Build\release --config Release --target package || exit /b diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 39c9df0772..eb6796b4b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -507,7 +507,7 @@ install(DIRECTORY "${SM_ROOT_DIR}/NoteSkins" install(FILES "${SM_ROOT_DIR}/Songs/instructions.txt" DESTINATION "${SM_INSTALL_DESTINATION}/Songs") -if(WITH_FULL_RELEASE) +if(WITH_CLUB_FANTASTIC) # Fetch ClubFantastic packs include(FetchContent) FetchContent_Declare( @@ -522,7 +522,4 @@ if(WITH_FULL_RELEASE) DESTINATION "${SM_INSTALL_DESTINATION}/Songs") install(DIRECTORY "${CLUB_FANTASTIC_DIR}/Club Fantastic Season 2" DESTINATION "${SM_INSTALL_DESTINATION}/Songs") -else() - install(DIRECTORY "${SM_ROOT_DIR}/Songs/StepMania 5" - DESTINATION "${SM_INSTALL_DESTINATION}/Songs") endif()