Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 84 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Binaries
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
build-win64:
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
file avarice_installed/usr/bin/*
ldd avarice_installed/usr/bin/avarice
cp /mingw64/bin/libusb-1.0.dll avarice_installed/usr/bin/.
cp /mingw64/bin/libusb-1.0.dll avarice_installed/usr/bin/msys-usb-1.0.dll
cp /usr/bin/msys-2.0.dll avarice_installed/usr/bin/.
cp /usr/bin/msys-stdc++-6.dll avarice_installed/usr/bin/.
cp /usr/bin/msys-gcc_s-seh-1.dll avarice_installed/usr/bin/.
Expand All @@ -61,7 +62,7 @@ jobs:
with:
name: AVaRICE Windows 64-bit
path: avarice_installed
build-lin64:
build-linux-intel64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -84,24 +85,62 @@ jobs:
run: tar -cvf avarice.tar.gz -C avarice_installed .
- uses: actions/upload-artifact@v4
with:
name: AVaRICE Linux 64-bit
name: AVaRICE Linux Intel 64-bit
path: avarice.tar.gz
build-linux-arm64:
runs-on: ubuntu-24.04-arm
steps:
- 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
run: |
./Bootstrap
./configure --enable-target-programming
make -j$NUMBER_OF_PROCESSORS
mkdir avarice_installed
make install DESTDIR=$(pwd)/avarice_installed/
file avarice_installed/usr/local/bin/*
ldd avarice_installed/usr/local/bin/avarice
- name: Run AVaRICE
run: |
avarice_installed/usr/local/bin/avarice --version
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@v4
with:
name: AVaRICE Linux ARM 64-bit
path: avarice.tar.gz
build-darwin-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew install gcc binutils autoconf automake mk-configure libusb libusb-compat hidapi
brew install binutils autoconf automake mk-configure libusb-compat hidapi
- 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").
# Actually, we now remove the trailing hidapi in order to account for version changes
INC=$(pkg-config --cflags hidapi)
INC=${INC%"hidapi"}
export CFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) $INC"
export CXXFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) $INC"
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
make -j$NUMBER_OF_PROCESSORS
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
Expand All @@ -111,4 +150,43 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: AVaRICE Mac OS ARM 64-bit
path: avarice.tar.gz
path: avarice.tar.gz
build-darwin-intel64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew install binutils autoconf automake mk-configure libusb-compat hidapi
- 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").
# Actually, we now remove the trailing hidapi in order to account for version changes
INC=$(pkg-config --cflags hidapi)
INC=${INC%"hidapi"}
export CFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) $INC"
export CXXFLAGS="$(pkg-config --cflags libusb) $(pkg-config --cflags libusb-1.0) $INC"
export LDFLAGS="$(pkg-config --libs-only-L libusb) $(pkg-config --libs-only-L libusb-1.0) $(pkg-config --libs-only-L hidapi)"
./configure
make -j$NUMBER_OF_PROCESSORS
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 /usr/local/opt/hidapi/lib/libhidapi.0.dylib @executable_path/./libhidapi.0.dylib ./avarice_installed/usr/local/bin/avarice
install_name_tool -change /usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib @executable_path/./libusb-0.1.4.dylib ./avarice_installed/usr/local/bin/avarice
cp /usr/local/opt/hidapi/lib/libhidapi.0.dylib ./avarice_installed/usr/local/bin/.
cp /usr/local/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
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@v4
with:
name: AVaRICE Mac OS Intel 64-bit
path: avarice.tar.gz
2 changes: 1 addition & 1 deletion src/gnu_getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static char *posixly_correct;
whose names are inconsistent. */

#ifndef getenv
extern char *getenv ();
extern char *getenv (const char *);
#endif

static char *
Expand Down
Loading