whatshotWine的编译依赖

@Ta 03-12 10:27发布,03-20 16:26修改 1495点击

安装编译工具链

Ubuntu 22.04 执行

sudo apt install \
git \
cmake \
ninja-build \
pkg-config \
ccache \
clang \
llvm \
lld \
binfmt-support \
libsdl2-dev \
libepoxy-dev \
libssl-dev \
python-setuptools \
gcc-x86-64-linux-gnu \
g++-x86-64-linux-gnu \
libgcc-11-dev-i386-cross \
libgcc-11-dev-amd64-cross \
nasm \
python3-clang \
libstdc++-10-dev-i386-cross \
libstdc++-10-dev-amd64-cross \
libstdc++-10-dev-arm64-cross \
squashfs-tools \
squashfuse \
libc-bin \
libc6-dev-i386-amd64-cross \
lib32stdc++-11-dev-amd64-cross

Ubuntu 18.04 执行

sudo apt install \
git \
cmake \
ninja-build \
pkg-config \
ccache \
clang \
llvm \
lld \
binfmt-support \
libsdl2-dev \
libepoxy-dev \
libssl-dev \
python-setuptools \
gcc \
g++ \
libgcc-8-dev-i386-cross \
libgcc-8-dev-amd64-cross \
nasm \
libstdc++-8-dev-i386-cross \
libstdc++-8-dev-amd64-cross \
libstdc++-8-dev-arm64-cross \
squashfs-tools \
squashfuse \
libc-bin \
libc6-dev-i386-amd64-cross \
lib32stdc++-8-dev-amd64-cross

安装Wine的依赖(所有发行版执行)

如果某些包找不到,从命令里删除这一行即可,注意换行也要删掉,不能有多余的空行。命令结尾如果是\,要连续按两次回车。

sudo apt install \
libsdl2-dev \
libudev-dev \
libdbus-1-dev \
libxcomposite-dev \
libcups2-dev \
libopenal-dev \
libsane-dev \
libcapi20-dev \
flex \
bison \
libfreetype6-dev \
libxcursor-dev \
libxxf86vm-dev \
libdbus-1-dev \
libgphoto2-dev \
libxcomposite-dev \
liblcms2-dev \
libpulse-dev \
libgstreamer-plugins-base1.0-dev \
libudev-dev \
libunwind-dev \
libsdl2-dev \
libosmesa6-dev \
libcapi20-dev \
libcups2-dev \
libfontconfig1-dev \
libgsm1-dev \
libkrb5-dev \
libjxr-dev \
libmpg123-dev \
libopenal-dev \
libldap2-dev \
libxml2-dev \
libxslt1-dev \
libgnutls28-dev \
libvulkan-dev \
libpcap0.8-dev \
libsane-dev \
libvulkan-dev \
unixodbc-dev \
samba-libs \
samba-dev \
ocl-icd-opencl-dev \
libpcsclite-dev \
libusb-1.0-0-dev \
libv4l-dev \
oss4-dev

llvm-mingw(所有发行版执行)

llvm-mingw用于编译Wine的PE DLL,可从github下载:

https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64.tar.xz

解压后将路径加到PATH和LD_LIBRARY_PATH中,如:

tar xf llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64.tar.xz

export LD_LIBRARY_PATH=$PWD/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64/lib

export PATH=$PWD/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64/bin:$PATH

其中$PWD表示当前目录,如果你的llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64目录已经解压出来了,可以先cd到解压出来的llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64文件夹的父目录再执行上述export命令,无需再执行tar命令解压。

图片.png(119.66 KB)

编译命令(在执行过上述export命令的终端继续执行)

# 假设 ./wine 是 wine的源代码
cd ./wine
mkdir build
cd build

export CC=clang
export CXX=clang++

../configure --enable-win64 --disable-tests --with-mingw --enable-archs=i386,x86_64 --prefix=$PWD/wine-x32x64

make -j$(nproc)
make install -j
回复列表(0|隐藏机器人聊天)
帖子没有回复
添加新回复
回复需要登录