diff --git a/.github/workflows/plugins_build.yml b/.github/workflows/plugins_build.yml index 3c6df0b4..1dacca2a 100644 --- a/.github/workflows/plugins_build.yml +++ b/.github/workflows/plugins_build.yml @@ -21,10 +21,18 @@ jobs: strategy: matrix: - os: [windows-latest] + # Pinned to windows-2022 (Visual Studio 2022) rather than + # windows-latest: as of the "Windows Server 2025" image, windows-latest + # now provisions Visual Studio 2026, whose toolchain/generator isn't + # supported by the vcpkg baseline pinned in 6.x/vcpkg.json. That + # mismatch made `vcpkg_execute_required_process` fail while running + # `ninja.exe -v` during the CMake configure step of essentially any + # port built from source (originally surfaced via ableton-link, later + # via zlib). + os: [windows-2022] version: ["6.17.0"] include: - - os: "windows-latest" + - os: "windows-2022" mono: "" # - os: "ubuntu-latest" # mono: "mono" @@ -55,6 +63,19 @@ jobs: ls 'C:\Program Files\Faust\' echo "C:\Program Files\Faust\;C:\Program Files\Faust\lib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + # vcpkg's pinned baseline downloads pkgconf from MSYS2 mirrors, which + # can be unavailable/removed upstream and break the build before it + # even reaches our ports. Provide a pkg-config via chocolatey and + # point vcpkg at it (vcpkg_find_acquire_program short-circuits its + # own download when PKG_CONFIG is already set) so eigen3/fltk/etc. + # configuration no longer depends on that MSYS2 mirror. + choco install pkgconfiglite -y + $pkgConfigPath = (Get-Command pkg-config -ErrorAction SilentlyContinue).Source + if (-not $pkgConfigPath) { + throw "pkg-config.exe was not found on PATH after installing pkgconfiglite" + } + echo "PKG_CONFIG=$pkgConfigPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # - name: Setup platform (linux) # if: startsWith(matrix.os, 'ubuntu') # run: | @@ -85,6 +106,20 @@ jobs: - name: Generate CMake build run: cmake 6.x/. -B build -DUSE_VCPKG=1 -DBUILD_ABLETON_LINK_OPCODES=OFF + - name: Verify ableton-link is not installed by vcpkg + shell: bash + run: | + matches="" + if [ -d build/vcpkg_installed ]; then + matches=$(find build/vcpkg_installed -maxdepth 2 -iname "ableton-link*") + fi + if [ -n "$matches" ]; then + echo "ableton-link was installed by vcpkg even though BUILD_ABLETON_LINK_OPCODES=OFF" >&2 + echo "$matches" >&2 + exit 1 + fi + echo "Confirmed ableton-link is not part of the vcpkg install graph." + - name: Build plugins run: cmake --build build --config Release diff --git a/6.x/CMakeLists.txt b/6.x/CMakeLists.txt index 3cea4fa0..22cfed1a 100644 --- a/6.x/CMakeLists.txt +++ b/6.x/CMakeLists.txt @@ -3,12 +3,27 @@ cmake_policy(SET CMP0077 NEW) option(USE_VCPKG "Use VCPKG to download and manage dependencies" OFF) +option(BUILD_ABLETON_LINK_OPCODES "Build Ableton Link Opcodes" OFF) + if (USE_VCPKG) + # Ableton Link is an optional vcpkg manifest feature so that it is only + # downloaded/built when its opcodes are actually being built. + if (BUILD_ABLETON_LINK_OPCODES) + list(APPEND VCPKG_MANIFEST_FEATURES "ableton-link") + endif() + # Detect correct triplet based on CMake env if (WIN32) set(VCPKG_HOST_TRIPLET "x64-windows-csound" CACHE STRING "") set(VCPKG_TARGET_TRIPLET "x64-windows-csound") - set(CSOUND_INCLUDE_DIR_HINT "C:/Program Files/Csound6_x64") + # The Chocolatey "csound" package (used in CI) deploys to + # "C:/Program Files/csound", installing headers under + # "include/csound" and import libs under "lib" (per csound's own + # CMakeLists.txt HEADER_INSTALL_DIR/LIBRARY_INSTALL_DIR). Older/local + # installers used "C:/Program Files/Csound6_x64" instead, so keep + # that as a fallback hint too. + set(CSOUND_INCLUDE_DIR_HINT "C:/Program Files/csound/include" "C:/Program Files/Csound6_x64") + set(CSOUND_LIBRARY_DIR_HINT "C:/Program Files/csound/lib" "C:/Program Files/Csound6_x64") elseif(APPLE) set(VCPKG_HOST_TRIPLET "x64-osx" CACHE STRING "") set(VCPKG_TARGET_TRIPLET "x64-osx") diff --git a/6.x/cmake/Modules/FindFAUST.cmake b/6.x/cmake/Modules/FindFAUST.cmake index d1d329e5..dde6faa0 100644 --- a/6.x/cmake/Modules/FindFAUST.cmake +++ b/6.x/cmake/Modules/FindFAUST.cmake @@ -21,7 +21,7 @@ find_library(FAUST_LIBRARY "${FAUST_LIB_DIR_HINT}" ) -find_package_handle_standard_args(FAUST FAUST_INCLUDE_DIR FAUST_LIBRARY) +find_package_handle_standard_args(FAUST REQUIRED_VARS FAUST_INCLUDE_DIR FAUST_LIBRARY) if(FAUST_FOUND) set(FAUST_LIBRARIES ${FAUST_LIBRARY}) diff --git a/6.x/installer/win64/Installer.iss b/6.x/installer/win64/Installer.iss index 12763dc1..da3ac719 100644 --- a/6.x/installer/win64/Installer.iss +++ b/6.x/installer/win64/Installer.iss @@ -43,32 +43,32 @@ Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" ; add files - dlls go standard location, or one of the users choosing, csd and other reousrce go to program data [Files] -Source: "..\..\build\src\AbletonLinkOpcodes\Release\ableton_link_opcodes.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\chua\Release\chua.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\image\Release\image.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\py\Release\py.dll"; DestDir: "{app}\plugins64"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\stk\Release\stkops.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\websockets\Release\websocketIO.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; +Source: "..\..\build\src\AbletonLinkOpcodes\Release\ableton_link_opcodes.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\chua\Release\chua.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\image\Release\image.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\py\Release\py.dll"; DestDir: "{app}\plugins64"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\stk\Release\stkops.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\websockets\Release\websocketIO.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; ; faust -Source: "..\..\build\src\faustcsound\Release\faustcsound.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "C:\Program Files\Faust\lib\faust.dll"; DestDir: "{autopf64}\Csound6_x64\bin\"; Flags: ignoreversion; Components: core; Permissions: users-full; +Source: "..\..\build\src\faustcsound\Release\faustcsound.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "C:\Program Files\Faust\lib\faust.dll"; DestDir: "{autopf64}\Csound6_x64\bin\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; ; widgets -Source: "..\..\build\src\widgets\Release\virtual.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\widgets\Release\widgets.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; +Source: "..\..\build\src\widgets\Release\virtual.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\widgets\Release\widgets.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; ; fluidsynth -Source: "..\..\build\src\fluidOpcodes\Release\fluidOpcodes.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\fluidOpcodes\Release\glib-2.0-0.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\fluidOpcodes\Release\iconv-2.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\fluidOpcodes\Release\intl-8.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\fluidOpcodes\Release\libfluidsynth-3.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\fluidOpcodes\Release\pcre2-8.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\fluidOpcodes.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\glib-2.0-0.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\iconv-2.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\intl-8.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\libfluidsynth-3.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\fluidOpcodes\Release\pcre2-8.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; ; hdf5 -Source: "..\..\build\src\hdf5\Release\hdf5ops.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; -Source: "..\..\build\src\hdf5\Release\zlib1.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion; Components: core; Permissions: users-full; +Source: "..\..\build\src\hdf5\Release\hdf5ops.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; +Source: "..\..\build\src\hdf5\Release\zlib1.dll"; DestDir: "{app}\plugins64\"; Flags: ignoreversion skipifsourcedoesntexist; Components: core; Permissions: users-full; [Tasks] ;Name: modifypath; Description: &Add application directory to your PATH environment variable (recommended); diff --git a/6.x/src/hdf5/HDF5IO.c b/6.x/src/hdf5/HDF5IO.c index 8d45ef5f..737d5974 100644 --- a/6.x/src/hdf5/HDF5IO.c +++ b/6.x/src/hdf5/HDF5IO.c @@ -229,7 +229,7 @@ void HDF5IO_readStringAttribute(CSOUND *csound, HDF5File *self, { hid_t dataSetID = H5Dopen2(self->fileHandle, datasetName, H5P_DEFAULT); H5O_info_t oinfo; -#if HDF5_VERSION_MAJOR == 1 && HDF5_VERSION_MINOR >= 12 +#if (HDF5_VERSION_MAJOR == 1 && HDF5_VERSION_MINOR >= 12) || HDF5_VERSION_MAJOR >= 2 HDF5ERROR(H5Oget_info1(dataSetID, &oinfo)); #else HDF5ERROR(H5Oget_info(dataSetID, &oinfo)); diff --git a/6.x/src/websockets/CMakeLists.txt b/6.x/src/websockets/CMakeLists.txt index 2438a8c3..1a6dea3b 100644 --- a/6.x/src/websockets/CMakeLists.txt +++ b/6.x/src/websockets/CMakeLists.txt @@ -20,7 +20,7 @@ if(BUILD_WEBSOCKET_OPCODE) target_include_directories(websocketIO PRIVATE ${CSOUND_INCLUDE_DIRS}) if(USE_VCPKG) - target_link_libraries(websocketIO websockets uv_a) + target_link_libraries(websocketIO websockets $,libuv::uv_a,libuv::uv>) else() target_link_libraries(websocketIO ${websockets_library}) target_include_directories(websocketIO PRIVATE ${WEBSOCKETS_H}) diff --git a/6.x/vcpkg b/6.x/vcpkg index f6a5d4e8..9e593bb1 160000 --- a/6.x/vcpkg +++ b/6.x/vcpkg @@ -1 +1 @@ -Subproject commit f6a5d4e8eb7476b8d7fc12a56dff300c1c986131 +Subproject commit 9e593bb18ea69cc5095e012465dcd675a822ed0d diff --git a/6.x/vcpkg.json b/6.x/vcpkg.json index 21ef94d8..e7501772 100644 --- a/6.x/vcpkg.json +++ b/6.x/vcpkg.json @@ -2,16 +2,28 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "csound-plugins", "version-string": "6.16.2", - "builtin-baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131", + "builtin-baseline": "9e593bb18ea69cc5095e012465dcd675a822ed0d", "dependencies": [ - "ableton-link", "eigen3", "fltk", "fluidsynth", - "hdf5", + { + "name": "hdf5", + "features": [ + "hl" + ] + }, "libstk", "libwebsockets", "mp3lame", "zlib" - ] + ], + "features": { + "ableton-link": { + "description": "Support for Ableton Link opcodes", + "dependencies": [ + "ableton-link" + ] + } + } } \ No newline at end of file diff --git a/6.x/x64-windows-csound.cmake b/6.x/x64-windows-csound.cmake index dc862f9a..043f9d54 100644 --- a/6.x/x64-windows-csound.cmake +++ b/6.x/x64-windows-csound.cmake @@ -6,3 +6,9 @@ if(${PORT} MATCHES "fluidsynth|glib|zlib|pcre|libffi|gettext|libiconv|portmidi|p else() set(VCPKG_LIBRARY_LINKAGE static) endif() + +# Allow PKG_CONFIG (set in CI to a chocolatey-installed pkg-config) through to +# port builds. Without this, vcpkg builds ports in a clean environment and +# vcpkg_find_acquire_program(PKGCONFIG) ignores ENV{PKG_CONFIG}, falling back +# to downloading its own pkgconf from MSYS2 mirrors, which can 404. +set(VCPKG_ENV_PASSTHROUGH PKG_CONFIG)