From 66beceba59dcb805f5418036877ae3a2133180e5 Mon Sep 17 00:00:00 2001 From: staphen Date: Tue, 7 Dec 2021 20:04:35 -0500 Subject: [PATCH] Remove NIGHTLY_BUILD and BINARY_RELEASE options --- .circleci/config.yml | 8 ++++---- .github/workflows/Linux_x86.yml | 2 +- .github/workflows/Linux_x86_64_SDL1.yml | 2 +- .github/workflows/MacOSX.yml | 2 +- .github/workflows/Windows_x64.yml | 2 +- .github/workflows/Windows_x86.yml | 2 +- CMake/platforms/android.cmake | 2 +- CMake/platforms/cpigamesh.cmake | 1 - CMakeLists.txt | 20 ++------------------ CMakeSettings.json | 4 ++-- Packaging/amiga/Dockerfile | 2 +- Packaging/switch/build.sh | 2 +- appveyor.yml | 2 +- 13 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0f23b98d..9eea170fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - run: apt update -y - run: apt install -y g++ libsdl2-dev libbz2-dev git rpm wget smpq - run: apt install -y -t 'stretch-backports*' cmake libsodium-dev libpng-dev - - run: cmake -S. -Bbuild .. -DNIGHTLY_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr + - run: cmake -S. -Bbuild .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK=ON -DCMAKE_INSTALL_PREFIX=/usr - run: cmake --build build -j 2 --target package - store_artifacts: {path: ./build/devilutionx, destination: devilutionx_linux_x86_64} - run: Packaging/nix/LinuxReleasePackaging.sh @@ -37,7 +37,7 @@ jobs: working_directory: ~/repo steps: - checkout - - run: /opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild .. -DNIGHTLY_BUILD=ON + - run: /opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild .. -DCMAKE_BUILD_TYPE=RelWithDebInfo - run: cmake --build build -j 2 - store_artifacts: {path: ./build/devilutionx.nro, destination: devilutionx.nro} 3ds: @@ -53,7 +53,7 @@ jobs: - run: wget https://github.com/jakcron/Project_CTR/releases/download/v0.16/makerom_016_ctrtool.zip - run: unzip -j "makerom_016_ctrtool.zip" "Ubuntu/makerom" -d "/opt/devkitpro/tools/bin" - run: sudo chmod +rx /opt/devkitpro/tools/bin/makerom - - run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake + - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake - run: cmake --build build -j 2 - store_artifacts: {path: ./build/devilutionx.3dsx, destination: devilutionx.3dsx} - store_artifacts: {path: ./build/devilutionx.cia, destination: devilutionx.cia} @@ -74,7 +74,7 @@ jobs: steps: - checkout - run: apk --no-cache add git cmake ninja bash pkgconfig gettext - - run: cmake -S. -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DNIGHTLY_BUILD=ON + - run: cmake -S. -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo - run: cmake --build build -j 2 - store_artifacts: {path: ./build/devilutionx.vpk, destination: devilutionx.vpk} diff --git a/.github/workflows/Linux_x86.yml b/.github/workflows/Linux_x86.yml index 54e3a1f21..609ece9c9 100644 --- a/.github/workflows/Linux_x86.yml +++ b/.github/workflows/Linux_x86.yml @@ -32,7 +32,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}} - run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/linux_i386.toolchain.cmake + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/linux_i386.toolchain.cmake - name: Build working-directory: ${{github.workspace}} diff --git a/.github/workflows/Linux_x86_64_SDL1.yml b/.github/workflows/Linux_x86_64_SDL1.yml index 337a6980e..4503a78f3 100644 --- a/.github/workflows/Linux_x86_64_SDL1.yml +++ b/.github/workflows/Linux_x86_64_SDL1.yml @@ -31,7 +31,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}} - run: cmake -S. -Bbuild .. -DNIGHTLY_BUILD=ON -DUSE_SDL1=ON + run: cmake -S. -Bbuild .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK=ON -DUSE_SDL1=ON - name: Build working-directory: ${{github.workspace}} diff --git a/.github/workflows/MacOSX.yml b/.github/workflows/MacOSX.yml index 6deeca1d6..623360b5b 100644 --- a/.github/workflows/MacOSX.yml +++ b/.github/workflows/MacOSX.yml @@ -39,7 +39,7 @@ jobs: # access regardless of the host operating system shell: bash working-directory: ${{github.workspace}} - run: cmake -S. -Bbuild + run: cmake -S. -Bbuild -DMACOSX_STANDALONE_APP_BUNDLE=ON - name: Build working-directory: ${{github.workspace}} diff --git a/.github/workflows/Windows_x64.yml b/.github/workflows/Windows_x64.yml index b998ea8d9..99d2163f0 100644 --- a/.github/workflows/Windows_x64.yml +++ b/.github/workflows/Windows_x64.yml @@ -25,7 +25,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}} - run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc64.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc64.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF - name: Build working-directory: ${{github.workspace}} diff --git a/.github/workflows/Windows_x86.yml b/.github/workflows/Windows_x86.yml index 32f782e7b..002750bc8 100644 --- a/.github/workflows/Windows_x86.yml +++ b/.github/workflows/Windows_x86.yml @@ -25,7 +25,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}} - run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF - name: Build working-directory: ${{github.workspace}} diff --git a/CMake/platforms/android.cmake b/CMake/platforms/android.cmake index aae4a8042..3b3038234 100644 --- a/CMake/platforms/android.cmake +++ b/CMake/platforms/android.cmake @@ -23,7 +23,7 @@ set(DEVILUTIONX_ASSETS_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/android-pro set(ASAN OFF) set(UBSAN OFF) -if(BINARY_RELEASE OR CMAKE_BUILD_TYPE STREQUAL "Release") +if(CMAKE_BUILD_TYPE STREQUAL "Release") # Work around a linker bug in clang: https://github.com/android/ndk/issues/721 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -flto=full") endif() diff --git a/CMake/platforms/cpigamesh.cmake b/CMake/platforms/cpigamesh.cmake index 1d23141af..11fe7fcbb 100644 --- a/CMake/platforms/cpigamesh.cmake +++ b/CMake/platforms/cpigamesh.cmake @@ -1,7 +1,6 @@ set(NONET ON) set(PREFILL_PLAYER_NAME ON) set(HAS_KBCTRL 1) -set(BINARY_RELEASE ON) set(LTO ON) set(DIST ON) set(DEBUG OFF) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78bf31828..9680dc7c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,9 +40,7 @@ option(GPERF "Build with GPerfTools profiler" OFF) cmake_dependent_option(GPERF_HEAP_FIRST_GAME_ITERATION "Save heap profile of the first game iteration" OFF "GPERF" OFF) option(DISABLE_LTO "Disable link-time optimization (by default enabled in release mode)" OFF) option(PIE "Generate position-independent code" OFF) -option(DIST "Dynamically link only glibc and SDL2" OFF) -option(BINARY_RELEASE "Enable options for binary release" OFF) -option(NIGHTLY_BUILD "Enable options for nightly build" OFF) +option(MACOSX_STANDALONE_APP_BUNDLE "Generate a portable app bundle to use on other devices (requires sudo)" OFF) option(USE_SDL1 "Use SDL1.2 instead of SDL2" OFF) option(NONET "Disable network support" OFF) cmake_dependent_option(DISABLE_TCP "Disable TCP multiplayer option" OFF "NOT NONET" ON) @@ -129,20 +127,6 @@ if(NONET) set(PACKET_ENCRYPTION OFF) endif() -if(BINARY_RELEASE OR CMAKE_BUILD_TYPE STREQUAL "Release") - set(BINARY_RELEASE ON) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - set(DIST ON) - set(CPACK ON) -endif() - -if(NIGHTLY_BUILD OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - set(NIGHTLY_BUILD ON) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "") - set(DIST ON) - set(CPACK ON) -endif() - find_program(CCACHE_PROGRAM ccache) if(CCACHE_PROGRAM) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") @@ -975,7 +959,7 @@ if(APPLE) install (TARGETS ${BIN_TARGET} DESTINATION ./) - if(DIST) + if(MACOSX_STANDALONE_APP_BUNDLE) install(CODE " include(BundleUtilities) fixup_bundle(${CMAKE_BINARY_DIR}/${MACOSX_BUNDLE_BUNDLE_NAME}.app \"\" \"\") diff --git a/CMakeSettings.json b/CMakeSettings.json index aa783fdc3..f5e61a232 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -38,7 +38,7 @@ "configurationType": "Release", "buildRoot": "${workspaceRoot}\\build\\${name}", "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "-DBINARY_RELEASE=ON", + "cmakeCommandArgs": "-DCPACK=ON", "inheritEnvironments": [ "msvc_x64" ], "intelliSenseMode": "windows-msvc-x64", "enableClangTidyCodeAnalysis": true @@ -70,7 +70,7 @@ "configurationType": "Release", "buildRoot": "${workspaceRoot}\\build\\${name}", "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "-DBINARY_RELEASE=ON", + "cmakeCommandArgs": "-DCPACK=ON", "inheritEnvironments": [ "msvc_x86" ], "intelliSenseMode": "windows-msvc-x86", "enableClangTidyCodeAnalysis": true diff --git a/Packaging/amiga/Dockerfile b/Packaging/amiga/Dockerfile index a660c1e6b..15f1e1b77 100644 --- a/Packaging/amiga/Dockerfile +++ b/Packaging/amiga/Dockerfile @@ -6,6 +6,6 @@ COPY Packaging/amiga/prep.sh /devilutionx-deps-build/prep.sh RUN cd /devilutionx-deps-build && ./prep.sh CMD PKG_CONFIG_PATH=/opt/m68k-amigaos/usr/lib/pkgconfig/:/opt/m68k-amigaos/usr/share/pkgconfig/ \ - cmake -S. -Bbuild-amiga -DBINARY_RELEASE=ON -DM68K_CPU=68040 -DM68K_FPU=hard \ + cmake -S. -Bbuild-amiga -DCMAKE_BUILD_TYPE=Release -DCPACK=ON -DM68K_CPU=68040 -DM68K_FPU=hard \ -DM68K_COMMON="-s -ffast-math -O3 -noixemul -D__BIG_ENDIAN__ -D__AMIGA__ -fpermissive" && \ cmake --build build-amiga -j $(nproc) diff --git a/Packaging/switch/build.sh b/Packaging/switch/build.sh index 3a88e3204..e6b77e4a6 100755 --- a/Packaging/switch/build.sh +++ b/Packaging/switch/build.sh @@ -18,7 +18,7 @@ build() { mkdir -p ../../build cd ../../build rm -f CMakeCache.txt - DEVKITPRO="$DEVKITPRO" cmake .. -DBINARY_RELEASE=ON \ + DEVKITPRO="$DEVKITPRO" cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=../CMake/switch/devkita64-libnx.cmake DEVKITPRO="$DEVKITPRO" make -j "$(getconf _NPROCESSORS_ONLN)" cd - diff --git a/appveyor.yml b/appveyor.yml index f46f21ba6..fb270c216 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ install: - cd %APPVEYOR_BUILD_FOLDER% before_build: - - cmake -G "Visual Studio 17 2022" -A x64 -DNIGHTLY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake . + - cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake . build: project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln