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
January 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
3 participants
615 discussions
Start a n
N
ew thread
Alexandre Julliard : winetest: Refuse to run if the mount manager isn' t running.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: ee0f4b0da39185637c075eae47a5f462c25767b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee0f4b0da39185637c075eae4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 28 15:50:52 2010 +0100 winetest: Refuse to run if the mount manager isn't running. This usually indicates that the Wine prefix isn't valid. --- programs/winetest/main.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index bb68ed1..69b7da6 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -132,6 +132,18 @@ static int running_under_wine (void) return (GetProcAddress(module, "wine_server_call") != NULL); } +static int check_mount_mgr(void) +{ + if (running_under_wine()) + { + HANDLE handle = CreateFileA( "\\\\.\\MountPointManager", GENERIC_READ, + FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); + if (handle == INVALID_HANDLE_VALUE) return FALSE; + CloseHandle( handle ); + } + return TRUE; +} + static int running_on_visible_desktop (void) { HWND desktop; @@ -1021,6 +1033,9 @@ int main( int argc, char *argv[] ) if (!running_on_visible_desktop ()) report (R_FATAL, "Tests must be run on a visible desktop"); + if (!check_mount_mgr()) + report (R_FATAL, "Mount manager not running, most likely your WINEPREFIX wasn't created correctly"); + SetConsoleCtrlHandler(ctrl_handler, TRUE); if (reset_env)
1
0
0
0
Uwe Bonnes : msvcrt: read_i should pull in LF after CR only in unbuffered mode.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 0d16965832f2d43a9d0592a8c37233acece90d78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d16965832f2d43a9d0592a8c…
Author: Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de> Date: Thu Jan 28 12:51:12 2010 +0100 msvcrt: read_i should pull in LF after CR only in unbuffered mode. --- dlls/msvcrt/file.c | 12 ++++++++++-- dlls/msvcrt/tests/file.c | 18 +++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index d7e628b..9dc1b54 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1786,8 +1786,16 @@ static int read_i(int fd, void *buf, unsigned int count) DWORD i, j; if (bufstart[num_read-1] == '\r') { - MSVCRT_fdesc[fd].wxflag |= WX_READCR; - num_read--; + if(count == 1) + { + MSVCRT_fdesc[fd].wxflag &= ~WX_READCR; + ReadFile(hand, bufstart, 1, &num_read, NULL); + } + else + { + MSVCRT_fdesc[fd].wxflag |= WX_READCR; + num_read--; + } } else MSVCRT_fdesc[fd].wxflag &= ~WX_READCR; diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 18247ad..5afdfcb 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -880,7 +880,23 @@ static void test_file_write_read( void ) "problems with _O_BINARY _write / _O_TEXT _read\n"); _close(tempfd); - ret =_chmod (tempf, _S_IREAD | _S_IWRITE); + /* test _read with single bytes. CR should be skipped and LF pulled in */ + tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */ + for (i=0; i<strlen(mytext); i++) /* */ + { + _read(tempfd,btext, 1); + ok(btext[0] == mytext[i],"_read failed at pos %d 0x%02x vs 0x%02x\n", i, btext[0], mytext[i]); + } + while (_read(tempfd,btext, 1)); + _close(tempfd); + + /* test _read in buffered mode. Last CR should be skipped but LF not pulled in */ + tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */ + i = _read(tempfd,btext, strlen(mytext)); + ok(i == strlen(mytext)-1, "_read_i %d vs %d\n", i, strlen(mytext)); + _close(tempfd); + + ret =_chmod (tempf, _S_IREAD | _S_IWRITE); ok( ret == 0, "Can't chmod '%s' to read-write: %d\n", tempf, errno); ret = unlink(tempf);
1
0
0
0
Uwe Bonnes : msvcrt: Check for EOF before correcting CR/LF.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 92ac665d3771f709d8ca8305eb974f57e0e1bcac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92ac665d3771f709d8ca8305e…
Author: Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de> Date: Thu Jan 28 12:41:37 2010 +0100 msvcrt: Check for EOF before correcting CR/LF. --- dlls/msvcrt/file.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 655f17e..d7e628b 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -1757,6 +1757,9 @@ static int read_i(int fd, void *buf, unsigned int count) char *bufstart = buf; HANDLE hand = msvcrt_fdtoh(fd); + if (count == 0) + return 0; + if (MSVCRT_fdesc[fd].wxflag & WX_READEOF) { MSVCRT_fdesc[fd].wxflag |= WX_ATEOF; TRACE("already at EOF, returning 0\n"); @@ -1773,7 +1776,12 @@ static int read_i(int fd, void *buf, unsigned int count) */ if (ReadFile(hand, bufstart, count, &num_read, NULL)) { - if (MSVCRT_fdesc[fd].wxflag & WX_TEXT) + if (count != 0 && num_read == 0) + { + MSVCRT_fdesc[fd].wxflag |= (WX_ATEOF|WX_READEOF); + TRACE(":EOF %s\n",debugstr_an(buf,num_read)); + } + else if (MSVCRT_fdesc[fd].wxflag & WX_TEXT) { DWORD i, j; if (bufstart[num_read-1] == '\r') @@ -1802,11 +1810,6 @@ static int read_i(int fd, void *buf, unsigned int count) } num_read = j; } - if (count != 0 && num_read == 0) - { - MSVCRT_fdesc[fd].wxflag |= (WX_ATEOF|WX_READEOF); - TRACE(":EOF %s\n",debugstr_an(buf,num_read)); - } } else {
1
0
0
0
Hans Leidekker : msi: Don' t create all directories in the CreateFolders action.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 1d0db2b19b6ecb040cf95439c0223a944d099824 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d0db2b19b6ecb040cf95439c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 28 11:06:51 2010 +0100 msi: Don't create all directories in the CreateFolders action. The CreatFolders action should create only the directories listed in the CreateFolder table, the rest will be created during the InstallFiles action. Fixes the EndNote 8 installer. --- dlls/msi/action.c | 6 ---- dlls/msi/tests/install.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 6 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index af028c7..0d765ea 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -959,10 +959,6 @@ UINT msi_create_component_directories( MSIPACKAGE *package ) return ERROR_SUCCESS; } -/* - * Also we cannot enable/disable components either, so for now I am just going - * to do all the directories for all the components. - */ static UINT ACTION_CreateFolders(MSIPACKAGE *package) { static const WCHAR ExecSeqQuery[] = @@ -981,8 +977,6 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package) rc = MSI_IterateRecords(view, NULL, ITERATE_CreateFolders, package); msiobj_release(&view->hdr); - msi_create_component_directories( package ); - return rc; } diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index a3bffe7..3904185 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1063,6 +1063,38 @@ static const CHAR aup_custom_action_dat[] = "Action\tType\tSource\tTarget\tISCom "CustomAction\tAction\n" "TestAllUsersProp\t19\t\tTest failed\t\n"; +static const CHAR cf_create_folders_dat[] = "Directory_\tComponent_\n" + "s72\ts72\n" + "CreateFolder\tDirectory_\tComponent_\n" + "MSITESTDIR\tOne\n"; + +static const CHAR cf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostFinalize\t\t1000\n" + "ValidateProductID\t\t700\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "RemoveFiles\t\t3500\n" + "CreateFolders\t\t3700\n" + "InstallExecute\t\t3800\n" + "TestCreateFolders\t\t3900\n" + "InstallFiles\t\t4000\n" + "RegisterUser\t\t6000\n" + "RegisterProduct\t\t6100\n" + "PublishFeatures\t\t6300\n" + "PublishProduct\t\t6400\n" + "InstallFinalize\t\t6600\n" + "InstallInitialize\t\t1500\n" + "ProcessComponents\t\t1600\n" + "UnpublishFeatures\t\t1800\n" + "InstallValidate\t\t1400\n" + "LaunchConditions\t\t100\n"; + +static const CHAR cf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" + "s72\ti2\tS64\tS0\tS255\n" + "CustomAction\tAction\n" + "TestCreateFolders\t19\t\tHalts installation\t\n"; typedef struct _msi_table { const CHAR *filename; @@ -1766,6 +1798,20 @@ static const msi_table fiuc_tables[] = ADD_TABLE(property), }; +static const msi_table cf_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(file), + ADD_TABLE(cf_create_folders), + ADD_TABLE(cf_install_exec_seq), + ADD_TABLE(cf_custom_action), + ADD_TABLE(media), + ADD_TABLE(property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -7336,6 +7382,34 @@ static void test_feature_override(void) delete_test_files(); } +static void test_create_folder(void) +{ + UINT r; + + create_test_files(); + create_database(msifile, cf_tables, sizeof(cf_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + todo_wine ok(!delete_pf("msitest", FALSE), "Directory created\n"); + + delete_test_files(); +} + START_TEST(install) { DWORD len; @@ -7427,6 +7501,7 @@ START_TEST(install) test_MsiSetExternalUI(); test_allusers_prop(); test_feature_override(); + test_create_folder(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : msi: Improve some traces.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: aa19638cb9c2477befe48de6dceeb2f91e04ee48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa19638cb9c2477befe48de6d…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 28 11:06:05 2010 +0100 msi: Improve some traces. --- dlls/msi/action.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 783acb4..af028c7 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4492,7 +4492,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) service = OpenServiceW(scm, name, SERVICE_START); if (!service) { - ERR("Failed to open service %s\n", debugstr_w(name)); + ERR("Failed to open service %s (%u)\n", debugstr_w(name), GetLastError()); goto done; } @@ -4500,7 +4500,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) if (!StartServiceW(service, numargs, vector)) { - ERR("Failed to start service %s\n", debugstr_w(name)); + ERR("Failed to start service %s (%u)\n", debugstr_w(name), GetLastError()); goto done; }
1
0
0
0
Hans Leidekker : msi: Name and arguments in the service control table are formatted strings.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 7c9cb1e1be3d78aafadcce55864e071718f7a08f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c9cb1e1be3d78aafadcce558…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 28 11:05:34 2010 +0100 msi: Name and arguments in the service control table are formatted strings. --- dlls/msi/action.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 3280e82..783acb4 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4466,8 +4466,8 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) MSIPACKAGE *package = param; MSICOMPONENT *comp; SC_HANDLE scm, service = NULL; - LPCWSTR name, *vector = NULL; - LPWSTR args; + LPCWSTR *vector = NULL; + LPWSTR name, args; DWORD event, numargs; UINT r = ERROR_FUNCTION_FAILED; @@ -4475,9 +4475,9 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) if (!comp || comp->Action == INSTALLSTATE_UNKNOWN || comp->Action == INSTALLSTATE_ABSENT) return ERROR_SUCCESS; - name = MSI_RecordGetString(rec, 2); + deformat_string(package, MSI_RecordGetString(rec, 2), &name); + deformat_string(package, MSI_RecordGetString(rec, 4), &args); event = MSI_RecordGetInteger(rec, 3); - args = strdupW(MSI_RecordGetString(rec, 4)); if (!(event & msidbServiceControlEventStart)) return ERROR_SUCCESS; @@ -4510,6 +4510,7 @@ done: CloseServiceHandle(service); CloseServiceHandle(scm); + msi_free(name); msi_free(args); msi_free(vector); return r; @@ -4594,7 +4595,6 @@ static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param) deformat_string(package, MSI_RecordGetString(rec, 2), &name); deformat_string(package, MSI_RecordGetString(rec, 4), &args); - args = strdupW(MSI_RecordGetString(rec, 4)); scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (!scm)
1
0
0
0
Hans Leidekker : msi: Add a test for MsiSetTargetPath.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 4d14ea47f760d42abdd6f0f959e9733a85f29b7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4d14ea47f760d42abdd6f0f95…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Jan 28 11:04:49 2010 +0100 msi: Add a test for MsiSetTargetPath. --- dlls/msi/tests/package.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 979de1a..ddb3522 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -1047,6 +1047,14 @@ static void test_settargetpath(void) ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); ok( !lstrcmpi(buffer, "C:\\one\\two\\"), "Expected C:\\one\\two\\, got %s\n", buffer); + r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two\\three" ); + ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r ); + + sz = sizeof buffer - 1; + r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz ); + ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); + ok( !lstrcmpi(buffer, "C:\\one\\two\\three\\"), "Expected C:\\one\\two\\three\\, got %s\n", buffer); + MsiCloseHandle( hpkg ); }
1
0
0
0
Alexandre Julliard : shell32: Put the temp directory inside the user profile directory.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 49be8db6b1f16518cafb0a7fba12f53dd9941191 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49be8db6b1f16518cafb0a7fb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 28 14:53:28 2010 +0100 shell32: Put the temp directory inside the user profile directory. --- dlls/shell32/shellpath.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 805be6f..2a4e17c 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -2268,6 +2268,42 @@ static void _SHCreateSymbolicLinks(void) } } +/****************************************************************************** + * create_extra_folders [Internal] + * + * Create some extra folders that don't have a standard CSIDL definition. + */ +static HRESULT create_extra_folders(void) +{ + static const WCHAR environW[] = {'E','n','v','i','r','o','n','m','e','n','t',0}; + static const WCHAR TempW[] = {'T','e','m','p',0}; + static const WCHAR TEMPW[] = {'T','E','M','P',0}; + static const WCHAR TMPW[] = {'T','M','P',0}; + WCHAR path[MAX_PATH+5]; + HRESULT hr; + HKEY hkey; + DWORD type, size, ret; + + ret = RegCreateKeyW( HKEY_CURRENT_USER, environW, &hkey ); + if (ret) return HRESULT_FROM_WIN32( ret ); + + /* FIXME: should be under AppData, but we don't want spaces in the temp path */ + hr = SHGetFolderPathAndSubDirW( 0, CSIDL_PROFILE | CSIDL_FLAG_CREATE, NULL, + SHGFP_TYPE_DEFAULT, TempW, path ); + if (SUCCEEDED(hr)) + { + size = sizeof(path); + if (RegQueryValueExW( hkey, TEMPW, NULL, &type, (LPBYTE)path, &size )) + RegSetValueExW( hkey, TEMPW, 0, REG_SZ, (LPBYTE)path, (strlenW(path) + 1) * sizeof(WCHAR) ); + size = sizeof(path); + if (RegQueryValueExW( hkey, TMPW, NULL, &type, (LPBYTE)path, &size )) + RegSetValueExW( hkey, TMPW, 0, REG_SZ, (LPBYTE)path, (strlenW(path) + 1) * sizeof(WCHAR) ); + } + RegCloseKey( hkey ); + return hr; +} + + /* Register the default values in the registry, as some apps seem to depend * on their presence. The set registered was taken from Windows XP. */ @@ -2286,6 +2322,8 @@ HRESULT SHELL_RegisterShellFolders(void) hr = _SHRegisterUserShellFolders(FALSE); if (SUCCEEDED(hr)) hr = _SHRegisterCommonShellFolders(); + if (SUCCEEDED(hr)) + hr = create_extra_folders(); return hr; }
1
0
0
0
Alexandre Julliard : kernel32: Append the user PATH value to the system one .
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 6beb82e2d6cc400c97fc654c2f157c217c4f87e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6beb82e2d6cc400c97fc654c2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 28 14:53:24 2010 +0100 kernel32: Append the user PATH value to the system one. --- dlls/kernel32/process.c | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 993fa6e..1ef3e46 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -358,13 +358,20 @@ static BOOL build_initial_environment(void) */ static void set_registry_variables( HANDLE hkey, ULONG type ) { + static const WCHAR pathW[] = {'P','A','T','H'}; + static const WCHAR sep[] = {';',0}; UNICODE_STRING env_name, env_value; NTSTATUS status; DWORD size; int index; char buffer[1024*sizeof(WCHAR) + sizeof(KEY_VALUE_FULL_INFORMATION)]; + WCHAR tmpbuf[1024]; + UNICODE_STRING tmp; KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; + tmp.Buffer = tmpbuf; + tmp.MaximumLength = sizeof(tmpbuf); + for (index = 0; ; index++) { status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, @@ -376,24 +383,27 @@ static void set_registry_variables( HANDLE hkey, ULONG type ) env_name.Buffer = info->Name; env_name.Length = env_name.MaximumLength = info->NameLength; env_value.Buffer = (WCHAR *)(buffer + info->DataOffset); - env_value.Length = env_value.MaximumLength = info->DataLength; + env_value.Length = info->DataLength; + env_value.MaximumLength = sizeof(buffer) - info->DataOffset; if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1]) env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */ if (!env_value.Length) continue; if (info->Type == REG_EXPAND_SZ) { - WCHAR buf_expanded[1024]; - UNICODE_STRING env_expanded; - env_expanded.Length = env_expanded.MaximumLength = sizeof(buf_expanded); - env_expanded.Buffer=buf_expanded; - status = RtlExpandEnvironmentStrings_U(NULL, &env_value, &env_expanded, NULL); - if (status == STATUS_SUCCESS || status == STATUS_BUFFER_OVERFLOW) - RtlSetEnvironmentVariable( NULL, &env_name, &env_expanded ); + status = RtlExpandEnvironmentStrings_U( NULL, &env_value, &tmp, NULL ); + if (status != STATUS_SUCCESS && status != STATUS_BUFFER_OVERFLOW) continue; + RtlCopyUnicodeString( &env_value, &tmp ); } - else + /* PATH is magic */ + if (env_name.Length == sizeof(pathW) && + !memicmpW( env_name.Buffer, pathW, sizeof(pathW)/sizeof(WCHAR) ) && + !RtlQueryEnvironmentVariable_U( NULL, &env_name, &tmp )) { - RtlSetEnvironmentVariable( NULL, &env_name, &env_value ); + RtlAppendUnicodeToString( &tmp, sep ); + if (RtlAppendUnicodeStringToString( &tmp, &env_value )) continue; + RtlCopyUnicodeString( &env_value, &tmp ); } + RtlSetEnvironmentVariable( NULL, &env_name, &env_value ); } }
1
0
0
0
Alexandre Julliard : kernel32: Make sure the volatile environment is always loaded.
by Alexandre Julliard
28 Jan '10
28 Jan '10
Module: wine Branch: master Commit: 17dea24f480815d292fec9d2f486a3c7930a2633 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17dea24f480815d292fec9d2f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 28 13:16:40 2010 +0100 kernel32: Make sure the volatile environment is always loaded. --- dlls/kernel32/process.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index ae6aa31..993fa6e 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -410,7 +410,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type ) * %SystemRoot% which are predefined. But Wine defines these in the * registry, so we need two passes. */ -static BOOL set_registry_environment(void) +static BOOL set_registry_environment( BOOL volatile_only ) { static const WCHAR env_keyW[] = {'M','a','c','h','i','n','e','\\', 'S','y','s','t','e','m','\\', @@ -435,7 +435,7 @@ static BOOL set_registry_environment(void) /* first the system environment variables */ RtlInitUnicodeString( &nameW, env_keyW ); - if (NtOpenKey( &hkey, KEY_READ, &attr ) == STATUS_SUCCESS) + if (!volatile_only && NtOpenKey( &hkey, KEY_READ, &attr ) == STATUS_SUCCESS) { set_registry_variables( hkey, REG_SZ ); set_registry_variables( hkey, REG_EXPAND_SZ ); @@ -446,7 +446,7 @@ static BOOL set_registry_environment(void) /* then the ones for the current user */ if (RtlOpenCurrentUser( KEY_READ, &attr.RootDirectory ) != STATUS_SUCCESS) return ret; RtlInitUnicodeString( &nameW, envW ); - if (NtOpenKey( &hkey, KEY_READ, &attr ) == STATUS_SUCCESS) + if (!volatile_only && NtOpenKey( &hkey, KEY_READ, &attr ) == STATUS_SUCCESS) { set_registry_variables( hkey, REG_SZ ); set_registry_variables( hkey, REG_EXPAND_SZ ); @@ -1090,7 +1090,7 @@ void CDECL __wine_kernel_init(void) /* convert old configuration to new format */ convert_old_config(); - got_environment = set_registry_environment(); + got_environment = set_registry_environment( FALSE ); set_additional_environment(); } @@ -1140,12 +1140,9 @@ void CDECL __wine_kernel_init(void) ERR( "boot event wait timed out\n" ); CloseHandle( boot_events[0] ); if (boot_events[1]) CloseHandle( boot_events[1] ); - /* if we didn't find environment section, try again now that wineboot has run */ - if (!got_environment) - { - set_registry_environment(); - set_additional_environment(); - } + /* reload environment now that wineboot has run */ + set_registry_environment( got_environment ); + set_additional_environment(); } if (!(peb->ImageBaseAddress = LoadLibraryExW( main_exe_name, 0, DONT_RESOLVE_DLL_REFERENCES )))
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
62
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
Results per page:
10
25
50
100
200