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
October 2017
----- 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
478 discussions
Start a n
N
ew thread
Nikolay Sivov : gdiplus/metafile: Implement EmfPlusRecordTypeSetClipRegion playback.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: bf9305f63547fa4050f7ac8a90314ce622d1be7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf9305f63547fa4050f7ac8a9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 23 09:47:05 2017 +0300 gdiplus/metafile: Implement EmfPlusRecordTypeSetClipRegion playback. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/metafile.c | 38 ++++++++++++++++++++++++++++++++------ dlls/gdiplus/tests/metafile.c | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 7289ea5..4990a5f 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -2134,6 +2134,18 @@ static GpStatus METAFILE_PlaybackObject(GpMetafile *metafile, UINT flags, UINT d return status; } +static GpStatus metafile_set_clip_region(GpMetafile *metafile, GpRegion *region, CombineMode mode) +{ + GpMatrix world_to_device; + + get_graphics_transform(metafile->playback_graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, &world_to_device); + + GdipTransformRegion(region, &world_to_device); + GdipCombineRegionRegion(metafile->clip, region, mode); + + return METAFILE_PlaybackUpdateClip(metafile); +} + GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, EmfPlusRecordType recordType, UINT flags, UINT dataSize, GDIPCONST BYTE *data) { @@ -2315,7 +2327,6 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, EmfPlusSetClipRect *record = (EmfPlusSetClipRect*)header; CombineMode mode = (CombineMode)((flags >> 8) & 0xf); GpRegion *region; - GpMatrix world_to_device; if (dataSize + sizeof(EmfPlusRecordHeader) < sizeof(*record)) return InvalidParameter; @@ -2324,17 +2335,32 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, if (stat == Ok) { - get_graphics_transform(real_metafile->playback_graphics, - CoordinateSpaceDevice, CoordinateSpaceWorld, &world_to_device); + stat = metafile_set_clip_region(real_metafile, region, mode); + GdipDeleteRegion(region); + } + + return stat; + } + case EmfPlusRecordTypeSetClipRegion: + { + CombineMode mode = (flags >> 8) & 0xf; + BYTE regionid = flags & 0xff; + GpRegion *region; - GdipTransformRegion(region, &world_to_device); + if (dataSize != 0) + return InvalidParameter; - GdipCombineRegionRegion(real_metafile->clip, region, mode); + if (regionid >= EmfPlusObjectTableSize || real_metafile->objtable[regionid].type != ObjectTypeRegion) + return InvalidParameter; + stat = GdipCloneRegion(real_metafile->objtable[regionid].u.region, ®ion); + if (stat == Ok) + { + stat = metafile_set_clip_region(real_metafile, region, mode); GdipDeleteRegion(region); } - return METAFILE_PlaybackUpdateClip(real_metafile); + return stat; } case EmfPlusRecordTypeSetPageTransform: { diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index f232210..bd4d526 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -2171,7 +2171,7 @@ static const emfplus_record clipping_records[] = { { EmfPlusRecordTypeSetClipRect, 0x300 }, { EmfPlusRecordTypeFillRects, 0xc000 }, { EmfPlusRecordTypeObject, ObjectTypeRegion << 8 }, - { EmfPlusRecordTypeSetClipRegion, 0x100, 0, 1 }, + { EmfPlusRecordTypeSetClipRegion, 0x100 }, { EmfPlusRecordTypeEndOfFile }, { EMR_EOF }, { 0 }
1
0
0
0
Zebediah Figura : gdiplus/tests: Mark broken bitmap background tests.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 35dacf52ddb4e9c7f4c519c1d56ddd2a1f0502f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35dacf52ddb4e9c7f4c519c1d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Oct 21 18:11:36 2017 -0500 gdiplus/tests: Mark broken bitmap background tests. This bug is present in gdiplus.dll version 5.1 and absent in version 5.2. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/image.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index a1bd056..82afc74 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -1770,6 +1770,7 @@ static void test_createhbitmap(void) } /* create HBITMAP with bkgnd colour */ + /* gdiplus.dll 5.1 is broken and only applies the blue value */ stat = GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0xff00ff); expect(Ok, stat); @@ -1789,20 +1790,20 @@ static void test_createhbitmap(void) if (bm.bmBits) { DWORD val = *(DWORD*)bm.bmBits; - ok(val == 0x68c12ac1, "got %x, expected 0x682a2a2a\n", val); + ok(val == 0x68c12ac1 || broken(val == 0x682a2ac1), "got %x, expected 0x68c12ac1\n", val); val = *((DWORD*)bm.bmBits + (bm.bmHeight-1) * bm.bmWidthBytes/4 + 1); - ok(val == 0xff00ff, "got %x, expected 0x682a2a2a\n", val); + ok(val == 0xff00ff || broken(val == 0xff), "got %x, expected 0xff00ff\n", val); } hdc = CreateCompatibleDC(NULL); oldhbitmap = SelectObject(hdc, hbitmap); pixel = GetPixel(hdc, 5, 5); - expect(0xc12ac1, pixel); + ok(pixel == 0xc12ac1 || broken(pixel == 0xc12a2a), "got %x, expected 0xc12ac1\n", pixel); pixel = GetPixel(hdc, 1, 0); - expect(0xff00ff, pixel); + ok(pixel == 0xff00ff || broken(pixel == 0xff0000), "got %x, expected 0xff00ff\n", pixel); pixel = GetPixel(hdc, 2, 0); - expect(0xb12ac1, pixel); + ok(pixel == 0xb12ac1 || broken(pixel == 0xb12a2a), "got %x, expected 0xb12ac1\n", pixel); SelectObject(hdc, oldhbitmap); DeleteDC(hdc); @@ -1829,20 +1830,20 @@ static void test_createhbitmap(void) if (bm.bmBits) { DWORD val = *(DWORD*)bm.bmBits; - ok(val == 0x68c12ac1, "got %x, expected 0x682a2a2a\n", val); + ok(val == 0x68c12ac1 || broken(val == 0x682a2ac1), "got %x, expected 0x68c12ac1\n", val); val = *((DWORD*)bm.bmBits + (bm.bmHeight-1) * bm.bmWidthBytes/4 + 1); - ok(val == 0xff00ff, "got %x, expected 0x682a2a2a\n", val); + ok(val == 0xff00ff || broken(val == 0xff), "got %x, expected 0xff00ff\n", val); } hdc = CreateCompatibleDC(NULL); oldhbitmap = SelectObject(hdc, hbitmap); pixel = GetPixel(hdc, 5, 5); - expect(0xc12ac1, pixel); + ok(pixel == 0xc12ac1 || broken(pixel == 0xc12a2a), "got %x, expected 0xc12ac1\n", pixel); pixel = GetPixel(hdc, 1, 0); - expect(0xff00ff, pixel); + ok(pixel == 0xff00ff || broken(pixel == 0xff0000), "got %x, expected 0xff00ff\n", pixel); pixel = GetPixel(hdc, 2, 0); - expect(0xb12ac1, pixel); + ok(pixel == 0xb12ac1 || broken(pixel == 0xb12a2a), "got %x, expected 0xb12ac1\n", pixel); SelectObject(hdc, oldhbitmap); DeleteDC(hdc);
1
0
0
0
Piotr Caban : msi: Add more feature action tests.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 0d88b68bbe953588104b4f48cc972120bead5af8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d88b68bbe953588104b4f48c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 23 12:17:30 2017 +0200 msi: Add more feature action tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/tests/package.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 1411c1e..3120252 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -3690,17 +3690,70 @@ static void test_states(void) add_custom_action_entry( hdb, "'ConditionCheck4', 19, '', 'Condition check failed (4)'" ); add_custom_action_entry( hdb, "'ConditionCheck5', 19, '', 'Condition check failed (5)'" ); add_custom_action_entry( hdb, "'ConditionCheck6', 19, '', 'Condition check failed (6)'" ); + add_custom_action_entry( hdb, "'ConditionCheck7', 19, '', 'Condition check failed (7)'" ); + add_custom_action_entry( hdb, "'ConditionCheck8', 19, '', 'Condition check failed (8)'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck3', 'REINSTALL', '6598'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck4', 'NOT REMOVE AND Preselected', '6599'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck5', 'REINSTALL', '6601'" ); - add_install_execute_sequence_entry( hdb, "'ConditionCheck6', 'NOT REMOVE AND Preselected', '6602'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck6', 'NOT REMOVE AND Preselected', '6601'" ); + /* Add "one" feature action tests */ + add_install_execute_sequence_entry( hdb, "'ConditionCheck7', 'NOT REMOVE AND NOT(&one=-1)', '1501'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck8', 'NOT REMOVE AND NOT(&one=-1)', '6602'" ); r = MsiDatabaseCommit(hdb); ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed: %d\n", r); + r = package_from_db( hdb, &hpkg ); + ok( r == ERROR_SUCCESS, "failed to create package %u\n", r ); MsiCloseHandle(hdb); + test_feature_states( __LINE__, hpkg, "one", ERROR_UNKNOWN_FEATURE, 0, 0, FALSE ); + test_feature_states( __LINE__, hpkg, "two", ERROR_UNKNOWN_FEATURE, 0, 0, FALSE ); + r = MsiDoActionA( hpkg, "CostInitialize"); + ok( r == ERROR_SUCCESS, "CostInitialize failed\n"); + test_feature_states( __LINE__, hpkg, "one", ERROR_SUCCESS, INSTALLSTATE_UNKNOWN, INSTALLSTATE_UNKNOWN, FALSE ); + test_feature_states( __LINE__, hpkg, "two", ERROR_SUCCESS, INSTALLSTATE_UNKNOWN, INSTALLSTATE_UNKNOWN, FALSE ); + + r = MsiDoActionA( hpkg, "FileCost"); + ok( r == ERROR_SUCCESS, "FileCost failed\n"); + test_feature_states( __LINE__, hpkg, "one", ERROR_SUCCESS, INSTALLSTATE_UNKNOWN, INSTALLSTATE_UNKNOWN, FALSE ); + test_feature_states( __LINE__, hpkg, "two", ERROR_SUCCESS, INSTALLSTATE_UNKNOWN, INSTALLSTATE_UNKNOWN, FALSE ); + + r = MsiDoActionA( hpkg, "CostFinalize"); + ok( r == ERROR_SUCCESS, "CostFinalize failed\n"); + test_feature_states( __LINE__, hpkg, "one", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); + test_feature_states( __LINE__, hpkg, "two", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "alpha", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, FALSE ); + test_component_states( __LINE__, hpkg, "beta", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "gamma", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "theta", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, FALSE ); + test_component_states( __LINE__, hpkg, "delta", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "epsilon", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "zeta", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "iota", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "eta", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "kappa", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "lambda", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "mu", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "nu", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "xi", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "omicron", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "pi", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "rho", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "sigma", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "tau", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "phi", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "chi", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "psi", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + test_component_states( __LINE__, hpkg, "upsilon", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + + r = MsiDoActionA( hpkg, "InstallValidate"); + ok( r == ERROR_SUCCESS, "InstallValidate failed %d\n", r); + test_feature_states( __LINE__, hpkg, "one", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); + test_feature_states( __LINE__, hpkg, "two", ERROR_SUCCESS, INSTALLSTATE_ABSENT, INSTALLSTATE_UNKNOWN, FALSE ); + MsiCloseHandle( hpkg ); + r = MsiInstallProductA(msifile, ""); ok(r == ERROR_SUCCESS || (is_broken && r == ERROR_INSTALL_FAILURE) /* win2k3 */, "Expected ERROR_SUCCESS, got %d\n", r);
1
0
0
0
Piotr Caban : msi: Add install test with no arguments on already installed product.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 599622d58325cba28d39d5a508cbb87cf50bec38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=599622d58325cba28d39d5a50…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Oct 23 12:17:21 2017 +0200 msi: Add install test with no arguments on already installed product. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/tests/package.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index ab3bb15..1411c1e 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -3058,10 +3058,13 @@ static void test_states(void) {'w','i','n','e','t','e','s','t','3','-','p','a','c','k','a','g','e','.','m','s','i',0}; static const WCHAR msifile4W[] = {'w','i','n','e','t','e','s','t','4','-','p','a','c','k','a','g','e','.','m','s','i',0}; + char msi_cache_file[MAX_PATH]; + DWORD cache_file_name_len; INSTALLSTATE state; MSIHANDLE hpkg; UINT r; MSIHANDLE hdb; + BOOL is_broken; if (is_process_limited()) { @@ -3582,7 +3585,8 @@ static void test_states(void) /* reinstall the product */ r = MsiInstallProductA(msifile3, "REINSTALL=ALL"); - ok(r == ERROR_SUCCESS || broken(r == ERROR_INSTALL_FAILURE) /* win2k3 */, "Expected ERROR_SUCCESS, got %d\n", r); + is_broken = (r == ERROR_INSTALL_FAILURE); + ok(r == ERROR_SUCCESS || broken(is_broken) /* win2k3 */, "Expected ERROR_SUCCESS, got %d\n", r); state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "five"); ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state); @@ -3671,6 +3675,40 @@ static void test_states(void) state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "two"); ok(state == INSTALLSTATE_ABSENT, "state = %d\n", state); + /* no arguments test */ + cache_file_name_len = sizeof(msi_cache_file); + r = MsiGetProductInfoA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", + INSTALLPROPERTY_LOCALPACKAGEA, msi_cache_file, &cache_file_name_len); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiOpenDatabaseA(msi_cache_file, (const char*)MSIDBOPEN_DIRECT, &hdb); + ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); + + create_custom_action_table( hdb ); + add_custom_action_entry( hdb, "'ConditionCheck1', 19, '', 'Condition check failed (1)'" ); + add_custom_action_entry( hdb, "'ConditionCheck2', 19, '', 'Condition check failed (2)'" ); + add_custom_action_entry( hdb, "'ConditionCheck3', 19, '', 'Condition check failed (3)'" ); + add_custom_action_entry( hdb, "'ConditionCheck4', 19, '', 'Condition check failed (4)'" ); + add_custom_action_entry( hdb, "'ConditionCheck5', 19, '', 'Condition check failed (5)'" ); + add_custom_action_entry( hdb, "'ConditionCheck6', 19, '', 'Condition check failed (6)'" ); + + add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck3', 'REINSTALL', '6598'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck4', 'NOT REMOVE AND Preselected', '6599'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck5', 'REINSTALL', '6601'" ); + add_install_execute_sequence_entry( hdb, "'ConditionCheck6', 'NOT REMOVE AND Preselected', '6602'" ); + r = MsiDatabaseCommit(hdb); + ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed: %d\n", r); + MsiCloseHandle(hdb); + + r = MsiInstallProductA(msifile, ""); + ok(r == ERROR_SUCCESS || (is_broken && r == ERROR_INSTALL_FAILURE) /* win2k3 */, + "Expected ERROR_SUCCESS, got %d\n", r); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "one"); + ok(state == INSTALLSTATE_SOURCE, "state = %d\n", state); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "two"); + ok(state == INSTALLSTATE_ABSENT, "state = %d\n", state); + /* uninstall the product */ r = MsiInstallProductA(msifile4, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
1
0
0
0
Alexandre Julliard : kernel32: Also set the preloader range for 64-bit binaries.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 1d49a57e77c2e18dd0b9e74aa6b71fc95ac57017 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d49a57e77c2e18dd0b9e74aa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 23 11:35:24 2017 +0200 kernel32: Also set the preloader range for 64-bit binaries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel_private.h | 4 ++-- dlls/kernel32/module.c | 12 +++++++----- dlls/kernel32/process.c | 20 +++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h index 7382956..1af11f5 100644 --- a/dlls/kernel32/kernel_private.h +++ b/dlls/kernel32/kernel_private.h @@ -84,8 +84,8 @@ struct binary_info enum binary_type type; DWORD arch; DWORD flags; - void *res_start; - void *res_end; + ULONGLONG res_start; + ULONGLONG res_end; }; /* module.c */ diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index 02c94c5..b4d5fe7 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -394,6 +394,7 @@ void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info ) { IMAGE_OS2_HEADER os2; IMAGE_NT_HEADERS32 nt; + IMAGE_NT_HEADERS64 nt64; } ext_header; /* We do have a DOS image so we will now try to seek into @@ -422,16 +423,17 @@ void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info ) info->arch = ext_header.nt.FileHeader.Machine; if (ext_header.nt.FileHeader.Characteristics & IMAGE_FILE_DLL) info->flags |= BINARY_FLAG_DLL; - if (len < sizeof(ext_header.nt)) /* clear remaining part of header if missing */ - memset( (char *)&ext_header.nt + len, 0, sizeof(ext_header.nt) - len ); + if (len < sizeof(ext_header)) /* clear remaining part of header if missing */ + memset( (char *)&ext_header + len, 0, sizeof(ext_header) - len ); switch (ext_header.nt.OptionalHeader.Magic) { case IMAGE_NT_OPTIONAL_HDR32_MAGIC: - info->res_start = (void *)(ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase; - info->res_end = (void *)((ULONG_PTR)ext_header.nt.OptionalHeader.ImageBase + - ext_header.nt.OptionalHeader.SizeOfImage); + info->res_start = ext_header.nt.OptionalHeader.ImageBase; + info->res_end = info->res_start + ext_header.nt.OptionalHeader.SizeOfImage; break; case IMAGE_NT_OPTIONAL_HDR64_MAGIC: + info->res_start = ext_header.nt64.OptionalHeader.ImageBase; + info->res_end = info->res_start + ext_header.nt64.OptionalHeader.SizeOfImage; info->flags |= BINARY_FLAG_64BIT; break; } diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 2c6229e..f9e3f7e 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -207,8 +207,8 @@ static BOOL get_builtin_path( const WCHAR *libname, const WCHAR *ext, WCHAR *fil } binary_info->type = BINARY_UNIX_LIB; binary_info->flags = flags; - binary_info->res_start = NULL; - binary_info->res_end = NULL; + binary_info->res_start = 0; + binary_info->res_end = 0; /* assume current arch */ #if defined(__i386__) || defined(__x86_64__) binary_info->arch = (flags & BINARY_FLAG_64BIT) ? IMAGE_FILE_MACHINE_AMD64 : IMAGE_FILE_MACHINE_I386; @@ -1930,8 +1930,9 @@ static pid_t exec_loader( LPCWSTR cmd_line, unsigned int flags, int socketfd, signal( SIGPIPE, SIG_DFL ); sprintf( socket_env, "WINESERVERSOCKET=%u", socketfd ); - sprintf( preloader_reserve, "WINEPRELOADRESERVE=%lx-%lx", - (unsigned long)binary_info->res_start, (unsigned long)binary_info->res_end ); + sprintf( preloader_reserve, "WINEPRELOADRESERVE=%x%08x-%x%08x", + (ULONG)(binary_info->res_start >> 32), (ULONG)binary_info->res_start, + (ULONG)(binary_info->res_end >> 32), (ULONG)binary_info->res_end ); putenv( preloader_reserve ); putenv( socket_env ); @@ -2403,10 +2404,10 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A else switch (binary_info.type) { case BINARY_PE: - TRACE( "starting %s as Win%d binary (%p-%p, arch %04x%s)\n", + TRACE( "starting %s as Win%d binary (%s-%s, arch %04x%s)\n", debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32, - binary_info.res_start, binary_info.res_end, binary_info.arch, - (binary_info.flags & BINARY_FLAG_FAKEDLL) ? ", fakedll" : "" ); + wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end), + binary_info.arch, (binary_info.flags & BINARY_FLAG_FAKEDLL) ? ", fakedll" : "" ); retv = create_process( hFile, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr, inherit, flags, startup_info, info, unixdir, &binary_info, FALSE ); break; @@ -2556,9 +2557,10 @@ static void exec_process( LPCWSTR name ) switch (binary_info.type) { case BINARY_PE: - TRACE( "starting %s as Win%d binary (%p-%p, arch %04x)\n", + TRACE( "starting %s as Win%d binary (%s-%s, arch %04x)\n", debugstr_w(name), (binary_info.flags & BINARY_FLAG_64BIT) ? 64 : 32, - binary_info.res_start, binary_info.res_end, binary_info.arch ); + wine_dbgstr_longlong(binary_info.res_start), wine_dbgstr_longlong(binary_info.res_end), + binary_info.arch ); create_process( hFile, name, GetCommandLineW(), NULL, NULL, NULL, NULL, FALSE, 0, &startup_info, &info, NULL, &binary_info, TRUE ); break;
1
0
0
0
Vincent Povirk : twain_32: Add support for DAT_NULL commands.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 24a10e301a3056fbdb6d348fc7c96db68c6c1fad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24a10e301a3056fbdb6d348fc…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Oct 20 14:16:26 2017 -0500 twain_32: Add support for DAT_NULL commands. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/twain_32/Makefile.in | 1 + dlls/twain_32/dsm_ctrl.c | 89 ++++++++++++++++++++++++++++++++++++++++++++ dlls/twain_32/twain32_main.c | 28 ++++++++++++++ dlls/twain_32/twain_i.h | 14 +++++++ 4 files changed, 132 insertions(+) diff --git a/dlls/twain_32/Makefile.in b/dlls/twain_32/Makefile.in index 451c489..cadaf80 100644 --- a/dlls/twain_32/Makefile.in +++ b/dlls/twain_32/Makefile.in @@ -1,4 +1,5 @@ MODULE = twain_32.dll +IMPORTS = user32 C_SRCS = \ dsm_ctrl.c \ diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c index b20d55c..9b87867 100644 --- a/dlls/twain_32/dsm_ctrl.c +++ b/dlls/twain_32/dsm_ctrl.c @@ -27,6 +27,7 @@ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "twain.h" #include "twain_i.h" #include "wine/debug.h" @@ -36,6 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(twain); static TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */ static TW_UINT32 DSM_sourceId; /* source id generator */ static TW_UINT16 DSM_currentDevice; /* keep track of device during enumeration */ +static HWND DSM_parent; +static UINT event_message; struct all_devices { char *modname; @@ -114,6 +117,86 @@ twain_autodetect(void) { #endif } +/* DG_CONTROL/DAT_NULL/MSG_CLOSEDSREQ|MSG_DEVICEEVENT|MSG_XFERREADY */ +TW_UINT16 TWAIN_ControlNull (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, activeDS *pSource, TW_UINT16 MSG, TW_MEMREF pData) +{ + struct pending_message *message; + + TRACE ("DG_CONTROL/DAT_NULL MSG=%i\n", MSG); + + if (MSG != MSG_CLOSEDSREQ && + MSG != MSG_DEVICEEVENT && + MSG != MSG_XFERREADY) + { + DSM_twCC = TWCC_BADPROTOCOL; + return TWRC_FAILURE; + } + + message = HeapAlloc(GetProcessHeap(), 0, sizeof(*message)); + if (!message) + { + DSM_twCC = TWCC_LOWMEMORY; + return TWRC_FAILURE; + } + + message->msg = MSG; + list_add_tail(&pSource->pending_messages, &message->entry); + + /* Delphi twain only sends us messages from one window, and it + doesn't even give us the real handle to that window. Other + applications might decide to forward messages sent to DSM_parent + or to the one supplied to ENABLEDS. So let's try very hard to + find a window that will work. */ + if (DSM_parent) + PostMessageW(DSM_parent, event_message, 0, 0); + if (pSource->ui_window && pSource->ui_window != DSM_parent) + PostMessageW(pSource->ui_window, event_message, 0, 0); + if (pSource->event_window && pSource->event_window != pSource->ui_window && + pSource->event_window != DSM_parent) + PostMessageW(pSource->event_window, event_message, 0, 0); + PostMessageW(0, event_message, 0, 0); + + return TWRC_SUCCESS; +} + +/* Filters MSG_PROCESSEVENT messages before reaching the data source */ +TW_UINT16 TWAIN_ProcessEvent (pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) +{ + TW_EVENT *event = (TW_EVENT*)pData; + MSG *msg = (MSG*)event->pEvent; + TW_UINT16 result = TWRC_NOTDSEVENT; + + TRACE("%x,%x\n", msg->message, event_message); + + if (msg->message == event_message) + { + if (!list_empty (&pSource->pending_messages)) + { + struct list *entry = list_head (&pSource->pending_messages); + struct pending_message *message = LIST_ENTRY(entry, struct pending_message, entry); + event->TWMessage = message->msg; + list_remove (entry); + TRACE("<-- %x\n", event->TWMessage); + } + else + event->TWMessage = MSG_NULL; + result = TWRC_DSEVENT; + } + + if (msg->hwnd) + { + MSG dummy; + pSource->event_window = msg->hwnd; + if (!list_empty (&pSource->pending_messages) && + !PeekMessageW(&dummy, msg->hwnd, event_message, event_message, PM_NOREMOVE)) + { + PostMessageW(msg->hwnd, event_message, 0, 0); + } + } + + return result; +} + /* DG_CONTROL/DAT_IDENTITY/MSG_CLOSEDS */ TW_UINT16 TWAIN_CloseDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) { @@ -254,6 +337,9 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) newSource->next = activeSources; newSource->identity.Id = pIdentity->Id; strcpy (newSource->identity.ProductName, pIdentity->ProductName); + list_init(&newSource->pending_messages); + newSource->ui_window = NULL; + newSource->event_window = NULL; activeSources = newSource; DSM_twCC = TWCC_SUCCESS; return TWRC_SUCCESS; @@ -299,6 +385,7 @@ TW_UINT16 TWAIN_CloseDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) currentDS = nextDS; } activeSources = NULL; + DSM_parent = NULL; DSM_twCC = TWCC_SUCCESS; return TWRC_SUCCESS; } else { @@ -314,6 +401,7 @@ TW_UINT16 TWAIN_OpenDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) TRACE("DG_CONTROL/DAT_PARENT/MSG_OPENDSM\n"); if (!DSM_initialized) { + event_message = RegisterWindowMessageA("WINE TWAIN_32 EVENT"); DSM_currentDevice = 0; DSM_initialized = TRUE; DSM_twCC = TWCC_SUCCESS; @@ -323,6 +411,7 @@ TW_UINT16 TWAIN_OpenDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) DSM_twCC = TWCC_SEQERROR; twRC = TWRC_FAILURE; } + DSM_parent = (HWND)pData; return twRC; } diff --git a/dlls/twain_32/twain32_main.c b/dlls/twain_32/twain32_main.c index f7b8f58..d1977b4 100644 --- a/dlls/twain_32/twain32_main.c +++ b/dlls/twain_32/twain32_main.c @@ -142,6 +142,19 @@ DSM_Entry (pTW_IDENTITY pOrigin, TRACE("(DG=%d DAT=%d MSG=%d)\n", DG, DAT, MSG); + if (DG == DG_CONTROL && DAT == DAT_NULL) + { + activeDS *pSource = TWAIN_LookupSource (pOrigin); + if (!pSource) + { + ERR("No source associated with pSource %p\n", pDest); + DSM_twCC = TWCC_BADPROTOCOL; + return TWRC_FAILURE; + } + + return TWAIN_ControlNull (pOrigin, pDest, pSource, MSG, pData); + } + if (pDest) { activeDS *pSource = TWAIN_LookupSource (pDest); @@ -152,6 +165,21 @@ DSM_Entry (pTW_IDENTITY pOrigin, DSM_twCC = TWCC_BADDEST; return TWRC_FAILURE; } + + if (DG == DG_CONTROL && DAT == DAT_EVENT && MSG == MSG_PROCESSEVENT) + { + twRC = TWAIN_ProcessEvent(pOrigin, pSource, pData); + if (twRC == TWRC_DSEVENT) + return twRC; + } + + if (DG == DG_CONTROL && DAT == DAT_USERINTERFACE && + (MSG == MSG_ENABLEDS || MSG == MSG_ENABLEDSUIONLY) && + pData != NULL) + { + pSource->ui_window = ((TW_USERINTERFACE*)pData)->hParent; + } + DSM_twCC = TWCC_SUCCESS; TRACE("Forwarding %d/%d/%d/%p to DS.\n", DG, DAT, MSG, pData); twRC = pSource->dsEntry(pOrigin, DG, DAT, MSG, pData); diff --git a/dlls/twain_32/twain_i.h b/dlls/twain_32/twain_i.h index a8fa2fb..f46999c 100644 --- a/dlls/twain_32/twain_i.h +++ b/dlls/twain_32/twain_i.h @@ -29,6 +29,13 @@ #include "windef.h" #include "winbase.h" #include "twain.h" +#include "wine/list.h" + +struct pending_message +{ + struct list entry; + TW_UINT16 msg; +}; /* internal information about an active data source */ typedef struct tagActiveDS @@ -37,6 +44,9 @@ typedef struct tagActiveDS TW_IDENTITY identity; /* identity */ HMODULE hmod; DSENTRYPROC dsEntry; + struct list pending_messages; + HWND ui_window; + HWND event_window; } activeDS; TW_UINT16 DSM_twCC DECLSPEC_HIDDEN; /* current condition code of Source Manager */ @@ -62,5 +72,9 @@ extern TW_UINT16 TWAIN_OpenDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; extern TW_UINT16 TWAIN_GetDSMStatus (pTW_IDENTITY pOrigin, TW_MEMREF pData) DECLSPEC_HIDDEN; +extern TW_UINT16 TWAIN_ControlNull + (pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, activeDS *pSource, TW_UINT16 MSG, TW_MEMREF pData) DECLSPEC_HIDDEN; +extern TW_UINT16 TWAIN_ProcessEvent + (pTW_IDENTITY pOrigin, activeDS *pSource, TW_MEMREF pData) DECLSPEC_HIDDEN; #endif
1
0
0
0
Vincent Povirk : twain_32: Notify data sources of their assigned Id.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 8a118c2e0f5f42836e58f0ca6849d9d57ff40d50 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a118c2e0f5f42836e58f0ca6…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Oct 20 14:16:25 2017 -0500 twain_32: Notify data sources of their assigned Id. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/twain_32/dsm_ctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/twain_32/dsm_ctrl.c b/dlls/twain_32/dsm_ctrl.c index 9d67dfb..b20d55c 100644 --- a/dlls/twain_32/dsm_ctrl.c +++ b/dlls/twain_32/dsm_ctrl.c @@ -242,13 +242,14 @@ TW_UINT16 TWAIN_OpenDS (pTW_IDENTITY pOrigin, TW_MEMREF pData) } newSource->hmod = hmod; newSource->dsEntry = (DSENTRYPROC)GetProcAddress(hmod, "DS_Entry"); + /* Assign id for the opened data source */ + pIdentity->Id = DSM_sourceId ++; if (TWRC_SUCCESS != newSource->dsEntry (pOrigin, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, pIdentity)) { DSM_twCC = TWCC_OPERATIONERROR; HeapFree(GetProcessHeap(), 0, newSource); + DSM_sourceId--; return TWRC_FAILURE; } - /* Assign name and id for the opened data source */ - pIdentity->Id = DSM_sourceId ++; /* add the data source to an internal active source list */ newSource->next = activeSources; newSource->identity.Id = pIdentity->Id;
1
0
0
0
Pierre Schweitzer : msi: Don't leak memory on failure.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: a6ad46dc940d1da4f567156e306c2349641c8437 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6ad46dc940d1da4f567156e3…
Author: Pierre Schweitzer <pierre(a)reactos.org> Date: Sat Oct 21 11:48:30 2017 +0200 msi: Don't leak memory on failure. Signed-off-by: Pierre Schweitzer <pierre(a)reactos.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/package.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 18466e1..2f6027b 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2286,7 +2286,10 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name ) row = MSI_CreateRecord(1); if (!row) + { + msi_free(buffer); return NULL; + } MSI_RecordSetStringW(row, 1, buffer); msi_free(buffer); return row; @@ -2301,7 +2304,10 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name ) row = MSI_CreateRecord(1); if (!row) + { + msi_free(buffer); return NULL; + } MSI_RecordSetStringW(row, 1, buffer); msi_free(buffer); return row;
1
0
0
0
Pierre Schweitzer : msi: Don't leak memory on failure.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: f621f4102d6e85dead75d229a633df4493f191e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f621f4102d6e85dead75d229a…
Author: Pierre Schweitzer <pierre(a)reactos.org> Date: Sat Oct 21 11:46:39 2017 +0200 msi: Don't leak memory on failure. Signed-off-by: Pierre Schweitzer <pierre(a)reactos.org> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/action.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2f065da..58a831e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -195,7 +195,11 @@ static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, template = msi_get_error_message(package->db, start ? MSIERR_INFO_ACTIONSTART : MSIERR_INFO_ACTIONENDED); row = MSI_CreateRecord(2); - if (!row) return; + if (!row) + { + msi_free(template); + return; + } MSI_RecordSetStringW(row, 0, template); MSI_RecordSetStringW(row, 1, action); MSI_RecordSetInteger(row, 2, start ? package->LastActionResult : rc);
1
0
0
0
Piotr Caban : msi: Improve installation with no argument of already installed product.
by Alexandre Julliard
24 Oct '17
24 Oct '17
Module: wine Branch: master Commit: 808f3158bbcf229d6eb935a7afe7291e9152ce1a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=808f3158bbcf229d6eb935a7a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Oct 20 22:18:41 2017 +0200 msi: Improve installation with no argument of already installed product. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/action.c | 61 +++++++++++++++++++++++------------------------- dlls/msi/msipriv.h | 1 - dlls/msi/tests/package.c | 4 ++-- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 217d1dc..2f065da 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1740,7 +1740,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level ) ret |= process_state_property( package, level, szReinstall, INSTALLSTATE_UNKNOWN ); ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED ); - if (ret && !package->full_reinstall) + if (ret) msi_set_property( package->db, szPreselected, szOne, -1 ); return ret; @@ -1795,7 +1795,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) level = msi_get_property_int(package->db, szInstallLevel, 1); - if (!msi_get_property_int( package->db, szPreselected, 0 )) + if (msi_get_property_int( package->db, szPreselected, 0 )) { LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { @@ -1803,24 +1803,18 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) if (feature->ActionRequest == INSTALLSTATE_UNKNOWN) { - if (feature->Attributes & msidbFeatureAttributesFavorSource) - { - feature->Action = INSTALLSTATE_SOURCE; - feature->ActionRequest = INSTALLSTATE_SOURCE; - } - else if (feature->Attributes & msidbFeatureAttributesFavorAdvertise) + if (feature->Installed == INSTALLSTATE_ABSENT) { - feature->Action = INSTALLSTATE_ADVERTISED; - feature->ActionRequest = INSTALLSTATE_ADVERTISED; + feature->Action = INSTALLSTATE_UNKNOWN; + feature->ActionRequest = INSTALLSTATE_UNKNOWN; } else { - feature->Action = INSTALLSTATE_LOCAL; - feature->ActionRequest = INSTALLSTATE_LOCAL; + feature->Action = feature->Installed; + feature->ActionRequest = feature->Installed; } } } - /* disable child features of unselected parent or follow parent */ LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { if (feature->Feature_Parent) continue; @@ -1828,7 +1822,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) follow_parent( feature ); } } - else /* preselected */ + else if (!msi_get_property_int( package->db, szInstalled, 0 )) { LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { @@ -1836,18 +1830,24 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) if (feature->ActionRequest == INSTALLSTATE_UNKNOWN) { - if (feature->Installed == INSTALLSTATE_ABSENT) + if (feature->Attributes & msidbFeatureAttributesFavorSource) { - feature->Action = INSTALLSTATE_UNKNOWN; - feature->ActionRequest = INSTALLSTATE_UNKNOWN; + feature->Action = INSTALLSTATE_SOURCE; + feature->ActionRequest = INSTALLSTATE_SOURCE; + } + else if (feature->Attributes & msidbFeatureAttributesFavorAdvertise) + { + feature->Action = INSTALLSTATE_ADVERTISED; + feature->ActionRequest = INSTALLSTATE_ADVERTISED; } else { - feature->Action = feature->Installed; - feature->ActionRequest = feature->Installed; + feature->Action = INSTALLSTATE_LOCAL; + feature->ActionRequest = INSTALLSTATE_LOCAL; } } } + /* disable child features of unselected parent or follow parent */ LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { if (feature->Feature_Parent) continue; @@ -1903,6 +1903,14 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) else component->hasLocalFeature = 1; break; + case INSTALLSTATE_UNKNOWN: + if (feature->Installed == INSTALLSTATE_ADVERTISED) + component->hasAdvertisedFeature = 1; + if (feature->Installed == INSTALLSTATE_SOURCE) + component->hasSourceFeature = 1; + if (feature->Installed == INSTALLSTATE_LOCAL) + component->hasLocalFeature = 1; + break; default: break; } @@ -7965,7 +7973,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, { static const WCHAR szDisableRollback[] = {'D','I','S','A','B','L','E','R','O','L','L','B','A','C','K',0}; static const WCHAR szAction[] = {'A','C','T','I','O','N',0}; - WCHAR *reinstall, *remove, *patch, *productcode, *action; + WCHAR *reinstall = NULL, *productcode, *action; UINT rc; DWORD len = 0; @@ -8012,15 +8020,6 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, msi_apply_transforms( package ); msi_apply_patches( package ); - patch = msi_dup_property( package->db, szPatch ); - remove = msi_dup_property( package->db, szRemove ); - reinstall = msi_dup_property( package->db, szReinstall ); - if (msi_get_property_int( package->db, szInstalled, 0 ) && !remove && !reinstall && !patch) - { - TRACE("setting REINSTALL property to ALL\n"); - msi_set_property( package->db, szReinstall, szAll, -1 ); - package->full_reinstall = 1; - } if (msi_get_property( package->db, szAction, NULL, &len )) msi_set_property( package->db, szAction, szINSTALL, -1 ); action = msi_dup_property( package->db, szAction ); @@ -8067,14 +8066,12 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, /* finish up running custom actions */ ACTION_FinishCustomActions(package); - if (package->need_rollback && !reinstall) + if (package->need_rollback && !(reinstall = msi_dup_property( package->db, szReinstall ))) { WARN("installation failed, running rollback script\n"); execute_script( package, SCRIPT_ROLLBACK ); } msi_free( reinstall ); - msi_free( remove ); - msi_free( patch ); msi_free( action ); if (rc == ERROR_SUCCESS && package->need_reboot_at_end) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 3f7387b..25c346b 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -445,7 +445,6 @@ typedef struct tagMSIPACKAGE unsigned char need_reboot_at_end : 1; unsigned char need_reboot_now : 1; unsigned char need_rollback : 1; - unsigned char full_reinstall : 1; } MSIPACKAGE; typedef struct tagMSIPREVIEW diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 0dafd7c..ab3bb15 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -3576,7 +3576,7 @@ static void test_states(void) test_component_states( __LINE__, hpkg, "phi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); test_component_states( __LINE__, hpkg, "chi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); test_component_states( __LINE__, hpkg, "psi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); - test_component_states( __LINE__, hpkg, "upsilon", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, TRUE ); + test_component_states( __LINE__, hpkg, "upsilon", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, FALSE ); MsiCloseHandle(hpkg); @@ -3652,7 +3652,7 @@ static void test_states(void) test_component_states( __LINE__, hpkg, "phi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); test_component_states( __LINE__, hpkg, "chi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); test_component_states( __LINE__, hpkg, "psi", ERROR_SUCCESS, INSTALLSTATE_SOURCE, INSTALLSTATE_UNKNOWN, FALSE ); - test_component_states( __LINE__, hpkg, "upsilon", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, TRUE ); + test_component_states( __LINE__, hpkg, "upsilon", ERROR_SUCCESS, INSTALLSTATE_LOCAL, INSTALLSTATE_LOCAL, FALSE ); MsiCloseHandle(hpkg);
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
48
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
Results per page:
10
25
50
100
200