From: Alexandros Frantzis alexandros.frantzis@collabora.com
Add the initial driver stub for the Wayland driver and build it by default.
Signed-off-by: Alexandros Frantzis alexandros.frantzis@collabora.com --- configure | 22 +++++++++++++++++ configure.ac | 6 +++++ 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 7 files changed, 114 insertions(+) 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 80f0acd1f78..94512c2ac56 100755 --- a/configure +++ b/configure @@ -937,6 +937,7 @@ with_unwind with_usb with_v4l2 with_vulkan +with_wayland with_xcomposite with_xcursor with_xfixes @@ -1472,6 +1473,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 + --without-wayland do not build the Wayland driver --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 @@ -4386,6 +4389,13 @@ then : fi
+# Check whether --with-wayland was given. +if test ${with_wayland+y} +then : + withval=$with_wayland; +fi + + # Check whether --with-xcomposite was given. if test ${with_xcomposite+y} then : @@ -15541,6 +15551,17 @@ enable_winex11_drv=${enable_winex11_drv:-no} fi 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 @@ -21730,6 +21751,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 140f26aec16..b8b8ce32bf6 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,7 @@ 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([--without-wayland],[do not build the Wayland driver])) 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]), @@ -1335,6 +1336,10 @@ else [enable_winex11_drv]) 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 @@ -3138,6 +3143,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