Module: wine Branch: master Commit: 2ebb30633eb521af178e69d00a95e4e43b80527a URL: http://source.winehq.org/git/wine.git/?a=commit;h=2ebb30633eb521af178e69d00a...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Aug 25 15:34:02 2011 +0200
comctl32: Create the WinSxS manifest from a resource.
---
dlls/comctl32/comctl32.manifest | 34 ++++++++++++++ dlls/comctl32/comctl32.rc | 3 + dlls/comctl32/commctrl.c | 92 --------------------------------------- tools/wine.inf.in | 1 - 4 files changed, 37 insertions(+), 93 deletions(-)
diff --git a/dlls/comctl32/comctl32.manifest b/dlls/comctl32/comctl32.manifest new file mode 100644 index 0000000..4c86137 --- /dev/null +++ b/dlls/comctl32/comctl32.manifest @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.2600.2982" processorArchitecture="" publicKeyToken="6595b64144ccf1df"/> + <file name="comctl32.dll"> + <windowClass>Button</windowClass> + <windowClass>ButtonListBox</windowClass> + <windowClass>ComboBoxEx32</windowClass> + <windowClass>ComboLBox</windowClass> + <windowClass>Combobox</windowClass> + <windowClass>Edit</windowClass> + <windowClass>Listbox</windowClass> + <windowClass>NativeFontCtl</windowClass> + <windowClass>ReBarWindow32</windowClass> + <windowClass>ScrollBar</windowClass> + <windowClass>Static</windowClass> + <windowClass>SysAnimate32</windowClass> + <windowClass>SysDateTimePick32</windowClass> + <windowClass>SysHeader32</windowClass> + <windowClass>SysIPAddress32</windowClass> + <windowClass>SysLink</windowClass> + <windowClass>SysListView32</windowClass> + <windowClass>SysMonthCal32</windowClass> + <windowClass>SysPager</windowClass> + <windowClass>SysTabControl32</windowClass> + <windowClass>SysTreeView32</windowClass> + <windowClass>ToolbarWindow32</windowClass> + <windowClass>msctls_hotkey32</windowClass> + <windowClass>msctls_progress32</windowClass> + <windowClass>msctls_statusbar32</windowClass> + <windowClass>msctls_trackbar32</windowClass> + <windowClass>msctls_updown32</windowClass> + <windowClass>tooltips_class32</windowClass> + </file> +</assembly> diff --git a/dlls/comctl32/comctl32.rc b/dlls/comctl32/comctl32.rc index a525111..7f3d178 100644 --- a/dlls/comctl32/comctl32.rc +++ b/dlls/comctl32/comctl32.rc @@ -55,6 +55,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc"
+/* @makedep: comctl32.manifest */ +WINE_MANIFEST RT_MANIFEST comctl32.manifest + /* @makedep: idt_check.bmp */ IDT_CHECK BITMAP idt_check.bmp
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 38cadad..76ab3a1 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -72,57 +72,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
-#define NAME "microsoft.windows.common-controls" -#define FILE "comctl32.dll" -#define VERSION "6.0.2600.2982" -#define PUBLIC_KEY "6595b64144ccf1df" - -#ifdef __i386__ -#define ARCH "x86" -#elif defined __x86_64__ -#define ARCH "amd64" -#else -#define ARCH "none" -#endif - -static const char manifest[] = - "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" - "<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\n" - " <assemblyIdentity type="win32" name="" NAME "" version="" VERSION "" processorArchitecture="" ARCH "" publicKeyToken="" PUBLIC_KEY ""/>\n" - " <file name="" FILE "">\n" - " <windowClass>Button</windowClass>\n" - " <windowClass>ButtonListBox</windowClass>\n" - " <windowClass>ComboBoxEx32</windowClass>\n" - " <windowClass>ComboLBox</windowClass>\n" - " <windowClass>Combobox</windowClass>\n" - " <windowClass>Edit</windowClass>\n" - " <windowClass>Listbox</windowClass>\n" - " <windowClass>NativeFontCtl</windowClass>\n" - " <windowClass>ReBarWindow32</windowClass>\n" - " <windowClass>ScrollBar</windowClass>\n" - " <windowClass>Static</windowClass>\n" - " <windowClass>SysAnimate32</windowClass>\n" - " <windowClass>SysDateTimePick32</windowClass>\n" - " <windowClass>SysHeader32</windowClass>\n" - " <windowClass>SysIPAddress32</windowClass>\n" - " <windowClass>SysLink</windowClass>\n" - " <windowClass>SysListView32</windowClass>\n" - " <windowClass>SysMonthCal32</windowClass>\n" - " <windowClass>SysPager</windowClass>\n" - " <windowClass>SysTabControl32</windowClass>\n" - " <windowClass>SysTreeView32</windowClass>\n" - " <windowClass>ToolbarWindow32</windowClass>\n" - " <windowClass>msctls_hotkey32</windowClass>\n" - " <windowClass>msctls_progress32</windowClass>\n" - " <windowClass>msctls_statusbar32</windowClass>\n" - " <windowClass>msctls_trackbar32</windowClass>\n" - " <windowClass>msctls_updown32</windowClass>\n" - " <windowClass>tooltips_class32</windowClass>\n" - " </file>\n" - "</assembly>\n"; - -static const char manifest_filename[] = ARCH "_" NAME "_" PUBLIC_KEY "_" VERSION "_none_deadbeef.manifest"; - static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static LPWSTR COMCTL32_wSubclass = NULL; @@ -143,46 +92,6 @@ static const WCHAR strCC32SubclassInfo[] = { 'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0 };
-static BOOL create_manifest( BOOL install ) -{ - static const WCHAR winsxsW[] = {'\','w','i','n','s','x','s',0}; - static const WCHAR manifestsW[] = {'\','m','a','n','i','f','e','s','t','s','\',0}; - - DWORD len, written; - WCHAR *buffer; - HANDLE file; - BOOL ret = FALSE; - - len = MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), NULL, 0 ); - len += GetWindowsDirectoryW( NULL, 0 ); - len += lstrlenW(winsxsW); - len += lstrlenW(manifestsW); - if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE; - GetWindowsDirectoryW( buffer, len ); - lstrcatW( buffer, winsxsW ); - CreateDirectoryW( buffer, NULL ); - lstrcatW( buffer, manifestsW ); - CreateDirectoryW( buffer, NULL ); - MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), - buffer + lstrlenW(buffer), len ); - if (install) - { - file = CreateFileW( buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL ); - if (file != INVALID_HANDLE_VALUE) - { - ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) && - written == sizeof(manifest)-1); - CloseHandle( file ); - if (!ret) DeleteFileW( buffer ); - else TRACE("created %s\n", debugstr_w(buffer)); - } - } - else ret = DeleteFileW( buffer ); - - HeapFree( GetProcessHeap(), 0, buffer ); - return ret; -} -
/*********************************************************************** * DllMain [Internal] @@ -1018,7 +927,6 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi) HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) { TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline)); - if (!create_manifest( bInstall )) return HRESULT_FROM_WIN32(GetLastError()); return S_OK; }
diff --git a/tools/wine.inf.in b/tools/wine.inf.in index af19c90..cd5e0e8 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2501,7 +2501,6 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,shell32.dll,1 11,,quartz.dll,1
-11,,comctl32.dll,2 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,devenum.dll,1