From: Alexandros Frantzis alexandros.frantzis@collabora.com
Add the initial driver stub for the Wayland driver and enable building it with the '--with-wayland' configure flag (building the driver is disabled by default).
Enable building the driver as part of gitlab CI.
Signed-off-by: Alexandros Frantzis alexandros.frantzis@collabora.com --- configure | 28 +++++++++++++++++++++ configure.ac | 11 +++++++++ dlls/winewayland.drv/Makefile.in | 6 +++++ dlls/winewayland.drv/dllmain.c | 30 +++++++++++++++++++++++ dlls/winewayland.drv/version.rc | 22 +++++++++++++++++ dlls/winewayland.drv/waylanddrv_dll.h | 28 +++++++++++++++++++++ dlls/winewayland.drv/winewayland.drv.spec | 0 tools/gitlab/build-linux | 4 +-- 8 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 dlls/winewayland.drv/Makefile.in create mode 100644 dlls/winewayland.drv/dllmain.c create mode 100644 dlls/winewayland.drv/version.rc create mode 100644 dlls/winewayland.drv/waylanddrv_dll.h create mode 100644 dlls/winewayland.drv/winewayland.drv.spec
diff --git a/configure b/configure index 922b3a3640e..83231b1c52b 100755 --- a/configure +++ b/configure @@ -939,6 +939,7 @@ with_unwind with_usb with_v4l2 with_vulkan +with_wayland with_xcomposite with_xcursor with_xfixes @@ -1474,6 +1475,7 @@ enable_wineps_drv enable_winepulse_drv enable_wineusb_sys enable_winevulkan +enable_winewayland_drv enable_winex11_drv enable_winexinput_sys enable_wing32 @@ -2458,6 +2460,7 @@ Optional Packages: --without-usb do not use the libusb library --without-v4l2 do not use v4l2 (video capture) --without-vulkan do not use Vulkan + --with-wayland build with wayland support --without-xcomposite do not use the Xcomposite extension --without-xcursor do not use the Xcursor extension --without-xfixes do not use Xfixes for clipboard change notifications @@ -4381,6 +4384,15 @@ then : fi
+# Check whether --with-wayland was given. +if test ${with_wayland+y} +then : + withval=$with_wayland; +else $as_nop + with_wayland=no +fi + + # Check whether --with-xcomposite was given. if test ${with_xcomposite+y} then : @@ -15661,6 +15673,21 @@ enable_winex11_drv=${enable_winex11_drv:-no} fi fi
+if test "x$with_wayland" = "xno" +then + enable_winewayland_drv=no +fi +if false +then : + case "x$with_wayland" in + x) as_fn_append wine_notices "|Wayland ${notice_platform}development files not found, the Wayland driver won't be supported." ;; + xno) ;; + *) as_fn_error $? "Wayland ${notice_platform}development files not found, the Wayland driver won't be supported. +This is an error since --with-wayland was requested." "$LINENO" 5 ;; +esac +enable_winewayland_drv=${enable_winewayland_drv:-no} +fi + if test "$ac_cv_header_CL_cl_h" = "yes" then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clGetPlatformInfo in -lOpenCL" >&5 @@ -21850,6 +21877,7 @@ wine_fn_config_makefile dlls/wineps16.drv16 enable_win16 wine_fn_config_makefile dlls/winepulse.drv enable_winepulse_drv wine_fn_config_makefile dlls/wineusb.sys enable_wineusb_sys wine_fn_config_makefile dlls/winevulkan enable_winevulkan +wine_fn_config_makefile dlls/winewayland.drv enable_winewayland_drv wine_fn_config_makefile dlls/winex11.drv enable_winex11_drv wine_fn_config_makefile dlls/winexinput.sys enable_winexinput_sys wine_fn_config_makefile dlls/wing.dll16 enable_win16 diff --git a/configure.ac b/configure.ac index 16bada50512..29ec91b93f2 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,8 @@ AC_ARG_WITH(unwind, AS_HELP_STRING([--without-unwind],[do not use the libunwi AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb library])) AC_ARG_WITH(v4l2, AS_HELP_STRING([--without-v4l2],[do not use v4l2 (video capture)])) AC_ARG_WITH(vulkan, AS_HELP_STRING([--without-vulkan],[do not use Vulkan])) +AC_ARG_WITH(wayland, AS_HELP_STRING([--with-wayland],[build with wayland support]), + [], [with_wayland=no]) AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]), [if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi]) AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]), @@ -1360,6 +1362,14 @@ else [enable_winex11_drv]) fi
+if test "x$with_wayland" = "xno" +then + enable_winewayland_drv=no +fi +WINE_NOTICE_WITH(wayland, [false], + [Wayland ${notice_platform}development files not found, the Wayland driver won't be supported.], + [enable_winewayland_drv]) + dnl **** Check for OpenCL **** if test "$ac_cv_header_CL_cl_h" = "yes" then @@ -3163,6 +3173,7 @@ WINE_CONFIG_MAKEFILE(dlls/wineps16.drv16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/winepulse.drv) WINE_CONFIG_MAKEFILE(dlls/wineusb.sys) WINE_CONFIG_MAKEFILE(dlls/winevulkan) +WINE_CONFIG_MAKEFILE(dlls/winewayland.drv) WINE_CONFIG_MAKEFILE(dlls/winex11.drv) WINE_CONFIG_MAKEFILE(dlls/winexinput.sys) WINE_CONFIG_MAKEFILE(dlls/wing.dll16,enable_win16) diff --git a/dlls/winewayland.drv/Makefile.in b/dlls/winewayland.drv/Makefile.in new file mode 100644 index 00000000000..713b281b1bd --- /dev/null +++ b/dlls/winewayland.drv/Makefile.in @@ -0,0 +1,6 @@ +MODULE = winewayland.drv + +C_SRCS = \ + dllmain.c \ + +RC_SRCS = version.rc diff --git a/dlls/winewayland.drv/dllmain.c b/dlls/winewayland.drv/dllmain.c new file mode 100644 index 00000000000..7ab3341e61d --- /dev/null +++ b/dlls/winewayland.drv/dllmain.c @@ -0,0 +1,30 @@ +/* + * winewayland.drv entry points + * + * Copyright 2022 Alexandros Frantzis for Collabora Ltd + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "waylanddrv_dll.h" + +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) +{ + if (reason != DLL_PROCESS_ATTACH) return TRUE; + + DisableThreadLibraryCalls(instance); + + return TRUE; +} diff --git a/dlls/winewayland.drv/version.rc b/dlls/winewayland.drv/version.rc new file mode 100644 index 00000000000..2d99c24f99c --- /dev/null +++ b/dlls/winewayland.drv/version.rc @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020 Alexandros Frantzis for Collabora Ltd + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine Wayland driver" +#define WINE_FILENAME_STR "winewayland.drv" + +#include "wine/wine_common_ver.rc" diff --git a/dlls/winewayland.drv/waylanddrv_dll.h b/dlls/winewayland.drv/waylanddrv_dll.h new file mode 100644 index 00000000000..556898d44b2 --- /dev/null +++ b/dlls/winewayland.drv/waylanddrv_dll.h @@ -0,0 +1,28 @@ +/* + * Wayland driver DLL definitions + * + * Copyright 2022 Alexandros Frantzis for Collabora Ltd + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WAYLANDDRV_DLL_H +#define __WINE_WAYLANDDRV_DLL_H + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" + +#endif /* __WINE_WAYLANDDRV_DLL_H */ diff --git a/dlls/winewayland.drv/winewayland.drv.spec b/dlls/winewayland.drv/winewayland.drv.spec new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tools/gitlab/build-linux b/tools/gitlab/build-linux index d77ca9cdb8e..dbb2986be1b 100755 --- a/tools/gitlab/build-linux +++ b/tools/gitlab/build-linux @@ -10,12 +10,12 @@ set -Eeuxo pipefail autoreconf -f
cd build64 -../configure -q -C --enable-win64 --enable-werror --with-mingw +../configure -q -C --enable-win64 --enable-werror --with-mingw --with-wayland make -s -j$(nproc) cd ..
cd build32 -../configure -q -C --enable-werror --with-mingw +../configure -q -C --enable-werror --with-mingw --with-wayland make -s -j$(nproc) cd ..