From e33a73e16ecb10202a60da69bb8d06e667a2cd97 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Mon, 28 Oct 2024 09:09:16 +0000 Subject: [PATCH] Remove libsoundio from GitHub actions; update Windows build docs --- .github/workflows/build.yml | 2 +- .github/workflows/wheels.yml | 5 ++--- CONTRIBUTING.md | 16 ++++++---------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebca1c5b..ff808dad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: run: | sudo rm -rf /home/linuxbrew sudo apt-get update -y - sudo apt-get install libasound2-dev libsoundio-dev libsndfile1-dev fftw3-dev -y + sudo apt-get install libasound2-dev libsndfile1-dev fftw3-dev -y sudo apt-get install python3 python3-setuptools python3-pip # Requires setuptools >= 62.1 for `python setup.py test`, as earlier versions # used a different build path to the .so file as located in tests/__init__.py diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 19d82286..7ce3cfc8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -28,9 +28,8 @@ jobs: yum install -y fftw-devel wget python3 sudo gcc && wget https://github.com/jackaudio/jack2/archive/v1.9.22.tar.gz && tar xzf v1.9.22.tar.gz && cd jack2-1.9.22 && python3 ./waf configure && /usr/bin/sudo python3 ./waf install && cd .. && wget https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.9.tar.bz2 && tar xjf alsa-lib-1.2.9.tar.bz2 && cd alsa-lib-1.2.9 && ./configure && make && /usr/bin/sudo make install && cd .. && - git clone https://github.com/libsndfile/libsndfile.git && cd libsndfile && cmake -DBUILD_SHARED_LIBS=1 . && make && make install && cd .. && - git clone https://github.com/andrewrk/libsoundio.git && cd libsoundio && cmake . && make && make install - CIBW_BEFORE_ALL_MACOS: brew install cmake python libsndfile libsoundio + git clone https://github.com/libsndfile/libsndfile.git && cd libsndfile && cmake -DBUILD_SHARED_LIBS=1 . && make && make install && cd .. + CIBW_BEFORE_ALL_MACOS: brew install cmake python libsndfile - uses: actions/upload-artifact@v3 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 061662dd..3041fd20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,17 +51,13 @@ pip3 install . ### Windows -This is work in progress. +The build process for SignalFlow on 64-bit Windows has been verified with Visual Studio 2022 and CMake. -Currently, dependencies need to be downloaded and built by hand. These can be placed anywhere. - -- https://github.com/libsndfile/libsndfile - - Use CMake GUI to build libsndfile with Visual Studio 2019 with binaries in a subfolder of that repo named `build`. (Configure, Generate, Open project, Batch build all configurations) -- Download Windows binaries of FFTW from http://fftw.org/install/windows.html. - -To build SignalFlow, use the CMake GUI. Press configure and you will see three empty fields to fill in with the path to the two build folders and the FFTW binaries folder (see above). Set these parameters then press Configure, then Generate then Open. Then build in Visual Studio 2019. - -As of 2021-03-03, only the signalflow project has been ported to build correctly on Windows. Only tested in x64 and for Debug builds. Tested using Visual Studio 2019. +- Download Windows binaries of [FFTW](http://fftw.org/install/windows.html) and [libsndfile](https://github.com/libsndfile/libsndfile/releases/), and unzip them in the same filesystem location as the `signalflow` source directory +- Install Python 3, and dependencies: `python -m pip install build delvewheel` +- Build the binary wheel: `python -m build --wheel` +- Copy the libsndfile and fftw binaries into `dlls` +- Bundle the DLL dependencies with the wheel: `python -m delvewheel repair --add-path=dlls *.whl`