diff options
82 files changed, 17738 insertions, 16711 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1025e9f5c6..dc99adc6c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON - -INSTALL_USER_UDEV_RULES=OFF + -DINSTALL_USER_UDEV_RULES=OFF cmake_generator: Unix Makefiles cmake_build_type: RelWithDebInfo ctest_args: @@ -39,12 +39,11 @@ jobs: -DWARNINGS_FATAL=ON -DBULK=ON -DFFMPEG=ON - -DKEYFINDER=ON -DLOCALECOMPARE=ON -DMAD=ON -DMODPLUG=ON -DWAVPACK=ON - -INSTALL_USER_UDEV_RULES=OFF + -DINSTALL_USER_UDEV_RULES=OFF cmake_generator: Unix Makefiles cmake_build_type: RelWithDebInfo ctest_args: @@ -63,6 +62,8 @@ jobs: -DCOREAUDIO=ON -DHSS1394=ON -DMACOS_BUNDLE=ON + -DMODPLUG=OFF + -DWAVPACK=OFF cmake_generator: Unix Makefiles cmake_build_type: RelWithDebInfo # TODO: Fix this broken test on macOS @@ -74,18 +75,23 @@ jobs: buildenv_script: tools/macos_buildenv.sh artifacts_name: macOS DMG artifacts_path: build/*.dmg + artifacts_slug: macos-macosintel qt_qpa_platform: offscreen - name: Windows 2019 (MSVC) os: windows-2019 # TODO: Reenable FFmpeg after licensing issues have been clarified + # Attention: If you change the cmake_args for the Windows CI build, + # also adjust the for the local Windows build setup in + # ./tools/windows_buildenv.bat cmake_args: >- -DBULK=OFF -DFFMPEG=OFF -DHSS1394=ON - -DKEYFINDER=OFF -DLOCALECOMPARE=ON -DMAD=ON -DMEDIAFOUNDATION=ON + -DMODPLUG=ON + -DWAVPACK=ON cc: cl cxx: cl cmake_generator: Ninja @@ -99,6 +105,7 @@ jobs: buildenv_script: tools/windows_buildenv.bat artifacts_name: Windows Installer artifacts_path: build/*.msi + artifacts_slug: windows-windows64 qt_qpa_platform: windows env: @@ -110,6 +117,9 @@ jobs: runs-on: ${{ matrix.os }} name: ${{ matrix.name }} + outputs: + artifact-macos-macosintel: ${{ steps.prepare_deploy.outputs.artifact-macos-macosintel }} + artifact-windows-windows64: ${{ steps.prepare_deploy.outputs.artifact-windows-windows64 }} steps: # sccache's handling of the /fp:fast MSVC compiler option is broken, so use our fork with the fix. @@ -141,7 +151,7 @@ jobs: with: # This should always match the mininum required version in # our CMakeLists.txt - cmake-version: '3.13.x' + cmake-version: '3.16.x' - name: "[Windows] Set up MSVC Developer Command Prompt" if: runner.os == 'Windows' @@ -229,6 +239,7 @@ jobs: -DBATTERY=ON -DBROADCAST=ON -DHID=ON + -DKEYFINDER=ON -DLILV=ON -DOPUS=ON -DQTKEYCHAIN=ON @@ -318,6 +329,21 @@ jobs: run: signtool sign /f $Env:WINDOWS_CODESIGN_CERTIFICATE_PATH /p $Env:WINDOWS_CODESIGN_CERTIFICATE_PASSWORD *.msi working-directory: build + - name: "Prepare for deployment" + # Copy the desired directory structure to the deploy/ directory. This + # also generates metadata for file artifact and write it to the job + # output using the artifacts_slug value. + id: prepare_deploy + if: github.event_name == 'push' + shell: bash + run: > + python3 tools/deploy.py prepare-deployment + --slug '${{ matrix.artifacts_slug }}' + --output-dir 'deploy/' + --dest-path 'builds/{branch}/${{ runner.os }}/{filename}' + --dest-url 'https://downloads.mixxx.org' + ${{ matrix.artifacts_path }} + - name: "[Windows] Install rsync and openssh" env: SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} @@ -330,15 +356,13 @@ jobs: - name: "[macOS/Windows] Upload build to downloads.mixxx.org" # skip deploying Ubuntu builds to downloads.mixxx.org because these are deployed to the PPA if: runner.os != 'Linux' && github.event_name == 'push' && env.SSH_PASSWORD != null - run: bash tools/deploy.sh ${{ matrix.artifacts_path }} + run: bash tools/deploy.sh deploy/ env: - DESTDIR: public_html/downloads/builds - OS: ${{ runner.os }} + DESTDIR: public_html/downloads/ SSH_HOST: downloads-hostgator.mixxx.org SSH_KEY: packaging/certificates/downloads-hostgator.mixxx.org.key SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} SSH_USER: mixxx - UPLOAD_ID: ${{ github.run_id }} # Workaround for https://github.com/actions/cache/issues/531 - name: Use system tar & zstd from Chocolatey for caching @@ -352,3 +376,42 @@ jobs: with: name: ${{ matrix.artifacts_name }} path: ${{ matrix.artifacts_path }} + + update_manifest: + name: "Update manifest file on download server" + runs-on: ubuntu-latest + needs: build + steps: + - name: "Check out repository" + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: "Collect Artifacts Metadata & Write Manifest" + # Retrieve the metadata from the matrix job's outputs, merge them into a + # single JSON document and then deploy to the server. + if: github.event_name == 'push' && env.SSH_PASSWORD != null + run: > + python3 tools/deploy.py generate-manifest + --output-dir 'deploy/' + --dest-path 'builds/{branch}/manifest.json' + --dest-url 'https://downloads.mixxx.org' + env: + JOB_DATA: ${{ toJSON(needs.build) }} + SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} + + - name: "Deploy Manifest" + if: github.event_name == 'push' && env.SSH_PASSWORD != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0' + run: bash tools/deploy.sh deploy/ + env: + DESTDIR: public_html/downloads/ + SSH_HOST: downloads-hostgator.mixxx.org + SSH_KEY: packaging/certificates/downloads-hostgator.mixxx.org.key + SSH_PASSWORD: ${{ secrets.DOWNLOADS_HOSTGATOR_DOT_MIXXX_DOT_ORG_KEY_PASSWORD }} + SSH_USER: mixxx + + - name: "Trigger Netlify build" + if: env.NETLIFY_BUILD_HOOK != null && env.MANIFEST_DIRTY != null && env.MANIFEST_DIRTY != '0' + run: curl -X POST -d '{}' ${{ env.NETLIFY_BUILD_HOOK }} + env: + NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} diff --git a/CMakeLists.txt b/CMakeLists.txt index be67c340d0..3d83c90269 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,4 @@ -cmake_minimum_required(VERSION 3.13.0) -project(mixxx VERSION 2.3.0) -set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org") -set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.") - -# Used for force control of color output -set(BUILD_COLORS "auto" CACHE STRING "Try to use colors auto/always/no") -# Option to disable symlinks -set(USE_SYMLINKS ON CACHE BOOL "Use symlinks in build directory when possible") - -# Support new IN_LIST if() operator -if(POLICY CMP0057) - cmake_policy(SET CMP0057 NEW) -endif() - -# Let AUTOMOC and AUTOUIC process GENERATED files -if(POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif() +cmake_minimum_required(VERSION 3.16) # CMAKE_CXX_COMPILER_ID: Distinguish between "AppleClang" and "Clang" if(POLICY CMP0025) @@ -28,10 +10,31 @@ if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif() +# Support new IN_LIST if() operator +if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) +endif() + +# Enforce interprocedural optimization if(POLICY CMP0069) cmake_policy(SET CMP0069 NEW) endif() +# Let AUTOMOC and AUTOUIC process GENERATED files +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + +project(mixxx VERSION 2.3.0) + +set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org") +set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.") + +# Used for force control of color output +set(BUILD_COLORS "auto" CACHE STRING "Try to use colors auto/always/no") +# Option to disable symlinks +set(USE_SYMLINKS ON CACHE BOOL "Use symlinks in build directory when possible") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") include(CMakeDependentOption) include(CheckSymbolExists) @@ -1008,9 +1011,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL ) set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON CXX_CLANG_TIDY "${CLANG_TIDY}") target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src") -target_compile_definitions(mixxx-lib PRIVATE SETTINGS_FILE="mixxx.cfg") if(UNIX AND NOT APPLE) - target_compile_definitions(mixxx-lib PRIVATE SETTINGS_PATH=".mixxx/") + set(MIXXX_SETTINGS_PATH ".mixxx/") endif() # Disable warnings in generated source files @@ -1134,6 +1136,7 @@ elseif (UNIX) set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DOCDIR}") endif() + if(WIN32) target_compile_definitions(mixxx-lib PRIVATE __WINDOWS__) @@ -1342,7 +1345,8 @@ install( install( FILES "${CMAKE_CURRENT_SOURCE_DIR}/README" - "${CMAKE_CURRENT_SOURCE_DIR}/Mixxx-Manual.pdf" + "${CMAKE_CURRENT_SOURCE_DIR}/res/Mixxx-Manual.pdf" + "${CMAKE_CURRENT_SOURCE_DIR}/res/Mixxx-Keyboard-Shortcuts.pdf" DESTINATION "${MIXXX_INSTALL_DOCDIR}" ) @@ -1612,15 +1616,14 @@ add_dependencies(mixxx-test mixxx-testdata) # # Resources # -add_library(mixxx-qrc OBJECT EXCLUDE_FROM_ALL res/mixxx.qrc) -set_target_properties(mixxx-qrc PROPERTIES AUTORCC ON) - # Add resources to mixxx and mixxx-test binaries, not the mixxx-lib static # library. Doing this would require initialization using Q_INIT_RESOURCE() # calls that are not present at the moment. Further information can be found # at: https://doc.qt.io/qt5/resources.html#using-resources-in-a-library -target_sources(mixxx PRIVATE $<TARGET_OBJECTS:mixxx-qrc>) -target_sources(mixxx-test PRIVATE $<TARGET_OBJECTS:mixxx-qrc>) +target_sources(mixxx PRIVATE res/mixxx.qrc) +set_target_properties(mixxx PROPERTIES AUTORCC ON) +target_sources(mixxx-test PRIVATE res/mixxx.qrc) +set_target_properties(mixxx-test PROPERTIES AUTORCC ON) file(READ src/_version.h MIXXX_VERSION_FILECONTENT) string(REGEX REPLACE "^.*#define MIXXX_VERSION \"(.*)\".*$" "\\1" MIXXX_VERSION "${MIXXX_VERSION_FILECONTENT}") @@ -2639,6 +2642,10 @@ if(WAVPACK) target_link_libraries(mixxx-lib PUBLIC WavPack::wavpack) endif() +# Configure file with build options +file(RELATIVE_PATH MIXXX_INSTALL_DOCDIR_RELATIVE_TO_DATADIR "${CMAKE_INSTALL_PREFIX}/${MIXXX_INSTALL_DATADIR}" "${CMAKE_INSTALL_PREFIX}/${MIXXX_INSTALL_DOCDIR}") +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/src/config.h" @ONLY) + # Packaging set(CPACK_PACKAGE_VENDOR "Mixxx Project") set(CPACK_PACKAGE_CONTACT "RJ Skerry-Ryan <rryan@mixxx.org>") @@ -2678,11 +2685,6 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION} string(PREPEND CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}" "\n") string(REPLACE "\n\n" "\n.\n" CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED}") string(REPLACE "\n" "\n " CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED}") -if("3.16.0" VERSION_GREATER CMAKE_VERSION) - # This hack is no longer required with cpack version 3.16.3 - set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_ |