Skip to content

Commit fc5bc9d

Browse files
committed
Add support for arm64
1 parent 14f5134 commit fc5bc9d

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

contrib/build.Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@ ENV BUILD_DATE="Jan 1 2019"
4141
ENV BUILD_TIME="00:00:00"
4242
RUN eval "$(pyenv init --path)" && eval "$(pyenv virtualenv-init -)" && cat /opt/reproducible-python.diff | pyenv install -kp 3.9.7
4343

44-
RUN dpkg --add-architecture i386
45-
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
46-
RUN apt-key add winehq.key
47-
RUN echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list
48-
RUN apt-get update
49-
RUN apt-get install --install-recommends -y \
50-
wine-stable-amd64 \
51-
wine-stable-i386 \
52-
wine-stable \
53-
winehq-stable \
54-
p7zip-full
44+
RUN if [[ $(dpkg --print-architecture) == "amd64" ]]; then \
45+
dpkg --add-architecture i386; \
46+
wget -nc https://dl.winehq.org/wine-builds/winehq.key; \
47+
apt-key add winehq.key; \
48+
echo "deb https://dl.winehq.org/wine-builds/debian/ stretch main" >> /etc/apt/sources.list; \
49+
apt-get update; \
50+
apt-get install --install-recommends -y \
51+
wine-stable-amd64 \
52+
wine-stable-i386 \
53+
wine-stable \
54+
winehq-stable \
55+
p7zip-full; \
56+
fi
5557

5658
ENV LC_ALL=C.UTF-8
5759
ENV LANG=C.UTF-8

contrib/build_bin.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
set -ex
66

7+
arch=`dpkg --print-architecture`
8+
79
eval "$(pyenv init --path)"
810
eval "$(pyenv virtualenv-init -)"
911
pip install -U pip
@@ -40,7 +42,7 @@ OS=`uname | tr '[:upper:]' '[:lower:]'`
4042
if [[ $OS == "darwin" ]]; then
4143
OS="mac"
4244
fi
43-
target_tarfile="hwi-${VERSION}-${OS}-amd64.tar.gz"
45+
target_tarfile="hwi-${VERSION}-${OS}-${arch}.tar.gz"
4446

4547
if [[ $gui_support == "--with-gui" ]]; then
4648
tar -czf $target_tarfile hwi hwi-qt

hwi.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_libusb_path():
1313
prefix = proc.communicate()[0].rstrip().decode()
1414
return os.path.join(prefix, "lib", "libusb-1.0.dylib")
1515
if platform.system() == "Linux":
16-
for lib_dir in ["/lib/x86_64-linux-gnu", "/usr/lib64", "/lib64" "/usr/lib", "/lib"]:
16+
for lib_dir in ["/lib/x86_64-linux-gnu", "/lib/aarch64-linux-gnu", "/usr/lib64", "/lib64" "/usr/lib", "/lib"]:
1717
libusb_path = os.path.join(lib_dir, "libusb-1.0.so.0")
1818
if os.path.exists(libusb_path):
1919
return libusb_path

0 commit comments

Comments
 (0)