From ea6e0489179e9c6d187f9539e4f7542226e8540a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 31 Jul 2011 06:16:59 -0700 Subject: [PATCH] Add the class resources for Wine-based builds --- CMakeLists.txt | 8 +++++-- dsound_classes.idl | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ version.rc | 12 ++++++----- 3 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 dsound_classes.idl diff --git a/CMakeLists.txt b/CMakeLists.txt index c4cfca2..9ba5aa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,15 +89,19 @@ else() WORKING_DIRECTORY "${DSOAL_BINARY_DIR}" COMMENT "Generating version.res" VERBATIM) add_custom_command(TARGET ${LIBNAME} POST_BUILD + COMMAND widl -D__WINESRC__ "-I${DSOAL_BINARY_DIR}" "-I${WINE_DIR}/include/wine" "-I${WINE_DIR}/include/wine/windows" -r -o "${LIBNAME}_classes_r.res" "${DSOAL_SOURCE_DIR}/${LIBNAME}_classes.idl" + WORKING_DIRECTORY "${DSOAL_BINARY_DIR}" + COMMENT "Generating ${LIBNAME}_classes_r.res" VERBATIM) + add_custom_command(TARGET ${LIBNAME} POST_BUILD COMMAND winebuild -w --def -o lib${LIBNAME}.def --export ${DSOAL_SOURCE_DIR}/${LIBNAME}.spec WORKING_DIRECTORY "${DSOAL_BINARY_DIR}" COMMENT "Generating lib${LIBNAME}.def" VERBATIM) add_custom_command(TARGET ${LIBNAME} POST_BUILD - COMMAND winegcc -shared "${DSOAL_SOURCE_DIR}/${LIBNAME}.spec" version.res -o "${DSOAL_BINARY_DIR}/${LIBNAME}.dll.so" "lib${LIBNAME}.a" -lopenal -ldxguid -luuid -lwinmm -lole32 -ldxerr8 + COMMAND winegcc -shared "${DSOAL_SOURCE_DIR}/${LIBNAME}.spec" "${LIBNAME}_classes_r.res" version.res -o "${DSOAL_BINARY_DIR}/${LIBNAME}.dll.so" "lib${LIBNAME}.a" -lopenal -ldxguid -luuid -lwinmm -lole32 -ldxerr8 WORKING_DIRECTORY "${DSOAL_BINARY_DIR}" COMMENT "Linking Wine shared library ${LIBNAME}.dll.so" VERBATIM) add_custom_command(TARGET ${LIBNAME} POST_BUILD - COMMAND winegcc -shared "${DSOAL_SOURCE_DIR}/${LIBNAME}.spec" version.res -o "${DSOAL_BINARY_DIR}/${LIBNAME}.dll.fake" "lib${LIBNAME}.a" -lopenal -ldxguid -luuid -lwinmm -lole32 -ldxerr8 + COMMAND winegcc -shared "${DSOAL_SOURCE_DIR}/${LIBNAME}.spec" "${LIBNAME}_classes_r.res" version.res -o "${DSOAL_BINARY_DIR}/${LIBNAME}.dll.fake" "lib${LIBNAME}.a" -lopenal -ldxguid -luuid -lwinmm -lole32 -ldxerr8 WORKING_DIRECTORY "${DSOAL_BINARY_DIR}" COMMENT "Creating ${LIBNAME}.dll.fake" VERBATIM) diff --git a/dsound_classes.idl b/dsound_classes.idl new file mode 100644 index 0000000..c47db21 --- /dev/null +++ b/dsound_classes.idl @@ -0,0 +1,61 @@ +/* + * COM Classes for dsound + * + * Copyright 2010 Alexandre Julliard + * + * 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 + */ + +[ + helpstring("DirectSound Object"), + threading(both), + uuid(47d4d946-62e8-11cf-93bc-444553540000) +] +coclass DirectSound { interface IDirectSound; } + +[ + helpstring("DirectSound 8.0 Object"), + threading(both), + uuid(3901cc3f-84b5-4fa4-ba35-aa8172b8a09b) +] +coclass DirectSound8 { interface IDirectSound8; } + +[ + helpstring("DirectSoundBufferConfig Object"), + threading(both), + uuid(b2f586d4-5558-49d1-a07b-3249dbbb33c2) +] +coclass DirectSoundBufferConfig { interface IDirectSoundBufferConfig; } + +[ + helpstring("DirectSoundCapture Object"), + threading(both), + uuid(b0210780-89cd-11d0-af08-00a0c925cd16) +] +coclass DirectSoundCapture { interface IDirectSoundCapture; } + +[ + helpstring("DirectSoundCapture 8.0 Object"), + threading(both), + uuid(e4bcac13-7f99-4908-9a8e-74e3bf24b6e1) +] +coclass DirectSoundCapture8 { interface IDirectSoundCapture8; } + +[ + helpstring("DirectSoundFullDuplex Object"), + threading(both), + uuid(fea4300c-7959-4147-b26a-2377b9e7a91d) +] +coclass DirectSoundFullDuplex { interface IDirectSoundFullDuplex; } diff --git a/version.rc b/version.rc index 281624d..ca706cd 100644 --- a/version.rc +++ b/version.rc @@ -16,13 +16,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_OLESELFREGISTER #define WINE_FILEDESCRIPTION_STR "Wine DirectSound" #define WINE_FILENAME_STR "dsound.dll" #define WINE_FILEVERSION 5,3,1,904 #define WINE_FILEVERSION_STR "5.3.1.904" #define WINE_PRODUCTVERSION 5,3,1,904 #define WINE_PRODUCTVERSION_STR "5.3.1.904" +#define WINE_EXTRAVALUES VALUE "OLESelfRegister","" /* * Copyright 2001 Dmitry Timoshkov @@ -113,6 +113,10 @@ never complain. #define WINE_PRODUCTNAME_STR "Wine" #endif +#ifndef WINE_EXTRAVALUES +#define WINE_EXTRAVALUES +#endif + VS_VERSION_INFO VERSIONINFO FILEVERSION WINE_FILEVERSION PRODUCTVERSION WINE_PRODUCTVERSION @@ -130,13 +134,11 @@ FILESUBTYPE WINE_FILESUBTYPE VALUE "FileDescription", WINE_FILEDESCRIPTION_STR VALUE "FileVersion", WINE_FILEVERSION_STR VALUE "InternalName", WINE_FILENAME - VALUE "LegalCopyright", "Copyright (c) 1993-2009 the Wine project authors (see the file AUTHORS for a complete list)" + VALUE "LegalCopyright", "Copyright (c) 1993-2011 the Wine project authors (see the file AUTHORS for a complete list)" VALUE "OriginalFilename", WINE_FILENAME_STR VALUE "ProductName", WINE_PRODUCTNAME_STR VALUE "ProductVersion", WINE_PRODUCTVERSION_STR -#ifdef WINE_OLESELFREGISTER - VALUE "OLESelfRegister", "" -#endif + WINE_EXTRAVALUES } } BLOCK "VarFileInfo" -- 2.11.4.GIT