Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for arm64 on amd64 #1

Closed
wants to merge 1 commit into from
Closed
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
20 changes: 10 additions & 10 deletions contrib/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ 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 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

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand Down
15 changes: 9 additions & 6 deletions contrib/build_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ pip install -U pip
pip install poetry

# Setup poetry and install the dependencies
poetry install -E qt
#poetry install -E qt
poetry install

# We also need to change the timestamps of all of the base library files
lib_dir=`pyenv root`/versions/3.9.7/lib/python3.9
Expand All @@ -18,8 +19,8 @@ TZ=UTC find ${lib_dir} -name '*.py' -type f -execdir touch -t "201901010000.00"
# Make the standalone binary
export PYTHONHASHSEED=42
poetry run pyinstaller hwi.spec
poetry run contrib/generate-ui.sh
poetry run pyinstaller hwi-qt.spec
#poetry run contrib/generate-ui.sh
#poetry run pyinstaller hwi-qt.spec
unset PYTHONHASHSEED

# Make the final compressed package
Expand All @@ -29,13 +30,15 @@ OS=`uname | tr '[:upper:]' '[:lower:]'`
if [[ $OS == "darwin" ]]; then
OS="mac"
fi
target_tarfile="hwi-${VERSION}-${OS}-amd64.tar.gz"
tar -czf $target_tarfile hwi hwi-qt

arch=`dpkg --print-architecture`
target_tarfile="hwi-${VERSION}-${OS}-${arch}.tar.gz"
tar -czf $target_tarfile hwi # hwi-qt

# Copy the binaries to subdir for shasum
target_dir="$target_tarfile.dir"
mkdir $target_dir
mv hwi $target_dir
mv hwi-qt $target_dir
# mv hwi-qt $target_dir

popd
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