Repository navigation
Expand file tree
/
Copy pathDockerfile.mxe-arm64
More file actions
127 lines (117 loc) · 2.87 KB
/
Copy pathDockerfile.mxe-arm64
File metadata and controls
127 lines (117 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV MXE_PATH=/opt/armmxe
# --------------------
# Build arguments
# --------------------
ARG QT_VERSION=6.9.0
ARG QT_MODULE=qtbase
# --------------------
# 環境変数
# --------------------
ENV DEBIAN_FRONTEND=noninteractive
ENV QT6_SRC_DIR=/build/qt6
ENV QT6_DIR=/qt6
ENV QT6_ARM_PREFIX=/opt/qt6-arm
ENV QT6_HOST_PREFIX=/opt/qt6-host
ENV CMAKE_GENERATOR=Ninja
ENV CXXFLAGS="-fuse-ld=lld"
# 1. 必要なパッケージをインストール
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
unzip \
wget \
cmake \
python3 \
python3-pip \
ninja-build \
ccache \
clang lld llvm pkg-config mingw-w64 yasm nasm perl autoconf \
gperf \
libtool \
automake \
ca-certificates \
file \
pkg-config \
automake \
autoconf \
libtool \
gperf \
bison \
flex \
nasm \
yasm \
libglib2.0-dev \
libssl-dev \
libasound2-dev \
libx11-dev \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g++ \
gettext \
git \
gperf \
intltool \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libncurses5-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
lzip \
make \
ninja-build \
openssl \
p7zip-full \
patch \
perl \
ruby \
sed \
unzip \
wget \
xz-utils \
sudo \
libpulse-dev && \
sudo pip3 install meson && \
apt-get clean && \
which python3 && \
sudo ln -s /usr/bin/python3 /usr/bin/python && \
rm -rf /var/lib/apt/lists/*
# 2. MXE 非公式リポジトリをクローン
WORKDIR /opt
RUN git clone --depth=1 https://github.com/aarch64devel/mxe-STATIC ${MXE_PATH} && \
git clone --depth=1 https://github.com/mxe/mxe.git /opt/tmp && \
cp -r /opt/tmp /opt/armmxe && \
cd armmxe && \
mkdir usr
# mkdir usr && \
# git clone https://github.com/mxe/mxe.git && \
# git clone --depth=1 https://github.com/mxe/mxe.git ${MXE_PATH} && \
# git clone --depth=1 https://github.com/aarch64devel/mxe-STATIC /opt/tmp && \
# cp -r /opt/tmp /opt/armmxe
# 3. LLVM MinGW を取得・展開(armv7専用)
WORKDIR ${MXE_PATH}/usr
RUN wget https://github.com/armdevvel/llvm-mingw/releases/download/14.0/armv7-only-llvm-mingw-linux-x86_64.tar.xz && \
tar -xf armv7-only-llvm-mingw-linux-x86_64.tar.xz && \
rm armv7-only-llvm-mingw-linux-x86_64.tar.xz
# 4. PATH を設定
ENV PATH="${MXE_PATH}/usr/bin:$PATH"
# 5. ライブラリおよびQt/FFmpegのビルド
WORKDIR ${MXE_PATH}
RUN make MXE_TARGETS='aarch64-w64-mingw32' \
qtbase \
zlib \
-j$(nproc)
# 6. 確認(任意)
RUN armv7-w64-mingw32-clang --version && \
file ${MXE_PATH}/usr/bin/ffmpeg.exe || true && \
file ${MXE_PATH}/usr/armv7-w64-mingw32/bin/Qt*.dll || true
CMD ["/bin/bash"]