Bonjour à tous,
Compiler WINE en 32/64bits avec support Vulkan et vkd3d et le patch pour désactiver la barre de tache Windows est un peu lourd.
J'ai donc travaillé sur le sujet.
Voilà mon fichier patch desktop.c.diff pour pouvoir désactiver la barre de tache (compatible WINE 3.21)
Je ne suis pas l'auteur du patch, j'ai juste adapté ce vieux patch à WINE 3.21 car il est pour moi indispensable à de nombreux jeux (ex. DOOM 2016)
--- desktop.c 2018-12-02 12:35:06.872071000 +0100
+++ desktop.c 2018-12-02 12:52:31.420488000 +0100
@@ -773,6 +773,31 @@
return result;
}
+static BOOL get_default_systray_state(void)
+{
+ static const WCHAR taskbarW[] = {'T','a','s','k','b','a','r',0};
+ static const WCHAR disabledW[] = {'d','i','s','a','b','l','e','d',0};
+ static const WCHAR desktop_keyW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
+ 'E','x','p','l','o','r','e','r','\\',
+ 'D','e','s','k','t','o','p','s',0};
+ HKEY hkey;
+ WCHAR buffer[64];
+ DWORD size = sizeof(buffer);
+ BOOL result = TRUE;
+
+ /* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */
+ if (!RegOpenKeyW( HKEY_CURRENT_USER, desktop_keyW, &hkey ))
+ {
+ /* Default enabled, except for when the taskbar value is disabled */
+ if (!RegQueryValueExW( hkey, taskbarW, 0, NULL, &buffer, &size )) {
+ result = (lstrcmpiW( buffer, disabledW ) != 0);
+ TRACE( "found key %s with value %s\n", debugstr_w(taskbarW), debugstr_w(buffer) );
+ }
+ RegCloseKey( hkey );
+ }
+ return result;
+}
+
static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid )
{
static const WCHAR device_keyW[] = {
@@ -922,6 +947,7 @@
const WCHAR *name = NULL;
BOOL enable_shell = FALSE;
void (WINAPI *pShellDDEInit)( BOOL ) = NULL;
+ BOOL enable_systray = TRUE;
/* get the rest of the command line (if any) */
while (*p && !is_whitespace(*p)) p++;
@@ -995,9 +1021,17 @@
{
HMODULE shell32;
- if (using_root) enable_shell = FALSE;
-
- initialize_systray( graphics_driver, using_root, enable_shell );
+ if (using_root)
+ {
+ enable_shell = FALSE;
+ initialize_systray( graphics_driver, using_root, enable_shell );
+ }
+ else
+ {
+ enable_systray=get_default_systray_state();
+ initialize_systray( graphics_driver, !enable_systray, enable_shell );
+ }
+
if (!using_root) initialize_launchers( hwnd );
if ((shell32 = LoadLibraryA( "shell32.dll" )) &&
Puis voilà mon script build-wine pour télécharger et compiler et installer WINE 3.21 automatiquement sous Ubuntu 18.04:
#!/bin/bash
#
# Author: Kirby_33
# Date: 2 dec 2018
#
# Build last WINE release from winehq.org
# Tested with WINE 3.21
#
# Vulkan and vkd3d-1.1 support
# Wine 32 and 64bits
# Include disable Taskbar patch from Robert Walker
# source: https://bugs.winehq.org/attachment.cgi?id=55024&action=diff
# This patch has been updated for WINE 3.21
#
# WINE will be installed to: $HOME/.PlayOnLinux/wine/linux-amd64/
#
# WINE 32bit is compiled in a LXC 32 bit sandbox container
#
GIT_FOLDER="mywine-git"
# LXC conf
BOXNAME="my32bitbox"
LXC_LINUX_OS="ubuntu"
LXC_LINUX_RELEASE="bionic"
CURRENT_DIR=$(pwd)
file="$CURRENT_DIR/desktop.c.diff"
if [ ! -e $file ]
then
echo "File (disable Taskbar patch) desktop.c.diff not found..."
exit 0
fi
folder="$HOME/$GIT_FOLDER"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/src"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
cd $HOME/$GIT_FOLDER
echo "#######################################################################################"
echo "# Install missing Ubuntu package"
echo "#######################################################################################"
echo " "
apt-get install git
apt-get build-dep wine
apt-get install -y lxc lxctl lxc-templates cmake gir1.2-gstreamer-0.10 python-software-properties git-core doxygen
apt-get install -y libsdl2-dev libkrb5-dev libpcap-dev libgstreamer-plugins-base1.0-dev libvulkan-dev libgstreamer0.10-dev libglib2.0-dev libxml2-dev libicu-dev libstdc++-5-dev libgcc-5-dev libubsan0 libcilkrts5 virtualbox-dkms virtualbox-source virtualbox-modules
apt-get install -y libglm-dev libxcb-dri3-0 libxcb-present0 libpciaccess0 libpng-dev libxcb-keysyms1-dev libxcb-dri3-dev libx11-dev libmirclient-dev libwayland-dev libxrandr-dev
if [ ! -e libhal1_0.5.14-8_i386.deb ]
then
wget http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_i386.deb
fi
if [ ! -e libhal-dev_0.5.14-8_i386.deb ]
then
wget http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal-dev_0.5.14-8_i386.deb
fi
if [ ! -e libhal1_0.5.14-8_amd64.deb ]
then
wget http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal1_0.5.14-8_amd64.deb
fi
if [ ! -e libhal-dev_0.5.14-8_amd64.deb ]
then
wget http://archive.ubuntu.com/ubuntu/pool/universe/h/hal/libhal-dev_0.5.14-8_amd64.deb
fi
dpkg -i libhal1_0.5.14-8_amd64.deb libhal-dev_0.5.14-8_amd64.deb
echo "#######################################################################################"
echo " "
echo " "
echo "#######################################################################################"
echo "# Compile VulkanSDK"
echo "#######################################################################################"
echo " "
echo "#######################################################################################"
echo "#Search release number from website https://vulkan.lunarg.com"
echo "#######################################################################################"
wget https://vulkan.lunarg.com/sdk/home
VKSDKVERSION=$(cat home | grep linux | head -n 1 | sed "s/\"/ /g" | awk '{print $3}')
if [ -e home ]
then
rm home
fi
folder="$HOME/$GIT_FOLDER/VulkanSDK"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
cd $HOME/$GIT_FOLDER/VulkanSDK
if [ ! -e vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz ]
then
wget https://sdk.lunarg.com/sdk/download/$VKSDKVERSION/linux/vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz?Human=true;u=
fi
if [ -e vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz?Human=true ]
then
mv vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz?Human=true vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz
fi
if [ -e vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz ]
then
tar xvzf vulkansdk-linux-x86_64-$VKSDKVERSION.tar.gz
cd $VKSDKVERSION
source setup-env.sh
./build_tools.sh
cd ../
fi
cd ../
if [ -e $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/GLSL.std.450.h ]
then
cp $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/GLSL.std.450.h /usr/include/vulkan/GLSL.std.450.h
fi
if [ -e $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/spirv.h ]
then
cp $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/spirv.h /usr/include/vulkan/spirv.h
fi
if [ -e $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/libspirv.h ]
then
cp $HOME/$GIT_FOLDER/VulkanSDK/$VKSDKVERSION/x86_64/include/vulkan/libspirv.h /usr/include/vulkan/libspirv.h
fi
echo "#######################################################################################"
echo " "
echo " "
echo "#######################################################################################"
echo "# Compile vkd3d"
echo "#######################################################################################"
echo " "
if [ ! -e vkd3d-1.1.tar.xz ]
then
wget https://dl.winehq.org/vkd3d/source/vkd3d-1.1.tar.xz
fi
if [ -e vkd3d-1.1.tar.xz ]
then
echo "Build vkd3d-1.1"
tar xf vkd3d-1.1.tar.xz
cd vkd3d-1.1
./configure
make install
else
echo "vkd3d-1.1.tar.xz not found!"
fi
echo " "
echo "#######################################################################################"
echo " "
echo " "
echo "#######################################################################################"
echo "# Delete old lxc container: $BOXNAME "
echo "#######################################################################################"
folder="/var/lib/lxc/$BOXNAME"
if [ -d "$folder" ]
then
lxc-stop -n $BOXNAME
lxc-destroy -n $BOXNAME
rm -r /var/lib/lxc/$BOXNAME
fi
echo " "
echo " "
echo "#######################################################################################"
echo "# Create new lxc container: $BOXNAME "
echo "#######################################################################################"
cd $HOME/$GIT_FOLDER/
echo "lxc-create -n $BOXNAME -t $LXC_LINUX_OS -- --bindhome $SUDO_USER -d $LXC_LINUX_OS -r $LXC_LINUX_RELEASE -a i386"
lxc-create -n $BOXNAME -t $LXC_LINUX_OS -- --bindhome $SUDO_USER -d $LXC_LINUX_OS -r $LXC_LINUX_RELEASE -a i386
cp -R /etc/apt /var/lib/lxc/$BOXNAME/rootfs/etc
folder="/var/lib/lxc/$BOXNAME/rootfs/home/$SUDO_USER"
if [ ! -d "$folder" ]
then
echo "mkdir /var/lib/lxc/$BOXNAME/rootfs/home/$SUDO_USER"
mkdir $folder
fi
TEST=$(cat /var/lib/lxc/$BOXNAME/config |grep lxc.mount.entry | grep bind | grep home)
if [ "$TEST" = "" ]
then
echo "Add mount /home/$SUDO_USER"
echo "lxc.mount.entry = /home/$SUDO_USER /var/lib/lxc/$BOXNAME/rootfs/home/$SUDO_USER none bind 0 0" >> /var/lib/lxc/$BOXNAME/config
fi
sleep 1
echo " "
echo " "
echo "#######################################################################################"
echo "# Start lxc container: $BOXNAME "
echo "#######################################################################################"
echo "lxc-start -n $BOXNAME"
lxc-start -n $BOXNAME
sleep 1
echo " "
echo "#######################################################################################"
echo " "
echo " "
echo "#######################################################################################"
echo "# Compile Wine 64bits"
echo "#######################################################################################"
WINE_SRC="$HOME/$GIT_FOLDER/src"
git clone git://source.winehq.org/git/wine.git $WINE_SRC
BUILD_WINE_VERSION=$(awk '{print $3}' $WINE_SRC/VERSION )
#===========================================================================================================
# Apply patch Taskbar
#===========================================================================================================
cp $CURRENT_DIR/desktop.c.diff $HOME/$GIT_FOLDER/src/programs/explorer/desktop.c.diff
cd $HOME/$GIT_FOLDER/src/programs/explorer/
if [ ! -e $HOME/$GIT_FOLDER/src/programs/explorer/desktop.c.ori ]
then
cp $HOME/$GIT_FOLDER/src/programs/explorer/desktop.c $HOME/$GIT_FOLDER/src/programs/explorer/desktop.c.ori
patch -i desktop.c.diff
fi
#===========================================================================================================
folder="$HOME/$GIT_FOLDER/wine"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/wine/$BUILD_WINE_VERSION"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/build32"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/build32/$BUILD_WINE_VERSION"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/build64"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/$GIT_FOLDER/build64/$BUILD_WINE_VERSION"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
WINE_DIR="$HOME/$GIT_FOLDER/wine/$BUILD_WINE_VERSION"
BUILD32="$HOME/$GIT_FOLDER/build32/$BUILD_WINE_VERSION"
BUILD64="$HOME/$GIT_FOLDER/build64/$BUILD_WINE_VERSION"
cd $BUILD64
$WINE_SRC/configure --enable-win64 --prefix=$WINE_DIR
make
make install
cd $HOME/$GIT_FOLDER/
echo " "
echo "#######################################################################################"
echo " "
echo " "
echo "#######################################################################################"
echo "# Compile Wine 32bits"
echo "#######################################################################################"
echo " "
echo "#######################################################################################"
echo "# Write build-lxc-32bits"
echo "#######################################################################################"
file="build-lxc-32bits"
echo "#!/bin/bash" > $file
echo "# Script execute from lxc $BOXNAME" >> $file
echo "GIT_FOLDER=\"mywine-git\"" >> $file
echo "WINE_SRC=\"\$HOME/\$GIT_FOLDER/src\"" >> $file
echo " " >> $file
echo "apt-get update" >> $file
echo "apt-get install -y git-core:i386" >> $file
echo "apt-get build-dep -y wine" >> $file
echo "apt-get install -y python-software-properties:i386" >> $file
echo "apt-get install -y libsdl2-dev:i386 libkrb5-dev:i386 libpcap-dev:i386 libgstreamer-plugins-base1.0-dev:i386 libvulkan-dev:i386 libgstreamer0.10-dev:i386 libglib2.0-dev:i386 libxml2-dev:i386 libicu-dev:i386 libstdc++-5-dev:i386 libgcc-5-dev:i386 libubsan0:i386 libcilkrts5:i386 virtualbox-dkms:i386 virtualbox-source:i386 virtualbox-modules:i386 " >> $file
echo "apt-get install -y libglm-dev:i386 libxcb-dri3-0:i386 libxcb-present0:i386 libpciaccess0:i386 libpng-dev:i386 libxcb-keysyms1-dev:i386 libxcb-dri3-dev:i386 libx11-dev:i386 libmirclient-dev:i386 libwayland-dev:i386 libxrandr-dev:i386 " >> $file
echo " " >> $file
echo "cd \$HOME " >> $file
echo "BUILD_WINE_VERSION=\$(awk '{print \$3}' \$WINE_SRC/VERSION )" >> $file
echo "WINE_DIR=\"\$HOME/\$GIT_FOLDER/wine/\$BUILD_WINE_VERSION\"" >> $file
echo "BUILD32=\"\$HOME/\$GIT_FOLDER/build32/\$BUILD_WINE_VERSION\"" >> $file
echo "BUILD64=\"\$HOME/\$GIT_FOLDER/build64/\$BUILD_WINE_VERSION\"" >> $file
echo "WINE_SRC=\"\$HOME/\$GIT_FOLDER/src\"" >> $file
echo "POL_WINE=\"\$HOME/.PlayOnLinux/wine/linux-amd64/\$BUILD_WINE_VERSION\"" >> $file
echo " " >> $file
echo "cd \$BUILD32 " >> $file
echo "\$WINE_SRC/configure --prefix=\$WINE_DIR" >> $file
echo "make " >> $file
echo "shutdown -h now" >> $file
chmod +x $file
sleep 2
echo "lxc-attach -n $BOXNAME -- ./build-lxc-32bits"
lxc-attach -n $BOXNAME -- ./build-lxc-32bits
cd $BUILD32
make install
echo " "
echo "#######################################################################################"
folder="$HOME/.PlayOnLinux"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/.PlayOnLinux/wine"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/.PlayOnLinux/wine/linux-amd64"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
folder="$HOME/.PlayOnLinux/wine/linux-amd64/$BUILD_WINE_VERSION-fix"
if [ ! -d "$folder" ]
then
mkdir $folder
fi
POL_WINE="$HOME/.PlayOnLinux/wine/linux-amd64/$BUILD_WINE_VERSION-fix"
chmod 777 $POL_WINE/
cp -r $BUILD32/* $POL_WINE/
cp -r $BUILD64/* $POL_WINE/
Il reste plus qu'à télécharger (ou copier/coller) ces 2 fichiers (desktop.c.diff et build-wine) dans votre dossier (ou sous dossier) $HOME.
Il est important que ce soit dans le dossier $HOME et pas ailleurs!! Car le container lxc 32bits utilisé n'a pas accès à tout les répertoires (sandbox) de votre pc.
Ensuite, il ne reste plus qu'à exécuter:
chmod +w build-wine
sudo ./build-wine
La compilation est longue... Le résultat de la compilation s'ajoute automatique à PlayOnLinux: ~/.PlayOnLinux/wine/linux-amd64/3.21-fix
J’espère que ce script aidera quelques personnes :cool:
Cordialement,
++