Skip to content

Commit

Permalink
Add support for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
kiminuo committed Jan 7, 2023
1 parent 14f5134 commit bfd92b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
19 changes: 8 additions & 11 deletions contrib/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ ENV BUILD_DATE="Jan 1 2019"
ENV BUILD_TIME="00:00:00"
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.9.7

RUN dpkg --add-architecture i386
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install --install-recommends -y \
wine-stable-amd64 \
wine-stable-i386 \
wine-stable \
winehq-stable \
p7zip-full
RUN if [[ $(dpkg --print-architecture) == "amd64" ]]; then \
dpkg --add-architecture i386; \
wget -nc https://dl.winehq.org/wine-builds/winehq.key; \
apt-key add winehq.key; \
echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list; \
apt-get update; \
apt-get install --install-recommends -y wine-stable-amd64 wine-stable-i386 wine-stable winehq-stable p7zip-full; \
fi

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand Down
4 changes: 3 additions & 1 deletion contrib/build_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

set -ex

arch=`dpkg --print-architecture`

eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pip install -U pip
Expand Down Expand Up @@ -40,7 +42,7 @@ OS=`uname | tr '[:upper:]' '[:lower:]'`
if [[ $OS == "darwin" ]]; then
OS="mac"
fi
target_tarfile="hwi-${VERSION}-${OS}-amd64.tar.gz"
target_tarfile="hwi-${VERSION}-${OS}-${arch}.tar.gz"

if [[ $gui_support == "--with-gui" ]]; then
tar -czf $target_tarfile hwi hwi-qt
Expand Down
2 changes: 1 addition & 1 deletion hwi.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_libusb_path():
prefix = proc.communicate()[0].rstrip().decode()
return os.path.join(prefix, "lib", "libusb-1.0.dylib")
if platform.system() == "Linux":
for lib_dir in ["/lib/x86_64-linux-gnu", "/usr/lib64", "/lib64" "/usr/lib", "/lib"]:
for lib_dir in ["/lib/x86_64-linux-gnu", "/lib/aarch64-linux-gnu", "/usr/lib64", "/lib64" "/usr/lib", "/lib"]:
libusb_path = os.path.join(lib_dir, "libusb-1.0.so.0")
if os.path.exists(libusb_path):
return libusb_path
Expand Down

0 comments on commit bfd92b2

Please sign in to comment.