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
April 2010
----- 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
2 participants
898 discussions
Start a n
N
ew thread
Roderick Colenbrander : wined3d: Move upsideDown calculation to blit implementation.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: ff82e66a696208f8233776adb37d1e09f5e445c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff82e66a696208f8233776adb…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Thu Apr 1 23:58:49 2010 +0200 wined3d: Move upsideDown calculation to blit implementation. --- dlls/wined3d/device.c | 18 +++------ dlls/wined3d/surface.c | 79 +++++++++++++++++++++++----------------- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 53 insertions(+), 46 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ff82e66a696208f823377…
1
0
0
0
Alexandre Julliard : ntdll/tests: Skip a couple of exception tests that crash on Wow64.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 29937272cbf199040a4999368a3118045dade003 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=29937272cbf199040a4999368…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 2 13:35:06 2010 +0200 ntdll/tests: Skip a couple of exception tests that crash on Wow64. --- dlls/ntdll/tests/exception.c | 125 +++++++++++++++++++++++++---------------- 1 files changed, 76 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=29937272cbf199040a499…
1
0
0
0
Hans Leidekker : msi: Reset the MsiEnumPatchesExW index on failure.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: dd1bef3498110ef0b30121943f064801b8206585 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd1bef3498110ef0b30121943…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:43:08 2010 +0200 msi: Reset the MsiEnumPatchesExW index on failure. --- dlls/msi/registry.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 3e03ecf..7a4c3f8 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -2041,7 +2041,7 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, DWORD idx = 0; UINT r; - static int last_index = 0; + static DWORD last_index; TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext, dwFilter, @@ -2077,6 +2077,8 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid, if (r == ERROR_SUCCESS) last_index = dwIndex; + else + last_index = 0; return r; }
1
0
0
0
Hans Leidekker : msi: Add tests for registering and unregistering MIME info .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 7aad77ae58ee7a6743fbff32e76e7cf05eb584d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aad77ae58ee7a6743fbff32e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:40:28 2010 +0200 msi: Add tests for registering and unregistering MIME info. --- dlls/msi/tests/install.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 102 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 1438bf8..842bb52 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1799,6 +1799,62 @@ static const CHAR rei_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n"; +static const CHAR rmi_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n"; + +static const CHAR rmi_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n"; + +static const CHAR rmi_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "mime\tmime\n"; + +static const CHAR rmi_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n"; + +static const CHAR rmi_extension_dat[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n" + "s255\ts72\tS255\tS64\ts38\n" + "Extension\tExtension\tComponent_\n" + "mime\tmime\t\tmime/type\tmime\n"; + +static const CHAR rmi_verb_dat[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n" + "s255\ts32\tI2\tL255\tL255\n" + "Verb\tExtension_\tVerb\n" + "mime\tOpen\t1\t&Open\t/argument\n"; + +static const CHAR rmi_mime_dat[] = "ContentType\tExtension_\tCLSID\n" + "s64\ts255\tS38\n" + "MIME\tContentType\n" + "mime/type\tmime\t\n"; + +static const CHAR rmi_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "LaunchConditions\t\t100\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "CostFinalize\t\t1000\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "RemoveFiles\t\t1700\n" + "InstallFiles\t\t2000\n" + "UnregisterExtensionInfo\t\t3000\n" + "UnregisterMIMEInfo\t\t3500\n" + "RegisterExtensionInfo\t\t4000\n" + "RegisterMIMEInfo\t\t4500\n" + "RegisterProduct\t\t5000\n" + "PublishFeatures\t\t5100\n" + "PublishProduct\t\t5200\n" + "InstallFinalize\t\t6000\n"; + typedef struct _msi_table { const CHAR *filename; @@ -2746,6 +2802,21 @@ static const msi_table rei_tables[] = ADD_TABLE(property) }; +static const msi_table rmi_tables[] = +{ + ADD_TABLE(directory), + ADD_TABLE(rmi_component), + ADD_TABLE(rmi_feature), + ADD_TABLE(rmi_feature_comp), + ADD_TABLE(rmi_file), + ADD_TABLE(rmi_extension), + ADD_TABLE(rmi_verb), + ADD_TABLE(rmi_mime), + ADD_TABLE(rmi_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -9144,6 +9215,36 @@ static void test_register_extension_info(void) delete_test_files(); } +static void test_register_mime_info(void) +{ + UINT r; + LONG res; + HKEY hkey; + + create_test_files(); + create_file("msitest\\mime.txt", 1000); + create_database(msifile, rmi_tables, sizeof(rmi_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + ok(!delete_pf("msitest\\mime.txt", TRUE), "file not removed\n"); + ok(!delete_pf("msitest", FALSE), "directory not removed\n"); + delete_test_files(); +} + START_TEST(install) { DWORD len; @@ -9253,6 +9354,7 @@ START_TEST(install) test_remove_env_strings(); test_register_class_info(); test_register_extension_info(); + test_register_mime_info(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : msi: Implement the UnregisterMIMEInfo standard action.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 3050cde95eabb59e02be5d63311d6bd45789c2fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3050cde95eabb59e02be5d633…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 09:40:07 2010 +0100 msi: Implement the UnregisterMIMEInfo standard action. --- dlls/msi/action.c | 8 ---- dlls/msi/classes.c | 94 +++++++++++++++++++++++++++++++++++++-------------- dlls/msi/msipriv.h | 3 ++ 3 files changed, 71 insertions(+), 34 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 25cd4fc..3322371 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -158,8 +158,6 @@ static const WCHAR szUnpublishFeatures[] = {'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0}; static const WCHAR szUnregisterComPlus[] = {'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; -static const WCHAR szUnregisterMIMEInfo[] = - {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}; static const WCHAR szUnregisterTypeLibraries[] = {'U','n','r','e','g','i','s','t','e','r','T','y','p','e','L','i','b','r','a','r','i','e','s',0}; static const WCHAR szValidateProductID[] = @@ -6947,12 +6945,6 @@ static UINT ACTION_RemoveExistingProducts( MSIPACKAGE *package ) return msi_unimplemented_action_stub( package, "RemoveExistingProducts", table ); } -static UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { 'M','I','M','E',0 }; - return msi_unimplemented_action_stub( package, "UnregisterMIMEInfo", table ); -} - typedef UINT (*STANDARDACTIONHANDLER)(MSIPACKAGE*); static const struct diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 744acfb..ce2325d 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -27,7 +27,7 @@ * UnregisterClassInfo * UnregisterProgIdInfo * UnregisterExtensionInfo - * UnregisterMIMEInfo (TODO) + * UnregisterMIMEInfo */ #include <stdarg.h> @@ -1429,11 +1429,6 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry ) { LPWSTR extension; - LPCWSTR exten; - LPCWSTR mime; - static const WCHAR fmt[] = - {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\', - 'C','o','n','t','e','n','t',' ','T','y','p','e','\\', '%','s',0}; LPWSTR key; /* @@ -1446,33 +1441,80 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) if (!mt->InstallMe) { - TRACE("MIME %s not scheduled to be installed\n", - debugstr_w(mt->ContentType)); + TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType)); continue; } - - mime = mt->ContentType; - exten = mt->Extension->Extension; - extension = msi_alloc( (lstrlenW( exten ) + 2)*sizeof(WCHAR) ); - extension[0] = '.'; - lstrcpyW(extension+1,exten); + TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType)); - key = msi_alloc( (strlenW(mime)+strlenW(fmt)+1) * sizeof(WCHAR) ); - sprintfW(key,fmt,mime); - msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szExten, extension ); + extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) ); + key = msi_alloc( (strlenW( mt->ContentType ) + strlenW( szMIMEDatabase ) + 1) * sizeof(WCHAR) ); - msi_free(extension); - msi_free(key); + if (extension && key) + { + extension[0] = '.'; + strcpyW( extension + 1, mt->Extension->Extension ); - if (mt->clsid) - FIXME("Handle non null for field 3\n"); + strcpyW( key, szMIMEDatabase ); + strcatW( key, mt->ContentType ); + msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szExten, extension ); - uirow = MSI_CreateRecord(2); - MSI_RecordSetStringW(uirow,1,mt->ContentType); - MSI_RecordSetStringW(uirow,2,exten); - ui_actiondata(package,szRegisterMIMEInfo,uirow); - msiobj_release(&uirow->hdr); + if (mt->clsid) + msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szCLSID, mt->clsid ); + } + msi_free( extension ); + msi_free( key ); + + uirow = MSI_CreateRecord( 2 ); + MSI_RecordSetStringW( uirow, 1, mt->ContentType ); + MSI_RecordSetStringW( uirow, 2, mt->Extension->Extension ); + ui_actiondata( package, szRegisterMIMEInfo, uirow ); + msiobj_release( &uirow->hdr ); + } + + return ERROR_SUCCESS; +} + +UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) +{ + MSIRECORD *uirow; + MSIMIME *mime; + + load_classes_and_such( package ); + + LIST_FOR_EACH_ENTRY( mime, &package->mimes, MSIMIME, entry ) + { + LONG res; + LPWSTR mime_key; + + mime->InstallMe = (mime->InstallMe || + (mime->Class && mime->Class->Installed) || + (mime->Extension && mime->Extension->Installed)); + + if (mime->InstallMe) + { + TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType)); + continue; + } + + TRACE("Unregistering MIME type %s\n", debugstr_w(mime->ContentType)); + + mime_key = msi_alloc( (strlenW( szMIMEDatabase ) + strlenW( mime->ContentType ) + 1) * sizeof(WCHAR) ); + if (mime_key) + { + strcpyW( mime_key, szMIMEDatabase ); + strcatW( mime_key, mime->ContentType ); + res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key ); + if (res != ERROR_SUCCESS) + WARN("Failed to delete MIME key %d\n", res); + msi_free( mime_key ); + } + + uirow = MSI_CreateRecord( 2 ); + MSI_RecordSetStringW( uirow, 1, mime->ContentType ); + MSI_RecordSetStringW( uirow, 2, mime->Extension->Extension ); + ui_actiondata( package, szUnregisterMIMEInfo, uirow ); + msiobj_release( &uirow->hdr ); } return ERROR_SUCCESS; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 7ab1c87..5e699ae 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -965,6 +965,7 @@ extern UINT ACTION_RegisterFonts(MSIPACKAGE *package); extern UINT ACTION_UnregisterClassInfo(MSIPACKAGE *package); extern UINT ACTION_UnregisterExtensionInfo(MSIPACKAGE *package); extern UINT ACTION_UnregisterFonts(MSIPACKAGE *package); +extern UINT ACTION_UnregisterMIMEInfo(MSIPACKAGE *package); extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package); /* Helpers */ @@ -1089,6 +1090,7 @@ static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0}; static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0}; static const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}; static const WCHAR szUnregisterExtensionInfo[] = {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}; +static const WCHAR szUnregisterMIMEInfo[] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}; static const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}; static const WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; static const WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}; @@ -1099,6 +1101,7 @@ static const WCHAR szAppID[] = {'A','p','p','I','D',0}; static const WCHAR szDefaultIcon[] = {'D','e','f','a','u','l','t','I','c','o','n',0}; static const WCHAR szInprocHandler[] = {'I','n','p','r','o','c','H','a','n','d','l','e','r',0}; static const WCHAR szInprocHandler32[] = {'I','n','p','r','o','c','H','a','n','d','l','e','r','3','2',0}; +static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',' ','T','y','p','e','\\',0}; /* memory allocation macro functions */ static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
1
0
0
0
Hans Leidekker : msi: Add tests for registering and unregistering extension info.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: a7ef96f97f61711263d329fbebd47fb9f23f3860 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7ef96f97f61711263d329fbe…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:39:44 2010 +0200 msi: Add tests for registering and unregistering extension info. --- dlls/msi/tests/install.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 107 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 35cd64a..1438bf8 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1745,6 +1745,60 @@ static const CHAR rci_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n"; +static const CHAR rei_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n"; + +static const CHAR rei_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n"; + +static const CHAR rei_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "extension\textension\n"; + +static const CHAR rei_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n"; + +static const CHAR rei_extension_dat[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n" + "s255\ts72\tS255\tS64\ts38\n" + "Extension\tExtension\tComponent_\n" + "extension\textension\tProg.Id.1\t\textension\n"; + +static const CHAR rei_verb_dat[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n" + "s255\ts32\tI2\tL255\tL255\n" + "Verb\tExtension_\tVerb\n" + "extension\tOpen\t1\t&Open\t/argument\n"; + +static const CHAR rei_progid_dat[] = "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n" + "s255\tS255\tS38\tL255\tS72\tI2\n" + "ProgId\tProgId\n" + "Prog.Id.1\t\t\tdescription\t\t\n"; + +static const CHAR rei_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "LaunchConditions\t\t100\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "CostFinalize\t\t1000\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "RemoveFiles\t\t1700\n" + "InstallFiles\t\t2000\n" + "UnregisterExtensionInfo\t\t3000\n" + "RegisterExtensionInfo\t\t4000\n" + "RegisterProduct\t\t5000\n" + "PublishFeatures\t\t5100\n" + "PublishProduct\t\t5200\n" + "InstallFinalize\t\t6000\n"; + typedef struct _msi_table { const CHAR *filename; @@ -2677,6 +2731,21 @@ static const msi_table rci_tables[] = ADD_TABLE(property) }; +static const msi_table rei_tables[] = +{ + ADD_TABLE(directory), + ADD_TABLE(rei_component), + ADD_TABLE(rei_feature), + ADD_TABLE(rei_feature_comp), + ADD_TABLE(rei_file), + ADD_TABLE(rei_extension), + ADD_TABLE(rei_verb), + ADD_TABLE(rei_progid), + ADD_TABLE(rei_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -9038,6 +9107,43 @@ static void test_register_class_info(void) delete_test_files(); } +static void test_register_extension_info(void) +{ + UINT r; + LONG res; + HKEY hkey; + + create_test_files(); + create_file("msitest\\extension.txt", 1000); + create_database(msifile, rei_tables, sizeof(rei_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + ok(!delete_pf("msitest\\extension.txt", TRUE), "file not removed\n"); + ok(!delete_pf("msitest", FALSE), "directory not removed\n"); + delete_test_files(); +} + START_TEST(install) { DWORD len; @@ -9146,6 +9252,7 @@ START_TEST(install) test_remove_ini_values(); test_remove_env_strings(); test_register_class_info(); + test_register_extension_info(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : msi: Implement the UnregisterExtensionInfo standard action .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 17d7effd2af347da27e6cbcd322318add60a1c6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17d7effd2af347da27e6cbcd3…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:39:20 2010 +0200 msi: Implement the UnregisterExtensionInfo standard action. --- dlls/msi/action.c | 8 ---- dlls/msi/classes.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++----- dlls/msi/msipriv.h | 2 + 3 files changed, 105 insertions(+), 19 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 4f1be9a..25cd4fc 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -158,8 +158,6 @@ static const WCHAR szUnpublishFeatures[] = {'U','n','p','u','b','l','i','s','h','F','e','a','t','u','r','e','s',0}; static const WCHAR szUnregisterComPlus[] = {'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; -static const WCHAR szUnregisterExtensionInfo[] = - {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}; static const WCHAR szUnregisterMIMEInfo[] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}; static const WCHAR szUnregisterTypeLibraries[] = @@ -6949,12 +6947,6 @@ static UINT ACTION_RemoveExistingProducts( MSIPACKAGE *package ) return msi_unimplemented_action_stub( package, "RemoveExistingProducts", table ); } -static UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { 'E','x','t','e','n','s','i','o','n',0 }; - return msi_unimplemented_action_stub( package, "UnregisterExtensionInfo", table ); -} - static UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) { static const WCHAR table[] = { 'M','I','M','E',0 }; diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index d6e8808..744acfb 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -24,10 +24,10 @@ * RegisterProgIdInfo * RegisterExtensionInfo * RegisterMIMEInfo - * UnRegisterClassInfo - * UnRegisterProgIdInfo - * UnRegisterExtensionInfo (TODO) - * UnRegisterMIMEInfo (TODO) + * UnregisterClassInfo + * UnregisterProgIdInfo + * UnregisterExtensionInfo + * UnregisterMIMEInfo (TODO) */ #include <stdarg.h> @@ -747,6 +747,13 @@ static void mark_mime_for_install( MSIMIME *mime ) mime->InstallMe = TRUE; } +static void mark_mime_for_uninstall( MSIMIME *mime ) +{ + if (!mime) + return; + mime->InstallMe = FALSE; +} + static UINT register_appid(const MSIAPPID *appid, LPCWSTR app ) { static const WCHAR szRemoteServerName[] = @@ -1221,10 +1228,11 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) { static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0 }; - HKEY hkey; + HKEY hkey = NULL; MSIEXTENSION *ext; MSIRECORD *uirow; BOOL install_on_demand = TRUE; + LONG res; load_classes_and_such(package); @@ -1270,12 +1278,16 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) mark_mime_for_install(ext->Mime); - extension = msi_alloc( (lstrlenW( ext->Extension ) + 2)*sizeof(WCHAR) ); - extension[0] = '.'; - lstrcpyW(extension+1,ext->Extension); - - RegCreateKeyW(HKEY_CLASSES_ROOT,extension,&hkey); - msi_free( extension ); + extension = msi_alloc( (strlenW( ext->Extension ) + 2) * sizeof(WCHAR) ); + if (extension) + { + extension[0] = '.'; + strcpyW( extension + 1, ext->Extension ); + res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey ); + msi_free( extension ); + if (res != ERROR_SUCCESS) + WARN("Failed to create extension key %d\n", res); + } if (ext->Mime) msi_reg_set_val_str( hkey, szContentType, ext->Mime->ContentType ); @@ -1325,6 +1337,86 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) return ERROR_SUCCESS; } +UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package ) +{ + MSIEXTENSION *ext; + MSIRECORD *uirow; + LONG res; + + load_classes_and_such( package ); + + LIST_FOR_EACH_ENTRY( ext, &package->extensions, MSIEXTENSION, entry ) + { + LPWSTR extension; + MSIFEATURE *feature; + + if (!ext->Component) + continue; + + feature = ext->Feature; + if (!feature) + continue; + + if (feature->ActionRequest != INSTALLSTATE_ABSENT) + { + TRACE("Feature %s not scheduled for removal, skipping unregistration of extension %s\n", + debugstr_w(feature->Feature), debugstr_w(ext->Extension)); + continue; + } + + TRACE("Unregistering extension %s\n", debugstr_w(ext->Extension)); + + ext->Installed = FALSE; + + if (ext->ProgID && !list_empty( &ext->verbs )) + mark_progid_for_uninstall( package, ext->ProgID ); + + mark_mime_for_uninstall( ext->Mime ); + + extension = msi_alloc( (strlenW( ext->Extension ) + 2) * sizeof(WCHAR) ); + if (extension) + { + extension[0] = '.'; + strcpyW( extension + 1, ext->Extension ); + res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension ); + msi_free( extension ); + if (res != ERROR_SUCCESS) + WARN("Failed to delete extension key %d\n", res); + } + + if (ext->ProgID || ext->ProgIDText) + { + static const WCHAR shellW[] = {'\\','s','h','e','l','l',0}; + LPCWSTR progid; + LPWSTR progid_shell; + + if (ext->ProgID) + progid = ext->ProgID->ProgID; + else + progid = ext->ProgIDText; + + progid_shell = msi_alloc( (strlenW( progid ) + strlenW( shellW ) + 1) * sizeof(WCHAR) ); + if (progid_shell) + { + strcpyW( progid_shell, progid ); + strcatW( progid_shell, shellW ); + res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell ); + msi_free( progid_shell ); + if (res != ERROR_SUCCESS) + WARN("Failed to delete shell key %d\n", res); + RegDeleteKeyW( HKEY_CLASSES_ROOT, progid ); + } + } + + uirow = MSI_CreateRecord( 1 ); + MSI_RecordSetStringW( uirow, 1, ext->Extension ); + ui_actiondata( package, szUnregisterExtensionInfo, uirow ); + msiobj_release( &uirow->hdr ); + } + + return ERROR_SUCCESS; +} + UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) { static const WCHAR szExten[] = diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index e81237c..7ab1c87 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -963,6 +963,7 @@ extern UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package); extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package); extern UINT ACTION_RegisterFonts(MSIPACKAGE *package); extern UINT ACTION_UnregisterClassInfo(MSIPACKAGE *package); +extern UINT ACTION_UnregisterExtensionInfo(MSIPACKAGE *package); extern UINT ACTION_UnregisterFonts(MSIPACKAGE *package); extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package); @@ -1087,6 +1088,7 @@ static const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0}; static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0}; static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0}; static const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}; +static const WCHAR szUnregisterExtensionInfo[] = {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}; static const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}; static const WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; static const WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
1
0
0
0
Hans Leidekker : msi: Implement the UnregisterProgIdInfo standard action.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 3bdfa1f6248ebc86c5d734f53aa220b3cf4c2bae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3bdfa1f6248ebc86c5d734f53…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:38:57 2010 +0200 msi: Implement the UnregisterProgIdInfo standard action. --- dlls/msi/action.c | 12 ------------ dlls/msi/classes.c | 37 ++++++++++++++++++++++++++++++++++++- dlls/msi/font.c | 5 ----- dlls/msi/msipriv.h | 4 ++++ 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2b729ec..4f1be9a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -124,8 +124,6 @@ static const WCHAR szPublishComponents[] = {'P','u','b','l','i','s','h','C','o','m','p','o','n','e','n','t','s',0}; static const WCHAR szRegisterComPlus[] = {'R','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; -static const WCHAR szRegisterFonts[] = - {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; static const WCHAR szRegisterUser[] = {'R','e','g','i','s','t','e','r','U','s','e','r',0}; static const WCHAR szRemoveEnvironmentStrings[] = @@ -162,12 +160,8 @@ static const WCHAR szUnregisterComPlus[] = {'U','n','r','e','g','i','s','t','e','r','C','o','m','P','l','u','s',0}; static const WCHAR szUnregisterExtensionInfo[] = {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}; -static const WCHAR szUnregisterFonts[] = - {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}; static const WCHAR szUnregisterMIMEInfo[] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}; -static const WCHAR szUnregisterProgIdInfo[] = - {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}; static const WCHAR szUnregisterTypeLibraries[] = {'U','n','r','e','g','i','s','t','e','r','T','y','p','e','L','i','b','r','a','r','i','e','s',0}; static const WCHAR szValidateProductID[] = @@ -6967,12 +6961,6 @@ static UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) return msi_unimplemented_action_stub( package, "UnregisterMIMEInfo", table ); } -static UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package ) -{ - static const WCHAR table[] = { 'P','r','o','g','I','d',0 }; - return msi_unimplemented_action_stub( package, "UnregisterProgIdInfo", table ); -} - typedef UINT (*STANDARDACTIONHANDLER)(MSIPACKAGE*); static const struct diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 7d4f1a0..d6e8808 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -25,7 +25,7 @@ * RegisterExtensionInfo * RegisterMIMEInfo * UnRegisterClassInfo - * UnRegisterProgIdInfo (TODO) + * UnRegisterProgIdInfo * UnRegisterExtensionInfo (TODO) * UnRegisterMIMEInfo (TODO) */ @@ -1105,6 +1105,41 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package) return ERROR_SUCCESS; } +UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package ) +{ + MSIPROGID *progid; + MSIRECORD *uirow; + LONG res; + + load_classes_and_such( package ); + + LIST_FOR_EACH_ENTRY( progid, &package->progids, MSIPROGID, entry ) + { + /* check if this progid is to be removed */ + if (progid->Class && !progid->Class->Installed) + progid->InstallMe = FALSE; + + if (progid->InstallMe) + { + TRACE("progid %s not scheduled to be removed\n", debugstr_w(progid->ProgID)); + continue; + } + + TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID)); + + res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID ); + if (res != ERROR_SUCCESS) + WARN("Failed to delete progid key %d\n", res); + + uirow = MSI_CreateRecord( 1 ); + MSI_RecordSetStringW( uirow, 1, progid->ProgID ); + ui_actiondata( package, szUnregisterProgIdInfo, uirow ); + msiobj_release( &uirow->hdr ); + } + + return ERROR_SUCCESS; +} + static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, MSICOMPONENT* component, const MSIEXTENSION* extension, MSIVERB* verb, INT* Sequence ) diff --git a/dlls/msi/font.c b/dlls/msi/font.c index 1b2c3c7..1d99a4c 100644 --- a/dlls/msi/font.c +++ b/dlls/msi/font.c @@ -64,11 +64,6 @@ typedef struct _tagTT_NAME_RECORD { #define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) #define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x))) -static const WCHAR szRegisterFonts[] = - {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; -static const WCHAR szUnregisterFonts[] = - {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}; - static const WCHAR regfont1[] = {'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index d5a81a4..e81237c 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -964,6 +964,7 @@ extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package); extern UINT ACTION_RegisterFonts(MSIPACKAGE *package); extern UINT ACTION_UnregisterClassInfo(MSIPACKAGE *package); extern UINT ACTION_UnregisterFonts(MSIPACKAGE *package); +extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package); /* Helpers */ extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data ); @@ -1086,6 +1087,9 @@ static const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0}; static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0}; static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0}; static const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}; +static const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}; +static const WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}; +static const WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}; static const WCHAR szCLSID[] = {'C','L','S','I','D',0}; static const WCHAR szProgID[] = {'P','r','o','g','I','D',0}; static const WCHAR szVIProgID[] = {'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0};
1
0
0
0
Hans Leidekker : msi: Add tests for registering and unregistering class info.
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: 90158af2dc4f257bab50b0c4603dec9ea8c9b7fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90158af2dc4f257bab50b0c46…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:38:35 2010 +0200 msi: Add tests for registering and unregistering class info. --- dlls/msi/tests/install.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 6672de2..35cd64a 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1696,6 +1696,55 @@ static const CHAR res_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n"; +static const CHAR rci_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n"; + +static const CHAR rci_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n"; + +static const CHAR rci_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "class\tclass\n"; + +static const CHAR rci_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n"; + +static const CHAR rci_appid_dat[] = "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n" + "s38\tS255\tS255\tS255\tS255\tI2\tI2\n" + "AppId\tAppId\n" + "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n"; + +static const CHAR rci_class_dat[] = "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n" + "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n" + "Class\tCLSID\tContext\tComponent_\n" + "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n"; + +static const CHAR rci_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "LaunchConditions\t\t100\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "CostFinalize\t\t1000\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "RemoveFiles\t\t1700\n" + "InstallFiles\t\t2000\n" + "UnregisterClassInfo\t\t3000\n" + "RegisterClassInfo\t\t4000\n" + "RegisterProduct\t\t5000\n" + "PublishFeatures\t\t5100\n" + "PublishProduct\t\t5200\n" + "InstallFinalize\t\t6000\n"; + typedef struct _msi_table { const CHAR *filename; @@ -2614,6 +2663,20 @@ static const msi_table res_tables[] = ADD_TABLE(property) }; +static const msi_table rci_tables[] = +{ + ADD_TABLE(directory), + ADD_TABLE(rci_component), + ADD_TABLE(rci_feature), + ADD_TABLE(rci_feature_comp), + ADD_TABLE(rci_file), + ADD_TABLE(rci_appid), + ADD_TABLE(rci_class), + ADD_TABLE(rci_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -8931,6 +8994,50 @@ static void test_remove_env_strings(void) delete_test_files(); } +static void test_register_class_info(void) +{ + UINT r; + LONG res; + HKEY hkey; + + create_test_files(); + create_file("msitest\\class.txt", 1000); + create_database(msifile, rci_tables, sizeof(rci_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey); + ok(res == ERROR_SUCCESS, "key not created\n"); + RegCloseKey(hkey); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); + + ok(!delete_pf("msitest\\class.txt", TRUE), "file not removed\n"); + ok(!delete_pf("msitest", FALSE), "directory not removed\n"); + delete_test_files(); +} + START_TEST(install) { DWORD len; @@ -9038,6 +9145,7 @@ START_TEST(install) test_find_related_products(); test_remove_ini_values(); test_remove_env_strings(); + test_register_class_info(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : msi: Set the action taken in the RegisterExtensionInfo and RegisterClassInfo actions .
by Alexandre Julliard
02 Apr '10
02 Apr '10
Module: wine Branch: master Commit: cf75d40dadaf5fb717f5627d5f05ea2e0ea373fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf75d40dadaf5fb717f5627d5…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 2 10:38:12 2010 +0200 msi: Set the action taken in the RegisterExtensionInfo and RegisterClassInfo actions. --- dlls/msi/classes.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 53ed70f..7d4f1a0 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -827,6 +827,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) debugstr_w(feature->Feature), debugstr_w(cls->clsid)); continue; } + feature->Action = feature->ActionRequest; file = get_loaded_file( package, comp->KeyPath ); if (!file) @@ -1220,6 +1221,7 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) debugstr_w(feature->Feature), debugstr_w(ext->Extension)); continue; } + feature->Action = feature->ActionRequest; TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
1
0
0
0
← Newer
1
...
81
82
83
84
85
86
87
...
90
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
Results per page:
10
25
50
100
200