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 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1174 discussions
Start a n
N
ew thread
David Adam : ddraw: SETFOCUSWINDOW lives independently of other flags.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 0a90271d6984d047893b6d93d2baa5d20dadfac7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a90271d6984d047893b6d93d…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Fri Oct 22 08:32:39 2010 +0200 ddraw: SETFOCUSWINDOW lives independently of other flags. --- dlls/ddraw/ddraw.c | 24 ++++++++++++++---------- dlls/ddraw/tests/ddrawmodes.c | 7 +++++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 346c7c5..1f88fa5 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -586,21 +586,23 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, if(cooplevel & DDSCL_SETFOCUSWINDOW) { /* This isn't compatible with a lot of flags */ - if(cooplevel & ( DDSCL_MULTITHREADED | - DDSCL_FPUSETUP | - DDSCL_FPUPRESERVE | - DDSCL_ALLOWREBOOT | - DDSCL_ALLOWMODEX | - DDSCL_SETDEVICEWINDOW | - DDSCL_NORMAL | - DDSCL_EXCLUSIVE | - DDSCL_FULLSCREEN ) ) + if(cooplevel & ( DDSCL_MULTITHREADED | + DDSCL_CREATEDEVICEWINDOW | + DDSCL_FPUSETUP | + DDSCL_FPUPRESERVE | + DDSCL_ALLOWREBOOT | + DDSCL_ALLOWMODEX | + DDSCL_SETDEVICEWINDOW | + DDSCL_NORMAL | + DDSCL_EXCLUSIVE | + DDSCL_FULLSCREEN ) ) { TRACE("Called with incompatible flags, returning DDERR_INVALIDPARAMS\n"); LeaveCriticalSection(&ddraw_cs); return DDERR_INVALIDPARAMS; } - else if( (This->cooperative_level & DDSCL_FULLSCREEN) && window) + + if( (This->cooperative_level & DDSCL_FULLSCREEN) && window ) { TRACE("Setting DDSCL_SETFOCUSWINDOW with an already set window, returning DDERR_HWNDALREADYSET\n"); LeaveCriticalSection(&ddraw_cs); @@ -620,6 +622,8 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd, DestroyWindow(This->devicewindow); This->devicewindow = NULL; } + + return DD_OK; } /* DDSCL_NORMAL or DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE */ if(cooplevel & DDSCL_NORMAL) diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index 709ea5d..b6491f3 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -557,6 +557,9 @@ static void testcooperativelevels_normal(void) surfacedesc.dwBackBufferCount = 1; surfacedesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP; + rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + /* Do some tests with DDSCL_NORMAL mode */ /* Fullscreen mode + normal mode + exclusive mode */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_NORMAL); @@ -604,6 +607,10 @@ static void testcooperativelevels_normal(void) if(surface && surface != (IDirectDrawSurface *)0xdeadbeef) IDirectDrawSurface_Release(surface); /* Set the focus window */ + + rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW); + ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x\n",rc); + rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW);
1
0
0
0
Hans Leidekker : include: Add rendering intent defines.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 1a7300b4b696e3340c767cb18a1c75099c3c30f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a7300b4b696e3340c767cb18…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:37:16 2010 +0200 include: Add rendering intent defines. --- include/icm.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/icm.h b/include/icm.h index a08d045..34b0b63 100644 --- a/include/icm.h +++ b/include/icm.h @@ -179,6 +179,11 @@ typedef enum typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM); typedef PBMCALLBACKFN LPPBMCALLBACKFN; +#define INTENT_PERCEPTUAL 0 +#define INTENT_RELATIVE_COLORIMETRIC 1 +#define INTENT_SATURATION 2 +#define INTENT_ABSOLUTE_COLORIMETRIC 3 + typedef struct tagPROFILEHEADER { DWORD phSize;
1
0
0
0
Hans Leidekker : msi: Register service arguments in the InstallServices action.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 031c70c965be095629181f3dec00e88076508d42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=031c70c965be095629181f3de…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:37:02 2010 +0200 msi: Register service arguments in the InstallServices action. --- dlls/msi/action.c | 24 +++++++++++++++++++----- dlls/msi/tests/action.c | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 633557d..a8e3a5d 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5369,9 +5369,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) SC_HANDLE hscm, service = NULL; LPCWSTR comp, key; LPWSTR name = NULL, disp = NULL, load_order = NULL, serv_name = NULL; - LPWSTR depends = NULL, pass = NULL; - DWORD serv_type, start_type; - DWORD err_control; + LPWSTR depends = NULL, pass = NULL, args = NULL, image_path = NULL; + DWORD serv_type, start_type, err_control; SERVICE_DESCRIPTIONW sd = {NULL}; static const WCHAR query[] = @@ -5400,6 +5399,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) deformat_string(package, MSI_RecordGetString(rec, 8), &depends); deformat_string(package, MSI_RecordGetString(rec, 9), &serv_name); deformat_string(package, MSI_RecordGetString(rec, 10), &pass); + deformat_string(package, MSI_RecordGetString(rec, 11), &args); comp = MSI_RecordGetString(rec, 12); deformat_string(package, MSI_RecordGetString(rec, 13), &sd.lpDescription); @@ -5420,9 +5420,21 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) goto done; } + if (!args || !args[0]) image_path = file->TargetPath; + else + { + int len = strlenW(file->TargetPath) + strlenW(args) + 2; + if (!(image_path = msi_alloc(len * sizeof(WCHAR)))) + return ERROR_OUTOFMEMORY; + + strcpyW(image_path, file->TargetPath); + strcatW(image_path, szSpace); + strcatW(image_path, args); + } service = CreateServiceW(hscm, name, disp, GENERIC_ALL, serv_type, - start_type, err_control, file->TargetPath, - load_order, NULL, depends, serv_name, pass); + start_type, err_control, image_path, load_order, + NULL, depends, serv_name, pass); + if (!service) { if (GetLastError() != ERROR_SERVICE_EXISTS) @@ -5434,6 +5446,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) WARN("failed to set service description %u\n", GetLastError()); } + if (image_path != file->TargetPath) msi_free(image_path); done: CloseServiceHandle(service); CloseServiceHandle(hscm); @@ -5444,6 +5457,7 @@ done: msi_free(serv_name); msi_free(pass); msi_free(depends); + msi_free(args); return ERROR_SUCCESS; } diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index f483583..f036c5b 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -212,7 +212,7 @@ static const char service_install_dat[] = "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n" "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n" "ServiceInstall\tServiceInstall\n" - "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t"; + "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService\t\t-a arg\tservice_comp\tdescription"; static const char service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
1
0
0
0
Hans Leidekker : msi: Register service dependencies in the InstallServices action.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 7f5204e1bc5d64333c9d1d1f7ca81285479596d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f5204e1bc5d64333c9d1d1f7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:36:45 2010 +0200 msi: Register service dependencies in the InstallServices action. --- dlls/msi/action.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 3b21810..633557d 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5367,8 +5367,9 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) MSIRECORD *row; MSIFILE *file; SC_HANDLE hscm, service = NULL; - LPCWSTR comp, depends, key; - LPWSTR name = NULL, disp = NULL, load_order = NULL, serv_name = NULL, pass = NULL; + LPCWSTR comp, key; + LPWSTR name = NULL, disp = NULL, load_order = NULL, serv_name = NULL; + LPWSTR depends = NULL, pass = NULL; DWORD serv_type, start_type; DWORD err_control; SERVICE_DESCRIPTIONW sd = {NULL}; @@ -5391,15 +5392,12 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) if (start_type == SERVICE_BOOT_START || start_type == SERVICE_SYSTEM_START) goto done; - depends = MSI_RecordGetString(rec, 8); - if (depends && *depends) - FIXME("Dependency list unhandled!\n"); - deformat_string(package, MSI_RecordGetString(rec, 2), &name); deformat_string(package, MSI_RecordGetString(rec, 3), &disp); serv_type = MSI_RecordGetInteger(rec, 4); err_control = MSI_RecordGetInteger(rec, 6); deformat_string(package, MSI_RecordGetString(rec, 7), &load_order); + deformat_string(package, MSI_RecordGetString(rec, 8), &depends); deformat_string(package, MSI_RecordGetString(rec, 9), &serv_name); deformat_string(package, MSI_RecordGetString(rec, 10), &pass); comp = MSI_RecordGetString(rec, 12); @@ -5424,7 +5422,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) service = CreateServiceW(hscm, name, disp, GENERIC_ALL, serv_type, start_type, err_control, file->TargetPath, - load_order, NULL, NULL, serv_name, pass); + load_order, NULL, depends, serv_name, pass); if (!service) { if (GetLastError() != ERROR_SERVICE_EXISTS) @@ -5445,6 +5443,7 @@ done: msi_free(load_order); msi_free(serv_name); msi_free(pass); + msi_free(depends); return ERROR_SUCCESS; }
1
0
0
0
Hans Leidekker : msi: The LoadOrderGroup, StartName and Password fields from the ServiceInstall table are formatted strings .
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 7a460eba711f96ddddd31feb4bdb0fc1f087b42f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a460eba711f96ddddd31feb4…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:36:32 2010 +0200 msi: The LoadOrderGroup, StartName and Password fields from the ServiceInstall table are formatted strings. --- dlls/msi/action.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a9826c9..3b21810 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5367,9 +5367,8 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) MSIRECORD *row; MSIFILE *file; SC_HANDLE hscm, service = NULL; - LPCWSTR comp, depends, pass; - LPWSTR name = NULL, disp = NULL; - LPCWSTR load_order, serv_name, key; + LPCWSTR comp, depends, key; + LPWSTR name = NULL, disp = NULL, load_order = NULL, serv_name = NULL, pass = NULL; DWORD serv_type, start_type; DWORD err_control; SERVICE_DESCRIPTIONW sd = {NULL}; @@ -5400,9 +5399,9 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) deformat_string(package, MSI_RecordGetString(rec, 3), &disp); serv_type = MSI_RecordGetInteger(rec, 4); err_control = MSI_RecordGetInteger(rec, 6); - load_order = MSI_RecordGetString(rec, 7); - serv_name = MSI_RecordGetString(rec, 9); - pass = MSI_RecordGetString(rec, 10); + deformat_string(package, MSI_RecordGetString(rec, 7), &load_order); + deformat_string(package, MSI_RecordGetString(rec, 9), &serv_name); + deformat_string(package, MSI_RecordGetString(rec, 10), &pass); comp = MSI_RecordGetString(rec, 12); deformat_string(package, MSI_RecordGetString(rec, 13), &sd.lpDescription); @@ -5413,7 +5412,6 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) ERR("Control query failed!\n"); goto done; } - key = MSI_RecordGetString(row, 6); file = get_loaded_file(package, key); @@ -5444,6 +5442,9 @@ done: msi_free(name); msi_free(disp); msi_free(sd.lpDescription); + msi_free(load_order); + msi_free(serv_name); + msi_free(pass); return ERROR_SUCCESS; }
1
0
0
0
Hans Leidekker : msi: Register the service description in the InstallServices action.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: d7dbb7e08dfc25658d4bdaa0a1cb10a86a23ae50 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7dbb7e08dfc25658d4bdaa0a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:36:20 2010 +0200 msi: Register the service description in the InstallServices action. --- dlls/msi/action.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 80e1418..a9826c9 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5372,6 +5372,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) LPCWSTR load_order, serv_name, key; DWORD serv_type, start_type; DWORD err_control; + SERVICE_DESCRIPTIONW sd = {NULL}; static const WCHAR query[] = {'S','E','L','E','C','T',' ','*',' ','F','R', 'O','M',' ', @@ -5403,6 +5404,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) serv_name = MSI_RecordGetString(rec, 9); pass = MSI_RecordGetString(rec, 10); comp = MSI_RecordGetString(rec, 12); + deformat_string(package, MSI_RecordGetString(rec, 13), &sd.lpDescription); /* fetch the service path */ row = MSI_QueryGetRecord(package->db, query, comp); @@ -5430,12 +5432,18 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) if (GetLastError() != ERROR_SERVICE_EXISTS) ERR("Failed to create service %s: %d\n", debugstr_w(name), GetLastError()); } + else if (sd.lpDescription) + { + if (!ChangeServiceConfig2W(service, SERVICE_CONFIG_DESCRIPTION, &sd)) + WARN("failed to set service description %u\n", GetLastError()); + } done: CloseServiceHandle(service); CloseServiceHandle(hscm); msi_free(name); msi_free(disp); + msi_free(sd.lpDescription); return ERROR_SUCCESS; }
1
0
0
0
Hans Leidekker : msi/tests: Add tests for msidbFeatureAttributesUIDisallowAbsent.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: 5a0a53820a051f9d89042e38492feaea20097c9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5a0a53820a051f9d89042e384…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:36:09 2010 +0200 msi/tests: Add tests for msidbFeatureAttributesUIDisallowAbsent. --- dlls/msi/tests/package.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 765cd24..d19a10a 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -9524,6 +9524,10 @@ static void test_featureparents(void) r = add_feature_entry( hdb, "'orion', '', '', '', 2, 1, '', 0" ); ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); + /* msidbFeatureAttributesUIDisallowAbsent */ + r = add_feature_entry( hdb, "'lyra', '', '', '', 2, 1, '', 16" ); + ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); + /* disabled because of install level */ r = add_feature_entry( hdb, "'waters', '', '', '', 15, 101, '', 9" ); ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); @@ -9704,6 +9708,13 @@ static void test_featureparents(void) state = 0xdeadbee; action = 0xdeadbee; + r = MsiGetFeatureState(hpkg, "lyra", &state, &action); + ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); + ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); + todo_wine ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); + + state = 0xdeadbee; + action = 0xdeadbee; r = MsiGetFeatureState(hpkg, "waters", &state, &action); ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); @@ -9796,6 +9807,9 @@ static void test_featureparents(void) r = MsiSetFeatureState(hpkg, "orion", INSTALLSTATE_ABSENT); ok( r == ERROR_SUCCESS, "failed to set feature state: %d\n", r); + r = MsiSetFeatureState(hpkg, "lyra", INSTALLSTATE_ABSENT); + ok( r == ERROR_SUCCESS, "failed to set feature state: %d\n", r); + r = MsiSetFeatureState(hpkg, "nosuchfeature", INSTALLSTATE_ABSENT); ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %u\n", r); @@ -9822,6 +9836,13 @@ static void test_featureparents(void) state = 0xdeadbee; action = 0xdeadbee; + r = MsiGetFeatureState(hpkg, "lyra", &state, &action); + ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); + ok( state == INSTALLSTATE_ABSENT, "Expected lyra INSTALLSTATE_ABSENT, got %d\n", state); + todo_wine ok( action == INSTALLSTATE_ABSENT, "Expected lyra INSTALLSTATE_ABSENT, got %d\n", action); + + state = 0xdeadbee; + action = 0xdeadbee; r = MsiGetComponentState(hpkg, "leo", &state, &action); ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); ok( state == INSTALLSTATE_UNKNOWN, "Expected leo INSTALLSTATE_UNKNOWN, got %d\n", state);
1
0
0
0
Hans Leidekker : msi: Don' t inline msi_feature_set_state and msi_component_set_state.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: ded22a58c0f6b47a2e9de10d6d414182e7153ffc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ded22a58c0f6b47a2e9de10d6…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:35:59 2010 +0200 msi: Don't inline msi_feature_set_state and msi_component_set_state. --- dlls/msi/action.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/msipriv.h | 98 +-------------------------------------------------- 2 files changed, 94 insertions(+), 96 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index c47e68a..80e1418 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -169,6 +169,98 @@ static const WCHAR szWriteEnvironmentStrings[] = * helper functions ********************************************************/ +void msi_feature_set_state( MSIPACKAGE *package, MSIFEATURE *feature, INSTALLSTATE state ) +{ + if (!package->ProductCode) + { + feature->ActionRequest = state; + feature->Action = state; + } + else if (state == INSTALLSTATE_ABSENT) + { + switch (feature->Installed) + { + case INSTALLSTATE_ABSENT: + feature->ActionRequest = INSTALLSTATE_UNKNOWN; + feature->Action = INSTALLSTATE_UNKNOWN; + break; + default: + feature->ActionRequest = state; + feature->Action = state; + } + } + else if (state == INSTALLSTATE_SOURCE) + { + switch (feature->Installed) + { + case INSTALLSTATE_ABSENT: + case INSTALLSTATE_SOURCE: + feature->ActionRequest = state; + feature->Action = state; + break; + case INSTALLSTATE_LOCAL: + feature->ActionRequest = INSTALLSTATE_LOCAL; + feature->Action = INSTALLSTATE_LOCAL; + break; + default: + feature->ActionRequest = INSTALLSTATE_UNKNOWN; + feature->Action = INSTALLSTATE_UNKNOWN; + } + } + else + { + feature->ActionRequest = state; + feature->Action = state; + } + if (feature->Attributes & msidbFeatureAttributesUIDisallowAbsent) + { + feature->Action = INSTALLSTATE_UNKNOWN; + } +} + +void msi_component_set_state( MSIPACKAGE *package, MSICOMPONENT *comp, INSTALLSTATE state ) +{ + if (!package->ProductCode) + { + comp->ActionRequest = state; + comp->Action = state; + } + else if (state == INSTALLSTATE_ABSENT) + { + switch (comp->Installed) + { + case INSTALLSTATE_LOCAL: + case INSTALLSTATE_SOURCE: + case INSTALLSTATE_DEFAULT: + comp->ActionRequest = state; + comp->Action = state; + break; + default: + comp->ActionRequest = INSTALLSTATE_UNKNOWN; + comp->Action = INSTALLSTATE_UNKNOWN; + } + } + else if (state == INSTALLSTATE_SOURCE) + { + if (comp->Installed == INSTALLSTATE_ABSENT || + (comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature)) + { + comp->ActionRequest = state; + comp->Action = state; + } + else + { + comp->ActionRequest = INSTALLSTATE_UNKNOWN; + comp->Action = INSTALLSTATE_UNKNOWN; + } + } + else + { + comp->ActionRequest = state; + comp->Action = state; + } +} + static void ui_actionstart(MSIPACKAGE *package, LPCWSTR action) { static const WCHAR Query_t[] = diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 6f0b551..30910de 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -888,102 +888,6 @@ extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UIN extern void ACTION_FinishCustomActions( const MSIPACKAGE* package); extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT script, BOOL execute); -static inline void msi_feature_set_state(MSIPACKAGE *package, - MSIFEATURE *feature, - INSTALLSTATE state) -{ - if (!package->ProductCode) - { - feature->ActionRequest = state; - feature->Action = state; - } - else if (state == INSTALLSTATE_ABSENT) - { - switch (feature->Installed) - { - case INSTALLSTATE_ABSENT: - feature->ActionRequest = INSTALLSTATE_UNKNOWN; - feature->Action = INSTALLSTATE_UNKNOWN; - break; - default: - feature->ActionRequest = state; - feature->Action = state; - } - } - else if (state == INSTALLSTATE_SOURCE) - { - switch (feature->Installed) - { - case INSTALLSTATE_ABSENT: - case INSTALLSTATE_SOURCE: - feature->ActionRequest = state; - feature->Action = state; - break; - case INSTALLSTATE_LOCAL: - feature->ActionRequest = INSTALLSTATE_LOCAL; - feature->Action = INSTALLSTATE_LOCAL; - break; - default: - feature->ActionRequest = INSTALLSTATE_UNKNOWN; - feature->Action = INSTALLSTATE_UNKNOWN; - } - } - else - { - feature->ActionRequest = state; - feature->Action = state; - } - if (feature->Attributes & msidbFeatureAttributesUIDisallowAbsent) - { - feature->Action = INSTALLSTATE_UNKNOWN; - } -} - -static inline void msi_component_set_state(MSIPACKAGE *package, - MSICOMPONENT *comp, - INSTALLSTATE state) -{ - if (!package->ProductCode) - { - comp->ActionRequest = state; - comp->Action = state; - } - else if (state == INSTALLSTATE_ABSENT) - { - switch (comp->Installed) - { - case INSTALLSTATE_LOCAL: - case INSTALLSTATE_SOURCE: - case INSTALLSTATE_DEFAULT: - comp->ActionRequest = state; - comp->Action = state; - break; - default: - comp->ActionRequest = INSTALLSTATE_UNKNOWN; - comp->Action = INSTALLSTATE_UNKNOWN; - } - } - else if (state == INSTALLSTATE_SOURCE) - { - if (comp->Installed == INSTALLSTATE_ABSENT || - (comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature)) - { - comp->ActionRequest = state; - comp->Action = state; - } - else - { - comp->ActionRequest = INSTALLSTATE_UNKNOWN; - comp->Action = INSTALLSTATE_UNKNOWN; - } - } - else - { - comp->ActionRequest = state; - comp->Action = state; - } -} - /* actions in other modules */ extern UINT ACTION_AppSearch(MSIPACKAGE *package); extern UINT ACTION_CCPSearch(MSIPACKAGE *package); @@ -1035,6 +939,8 @@ extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value); extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix); extern UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace); +extern void msi_component_set_state(MSIPACKAGE *, MSICOMPONENT *, INSTALLSTATE); +extern void msi_feature_set_state(MSIPACKAGE *, MSIFEATURE *, INSTALLSTATE); /* media */
1
0
0
0
Hans Leidekker : services: Support setting and changing service dependencies.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: e01455d41d72a9823fbe6c33f821bdf037c955d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e01455d41d72a9823fbe6c33f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:35:49 2010 +0200 services: Support setting and changing service dependencies. --- programs/services/rpc.c | 104 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 96 insertions(+), 8 deletions(-) diff --git a/programs/services/rpc.c b/programs/services/rpc.c index c647cc8..41630be 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -84,8 +84,11 @@ struct sc_lock struct scmdatabase *db; }; -static void free_config_strings(QUERY_SERVICE_CONFIGW *old_cfg, QUERY_SERVICE_CONFIGW *new_cfg) +static void free_service_strings(struct service_entry *old, struct service_entry *new) { + QUERY_SERVICE_CONFIGW *old_cfg = &old->config; + QUERY_SERVICE_CONFIGW *new_cfg = &new->config; + if (old_cfg->lpBinaryPathName != new_cfg->lpBinaryPathName) HeapFree(GetProcessHeap(), 0, old_cfg->lpBinaryPathName); @@ -97,6 +100,12 @@ static void free_config_strings(QUERY_SERVICE_CONFIGW *old_cfg, QUERY_SERVICE_CO if (old_cfg->lpDisplayName != new_cfg->lpDisplayName) HeapFree(GetProcessHeap(), 0, old_cfg->lpDisplayName); + + if (old->dependOnServices != new->dependOnServices) + HeapFree(GetProcessHeap(), 0, old->dependOnServices); + + if (old->dependOnGroups != new->dependOnGroups) + HeapFree(GetProcessHeap(), 0, old->dependOnGroups); } /* Check if the given handle is of the required type and allows the requested access. */ @@ -335,6 +344,78 @@ DWORD svcctl_OpenServiceW( return create_handle_for_service(entry, dwDesiredAccess, phService); } +static DWORD parse_dependencies(const WCHAR *dependencies, struct service_entry *entry) +{ + WCHAR *services = NULL, *groups, *s; + DWORD len, len_services = 0, len_groups = 0; + const WCHAR *ptr = dependencies; + + if (!dependencies || !dependencies[0]) + { + entry->dependOnServices = NULL; + entry->dependOnGroups = NULL; + return ERROR_SUCCESS; + } + + while (*ptr) + { + len = strlenW(ptr) + 1; + if (ptr[0] == '+' && ptr[1]) + len_groups += len - 1; + else + len_services += len; + ptr += len; + } + if (!len_services) entry->dependOnServices = NULL; + else + { + services = HeapAlloc(GetProcessHeap(), 0, (len_services + 1) * sizeof(WCHAR)); + if (!services) + return ERROR_OUTOFMEMORY; + + s = services; + ptr = dependencies; + while (*ptr) + { + len = strlenW(ptr) + 1; + if (*ptr != '+') + { + strcpyW(s, ptr); + s += len; + } + ptr += len; + } + *s = 0; + entry->dependOnServices = services; + } + if (!len_groups) entry->dependOnGroups = NULL; + else + { + groups = HeapAlloc(GetProcessHeap(), 0, (len_groups + 1) * sizeof(WCHAR)); + if (!groups) + { + HeapFree(GetProcessHeap(), 0, services); + return ERROR_OUTOFMEMORY; + } + s = groups; + ptr = dependencies; + while (*ptr) + { + len = strlenW(ptr) + 1; + if (ptr[0] == '+' && ptr[1]) + { + strcpyW(s, ptr + 1); + s += len - 1; + } + ptr += len; + } + *s = 0; + entry->dependOnGroups = groups; + } + + return ERROR_SUCCESS; +} + DWORD svcctl_CreateServiceW( SC_RPC_HANDLE hSCManager, LPCWSTR lpServiceName, @@ -369,12 +450,15 @@ DWORD svcctl_CreateServiceW( if (lpPassword) WINE_FIXME("Don't know how to add a password\n"); /* I always get ERROR_GEN_FAILURE */ - if (lpDependencies) - WINE_FIXME("Dependencies not supported yet\n"); err = service_create(lpServiceName, &entry); if (err != ERROR_SUCCESS) return err; + + err = parse_dependencies((LPCWSTR)lpDependencies, entry); + if (err != ERROR_SUCCESS) + return err; + entry->ref_count = 1; entry->config.dwServiceType = entry->status.dwServiceType = dwServiceType; entry->config.dwStartType = dwStartType; @@ -540,9 +624,6 @@ DWORD svcctl_ChangeServiceConfigW( if (lpdwTagId != NULL) WINE_FIXME("Changing tag id not supported\n"); - if (lpDependencies != NULL) - WINE_FIXME("Changing dependencies not supported\n"); - if (lpServiceStartName != NULL) new_entry.config.lpServiceStartName = (LPWSTR)lpServiceStartName; @@ -552,6 +633,13 @@ DWORD svcctl_ChangeServiceConfigW( if (lpDisplayName != NULL) new_entry.config.lpDisplayName = (LPWSTR)lpDisplayName; + err = parse_dependencies((LPCWSTR)lpDependencies, &new_entry); + if (err != ERROR_SUCCESS) + { + service_unlock(service->service_entry); + return err; + } + if (!validate_service_config(&new_entry)) { WINE_ERR("The configuration after the change wouldn't be valid\n"); @@ -576,10 +664,10 @@ DWORD svcctl_ChangeServiceConfigW( err = save_service_config(&new_entry); if (ERROR_SUCCESS == err) { - free_config_strings(&service->service_entry->config,&new_entry.config); + free_service_strings(service->service_entry, &new_entry); *service->service_entry = new_entry; } - else free_config_strings(&new_entry.config,&service->service_entry->config); + else free_service_strings(&new_entry, service->service_entry); service_unlock(service->service_entry); return err;
1
0
0
0
Hans Leidekker : services: Save service dependencies.
by Alexandre Julliard
22 Oct '10
22 Oct '10
Module: wine Branch: master Commit: eae2cf56cbba5179c0041ec26fc00f854ef1d5da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eae2cf56cbba5179c0041ec26…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 22 10:35:37 2010 +0200 services: Save service dependencies. --- programs/services/services.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/programs/services/services.c b/programs/services/services.c index 59fe8bc..1ecf30b 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -154,6 +154,25 @@ static DWORD reg_set_string_value(HKEY hKey, LPCWSTR value_name, LPCWSTR string) return RegSetValueExW(hKey, value_name, 0, REG_SZ, (const BYTE*)string, sizeof(WCHAR)*(strlenW(string) + 1)); } +static DWORD reg_set_multisz_value(HKEY hKey, LPCWSTR value_name, LPCWSTR string) +{ + const WCHAR *ptr; + + if (!string) + { + DWORD err; + err = RegDeleteValueW(hKey, value_name); + if (err != ERROR_FILE_NOT_FOUND) + return err; + + return ERROR_SUCCESS; + } + + ptr = string; + while (*ptr) ptr += strlenW(ptr) + 1; + return RegSetValueExW(hKey, value_name, 0, REG_MULTI_SZ, (const BYTE*)string, sizeof(WCHAR)*(ptr - string + 1)); +} + DWORD save_service_config(struct service_entry *entry) { DWORD err; @@ -173,6 +192,10 @@ DWORD save_service_config(struct service_entry *entry) goto cleanup; if ((err = reg_set_string_value(hKey, SZ_DESCRIPTION, entry->description)) != 0) goto cleanup; + if ((err = reg_set_multisz_value(hKey, SZ_DEPEND_ON_SERVICE, entry->dependOnServices)) != 0) + goto cleanup; + if ((err = reg_set_multisz_value(hKey, SZ_DEPEND_ON_GROUP, entry->dependOnGroups)) != 0) + goto cleanup; if ((err = RegSetValueExW(hKey, SZ_START, 0, REG_DWORD, (LPBYTE)&entry->config.dwStartType, sizeof(DWORD))) != 0) goto cleanup; if ((err = RegSetValueExW(hKey, SZ_ERROR, 0, REG_DWORD, (LPBYTE)&entry->config.dwErrorControl, sizeof(DWORD))) != 0)
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200