Module: wine Branch: master Commit: 34556854eda0de9d098968e8d948090d44030d25 URL: http://source.winehq.org/git/wine.git/?a=commit;h=34556854eda0de9d098968e8d9...
Author: Rob Shearman rob@codeweavers.com Date: Sat May 26 09:05:13 2007 +0100
setupapi: Add a FIXME in SetupCopyOEMInfW for when we should be copying a catalog file.
---
dlls/setupapi/misc.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 2a91b17..bc3e764 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -950,9 +950,12 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location, DWORD buffer_size, PDWORD required_size, PWSTR *component ) { BOOL ret = FALSE; - WCHAR target[MAX_PATH], *p; + WCHAR target[MAX_PATH], catalog_file[MAX_PATH], *p; static const WCHAR inf[] = { '\','i','n','f','\',0 }; + static const WCHAR wszVersion[] = { 'V','e','r','s','i','o','n',0 }; + static const WCHAR wszCatalogFile[] = { 'C','a','t','a','l','o','g','F','i','l','e',0 }; DWORD size; + HINF hinf;
TRACE("%s, %s, %d, %d, %p, %d, %p, %p\n", debugstr_w(source), debugstr_w(location), media_type, style, dest, buffer_size, required_size, component); @@ -1036,6 +1039,25 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location, } }
+ hinf = SetupOpenInfFileW( source, NULL, INF_STYLE_WIN4, NULL ); + if (hinf == INVALID_HANDLE_VALUE) return FALSE; + + if (SetupGetLineTextW( NULL, hinf, wszVersion, wszCatalogFile, catalog_file, + sizeof(catalog_file)/sizeof(catalog_file[0]), NULL )) + { + WCHAR source_cat[MAX_PATH]; + strcpyW( source_cat, source ); + + p = strrchrW( source_cat, '\' ); + if (p) p++; + else p = source_cat; + + strcpyW( p, catalog_file ); + + FIXME("install catalog file %s\n", debugstr_w( source_cat )); + } + SetupCloseInfFile( hinf ); + if (!(ret = CopyFileW( source, target, (style & SP_COPY_NOOVERWRITE) != 0 ))) return ret;