From e9f118a6adcb72a142ea36b19f5398b65f6e4cb3 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Thu, 24 Apr 2025 19:52:22 +0200 Subject: [PATCH 1/2] Update Github actions version --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab948f7..99475b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: run: shell: msys2 {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: msystem: MSYS @@ -57,14 +57,14 @@ jobs: run: | avarice_installed/usr/bin/avarice --version avarice_installed/usr/bin/avarice --known-devices || true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: AVaRICE Windows 64-bit path: avarice_installed build-lin64: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get update && sudo apt-get install -y build-essential make autotools-dev automake binutils-dev libusb-dev libhidapi-dev - name: Build AVaRICE @@ -82,14 +82,14 @@ jobs: avarice_installed/usr/local/bin/avarice --known-devices || true - name: Tar files run: tar -cvf avarice.tar.gz -C avarice_installed . - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: AVaRICE Linux 64-bit path: avarice.tar.gz - build-darwin-x64: + build-darwin-arm64: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Dependencies run: | brew install gcc binutils autoconf automake mk-configure libusb libusb-compat hidapi @@ -108,7 +108,7 @@ jobs: avarice_installed/usr/local/bin/avarice --known-devices || true - name: Tar files run: tar -cvf avarice.tar.gz -C avarice_installed . - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: AVaRICE Mac OS Intel 64-bit + name: AVaRICE Mac OS ARM 64-bit path: avarice.tar.gz \ No newline at end of file From fae8316d314a897aed51ecb2d3dfb88294af5bf1 Mon Sep 17 00:00:00 2001 From: Maximilian Gerhardt Date: Sat, 26 Apr 2025 19:24:53 +0200 Subject: [PATCH 2/2] Try enabling libusb in MacOS avarice build --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99475b9..8c75287 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,12 +96,22 @@ jobs: - name: Build AVaRICE run: | ./Bootstrap + # note: we use a constant hidapi include path instead of "pkg-config --cflags hidapi" because that path include "/hidapi" at the end + # through which in turn "hidapi/hidapi.h" will not be found (it would have to be just "hidapi.h"). + export CFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) -I/opt/homebrew/Cellar/hidapi/0.14.0/include/" + export CXXFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) -I/opt/homebrew/Cellar/hidapi/0.14.0/include/" + export LDFLAGS="$(pkg-config --libs-only-L libusb) $(pkg-config --libs-only-L libusb-1.0) $(pkg-config --libs-only-L hidapi)" ./configure make -j3 mkdir avarice_installed make install DESTDIR=$(pwd)/avarice_installed/ ls -R avarice_installed otool -L avarice_installed/usr/local/bin/avarice + install_name_tool -change /opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib @executable_path/./libhidapi.0.dylib ./avarice_installed/usr/local/bin/avarice + install_name_tool -change /opt/homebrew/opt/libusb-compat/lib/libusb-0.1.4.dylib @executable_path/./libusb-0.1.4.dylib ./avarice_installed/usr/local/bin/avarice + cp /opt/homebrew/opt/hidapi/lib/libhidapi.0.dylib ./avarice_installed/usr/local/bin/. + cp /opt/homebrew/opt/libusb-compat/lib/libusb-0.1.4.dylib ./avarice_installed/usr/local/bin/. + otool -L avarice_installed/usr/local/bin/avarice - name: Run AVaRICE run: | avarice_installed/usr/local/bin/avarice --version