winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
999 discussions
Start a n
N
ew thread
Dmitry Timoshkov : mscms: Allow compilation without LCMS installed.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: b9bea18cfe7571f5074b3df7bea91317aa637ad1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9bea18cfe7571f5074b3df7b…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Feb 26 09:45:07 2008 +0800 mscms: Allow compilation without LCMS installed. --- dlls/mscms/transform.c | 116 +++++++++++++++++++++++------------------------ 1 files changed, 57 insertions(+), 59 deletions(-) diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index 13bc55a..ec33a10 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -34,6 +34,63 @@ WINE_DEFAULT_DEBUG_CHANNEL(mscms); +#ifdef HAVE_LCMS + +static DWORD from_profile( HPROFILE profile ) +{ + PROFILEHEADER header; + + GetColorProfileHeader( profile, &header ); + TRACE( "color space: 0x%08x %s\n", header.phDataColorSpace, MSCMS_dbgstr_tag( header.phDataColorSpace ) ); + + switch (header.phDataColorSpace) + { + case 0x434d594b: return TYPE_CMYK_16; /* 'CMYK' */ + case 0x47524159: return TYPE_GRAY_16; /* 'GRAY' */ + case 0x4c616220: return TYPE_Lab_16; /* 'Lab ' */ + case 0x52474220: return TYPE_RGB_16; /* 'RGB ' */ + case 0x58595a20: return TYPE_XYZ_16; /* 'XYZ ' */ + default: + WARN("unhandled format\n"); + return TYPE_RGB_16; + } +} + +static DWORD from_bmformat( BMFORMAT format ) +{ + TRACE( "bitmap format: 0x%08x\n", format ); + + switch (format) + { + case BM_RGBTRIPLETS: return TYPE_RGB_8; + case BM_BGRTRIPLETS: return TYPE_BGR_8; + case BM_GRAY: return TYPE_GRAY_8; + default: + FIXME("unhandled bitmap format\n"); + return TYPE_RGB_8; + } +} + +static DWORD from_type( COLORTYPE type ) +{ + TRACE( "color type: 0x%08x\n", type ); + + switch (type) + { + case COLOR_GRAY: return TYPE_GRAY_16; + case COLOR_RGB: return TYPE_RGB_16; + case COLOR_XYZ: return TYPE_XYZ_16; + case COLOR_Yxy: return TYPE_Yxy_16; + case COLOR_Lab: return TYPE_Lab_16; + case COLOR_CMYK: return TYPE_CMYK_16; + default: + FIXME("unhandled color type\n"); + return TYPE_RGB_16; + } +} + +#endif /* HAVE_LCMS */ + /****************************************************************************** * CreateColorTransformA [MSCMS.@] * @@ -58,28 +115,6 @@ HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest, return CreateColorTransformW( &spaceW, dest, target, flags ); } -static DWORD from_profile( HPROFILE profile ) -{ - PROFILEHEADER header; - - GetColorProfileHeader( profile, &header ); - TRACE( "color space: 0x%08x %s\n", header.phDataColorSpace, MSCMS_dbgstr_tag( header.phDataColorSpace ) ); - - switch (header.phDataColorSpace) - { - case 0x434d594b: return TYPE_CMYK_16; /* 'CMYK' */ - case 0x47524159: return TYPE_GRAY_16; /* 'GRAY' */ - case 0x4c616220: return TYPE_Lab_16; /* 'Lab ' */ - case 0x52474220: return TYPE_RGB_16; /* 'RGB ' */ - case 0x58595a20: return TYPE_XYZ_16; /* 'XYZ ' */ - default: - { - WARN("unhandled format\n"); - return TYPE_RGB_16; - } - } -} - /****************************************************************************** * CreateColorTransformW [MSCMS.@] * @@ -234,23 +269,6 @@ BOOL WINAPI DeleteColorTransform( HTRANSFORM transform ) return ret; } -static DWORD from_bmformat( BMFORMAT format ) -{ - TRACE( "bitmap format: 0x%08x\n", format ); - - switch (format) - { - case BM_RGBTRIPLETS: return TYPE_RGB_8; - case BM_BGRTRIPLETS: return TYPE_BGR_8; - case BM_GRAY: return TYPE_GRAY_8; - default: - { - FIXME("unhandled bitmap format\n"); - return TYPE_RGB_8; - } - } -} - /****************************************************************************** * TranslateBitmapBits [MSCMS.@] * @@ -295,26 +313,6 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT i return ret; } -static DWORD from_type( COLORTYPE type ) -{ - TRACE( "color type: 0x%08x\n", type ); - - switch (type) - { - case COLOR_GRAY: return TYPE_GRAY_16; - case COLOR_RGB: return TYPE_RGB_16; - case COLOR_XYZ: return TYPE_XYZ_16; - case COLOR_Yxy: return TYPE_Yxy_16; - case COLOR_Lab: return TYPE_Lab_16; - case COLOR_CMYK: return TYPE_CMYK_16; - default: - { - FIXME("unhandled color type\n"); - return TYPE_RGB_16; - } - } -} - /****************************************************************************** * TranslateColors [MSCMS.@] *
1
0
0
0
James Hawkins : msi: Search existing published sources if the media cannot be found.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: bdbb7a0348c558c4ecd93f089aacf3b335d8f9d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdbb7a0348c558c4ecd93f089…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:55:56 2008 -0600 msi: Search existing published sources if the media cannot be found. --- dlls/msi/files.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 50 insertions(+), 2 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 2b8ae6f..33a3a5a 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -589,6 +589,49 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf return ERROR_SUCCESS; } +/* FIXME: search NETWORK and URL sources as well */ +static UINT find_published_source(MSIPACKAGE *package, struct media_info *mi) +{ + WCHAR source[MAX_PATH]; + WCHAR volume[MAX_PATH]; + WCHAR prompt[MAX_PATH]; + DWORD volumesz, promptsz; + DWORD index, size; + WORD id; + UINT r; + + r = MsiSourceListGetInfoW(package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + INSTALLPROPERTY_LASTUSEDSOURCEW, source, &size); + if (r != ERROR_SUCCESS) + return r; + + index = 0; + volumesz = MAX_PATH; + promptsz = MAX_PATH; + while (MsiSourceListEnumMediaDisksW(package->ProductCode, NULL, + MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT, index++, &id, + volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS) + { + mi->disk_id = id; + mi->volume_label = msi_realloc(mi->volume_label, ++volumesz * sizeof(WCHAR)); + lstrcpyW(mi->volume_label, volume); + mi->disk_prompt = msi_realloc(mi->disk_prompt, ++promptsz * sizeof(WCHAR)); + lstrcpyW(mi->disk_prompt, prompt); + + if (source_matches_volume(mi, source)) + { + /* FIXME: what about SourceDir */ + lstrcpyW(mi->source, source); + lstrcatW(mi->source, mi->cabinet); + return ERROR_SUCCESS; + } + } + + return ERROR_FUNCTION_FAILED; +} + static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *mi) { UINT rc = ERROR_SUCCESS; @@ -641,8 +684,13 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m if (file->IsCompressed && GetFileAttributesW(mi->source) == INVALID_FILE_ATTRIBUTES) { - ERR("Cabinet not found: %s\n", debugstr_w(mi->source)); - return ERROR_INSTALL_FAILURE; + /* FIXME: this might be done earlier in the install process */ + rc = find_published_source(package, mi); + if (rc != ERROR_SUCCESS) + { + ERR("Cabinet not found: %s\n", debugstr_w(mi->source)); + return ERROR_INSTALL_FAILURE; + } } return ERROR_SUCCESS;
1
0
0
0
James Hawkins : msi: Allow setting a media disk as the last used source in the internal msi_set_last_used_source .
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: cf84e2df5b2da6d4843b9566039cab1e07c2ed00 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf84e2df5b2da6d4843b95660…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:55:01 2008 -0600 msi: Allow setting a media disk as the last used source in the internal msi_set_last_used_source. --- dlls/msi/action.c | 10 +++++++--- dlls/msi/msipriv.h | 2 ++ dlls/msi/source.c | 51 +++++++++++++++++++++++++++++++++------------------ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index dee64d1..d5fad0c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3508,9 +3508,13 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) /* publish the SourceList info */ LIST_FOR_EACH_ENTRY(info, &package->sourcelist_info, MSISOURCELISTINFO, entry) { - MsiSourceListSetInfoW(package->ProductCode, NULL, - info->context, info->options, - info->property, info->value); + if (!lstrcmpW(info->property, INSTALLPROPERTY_LASTUSEDSOURCEW)) + msi_set_last_used_source(package->ProductCode, NULL, info->context, + info->options, info->value); + else + MsiSourceListSetInfoW(package->ProductCode, NULL, + info->context, info->options, + info->property, info->value); } LIST_FOR_EACH_ENTRY(disk, &package->sourcelist_media, MSIMEDIADISK, entry) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index e23261b..975ebb6 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -885,6 +885,8 @@ extern BOOL check_unique_action(const MSIPACKAGE *, LPCWSTR); extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... ); extern UINT msi_create_component_directories( MSIPACKAGE *package ); extern void msi_ui_error( DWORD msg_id, DWORD type ); +extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, + MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value); /* control event stuff */ extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event, diff --git a/dlls/msi/source.c b/dlls/msi/source.c index b508569..37a0b8b 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -701,15 +701,16 @@ UINT WINAPI MsiSourceListSetInfoA(LPCSTR szProduct, LPCSTR szUserSid, return ret; } -static UINT set_last_used_source(HKEY source, LPCWSTR product, LPCWSTR usersid, - MSIINSTALLCONTEXT context, DWORD options, - LPCWSTR value) +UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, + MSIINSTALLCONTEXT context, DWORD options, + LPCWSTR value) { + HKEY source; LPWSTR buffer; WCHAR typechar; DWORD size; UINT r; - int index = 0; + int index = 1; static const WCHAR format[] = {'%','c',';','%','i',';','%','s',0}; @@ -717,27 +718,36 @@ static UINT set_last_used_source(HKEY source, LPCWSTR product, LPCWSTR usersid, typechar = 'n'; else if (options & MSISOURCETYPE_URL) typechar = 'u'; + else if (options & MSISOURCETYPE_MEDIA) + typechar = 'm'; else return ERROR_INVALID_PARAMETER; - /* make sure the source is registered */ - r = MsiSourceListAddSourceExW(product, usersid, context, - options, value, 0); - if (r != ERROR_SUCCESS) - return r; + if (!(options & MSISOURCETYPE_MEDIA)) + { + r = MsiSourceListAddSourceExW(product, usersid, context, + options, value, 0); + if (r != ERROR_SUCCESS) + return r; - while ((r = MsiSourceListEnumSourcesW(product, usersid, context, options, - index, NULL, NULL)) == ERROR_SUCCESS) - index++; + index = 0; + while ((r = MsiSourceListEnumSourcesW(product, usersid, context, options, + index, NULL, NULL)) == ERROR_SUCCESS) + index++; - if (r != ERROR_NO_MORE_ITEMS) - return r; + if (r != ERROR_NO_MORE_ITEMS) + return r; + } size = (lstrlenW(format) + lstrlenW(value) + 7) * sizeof(WCHAR); buffer = msi_alloc(size); if (!buffer) return ERROR_OUTOFMEMORY; + r = OpenSourceKey(product, &source, MSICODE_PRODUCT, context, FALSE); + if (r != ERROR_SUCCESS) + return r; + sprintfW(buffer, format, typechar, index, value); size = (lstrlenW(buffer) + 1) * sizeof(WCHAR); @@ -745,6 +755,7 @@ static UINT set_last_used_source(HKEY source, LPCWSTR product, LPCWSTR usersid, REG_SZ, (LPBYTE)buffer, size); msi_free(buffer); + RegCloseKey(source); return r; } @@ -818,15 +829,19 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, if (rc != ERROR_SUCCESS) rc = ERROR_UNKNOWN_PROPERTY; } - else if (strcmpW(szProperty, INSTALLPROPERTY_LASTUSEDSOURCEW)==0) - rc = set_last_used_source(sourcekey, szProduct, szUserSid, dwContext, - dwOptions, szValue); + else if (!lstrcmpW(szProperty, INSTALLPROPERTY_LASTUSEDSOURCEW)) + { + if (!(dwOptions & (MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL))) + rc = ERROR_INVALID_PARAMETER; + else + rc = msi_set_last_used_source(szProduct, szUserSid, dwContext, + dwOptions, szValue); + } else rc = ERROR_UNKNOWN_PROPERTY; RegCloseKey(sourcekey); return rc; - } /******************************************************************
1
0
0
0
James Hawkins : msi: Store the media type and set the last used source type accordingly.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: 7d10d1d2d0fadbe21b8aeab5f74566a572d61283 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d10d1d2d0fadbe21b8aeab5f…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:54:14 2008 -0600 msi: Store the media type and set the last used source type accordingly. --- dlls/msi/action.c | 10 ---------- dlls/msi/files.c | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 54a9fbe..dee64d1 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3468,16 +3468,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; - buffer = msi_dup_property( package, cszSourceDir ); - - rc = MsiSourceListSetInfoW( package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_LASTUSEDSOURCEW, buffer ); - msi_free(buffer); - if (rc != ERROR_SUCCESS) - goto end; - /* FIXME: Need to write more keys to the user registry */ hDb= alloc_msihandle( &package->db->hdr ); diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 8ed2395..2b8ae6f 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -59,6 +59,7 @@ static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0}; struct media_info { UINT disk_id; + UINT type; UINT last_sequence; LPWSTR disk_prompt; LPWSTR cabinet; @@ -504,6 +505,8 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf { MSIRECORD *row; LPWSTR source_dir; + LPWSTR source; + DWORD options; UINT r; static const WCHAR query[] = { @@ -539,6 +542,9 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf source_dir = msi_dup_property(package, cszSourceDir); lstrcpyW(mi->source, source_dir); + PathStripToRootW(source_dir); + mi->type = GetDriveTypeW(source_dir); + if (file->IsCompressed && mi->cabinet) { if (mi->cabinet[0] == '#') @@ -554,12 +560,30 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf lstrcatW(mi->source, mi->cabinet); } - msi_package_add_media_disk(package, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - mi->disk_id, mi->volume_label, mi->disk_prompt); + options = MSICODE_PRODUCT; + if (mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE) + { + source = source_dir; + options |= MSISOURCETYPE_MEDIA; + } + else if (package->BaseURL && UrlIsW(package->BaseURL, URLIS_URL)) + { + source = package->BaseURL; + options |= MSISOURCETYPE_URL; + } + else + { + source = mi->source; + options |= MSISOURCETYPE_NETWORK; + } + + if (mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE) + msi_package_add_media_disk(package, MSIINSTALLCONTEXT_USERUNMANAGED, + MSICODE_PRODUCT, mi->disk_id, + mi->volume_label, mi->disk_prompt); msi_package_add_info(package, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_MEDIA, - INSTALLPROPERTY_LASTUSEDSOURCEW, mi->source); + options, INSTALLPROPERTY_LASTUSEDSOURCEW, source); msi_free(source_dir); return ERROR_SUCCESS; @@ -602,14 +626,11 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m { LPWSTR source = msi_dup_property(package, cszSourceDir); BOOL matches; - UINT type; - PathStripToRootW(source); - type = GetDriveTypeW(source); matches = source_matches_volume(mi, source); msi_free(source); - if ((type == DRIVE_CDROM || type == DRIVE_REMOVABLE) && !matches) + if ((mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE) && !matches) { rc = msi_change_media(package, mi); if (rc != ERROR_SUCCESS)
1
0
0
0
James Hawkins : msi: Read the source list properties from the user-unmanaged context.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: 6e2048bbc7070e5bba7f1671e4ed31a65c0356cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e2048bbc7070e5bba7f1671e…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:53:27 2008 -0600 msi: Read the source list properties from the user-unmanaged context. --- dlls/msi/msi.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 13b693f..7cfafbc 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -365,12 +365,12 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, } sz = sizeof(sourcepath); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz); sz = sizeof(filename); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, filename, &sz); lstrcatW(sourcepath,filename); @@ -2193,11 +2193,11 @@ UINT WINAPI MsiConfigureFeatureW(LPCWSTR szProduct, LPCWSTR szFeature, INSTALLST return r; sz = sizeof(sourcepath); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz); sz = sizeof(filename); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, filename, &sz); lstrcatW( sourcepath, filename ); @@ -2378,11 +2378,11 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, *ptr = 0; sz = sizeof(sourcepath); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz); sz = sizeof(filename); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERMANAGED, + MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, filename, &sz); lstrcatW( sourcepath, filename );
1
0
0
0
James Hawkins : msi: Read the disk prompt source list property from the user-unmanaged context.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: acfed4cfab7b2c15650d0c3fb105e93dee36cbbe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=acfed4cfab7b2c15650d0c3fb…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:52:34 2008 -0600 msi: Read the disk prompt source list property from the user-unmanaged context. --- dlls/msi/action.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 7058aa8..54a9fbe 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4255,13 +4255,13 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package) DWORD size = 0; rc = MsiSourceListGetInfoW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTW,NULL,&size); if (rc == ERROR_MORE_DATA) { prompt = msi_alloc(size * sizeof(WCHAR)); MsiSourceListGetInfoW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, + MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTW,prompt,&size); } else
1
0
0
0
James Hawkins : msi: Remove setting a source list property that' s in the wrong place.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: d62bd166dc95d092fe8cc5447531badf7f5c6469 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d62bd166dc95d092fe8cc5447…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:51:41 2008 -0600 msi: Remove setting a source list property that's in the wrong place. --- dlls/msi/files.c | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index da92965..8ed2395 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -739,21 +739,11 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) { struct media_info *mi; UINT rc = ERROR_SUCCESS; - LPWSTR ptr; MSIFILE *file; /* increment progress bar each time action data is sent */ ui_progress(package,1,1,0,0); - /* handle the keys for the SourceList */ - ptr = strrchrW(package->PackagePath,'\\'); - if (ptr) - { - ptr++; - msi_package_add_info(package, MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, ptr); - } - schedule_install_files(package); /*
1
0
0
0
James Hawkins : msi: Publish source information in the user-unmanaged context.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: 4d2cf7a44b7d738511170ca8fbc7b64857320b24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4d2cf7a44b7d738511170ca8f…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Tue Feb 26 01:50:53 2008 -0600 msi: Publish source information in the user-unmanaged context. --- dlls/msi/files.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index ba25f04..da92965 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -554,10 +554,10 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf lstrcatW(mi->source, mi->cabinet); } - msi_package_add_media_disk(package, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, + msi_package_add_media_disk(package, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, mi->disk_id, mi->volume_label, mi->disk_prompt); - msi_package_add_info(package, MSIINSTALLCONTEXT_USERMANAGED, + msi_package_add_info(package, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT | MSISOURCETYPE_MEDIA, INSTALLPROPERTY_LASTUSEDSOURCEW, mi->source);
1
0
0
0
James Hawkins : msi: Add tests for MsiSourceListEnumMediaDisks.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: 7e8cd606a0cceb8f19d984d4d4896a891cd78ec6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e8cd606a0cceb8f19d984d4d…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Feb 25 22:08:43 2008 -0600 msi: Add tests for MsiSourceListEnumMediaDisks. --- dlls/msi/tests/source.c | 752 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 752 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7e8cd606a0cceb8f19d98…
1
0
0
0
James Hawkins : msi: Implement MsiSourceListEnumMediaDisks.
by Alexandre Julliard
26 Feb '08
26 Feb '08
Module: wine Branch: master Commit: 1bd49bcf7486ece38d8e804108cb28d04defe0f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bd49bcf7486ece38d8e80410…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Feb 25 22:07:42 2008 -0600 msi: Implement MsiSourceListEnumMediaDisks. --- dlls/msi/msi.spec | 4 +- dlls/msi/source.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/msi.h | 6 ++ 3 files changed, 196 insertions(+), 2 deletions(-) diff --git a/dlls/msi/msi.spec b/dlls/msi/msi.spec index b510de7..598e2f3 100644 --- a/dlls/msi/msi.spec +++ b/dlls/msi/msi.spec @@ -264,8 +264,8 @@ 268 stdcall MsiSourceListSetInfoW(wstr wstr long long wstr wstr) 269 stub MsiEnumPatchesExA 270 stub MsiEnumPatchesExW -271 stub MsiSourceListEnumMediaDisksA -272 stub MsiSourceListEnumMediaDisksW +271 stdcall MsiSourceListEnumMediaDisksA(str str long long long ptr ptr ptr ptr ptr) +272 stdcall MsiSourceListEnumMediaDisksW(wstr wstr long long long ptr ptr ptr ptr ptr) 273 stdcall MsiSourceListAddMediaDiskA(str str long long long str str) 274 stdcall MsiSourceListAddMediaDiskW(wstr wstr long long long wstr wstr) 275 stub MsiSourceListClearMediaDiskA diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 716414f..b508569 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -141,6 +141,194 @@ static UINT OpenURLSubkey(HKEY rootkey, HKEY *key, BOOL create) } /****************************************************************** + * MsiSourceListEnumMediaDisksA (MSI.@) + */ +UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode, + LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions, DWORD dwIndex, LPWORD pdwDiskId, + LPSTR szVolumeLabel, LPDWORD pcchVolumeLabel, + LPSTR szDiskPrompt, LPDWORD pcchDiskPrompt) +{ + LPWSTR product = NULL; + LPWSTR usersid = NULL; + LPWSTR volume = NULL; + LPWSTR prompt = NULL; + DWORD volumesz, promptsz; + UINT r = ERROR_INVALID_PARAMETER; + + TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_a(szProductCodeOrPatchCode), + debugstr_a(szUserSid), dwContext, dwOptions, dwIndex, pdwDiskId, + szVolumeLabel, pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); + + if (szDiskPrompt && !pcchDiskPrompt) + return ERROR_INVALID_PARAMETER; + + if (szProductCodeOrPatchCode) product = strdupAtoW(szProductCodeOrPatchCode); + if (szUserSid) usersid = strdupAtoW(szUserSid); + + /* FIXME: add tests for an invalid format */ + + if (pcchVolumeLabel) + volume = msi_alloc(*pcchVolumeLabel * sizeof(WCHAR)); + + if (pcchDiskPrompt) + prompt = msi_alloc(*pcchDiskPrompt * sizeof(WCHAR)); + + if (volume) *volume = '\0'; + if (prompt) *prompt = '\0'; + r = MsiSourceListEnumMediaDisksW(product, usersid, dwContext, dwOptions, + dwIndex, pdwDiskId, volume, pcchVolumeLabel, + prompt, pcchDiskPrompt); + if (r != ERROR_SUCCESS) + goto done; + + if (szVolumeLabel && pcchVolumeLabel) + volumesz = WideCharToMultiByte(CP_ACP, 0, volume, -1, szVolumeLabel, + *pcchVolumeLabel + 1, NULL, NULL); + + if (szDiskPrompt) + promptsz = WideCharToMultiByte(CP_ACP, 0, prompt, -1, szDiskPrompt, + *pcchDiskPrompt + 1, NULL, NULL); + +done: + msi_free(product); + msi_free(usersid); + msi_free(volume); + msi_free(prompt); + + return r; +} + +/****************************************************************** + * MsiSourceListEnumMediaDisksW (MSI.@) + */ +UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, + LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, + DWORD dwOptions, DWORD dwIndex, LPWORD pdwDiskId, + LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel, + LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt) +{ + WCHAR squished_pc[GUID_SIZE]; + LPWSTR value = NULL; + LPWSTR data = NULL; + LPWSTR ptr; + HKEY source, media; + DWORD valuesz, datasz = 0; + DWORD type; + DWORD numvals, size; + LONG res; + UINT r; + static int index = 0; + + TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p)\n", debugstr_w(szProductCodeOrPatchCode), + debugstr_w(szUserSid), dwContext, dwOptions, dwIndex, szVolumeLabel, + pcchVolumeLabel, szDiskPrompt, pcchDiskPrompt); + + if (!szProductCodeOrPatchCode || + !squash_guid(szProductCodeOrPatchCode, squished_pc)) + return ERROR_INVALID_PARAMETER; + + if (dwContext == MSIINSTALLCONTEXT_MACHINE && szUserSid) + return ERROR_INVALID_PARAMETER; + + if (dwOptions != MSICODE_PRODUCT && dwOptions != MSICODE_PATCH) + return ERROR_INVALID_PARAMETER; + + if (szDiskPrompt && !pcchDiskPrompt) + return ERROR_INVALID_PARAMETER; + + if (dwIndex == 0) + index = 0; + + if (dwIndex != index) + return ERROR_INVALID_PARAMETER; + + r = OpenSourceKey(szProductCodeOrPatchCode, &source, + dwOptions, dwContext, FALSE); + if (r != ERROR_SUCCESS) + return r; + + r = OpenMediaSubkey(source, &media, FALSE); + if (r != ERROR_SUCCESS) + { + RegCloseKey(source); + return ERROR_NO_MORE_ITEMS; + } + + if (!pcchVolumeLabel && !pcchDiskPrompt) + { + r = RegEnumValueW(media, dwIndex, NULL, NULL, NULL, + &type, NULL, NULL); + goto done; + } + + res = RegQueryInfoKeyW(media, NULL, NULL, NULL, NULL, NULL, + NULL, &numvals, &valuesz, &datasz, NULL, NULL); + if (res != ERROR_SUCCESS) + { + r = ERROR_BAD_CONFIGURATION; + goto done; + } + + value = msi_alloc(++valuesz * sizeof(WCHAR)); + data = msi_alloc(++datasz * sizeof(WCHAR)); + if (!value || !data) + { + r = ERROR_OUTOFMEMORY; + goto done; + } + + r = RegEnumValueW(media, dwIndex, value, &valuesz, + NULL, &type, (LPBYTE)data, &datasz); + if (r != ERROR_SUCCESS) + goto done; + + if (pdwDiskId) + *pdwDiskId = atolW(value); + + ptr = strchrW(data, ';'); + if (!ptr) + ptr = data; + else + *ptr = '\0'; + + if (pcchVolumeLabel) + { + size = lstrlenW(data); + if (size >= *pcchVolumeLabel) + r = ERROR_MORE_DATA; + else if (szVolumeLabel) + lstrcpyW(szVolumeLabel, data); + + *pcchVolumeLabel = size; + } + + if (pcchDiskPrompt) + { + data = ptr; + if (!*data) + data++; + + size = lstrlenW(data); + if (size >= *pcchDiskPrompt) + r = ERROR_MORE_DATA; + else if (szDiskPrompt) + lstrcpyW(szDiskPrompt, data); + + *pcchDiskPrompt = size; + } + + index++; + +done: + msi_free(value); + msi_free(data); + RegCloseKey(source); + + return r; +} + +/****************************************************************** * MsiSourceListEnumSourcesA (MSI.@) */ UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR szProductCodeOrPatch, LPCSTR szUserSid, diff --git a/include/msi.h b/include/msi.h index 26d07fb..93c4c28 100644 --- a/include/msi.h +++ b/include/msi.h @@ -537,6 +537,12 @@ UINT WINAPI MsiSourceListAddSourceA(LPCSTR, LPCSTR, DWORD, LPCSTR); UINT WINAPI MsiSourceListAddSourceW(LPCWSTR, LPCWSTR, DWORD, LPCWSTR); #define MsiSourceListAddSource WINELIB_NAME_AW(MsiSourceListAddSource) +UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPWORD, + LPSTR, LPDWORD, LPSTR, LPDWORD); +UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPWORD, + LPWSTR, LPDWORD, LPWSTR, LPDWORD); +#define MsiSourceListEnumMediaDisks WINELIB_NAME_AW(MsiSourceListEnumMediaDisks) + UINT WINAPI MsiSourceListEnumSourcesA(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD); UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR, LPCWSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPWSTR, LPDWORD); #define MsiSourceListEnumSources WINELIB_NAME_AW(MsiSourceListEnumSources)
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200