在64位Debian中构建Wine的正确方法是什么?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在64位Debian中构建Wine的正确方法是什么?相关的知识,希望对你有一定的参考价值。
问)在64位Debian中构建Wine的正确方法是什么?什么是现代工具链以及如何实施以完成任务?而且..我如何将Wine Nine纳入包装?
人们多年来一直在问,即使可用的教程是最新的,它们也是不完整的,所以请在这个帖子上找到完整的答案!
答案
A)我会尝试自己的答案。随意回收它的一部分作为改进或更现代的答案的一部分!这最初是针对17.1,但之后添加了17.3更改。这些都来自零星的笔记/术语输出,所以这里肯定有更好的答案空间。事实上我觉得我在某个地方丢了一块!希望这可以帮助Debian爱好者吧!祝你好运!这肯定会破坏你的周末,并以极度失败告终,所以至少有期待!
Building Wine in Debian > 9
1) Setting up the Environment:
# Start by grabing some development tools and basic dependencies:
sudo apt-get install debhelper apt-utils binutils-multiarch-dev gcc-multilib pkg-config libtool-bin python-mako build-essential devscripts git git-buildpackage
sudo dpkg --add-architecture i386
sudo apt-get build-dep mesa
sudo apt-get build-dep wine
# And you could make git pretty like that one guy does, which debian probably did already:
git config --global color.ui auto
git config --global core.whitespace trailing-space,space-before-tab
# From: https://wiki.debian.org/PbuilderTricks https://wiki.ubuntu.com/PbuilderHowto
# http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.building.html
# Essentially we need to build some libraries then build against those libraries. Even with a true multiarch process in hand we'd be at the mercy of debian packaging, and DFSG policy is not for the faint of heart. At first gbp may seem like yet another tool but infact git-buildpackage is a wrapper that makes dealing with it all easier and solves that irritating little chroot problem for us. Mostly.
# First lets prep our 32bit chroot a bit:
ARCH=i386 git-pbuilder create
ARCH=i386 git-pbuilder login --save-after-login
# We need to build wine against mesa, so we start a private repo for when we've built it:
apt-get install nano apt-utils
nano /etc/apt/sources.list
# Example
deb http://mirrors.accretive-networks.net/debian/ sid main contrib
deb-src http://mirrors.accretive-networks.net/debian/ sid main contrib
# apt-ftparchive:
deb [trusted=yes] file:///home/user/pbuilder/deps ./
apt-get update
apt-get upgrade
apt-get dist-upgrade
# If it wasn't sid it is now. Oh yeah, dependencies:
sudo apt-get build-dep mesa
sudo apt-get build-dep wine
exit
# Now create that directory!
mkdir -p /home/user/pbuilder/deps
# You can do the same with amd64 but realy we only need it for wine64.. it simplifies cross building the wow64 stuff:
ARCH=amd64 git-pbuilder create
# Optional, just saves redownloading if your first build fails:
ARCH=amd64 git-pbuilder login --save-after-login
sudo apt-get build-dep wine
exit
# Install the private repo with a script, so you don't have to log in and do it by hand in the future (even more optional):
sudo mkdir -p /var/cache/pbuilder/hook.d
mkdir -p /home/doc/pbuilder/deps
# This doesn't work on drives using nodev, add 'dev' to defaults or remove for drives /etc/fstab entry
# Somebody should do something about that.
bash -c 'cat > /etc/pbuilderrc << EOF
# the file in /usr/share/pbuilder/pbuilderrc is the default template.
# /etc/pbuilderrc is the one meant for overwriting defaults read pbuilderrc.5
MIRRORSITE=http://mirrors.accretive-networks.net/debian/
OTHERMIRROR="deb [trusted=yes] file:///home/user/pbuilder/deps ./"
BINDMOUNTS="/home/user/pbuilder/deps"
# the hook dir may already be set/populated!
HOOKDIR="/var/cache/pbuilder/hook.d"
# this is necessary for running 'apt-ftp-archive' in the hook below
EXTRAPACKAGES="apt-utils"
EOF'
bash -c 'cat > /var/cache/pbuilder/hook.d/D01mesa << EOF
#!/bin/bash
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788580
# This fix didnt seem to work for test sys: mount -t devpts none /dev/pts
# Added dev to defaults on / and /opt in /etc/fstab, this is potentially a security issue but should be fine temporarily.
# Private Repo
(cd /home/user/pbuilder/deps; apt-ftparchive packages . > Packages)
# Add deps:
apt-get update
#apt-get install -f libegl1-mesa:i386=17.1.5-1 etc, etc,
#apt --fix-broken install
EOF'
# Create the empty list:
touch /home/user/pbuilder/deps/Packages
# updates chroots sources.list
sudo pbuilder --update --override-config --distribution sid
chmod u+x /home/user/pbuilder/D01deps
# The tutorial shows the actual editing of the appropriate debian/ directory. We supply those for the tutorial versions.
# If your version debian/ is older than source, you will need to remove the debian/patches it comes with.
# (i.e wget urltosome.deb; dpkg -x some.deb /some/where)
# We assume you will have them ready in /opt/src/debian-mesa and -wine/ so no git is provided here:
# Lets establish /opt/src as our working directory and populate our gits
mkdir -p /opt/src; cd /opt/src
# old: git clone http://copr-dist-git.fedorainfracloud.org/git/kkofler/qtwebengine/mesa.git mesa.nlp/
git clone git://anongit.freedesktop.org/mesa/mesa mesa.git/
git clone git://source.winehq.org/git/wine.git wine.git/
git clone --depth=1 https://github.com/wine-compholio/wine-staging.git wine-staging/
git clone --depth=1 https://github.com/sarnex/wine-d3d9-patches wine-d3d9/
# Go ahead and skip this bit if you plan to go straight to the Mesa 32bit build:
git clone --depth=1 git://anongit.freedesktop.org/mesa/drm libdrm/
git clone --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
# So thats most the downloading finished anyways!
2) Proper Kernel Config
# This next bit mostly from: https://people.freedesktop.org/~mslusarz/nouveau-wiki-dump/InstallDRM.html
# This kernel worked on the test system, but was not with out issues. Kernel config needs it own tutorial the minimum for nouveau is shown here:
cd /opt/src/linux-2.6
apt-get install xorg-dev kernel-package
# For nouveau:
git remote add nouveau git://anongit.freedesktop.org/nouveau/linux-2.6
git remote update
git checkout -b nouveau-master nouveau/master
# Otherwise -b master
# Ok to just hit enter for all the new stuff...
cp -i /boot/config-`uname -r` ./.config
make oldconfig
# ... because we are looking closer now
make xconfig # needs libqt4-dev or use menuconfig and libncurses5
# Nouveau sanity checks:
#scripts/config --enable CONFIG_FB
scripts/config --enable CONFIG_I2C
scripts/config --enable CONFIG_I2C_ALGOBIT
scripts/config --enable CONFIG_FRAMEBUFFER_CONSOLE
scripts/config --enable CONFIG_BACKLIGHT_LCD_SUPPORT
scripts/config --enable CONFIG_BACKLIGHT_CLASS_DEVICE
scripts/config --enable CONFIG_FB_CFB_FILLRECT
scripts/config --enable CONFIG_FB_CFB_COPYAREA
scripts/config --enable CONFIG_FB_CFB_IMAGEBLIT
scripts/config --enable CONFIG_VT_HW_CONSOLE_BINDING
# Avoid the following framebuffers: offb uvesafb nvidiafb rivafb nvidia
cat .config | grep NVIDIA
# (Outdated) If you need firmware:
# Download file from https://people.freedesktop.org/~pq/nouveau-drm/
# Or follow steps at https://people.freedesktop.org/~mslusarz/nouveau-wiki-dump/NVC0_Firmware.html
# Place in /lib/usr/nouveau
git merge origin
# The fun bit..
search "<<<" keep origin:
#sudo nano drivers/gpu/drm/nouveau/nouveau_fence.c
# OR
git checkout origin drivers/gpu/drm/nouveau/nouveau_fence.c
git add .
git commit
git merge origin
make-kpkg clean
fakeroot make-kpkg --initrd --revision=1.0.custom kernel_image
# To later update gits:
git remote update
git reset --hard nouveau/master
# Libdrm, for reference:
autoreconf -vfi
./configure --prefix=/usr/ --disable-intel --disable-vmwgfx --disable-radeon --enable-omap-experimental-api --enable-install-test-programs
sudo cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers
3) Build Mesa:
cd /opt/src/mesa.git
git checkout -b master origin/master
cp ../debian-mesa/ debian/ -R
# You can skip these edits if your using debian/ from tutorial or use your and edit:
echo "10" > debian/compat
# Be sure to use tabs not spaces and stay to format in:
nano debian/rules
# You should replace all gallium-llvm with -llvm, but it's not entirely needed.
# find: confflags +=
# add: --enable-nine
# replace: --disable-omx
# with: --disable-omx-bellagio
# replace: dh_install -a --fail-missing
# with: dh_install -a
echo "17.3.0" > VERSION
# You can follow the example以上是关于在64位Debian中构建Wine的正确方法是什么?的主要内容,如果未能解决你的问题,请参考以下文章
linux/Deepin /Debian 9 Stretch安装Wine
debian桌面环境下利用wine怎么运行exe?求详细图解
linux 64位下安装wine1.6 Windows模拟器(用来运行.exe文件) 编译安装32位wine