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
November 2007
----- 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
757 discussions
Start a n
N
ew thread
James Hawkins : msi: Only unpublish the features if the entire product is being uninstalled.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: ccdf578ba264bd8f522fc03188064b57003d220a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccdf578ba264bd8f522fc0318…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:14:18 2007 -0500 msi: Only unpublish the features if the entire product is being uninstalled. --- dlls/msi/action.c | 15 ++++++++++++++- dlls/msi/tests/install.c | 10 ++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index ca46448..9560c4e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3754,11 +3754,24 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature) return ERROR_SUCCESS; } +static BOOL msi_check_unpublish(MSIPACKAGE *package) +{ + MSIFEATURE *feature; + + LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) + { + if (feature->ActionRequest != INSTALLSTATE_ABSENT) + return FALSE; + } + + return TRUE; +} + static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package) { MSIFEATURE *feature; - if (msi_check_publish(package)) + if (!msi_check_unpublish(package)) return ERROR_SUCCESS; LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index a93b66b..6ac44f1 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2169,16 +2169,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
1
0
0
0
James Hawkins : msi: Properly register features.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 9f11a5a8782270cd26273ca8d198535dcd7297fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f11a5a8782270cd26273ca8d…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:13:28 2007 -0500 msi: Properly register features. --- dlls/msi/action.c | 7 +++++++ dlls/msi/tests/install.c | 40 ++++++++-------------------------------- 2 files changed, 15 insertions(+), 32 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 83f3d84..ca46448 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3625,6 +3625,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) UINT rc; HKEY hkey=0; HKEY hukey=0; + HKEY userdata=0; if (!msi_check_publish(package)) return ERROR_SUCCESS; @@ -3637,6 +3638,10 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; + rc = MSIREG_OpenUserDataFeaturesKey(package->ProductCode, &userdata, TRUE); + if (rc != ERROR_SUCCESS) + goto end; + /* here the guids are base 85 encoded */ LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { @@ -3678,6 +3683,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) strcatW(data,buf); } } + if (feature->Feature_Parent) { static const WCHAR sep[] = {'\2',0}; @@ -3686,6 +3692,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) } msi_reg_set_val_str( hkey, feature->Feature, data ); + msi_reg_set_val_str( userdata, feature->Feature, data ); msi_free(data); size = 0; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 5f54609..a93b66b 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2063,16 +2063,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); @@ -2112,16 +2106,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); @@ -2161,16 +2149,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); @@ -2262,16 +2244,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
1
0
0
0
James Hawkins : msi: Properly register and unregister components.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: fc6b9dd4e4ff2674ebeda31ef4c8ced4bafa7d6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc6b9dd4e4ff2674ebeda31ef…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:12:41 2007 -0500 msi: Properly register and unregister components. --- dlls/msi/action.c | 24 +++++++++++++++++++++- dlls/msi/msipriv.h | 2 + dlls/msi/registry.c | 24 ++++++++++++++++++++++ dlls/msi/tests/install.c | 49 +++++++++++++-------------------------------- 4 files changed, 63 insertions(+), 36 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 05bb4f1..83f3d84 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1845,6 +1845,9 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) switch (feature->Action) { + case INSTALLSTATE_ABSENT: + component->anyAbsent = 1; + break; case INSTALLSTATE_ADVERTISED: component->hasAdvertiseFeature = 1; break; @@ -1906,6 +1909,8 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) } TRACE("nobody wants component %s\n", debugstr_w(component->Component)); + if (component->anyAbsent) + msi_component_set_state(component, INSTALLSTATE_ABSENT); } LIST_FOR_EACH_ENTRY( component, &package->components, MSICOMPONENT, entry ) @@ -2767,6 +2772,8 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) MSICOMPONENT *comp; HKEY hkey=0,hkey2=0; + TRACE("\n"); + /* writes the Component and Features values to the registry */ rc = MSIREG_OpenComponents(&hkey); @@ -2823,6 +2830,13 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) } RegCloseKey(hkey2); + + rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, &hkey2, TRUE); + if (rc != ERROR_SUCCESS) + continue; + + msi_reg_set_val_str(hkey2, squished_pc, comp->FullKeypath); + RegCloseKey(hkey2); } else if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_ABSENT)) { @@ -2840,6 +2854,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) if (res == ERROR_NO_MORE_ITEMS) RegDeleteKeyW(hkey,squished_cc); + MSIREG_DeleteUserDataComponentKey(comp->ComponentId); } /* UI stuff */ @@ -3785,6 +3800,7 @@ static UINT msi_make_package_local( MSIPACKAGE *package, HKEY hkey ) {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0}; WCHAR packagefile[MAX_PATH]; LPWSTR msiFilePath; + HKEY props; UINT r; r = msi_get_local_package_name( packagefile ); @@ -3805,8 +3821,14 @@ static UINT msi_make_package_local( MSIPACKAGE *package, HKEY hkey ) } msi_free( msiFilePath ); - /* FIXME: maybe set this key in ACTION_RegisterProduct instead */ msi_reg_set_val_str( hkey, INSTALLPROPERTY_LOCALPACKAGEW, packagefile ); + + r = MSIREG_OpenInstallPropertiesKey(package->ProductCode, &props, TRUE); + if (r != ERROR_SUCCESS) + return r; + + msi_reg_set_val_str(props, INSTALLPROPERTY_LOCALPACKAGEW, packagefile); + RegCloseKey(props); return ERROR_SUCCESS; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index d85ac55..91249e1 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -359,6 +359,7 @@ typedef struct tagMSICOMPONENT LPWSTR FullKeypath; LPWSTR AdvertiseString; + unsigned int anyAbsent:1; unsigned int hasAdvertiseFeature:1; unsigned int hasLocalFeature:1; unsigned int hasSourceFeature:1; @@ -752,6 +753,7 @@ extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, B extern UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); +extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent); extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name ); extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 1163111..9a88aea 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -729,6 +729,30 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create return rc; } +UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent) +{ + UINT rc; + WCHAR comp[GUID_SIZE]; + WCHAR keypath[0x200]; + LPWSTR usersid; + + TRACE("%s\n", debugstr_w(szComponent)); + if (!squash_guid(szComponent, comp)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(comp)); + + rc = get_user_sid(&usersid); + if (rc != ERROR_SUCCESS || !usersid) + { + ERR("Failed to retrieve user SID: %d\n", rc); + return rc; + } + + sprintfW(keypath, szUserDataComp_fmt, usersid, comp); + + return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath); +} + UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create) { UINT rc; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 3d5458a..5f54609 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2030,11 +2030,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* complete uninstall */ r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); @@ -2079,11 +2076,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* complete uninstall */ r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); @@ -2131,11 +2125,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* no UnpublishFeatures */ r = MsiInstallProductA(msifile, "REMOVE=ALL"); @@ -2183,11 +2174,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* UnpublishFeatures, only feature removed. Only works when entire product is removed */ r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature"); @@ -2212,11 +2200,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* complete install */ r = MsiInstallProductA(msifile, "FULL=1"); @@ -2241,11 +2226,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* UnpublishFeatures, both features removed */ r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature,montecristo"); @@ -2293,11 +2275,8 @@ static void test_publish(void) r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); /* complete uninstall */ r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
1
0
0
0
James Hawkins : msi: Remove a duplicated function.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: eec9bbb12d0c92a53747298d19663187ae9204c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eec9bbb12d0c92a53747298d1…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:10:47 2007 -0500 msi: Remove a duplicated function. --- dlls/msi/action.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f79f9a4..05bb4f1 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4441,19 +4441,6 @@ static LPCWSTR *msi_service_args_to_vector(LPCWSTR name, LPWSTR args, DWORD *num return vector; } -static MSICOMPONENT *msi_find_component( MSIPACKAGE *package, LPCWSTR component ) -{ - MSICOMPONENT *comp; - - LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry) - { - if (!lstrcmpW(comp->Component, component)) - return comp; - } - - return NULL; -} - static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) { MSIPACKAGE *package = (MSIPACKAGE *)param; @@ -4464,7 +4451,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) DWORD event, numargs; UINT r = ERROR_FUNCTION_FAILED; - comp = msi_find_component(package, MSI_RecordGetString(rec, 6)); + comp = get_loaded_component(package, MSI_RecordGetString(rec, 6)); if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) return ERROR_SUCCESS;
1
0
0
0
James Hawkins : msi: Implement the MoveFiles standard action.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: c3df74e24f311b3a33c1f143bd4f4b3829112012 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3df74e24f311b3a33c1f143b…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:09:02 2007 -0500 msi: Implement the MoveFiles standard action. --- dlls/msi/action.c | 315 +++++++++++++++++++++++++++++++++++++++++++++- dlls/msi/tests/install.c | 48 ++++---- include/msidefs.h | 5 + 3 files changed, 338 insertions(+), 30 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c3df74e24f311b3a33c1f…
1
0
0
0
James Hawkins : msi: Test the MoveFiles standard action.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: b9a29e221f4e5dada5ac664e30812ae40a65c6e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9a29e221f4e5dada5ac664e3…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:07:50 2007 -0500 msi: Test the MoveFiles standard action. --- dlls/msi/tests/install.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 140 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 52de3db..46cc1ec 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -109,6 +109,8 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "CostFinalize\t\t1000\n" "CostInitialize\t\t800\n" "FileCost\t\t900\n" + "ResolveSource\t\t950\n" + "MoveFiles\t\t1700\n" "InstallFiles\t\t4000\n" "InstallServices\t\t5000\n" "InstallFinalize\t\t6600\n" @@ -508,6 +510,27 @@ static const CHAR rem_remove_files_dat[] = "FileKey\tComponent_\tFileName\tDirPr "block\thelium\tblock\tMSITESTDIR\t3\n" "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"; +static const CHAR mov_move_file_dat[] = "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n" + "s72\ts72\tS255\tS255\tS72\ts72\ti2\n" + "MoveFile\tFileKey\n" + "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n" + "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n" + "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n" + "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n" + "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n" + "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n" + "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n" + "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n" + "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n" + "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n" + "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n" + "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n" + "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n" + "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n" + "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n" + "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n" + "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n"; + typedef struct _msi_table { const CHAR *filename; @@ -757,6 +780,20 @@ static const msi_table rem_tables[] = ADD_TABLE(rem_remove_files), }; +static const msi_table mov_tables[] = +{ + ADD_TABLE(cwd_component), + ADD_TABLE(directory), + ADD_TABLE(rof_feature), + ADD_TABLE(ci2_feature_comp), + ADD_TABLE(ci2_file), + ADD_TABLE(install_exec_seq), + ADD_TABLE(rof_media), + ADD_TABLE(property), + ADD_TABLE(mov_move_file), + ADD_TABLE(registry), +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -2896,6 +2933,108 @@ static void test_removefiles(void) RemoveDirectory("msitest"); } +static void test_movefiles(void) +{ + UINT r; + char props[MAX_PATH]; + + CreateDirectoryA("msitest", NULL); + create_file("msitest\\augustus", 100); + create_file("cameroon", 100); + create_file("djibouti", 100); + create_file("egypt", 100); + create_file("finland", 100); + create_file("gambai", 100); + create_file("honduras", 100); + create_file("msitest\\india", 100); + create_file("japan", 100); + create_file("kenya", 100); + CreateDirectoryA("latvia", NULL); + create_file("nauru", 100); + create_file("apple", 100); + create_file("application", 100); + create_file("ape", 100); + create_file("foo", 100); + create_file("fao", 100); + create_file("fbod", 100); + create_file("budding", 100); + create_file("buddy", 100); + create_file("bud", 100); + create_file("bar", 100); + create_file("bur", 100); + create_file("bird", 100); + + create_database(msifile, mov_tables, sizeof(mov_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); + MsiEnableLog(INSTALLLOGMODE_VERBOSE | INSTALLLOGMODE_EXTRADEBUG, "log.txt", 0); + + /* if the source or dest property is not a full path, + * windows tries to access it as a network resource + */ + + sprintf(props, "SOURCEFULL=\"%s\\\" DESTFULL=\"%s\\msitest\" " + "FILEPATHBAD=\"%s\\japan\" FILEPATHGOOD=\"%s\\kenya\"", + CURR_DIR, PROG_FILES_DIR, CURR_DIR, CURR_DIR); + + r = MsiInstallProductA(msifile, props); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); + ok(!delete_pf("msitest\\dest", TRUE), "File copied\n"); + todo_wine ok(delete_pf("msitest\\canada", TRUE), "File not copied\n"); + todo_wine ok(delete_pf("msitest\\dominica", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\elsalvador", TRUE), "File moved\n"); + ok(!delete_pf("msitest\\france", TRUE), "File moved\n"); + ok(!delete_pf("msitest\\georgia", TRUE), "File moved\n"); + todo_wine ok(delete_pf("msitest\\hungary", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\indonesia", TRUE), "File moved\n"); + ok(!delete_pf("msitest\\jordan", TRUE), "File moved\n"); + todo_wine ok(delete_pf("msitest\\kiribati", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\lebanon", TRUE), "File moved\n"); + ok(!delete_pf("msitest\\lebanon", FALSE), "Directory moved\n"); + ok(!delete_pf("msitest\\apple", TRUE), "File should not exist\n"); + todo_wine ok(delete_pf("msitest\\wildcard", TRUE), "File not moved\n"); + todo_wine ok(delete_pf("msitest\\application", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\ape", TRUE), "File moved\n"); + todo_wine ok(delete_pf("msitest\\foo", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\fao", TRUE), "File should not exist\n"); + todo_wine ok(delete_pf("msitest\\single", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\fbod", TRUE), "File moved\n"); + todo_wine ok(delete_pf("msitest\\budding", TRUE), "File not moved\n"); + todo_wine ok(delete_pf("msitest\\buddy", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\bud", TRUE), "File moved\n"); + todo_wine ok(delete_pf("msitest\\bar", TRUE), "File not moved\n"); + todo_wine ok(delete_pf("msitest\\bur", TRUE), "File not moved\n"); + ok(!delete_pf("msitest\\bird", TRUE), "File moved\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + ok(DeleteFileA("cameroon"), "File moved\n"); + todo_wine ok(!DeleteFileA("djibouti"), "File not moved\n"); + ok(DeleteFileA("egypt"), "File moved\n"); + ok(DeleteFileA("finland"), "File moved\n"); + ok(DeleteFileA("gambai"), "File moved\n"); + todo_wine ok(!DeleteFileA("honduras"), "File not moved\n"); + ok(DeleteFileA("msitest\\india"), "File moved\n"); + ok(DeleteFileA("japan"), "File moved\n"); + todo_wine ok(!DeleteFileA("kenya"), "File not moved\n"); + ok(RemoveDirectoryA("latvia"), "Directory moved\n"); + todo_wine ok(!DeleteFileA("nauru"), "File not moved\n"); + todo_wine ok(!DeleteFileA("apple"), "File not moved\n"); + todo_wine ok(!DeleteFileA("application"), "File not moved\n"); + ok(DeleteFileA("ape"), "File moved\n"); + todo_wine ok(!DeleteFileA("foo"), "File not moved\n"); + todo_wine ok(!DeleteFileA("fao"), "File not moved\n"); + ok(DeleteFileA("fbod"), "File moved\n"); + todo_wine ok(!DeleteFileA("budding"), "File not moved\n"); + todo_wine ok(!DeleteFileA("buddy"), "File not moved\n"); + ok(DeleteFileA("bud"), "File moved\n"); + todo_wine ok(!DeleteFileA("bar"), "File not moved\n"); + todo_wine ok(!DeleteFileA("bur"), "File not moved\n"); + ok(DeleteFileA("bird"), "File moved\n"); + + DeleteFile("msitest\\augustus"); + RemoveDirectory("msitest"); + DeleteFile(msifile); +} START_TEST(install) { DWORD len; @@ -2935,6 +3074,7 @@ START_TEST(install) test_admin(); test_adminprops(); test_removefiles(); + test_movefiles(); SetCurrentDirectoryA(prev_path); }
1
0
0
0
Vitaliy Margolen : kernel32: Implement GetProcessHandleCount.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: eb31959ab957be075a9a14fe31717f981b33b2cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb31959ab957be075a9a14fe3…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Thu Nov 1 00:46:54 2007 -0600 kernel32: Implement GetProcessHandleCount. --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/process.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index fe98670..ff92b2e 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -576,7 +576,7 @@ @ stdcall GetProcAddress(long str) @ stdcall GetProcessAffinityMask(long ptr ptr) @ stdcall GetProcessFlags(long) -# @ stub GetProcessHandleCount +@ stdcall GetProcessHandleCount(long ptr) @ stdcall GetProcessHeap() @ stdcall GetProcessHeaps(long ptr) @ stdcall GetProcessId(long) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index a08235a..d770fd7 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2784,6 +2784,19 @@ BOOL WINAPI GetProcessIoCounters(HANDLE hProcess, PIO_COUNTERS ioc) return !status; } +/****************************************************************** + * GetProcessHandleCount (KERNEL32.@) + */ +BOOL WINAPI GetProcessHandleCount(HANDLE hProcess, DWORD *cnt) +{ + NTSTATUS status; + + status = NtQueryInformationProcess(hProcess, ProcessHandleCount, + cnt, sizeof(*cnt), NULL); + if (status) SetLastError( RtlNtStatusToDosError(status) ); + return !status; +} + /*********************************************************************** * ProcessIdToSessionId (KERNEL32.@) * This function is available on Terminal Server 4SP4 and Windows 2000
1
0
0
0
Dmitry Timoshkov : version: Use GetModuleHandleEx to increment the module ref count.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 09c3d32ff583dad7b1ba8a86d17a65bc8226f705 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09c3d32ff583dad7b1ba8a86d…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Nov 1 14:23:38 2007 +0800 version: Use GetModuleHandleEx to increment the module ref count. --- dlls/version/info.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/version/info.c b/dlls/version/info.c index 0ad288e..935d0c1 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -246,11 +246,9 @@ static DWORD VERSION_GetFileVersionInfo_PE( LPCWSTR filename, DWORD datasize, LP TRACE("%s\n", debugstr_w(filename)); - hModule = GetModuleHandleW(filename); - if(!hModule) + if (!GetModuleHandleExW(0, filename, &hModule)) hModule = LoadLibraryExW(filename, 0, LOAD_LIBRARY_AS_DATAFILE); - else - hModule = LoadLibraryExW(filename, 0, 0); + if(!hModule) { WARN("Could not load %s\n", debugstr_w(filename));
1
0
0
0
Dmitry Timoshkov : winex11.drv: Add support for saving/ reading display settings.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 7bb12b9e8c4230d38244f965ad2a55e771a83fb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7bb12b9e8c4230d38244f965a…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Nov 1 14:23:19 2007 +0800 winex11.drv: Add support for saving/reading display settings. --- dlls/winex11.drv/settings.c | 73 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 71 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index 908d61e..d530f9b 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -24,6 +24,7 @@ #include "x11drv.h" #include "windef.h" +#include "winreg.h" #include "wingdi.h" #include "ddrawi.h" #include "wine/debug.h" @@ -144,11 +145,13 @@ static int X11DRV_nores_GetCurrentMode(void) { return 0; } + static LONG X11DRV_nores_SetCurrentMode(int mode) { TRACE("Ignoring mode change request\n"); return DISP_CHANGE_FAILED; } + /* default handler only gets the current X desktop resolution */ void X11DRV_Settings_Init(void) { @@ -159,6 +162,68 @@ void X11DRV_Settings_Init(void) X11DRV_Settings_AddOneMode(screen_width, screen_height, 0, 60); } +/* Our fake driver GUID path */ +static const char wine_X11_reg_key[] = + "System\\CurrentControlSet\\Control\\Video\\{64498428-1122-3344-5566-778899aabbcc}\\0000"; + +static BOOL read_registry_settings(DEVMODEW *dm) +{ + HKEY hkey; + DWORD type, size; + BOOL ret = TRUE; + + if (RegOpenKeyA(HKEY_CURRENT_CONFIG, wine_X11_reg_key, &hkey)) + return FALSE; + +#define query_value(name, data) \ + if (RegQueryValueExA(hkey, name, 0, &type, (LPBYTE)(data), &size) || \ + type != REG_DWORD || size != sizeof(DWORD)) \ + ret = FALSE + + query_value("DefaultSettings.BitsPerPel", &dm->dmBitsPerPel); + query_value("DefaultSettings.XResolution", &dm->dmPelsWidth); + query_value("DefaultSettings.YResolution", &dm->dmPelsHeight); + query_value("DefaultSettings.VRefresh", &dm->dmDisplayFrequency); + query_value("DefaultSettings.Flags", &dm->dmDisplayFlags); + query_value("DefaultSettings.XPanning", &dm->dmPosition.x); + query_value("DefaultSettings.YPanning", &dm->dmPosition.y); + query_value("DefaultSettings.Orientation", &dm->dmDisplayOrientation); + query_value("DefaultSettings.FixedOutput", &dm->dmDisplayFixedOutput); + +#undef query_value + + RegCloseKey(hkey); + return ret; +} + +static BOOL write_registry_settings(const DEVMODEW *dm) +{ + HKEY hkey; + BOOL ret = TRUE; + + if (RegCreateKeyA(HKEY_CURRENT_CONFIG, wine_X11_reg_key, &hkey)) + return FALSE; + +#define set_value(name, data) \ + if (RegSetValueExA(hkey, name, 0, REG_DWORD, (LPBYTE)(data), sizeof(DWORD))) \ + ret = FALSE + + set_value("DefaultSettings.BitsPerPel", &dm->dmBitsPerPel); + set_value("DefaultSettings.XResolution", &dm->dmPelsWidth); + set_value("DefaultSettings.YResolution", &dm->dmPelsHeight); + set_value("DefaultSettings.VRefresh", &dm->dmDisplayFrequency); + set_value("DefaultSettings.Flags", &dm->dmDisplayFlags); + set_value("DefaultSettings.XPanning", &dm->dmPosition.x); + set_value("DefaultSettings.YPanning", &dm->dmPosition.y); + set_value("DefaultSettings.Orientation", &dm->dmDisplayOrientation); + set_value("DefaultSettings.FixedOutput", &dm->dmDisplayFixedOutput); + +#undef set_value + + RegCloseKey(hkey); + return ret; +} + /*********************************************************************** * EnumDisplaySettingsEx (X11DRV.@) * @@ -192,7 +257,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW if (n == ENUM_REGISTRY_SETTINGS) { TRACE("mode %d (registry) -- getting default mode (%s)\n", n, handler_name); - n = dd_mode_default; + return read_registry_settings(devmode); } if (n < dd_mode_count) { @@ -311,7 +376,11 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, } /* we have a valid mode */ TRACE("Requested display settings match mode %d (%s)\n", i, handler_name); - if (!(flags & CDS_TEST)) + + if (flags & CDS_UPDATEREGISTRY) + write_registry_settings(devmode); + + if (!(flags & (CDS_TEST | CDS_NORESET))) return pSetCurrentMode(i); return DISP_CHANGE_SUCCESSFUL; }
1
0
0
0
Dmitry Timoshkov : user32: Initialize more fields in the DEVMODE structure.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 2712eb50b18128a41aea251119d969e461b06874 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2712eb50b18128a41aea25111…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Nov 1 14:22:41 2007 +0800 user32: Initialize more fields in the DEVMODE structure. --- dlls/user32/sysparams.c | 24 ++++++++++++++++-------- dlls/winex11.drv/settings.c | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index a72108a..ad5704a 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -2985,7 +2985,6 @@ LONG WINAPI ChangeDisplaySettingsW( LPDEVMODEW devmode, DWORD flags ) LONG WINAPI ChangeDisplaySettingsExA( LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags, LPVOID lparam ) { - DEVMODEW devmodeW; LONG ret; UNICODE_STRING nameW; @@ -2994,13 +2993,11 @@ LONG WINAPI ChangeDisplaySettingsExA( LPCSTR devname, LPDEVMODEA devmode, HWND h if (devmode) { - devmodeW.dmBitsPerPel = devmode->dmBitsPerPel; - devmodeW.dmPelsHeight = devmode->dmPelsHeight; - devmodeW.dmPelsWidth = devmode->dmPelsWidth; - devmodeW.dmDisplayFlags = devmode->dmDisplayFlags; - devmodeW.dmDisplayFrequency = devmode->dmDisplayFrequency; - devmodeW.dmFields = devmode->dmFields; - ret = ChangeDisplaySettingsExW(nameW.Buffer, &devmodeW, hwnd, flags, lparam); + DEVMODEW *devmodeW; + + devmodeW = GdiConvertToDevmodeW(devmode); + ret = ChangeDisplaySettingsExW(nameW.Buffer, devmodeW, hwnd, flags, lparam); + HeapFree(GetProcessHeap(), 0, devmodeW); } else { @@ -3063,12 +3060,23 @@ BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum, ret = EnumDisplaySettingsExW(nameW.Buffer,iModeNum,&devmodeW,dwFlags); if (ret) { + lpDevMode->dmSize = sizeof(*lpDevMode); + lpDevMode->dmSpecVersion = devmodeW.dmSpecVersion; + lpDevMode->dmDriverVersion = devmodeW.dmDriverVersion; + WideCharToMultiByte(CP_ACP, 0, devmodeW.dmDeviceName, -1, + (LPSTR)lpDevMode->dmDeviceName, CCHDEVICENAME, NULL, NULL); + lpDevMode->dmDriverExtra = 0; /* FIXME */ lpDevMode->dmBitsPerPel = devmodeW.dmBitsPerPel; lpDevMode->dmPelsHeight = devmodeW.dmPelsHeight; lpDevMode->dmPelsWidth = devmodeW.dmPelsWidth; lpDevMode->dmDisplayFlags = devmodeW.dmDisplayFlags; lpDevMode->dmDisplayFrequency = devmodeW.dmDisplayFrequency; lpDevMode->dmFields = devmodeW.dmFields; + + lpDevMode->dmPosition.x = devmodeW.dmPosition.x; + lpDevMode->dmPosition.y = devmodeW.dmPosition.y; + lpDevMode->dmDisplayOrientation = devmodeW.dmDisplayOrientation; + lpDevMode->dmDisplayFixedOutput = devmodeW.dmDisplayFixedOutput; } if (lpszDeviceName) RtlFreeUnicodeString(&nameW); return ret; diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index cc6dd2c..908d61e 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -165,11 +165,25 @@ void X11DRV_Settings_Init(void) */ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags) { - DWORD dwBpp = screen_depth; + static const WCHAR dev_name[CCHDEVICENAME] = + { 'W','i','n','e',' ','X','1','1',' ','d','r','i','v','e','r',0 }; + DWORD dwBpp; + + dwBpp = screen_depth; if (dwBpp == 24) dwBpp = 32; + + devmode->dmSize = sizeof(DEVMODEW); + devmode->dmSpecVersion = MAKEWORD(1,4); + devmode->dmDriverVersion = MAKEWORD(1,4); + memcpy(devmode->dmDeviceName, dev_name, sizeof(dev_name)); + devmode->dmDriverExtra = 0; devmode->dmDisplayFlags = 0; devmode->dmDisplayFrequency = 0; - devmode->dmSize = sizeof(DEVMODEW); + devmode->dmPosition.x = 0; + devmode->dmPosition.y = 0; + devmode->dmDisplayOrientation = 0; + devmode->dmDisplayFixedOutput = 0; + if (n == ENUM_CURRENT_SETTINGS) { TRACE("mode %d (current) -- getting current mode (%s)\n", n, handler_name);
1
0
0
0
← Newer
1
...
71
72
73
74
75
76
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
Results per page:
10
25
50
100
200