Skip to content

Instantly share code, notes, and snippets.

@tresf
Created November 23, 2020 22:02
Show Gist options
  • Save tresf/565ebc689c735129be9eefd26346b9cd to your computer and use it in GitHub Desktop.
Save tresf/565ebc689c735129be9eefd26346b9cd to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
pushd ~/Desktop
rm -rf llvm-mingw
rm -rf hidapi
mkdir -p llvm-mingw
wget -qO- https://github.com/mstorsjo/llvm-mingw/releases/download/20201020/llvm-mingw-20201020-msvcrt-ubuntu-18.04.tar.xz | tar xJvf - --strip 1 -C ./llvm-mingw
export PATH="$(pwd)/llvm-mingw/bin:$PATH"
git clone https://github.com/libusb/hidapi "$(pwd)/hidapi"
pushd "$(pwd)/hidapi"
./bootstrap
./configure --host=aarch64-w64-mingw32
make
popd
popd
@tresf
Copy link
Author

tresf commented Nov 23, 2020

ubuntu@ubuntu:~/Desktop$ file hidapi/hidtest/hidtest.exe 
hidapi/hidtest/hidtest.exe: PE32+ executable (console) Aarch64, for MS Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment