ReactOS.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
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
List overview
Download
Ros-diffs
March 2022
----- 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
ros-diffs@reactos.org
20 participants
436 discussions
Start a n
N
ew thread
[reactos] 161/360: [WINESYNC] msi: Fix the remote case for MsiViewModify(MSIMODIFY_UPDATE).
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=14478462ccfdaf2933624…
commit 14478462ccfdaf29336243dd5b29dfa3f2456698 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:08:18 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:05 2022 +0100 [WINESYNC] msi: Fix the remote case for MsiViewModify(MSIMODIFY_UPDATE). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45972
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id c494570d89f270c9240519c625c5c757a4e8ff23 by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/msipriv.h | 2 +- dll/win32/msi/msiquery.c | 4 ++-- dll/win32/msi/record.c | 11 ++++++----- dll/win32/msi/winemsi.idl | 2 ++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h index 05eff8e7271..304dab049e4 100644 --- a/dll/win32/msi/msipriv.h +++ b/dll/win32/msi/msipriv.h @@ -141,8 +141,8 @@ typedef struct tagMSIFIELD typedef struct tagMSIRECORD { MSIOBJECTHDR hdr; - MSIQUERY *query; UINT count; /* as passed to MsiCreateRecord */ + UINT64 cookie; MSIFIELD fields[1]; /* nb. array size is count+1 */ } MSIRECORD; diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 5c686a37be0..6ecbbcdf63c 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -379,7 +379,7 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec) if (r == ERROR_SUCCESS) { query->row ++; - (*prec)->query = query; + (*prec)->cookie = (UINT64)(ULONG_PTR)query; MSI_RecordSetInteger(*prec, 0, 1); } @@ -693,7 +693,7 @@ UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec ) if ( !view || !view->ops->modify) return ERROR_FUNCTION_FAILED; - if ( mode == MSIMODIFY_UPDATE && rec->query != query ) + if ( mode == MSIMODIFY_UPDATE && rec->cookie != (UINT64)(ULONG_PTR)query ) return ERROR_FUNCTION_FAILED; r = view->ops->modify( view, mode, rec, query->row ); diff --git a/dll/win32/msi/record.c b/dll/win32/msi/record.c index a7d55888a9d..cca63083d18 100644 --- a/dll/win32/msi/record.c +++ b/dll/win32/msi/record.c @@ -1064,6 +1064,7 @@ UINT copy_remote_record(const struct wire_record *in, MSIHANDLE out) if (!(rec = msihandle2msiinfo(out, MSIHANDLETYPE_RECORD))) return ERROR_INVALID_HANDLE; + rec->cookie = in->cookie; for (i = 0; i <= in->count; i++) { switch (in->fields[i].type) @@ -1114,17 +1115,17 @@ UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out) struct wire_record *marshal_record(MSIHANDLE handle) { struct wire_record *ret; - unsigned int i, count; + unsigned int i; MSIRECORD *rec; if (!(rec = msihandle2msiinfo(handle, MSIHANDLETYPE_RECORD))) return NULL; - count = MSI_RecordGetFieldCount(rec); - ret = midl_user_allocate(sizeof(*ret) + count * sizeof(ret->fields[0])); - ret->count = count; + ret = midl_user_allocate(sizeof(*ret) + rec->count * sizeof(ret->fields[0])); + ret->count = rec->count; + ret->cookie = rec->cookie; - for (i = 0; i <= count; i++) + for (i = 0; i <= rec->count; i++) { switch (rec->fields[i].type) { diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index ebbca82a16d..16586036949 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -51,8 +51,10 @@ struct wire_field { int len; }; +/* compatible with MSIRECORD minus header */ struct wire_record { unsigned int count; + UINT64 cookie; [size_is(count+1)] struct wire_field fields[]; };
2 years, 9 months
1
0
0
0
[reactos] 160/360: [WINESYNC] msi: Fix memory leaks.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b4baf5cb8a54717897be…
commit 4b4baf5cb8a54717897be122c8bfe5feab4f70ea Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:08:17 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:04 2022 +0100 [WINESYNC] msi: Fix memory leaks. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 965ca1b4de78600366cde437c97a7208a954b18b by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/custom.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c index caa379b416d..25c90a9fde0 100644 --- a/dll/win32/msi/custom.c +++ b/dll/win32/msi/custom.c @@ -553,46 +553,49 @@ UINT CDECL __wine_msi_call_dll_function(const GUID *guid) if (r != ERROR_SUCCESS) return r; + hPackage = alloc_msi_remote_handle( remote_package ); + if (!hPackage) + { + ERR( "failed to create handle for %x\n", remote_package ); + midl_user_free( dll ); + midl_user_free( proc ); + return ERROR_INSTALL_FAILURE; + } + hModule = LoadLibraryW( dll ); if (!hModule) { ERR( "failed to load dll %s (%u)\n", debugstr_w( dll ), GetLastError() ); + midl_user_free( dll ); + midl_user_free( proc ); + MsiCloseHandle( hPackage ); return ERROR_SUCCESS; } fn = (MsiCustomActionEntryPoint) GetProcAddress( hModule, proc ); - if (fn) + if (!fn) WARN( "GetProcAddress(%s) failed\n", debugstr_a(proc) ); + else { - hPackage = alloc_msi_remote_handle( remote_package ); - if (hPackage) + handle_msi_break(proc); + + __TRY { - TRACE("calling %s\n", debugstr_a(proc)); - handle_msi_break(proc); - - __TRY - { - r = custom_proc_wrapper(fn, hPackage); - } - __EXCEPT_PAGE_FAULT - { - ERR("Custom action (%s:%s) caused a page fault: %08x\n", - debugstr_w(dll), debugstr_a(proc), GetExceptionCode()); - r = ERROR_SUCCESS; - } - __ENDTRY; - - MsiCloseHandle( hPackage ); + r = custom_proc_wrapper( fn, hPackage ); } - else - ERR("failed to create handle for %x\n", remote_package ); + __EXCEPT_PAGE_FAULT + { + ERR( "Custom action (%s:%s) caused a page fault: %08x\n", + debugstr_w(dll), debugstr_a(proc), GetExceptionCode() ); + r = ERROR_SUCCESS; + } + __ENDTRY; } - else - ERR("GetProcAddress(%s) failed\n", debugstr_a(proc)); FreeLibrary(hModule); midl_user_free(dll); midl_user_free(proc); + MsiCloseHandle(hPackage); return r; }
2 years, 9 months
1
0
0
0
[reactos] 159/360: [WINESYNC] msi/tests: Add tests for directory properties.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0bbc2be92cc9d13bf3591…
commit 0bbc2be92cc9d13bf3591eba3dcda265ff6c5dab Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:08:16 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:04 2022 +0100 [WINESYNC] msi/tests: Add tests for directory properties. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 8386157caa9bfaea9a17c2d36e61f8a15138a791 by Hans Leidekker <hans(a)codeweavers.com> --- modules/rostests/winetests/msi/msi.c | 108 ++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 8 deletions(-) diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c index 17efddd8236..eccd651aa45 100644 --- a/modules/rostests/winetests/msi/msi.c +++ b/modules/rostests/winetests/msi/msi.c @@ -348,12 +348,11 @@ static const char spf_install_exec_seq_dat[] = "SetFolderProp\t\t950\n" "SetFolderProp2\t\t960\n" "CostFinalize\t\t1000\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" "InstallFiles\t\t4000\n" "InstallServices\t\t5000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100"; + "InstallFinalize\t\t6600\n"; static const char spf_install_ui_seq_dat[] = "Action\tCondition\tSequence\n" @@ -364,6 +363,68 @@ static const char spf_install_ui_seq_dat[] = "CostFinalize\t\t1000\n" "ExecuteAction\t\t1100\n"; +static const char spf_directory_dat[] = + "Directory\tDirectory_Parent\tDefaultDir\n" + "s72\tS72\tl255\n" + "Directory\tDirectory\n" + "PARENTDIR\tTARGETDIR\tparent\n" + "CHILDDIR\tPARENTDIR\tchild\n" + "MSITESTDIR\tProgramFilesFolder\tmsitest\n" + "ProgramFilesFolder\tTARGETDIR\t.\n" + "TARGETDIR\t\tSourceDir"; + +static const char spf_component_dat[] = + "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n"; + +static const char spf2_install_exec_seq_dat[] = + "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "FormatParentFolderCheck\t\t910\n" + "FormatChildFolderCheck\t\t920\n" + "CheckParentFolder\tNOT PARENTDIR=PARENTDIRCHECK\t930\n" + "CheckChildFolder\tNOT CHILDDIR=CHILDDIRCHECK\t940\n" + "FormatParentFolderCheck2\t\t945\n" + "SetParentFolder\t\t950\n" + "CheckParentFolder2\tNOT PARENTDIR=PARENTDIRCHECK\t960\n" + "CheckChildFolder2\tNOT CHILDDIR=CHILDDIRCHECK\t970\n" + "CostFinalize\t\t1000\n" + "FormatParentFolderCheck3\t\t1005\n" + "CheckParentFolder3\tNOT PARENTDIR=PARENTDIRCHECK\t1010\n" + "CheckChildFolder3\tNOT CHILDDIR=CHILDDIRCHECK\t1020\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" + "InstallFiles\t\t4000\n" + "CreateShortcuts\t\t4100\n" + "InstallFinalize\t\t6600\n"; + +static const char spf2_custom_action_dat[] = + "Action\tType\tSource\tTarget\tISComments\n" + "s72\ti2\tS64\tS0\tS255\n" + "CustomAction\tAction\n" + "FormatParentFolderCheck\t51\tPARENTDIRCHECK\t[TARGETDIR]parent\\\t\n" + "FormatChildFolderCheck\t51\tCHILDDIRCHECK\t[TARGETDIR]parent\\child\\\t\n" + "CheckParentFolder\t19\tPARENTDIR\tparent prop wrong before set: [PARENTDIR]\t\n" + "CheckChildFolder\t19\tCHILDDIR\tchild prop wrong before set: [CHILDDIR]\t\n" + "FormatParentFolderCheck2\t51\tPARENTDIRCHECK\t[ProgramFilesFolder]msitest\\parent\t\n" + "SetParentFolder\t51\tPARENTDIR\t[PARENTDIRCHECK]\t\n" + "CheckParentFolder2\t19\tPARENTDIR\tparent prop wrong after set: [PARENTDIR]\t\n" + "CheckChildFolder2\t19\tCHILDDIR\tchild prop wrong after set: [CHILDDIR]\t\n" + "FormatParentFolderCheck3\t51\tPARENTDIRCHECK\t[ProgramFilesFolder]msitest\\parent\\\t\n" + "CheckParentFolder3\t19\tPARENTDIR\tparent prop wrong after CostFinalize: [PARENTDIR]\t\n" + "CheckChildFolder3\t19\tCHILDDIR\tchild prop wrong after CostFinalize: [CHILDDIR]\t\n"; + +static const char shortcut_dat[] = + "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n" + "s72\ts72\tl128\ts72\ts72\tS255\tL255\tI2\tS72\tI2\tI2\tS72\n" + "Shortcut\tShortcut\n" + "Shortcut\tCHILDDIR\tShortcut\tmaximus\t[#maximus]\t\tShortcut\t\t\t\t\tMSITESTDIR\n"; + static const char sd_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -649,6 +710,21 @@ static const msi_table spf_tables[] = ADD_TABLE(spf_install_ui_seq) }; +static const msi_table spf2_tables[] = +{ + ADD_TABLE(spf_component), + ADD_TABLE(spf_directory), + ADD_TABLE(lus_feature), + ADD_TABLE(lus_feature_comp), + ADD_TABLE(lus_file), + ADD_TABLE(lus0_media), + ADD_TABLE(property), + ADD_TABLE(spf2_custom_action), + ADD_TABLE(spf2_install_exec_seq), + ADD_TABLE(spf_install_ui_seq), + ADD_TABLE(shortcut) +}; + static const msi_table sd_tables[] = { ADD_TABLE(directory), @@ -14104,7 +14180,6 @@ error: static void test_setpropertyfolder(void) { UINT r; - CHAR path[MAX_PATH]; if (is_process_limited()) { @@ -14112,9 +14187,6 @@ static void test_setpropertyfolder(void) return; } - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\msitest\\added"); - CreateDirectoryA("msitest", NULL); create_file("msitest\\maximus", 500); @@ -14134,6 +14206,26 @@ static void test_setpropertyfolder(void) ok(delete_pf("msitest\\added", FALSE), "Directory not created\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n"); + CreateDirectoryA("parent", NULL); + CreateDirectoryA("parent\\child", NULL); + create_file("parent\\child\\maximus", 500); + + create_database(msifile, spf2_tables, ARRAY_SIZE(spf2_tables)); + + r = MsiInstallProductA(msifile, "TARGETDIR=c:\\"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(delete_pf("msitest\\maximus", TRUE), "file not installed\n"); + ok(delete_pf("msitest", FALSE), "directory not created\n"); + + ok(DeleteFileA("c:\\parent\\child\\Shortcut.lnk"), "file not installed"); + ok(RemoveDirectoryA("c:\\parent\\child"), "directory not created\n"); + ok(RemoveDirectoryA("c:\\parent"), "directory not created\n"); + + DeleteFileA("parent\\child\\maximus"); + RemoveDirectoryA("parent\\child"); + RemoveDirectoryA("parent"); + error: DeleteFileA(msifile); DeleteFileA("msitest\\maximus");
2 years, 9 months
1
0
0
0
[reactos] 158/360: [WINESYNC] msi: Remove unused fields from MSIFOLDER.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=312627c75bc6a650c5ad1…
commit 312627c75bc6a650c5ad1e4097fcda450eeb61c1 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:08:16 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:04 2022 +0100 [WINESYNC] msi: Remove unused fields from MSIFOLDER. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id de78ca24a5a2945e7431c1eb9a6e5404bbcfbf5d by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/msipriv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h index 61032201b53..05eff8e7271 100644 --- a/dll/win32/msi/msipriv.h +++ b/dll/win32/msi/msipriv.h @@ -565,8 +565,6 @@ typedef struct tagMSIFOLDER LPWSTR ResolvedSource; enum folder_state State; BOOL persistent; - INT Cost; - INT Space; } MSIFOLDER; typedef struct tagFolderList
2 years, 9 months
1
0
0
0
[reactos] 157/360: [WINESYNC] msi: Rename msi_reset_folders to msi_reset_source_folders.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0922e524ec30b99315443…
commit 0922e524ec30b99315443763f25173405d9351c7 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:08:16 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:04 2022 +0100 [WINESYNC] msi: Rename msi_reset_folders to msi_reset_source_folders. It was always called with source parameter set to TRUE. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 14ddb49df278e44fd184a8fd73ff1341ce0885ec by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/action.c | 4 ++-- dll/win32/msi/appsearch.c | 2 +- dll/win32/msi/custom.c | 2 +- dll/win32/msi/dialog.c | 2 +- dll/win32/msi/msipriv.h | 2 +- dll/win32/msi/package.c | 16 ++++------------ dll/win32/msi/upgrade.c | 2 +- 7 files changed, 11 insertions(+), 19 deletions(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index d73657e98a3..1be0a4ce52c 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -375,7 +375,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, r = msi_set_property( package->db, prop, val, -1 ); if (r == ERROR_SUCCESS && !strcmpW( prop, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); msi_free( val ); msi_free( prop ); @@ -493,7 +493,7 @@ UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) { UINT r = msi_set_property( package->db, szSourceDir, source, -1 ); if (r == ERROR_SUCCESS) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); } msi_free( check ); diff --git a/dll/win32/msi/appsearch.c b/dll/win32/msi/appsearch.c index fbed073bd4a..806365191d0 100644 --- a/dll/win32/msi/appsearch.c +++ b/dll/win32/msi/appsearch.c @@ -1107,7 +1107,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param) { r = msi_set_property( package->db, propName, value, -1 ); if (r == ERROR_SUCCESS && !strcmpW( propName, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); msi_free(value); } diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c index 56801363238..caa379b416d 100644 --- a/dll/win32/msi/custom.c +++ b/dll/win32/msi/custom.c @@ -1423,7 +1423,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action) len = deformat_string( package, target, &deformated ); rc = msi_set_property( package->db, source, deformated, len ); if (rc == ERROR_SUCCESS && !strcmpW( source, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); msi_free(deformated); break; case 37: /* JScript/VBScript text stored in target column. */ diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c index b39e6936678..29e016d9f7b 100644 --- a/dll/win32/msi/dialog.c +++ b/dll/win32/msi/dialog.c @@ -577,7 +577,7 @@ static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCW { UINT r = msi_set_property( package->db, property, value, -1 ); if (r == ERROR_SUCCESS && !strcmpW( property, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); } static MSIFEATURE *msi_seltree_feature_from_item( HWND hwnd, HTREEITEM hItem ) diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h index b5f66339133..61032201b53 100644 --- a/dll/win32/msi/msipriv.h +++ b/dll/win32/msi/msipriv.h @@ -1026,7 +1026,7 @@ extern void msi_resolve_target_folder(MSIPACKAGE *package, const WCHAR *name, BO extern WCHAR *msi_normalize_path(const WCHAR *) DECLSPEC_HIDDEN; extern WCHAR *msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file) DECLSPEC_HIDDEN; extern const WCHAR *msi_get_target_folder(MSIPACKAGE *package, const WCHAR *name) DECLSPEC_HIDDEN; -extern void msi_reset_folders( MSIPACKAGE *package, BOOL source ) DECLSPEC_HIDDEN; +extern void msi_reset_source_folders( MSIPACKAGE *package ) DECLSPEC_HIDDEN; extern MSICOMPONENT *msi_get_loaded_component(MSIPACKAGE *package, const WCHAR *Component) DECLSPEC_HIDDEN; extern MSIFEATURE *msi_get_loaded_feature(MSIPACKAGE *package, const WCHAR *Feature) DECLSPEC_HIDDEN; extern MSIFILE *msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *file) DECLSPEC_HIDDEN; diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index 80cae055b22..43af32acf14 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -2161,22 +2161,14 @@ end: return r; } -void msi_reset_folders( MSIPACKAGE *package, BOOL source ) +void msi_reset_source_folders( MSIPACKAGE *package ) { MSIFOLDER *folder; LIST_FOR_EACH_ENTRY( folder, &package->folders, MSIFOLDER, entry ) { - if ( source ) - { - msi_free( folder->ResolvedSource ); - folder->ResolvedSource = NULL; - } - else - { - msi_free( folder->ResolvedTarget ); - folder->ResolvedTarget = NULL; - } + msi_free( folder->ResolvedSource ); + folder->ResolvedSource = NULL; } } @@ -2270,7 +2262,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue ret = msi_set_property( package->db, szName, szValue, -1 ); if (ret == ERROR_SUCCESS && !strcmpW( szName, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); msiobj_release( &package->hdr ); return ret; diff --git a/dll/win32/msi/upgrade.c b/dll/win32/msi/upgrade.c index bbc7df6eec5..36d65be8fe9 100644 --- a/dll/win32/msi/upgrade.c +++ b/dll/win32/msi/upgrade.c @@ -90,7 +90,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property, r = msi_set_property( package->db, action_property, newprop, -1 ); if (r == ERROR_SUCCESS && !strcmpW( action_property, szSourceDir )) - msi_reset_folders( package, TRUE ); + msi_reset_source_folders( package ); TRACE("Found Related Product... %s now %s\n", debugstr_w(action_property), debugstr_w(newprop));
2 years, 9 months
1
0
0
0
[reactos] 156/360: [WINESYNC] msi: Add support for control event DirectoryListNew.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b608ba9798dc5bf7e7e6b…
commit b608ba9798dc5bf7e7e6b9ee400d833e39860e2a Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:04:01 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:04 2022 +0100 [WINESYNC] msi: Add support for control event DirectoryListNew. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=25687
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 97a7a4ff0c8895c3ef1979eeee988c4c121d9839 by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/dialog.c | 164 +++++++++++++++++++++++++++++++------------ dll/win32/msi/lang/msi_Bg.rc | 1 + dll/win32/msi/lang/msi_Da.rc | 1 + dll/win32/msi/lang/msi_De.rc | 1 + dll/win32/msi/lang/msi_En.rc | 1 + dll/win32/msi/lang/msi_Es.rc | 1 + dll/win32/msi/lang/msi_Fi.rc | 1 + dll/win32/msi/lang/msi_Fr.rc | 1 + dll/win32/msi/lang/msi_He.rc | 1 + dll/win32/msi/lang/msi_Hu.rc | 1 + dll/win32/msi/lang/msi_Id.rc | 1 + dll/win32/msi/lang/msi_It.rc | 1 + dll/win32/msi/lang/msi_Ja.rc | 1 + dll/win32/msi/lang/msi_Ko.rc | 1 + dll/win32/msi/lang/msi_Lt.rc | 1 + dll/win32/msi/lang/msi_Nl.rc | 1 + dll/win32/msi/lang/msi_No.rc | 1 + dll/win32/msi/lang/msi_Pl.rc | 1 + dll/win32/msi/lang/msi_Pt.rc | 1 + dll/win32/msi/lang/msi_Ro.rc | 1 + dll/win32/msi/lang/msi_Ru.rc | 1 + dll/win32/msi/lang/msi_Si.rc | 1 + dll/win32/msi/lang/msi_Sq.rc | 1 + dll/win32/msi/lang/msi_Sr.rc | 1 + dll/win32/msi/lang/msi_Sv.rc | 1 + dll/win32/msi/lang/msi_Tr.rc | 1 + dll/win32/msi/lang/msi_Uk.rc | 1 + dll/win32/msi/lang/msi_Zh.rc | 1 + dll/win32/msi/resource.h | 2 + 29 files changed, 149 insertions(+), 44 deletions(-) diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c index 860b80e4073..b39e6936678 100644 --- a/dll/win32/msi/dialog.c +++ b/dll/win32/msi/dialog.c @@ -2151,23 +2151,27 @@ struct msi_pathedit_info WNDPROC oldproc; }; +static WCHAR *get_path_property( msi_dialog *dialog, msi_control *control ) +{ + WCHAR *prop, *path; + BOOL indirect = control->attributes & msidbControlAttributesIndirect; + if (!(prop = msi_dialog_dup_property( dialog, control->property, indirect ))) return NULL; + path = msi_dialog_dup_property( dialog, prop, TRUE ); + msi_free( prop ); + return path; +} + static void msi_dialog_update_pathedit( msi_dialog *dialog, msi_control *control ) { - LPWSTR prop, path; - BOOL indirect; + WCHAR *path; if (!control && !(control = msi_dialog_find_control_by_type( dialog, szPathEdit ))) return; - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; SetWindowTextW( control->hwnd, path ); SendMessageW( control->hwnd, EM_SETSEL, 0, -1 ); - msi_free( path ); - msi_free( prop ); } /* FIXME: test when this should fail */ @@ -2921,16 +2925,12 @@ static UINT msi_dialog_list_box( msi_dialog *dialog, MSIRECORD *rec ) static void msi_dialog_update_directory_combo( msi_dialog *dialog, msi_control *control ) { - LPWSTR prop, path; - BOOL indirect; + WCHAR *path; if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryCombo ))) return; - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; PathStripPathW( path ); PathRemoveBackslashW( path ); @@ -2938,7 +2938,6 @@ static void msi_dialog_update_directory_combo( msi_dialog *dialog, msi_control * SendMessageW( control->hwnd, CB_SETCURSEL, 0, 0 ); msi_free( path ); - msi_free( prop ); } static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec ) @@ -2967,31 +2966,28 @@ static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec ) static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *control ) { - WCHAR dir_spec[MAX_PATH]; + static const WCHAR asterisk[] = {'*',0}; + WCHAR dir_spec[MAX_PATH], *path; WIN32_FIND_DATAW wfd; - LPWSTR prop, path; - BOOL indirect; LVITEMW item; HANDLE file; - static const WCHAR asterisk[] = {'*',0}; - if (!control && !(control = msi_dialog_find_control_by_type( dialog, szDirectoryList ))) return; /* clear the list-view */ SendMessageW( control->hwnd, LVM_DELETEALLITEMS, 0, 0 ); - indirect = control->attributes & msidbControlAttributesIndirect; - prop = msi_dialog_dup_property( dialog, control->property, indirect ); - path = msi_dialog_dup_property( dialog, prop, TRUE ); - + if (!(path = get_path_property( dialog, control ))) return; lstrcpyW( dir_spec, path ); lstrcatW( dir_spec, asterisk ); file = FindFirstFileW( dir_spec, &wfd ); - if ( file == INVALID_HANDLE_VALUE ) + if (file == INVALID_HANDLE_VALUE) + { + msi_free( path ); return; + } do { @@ -3010,7 +3006,6 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item ); } while ( FindNextFileW( file, &wfd ) ); - msi_free( prop ); msi_free( path ); FindClose( file ); } @@ -3043,38 +3038,110 @@ static UINT msi_dialog_directorylist_up( msi_dialog *dialog ) return ERROR_SUCCESS; } -static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, - msi_control *control, WPARAM param ) +static WCHAR *get_unique_folder_name( const WCHAR *root, int *ret_len ) { - LPNMHDR nmhdr = (LPNMHDR)param; - WCHAR new_path[MAX_PATH]; - WCHAR text[MAX_PATH]; - LPWSTR path, prop; - BOOL indirect; + static const WCHAR fmtW[] = {'%','s','%','s',' ','%','u',0}; + WCHAR newfolder[MAX_PATH], *path, *ptr; + int len, count = 2; + + len = LoadStringW( msi_hInstance, IDS_NEWFOLDER, newfolder, ARRAY_SIZE(newfolder) ); + len += strlenW(root) + 1; + if (!(path = msi_alloc( (len + 4) * sizeof(WCHAR) ))) return NULL; + strcpyW( path, root ); + strcatW( path, newfolder ); + + for (;;) + { + if (GetFileAttributesW( path ) == INVALID_FILE_ATTRIBUTES) break; + if (count > 99) + { + msi_free( path ); + return NULL; + } + len = sprintfW( path, fmtW, root, newfolder, count++ ) + 1; + } + + ptr = strrchrW( path, '\\' ) + 1; + *ret_len = len - (ptr - path); + memmove( path, ptr, *ret_len * sizeof(WCHAR) ); + return path; +} + +static UINT msi_dialog_directorylist_new( msi_dialog *dialog ) +{ + msi_control *control; + WCHAR *path; LVITEMW item; int index; - if (nmhdr->code != LVN_ITEMACTIVATE) - return ERROR_SUCCESS; + control = msi_dialog_find_control_by_type( dialog, szDirectoryList ); + + if (!(path = get_path_property( dialog, control ))) return ERROR_OUTOFMEMORY; + + item.mask = LVIF_TEXT; + item.iItem = 0; + item.iSubItem = 0; + item.pszText = get_unique_folder_name( path, &item.cchTextMax ); - index = SendMessageW( control->hwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED ); - if ( index < 0 ) + index = SendMessageW( control->hwnd, LVM_INSERTITEMW, 0, (LPARAM)&item ); + SendMessageW( control->hwnd, LVM_ENSUREVISIBLE, index, 0 ); + SendMessageW( control->hwnd, LVM_EDITLABELW, index, -1 ); + + msi_free( path ); + msi_free( item.pszText ); + return ERROR_SUCCESS; +} + +static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, msi_control *control, WPARAM param ) +{ + NMHDR *nmhdr = (NMHDR *)param; + WCHAR text[MAX_PATH], *new_path, *path, *prop; + BOOL indirect; + + switch (nmhdr->code) { - ERR("No list-view item selected!\n"); - return ERROR_FUNCTION_FAILED; + case LVN_ENDLABELEDITW: + { + NMLVDISPINFOW *info = (NMLVDISPINFOW *)param; + if (!info->item.pszText) return ERROR_SUCCESS; + lstrcpynW( text, info->item.pszText, ARRAY_SIZE(text) ); + text[ARRAY_SIZE(text) - 1] = 0; + break; } + case LVN_ITEMACTIVATE: + { + LVITEMW item; + int index = SendMessageW( control->hwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED ); + if (index < 0) + { + ERR("no list-view item selected\n"); + return ERROR_FUNCTION_FAILED; + } - item.iSubItem = 0; - item.pszText = text; - item.cchTextMax = MAX_PATH; - SendMessageW( control->hwnd, LVM_GETITEMTEXTW, index, (LPARAM)&item ); + item.iSubItem = 0; + item.pszText = text; + item.cchTextMax = MAX_PATH; + SendMessageW( control->hwnd, LVM_GETITEMTEXTW, index, (LPARAM)&item ); + text[ARRAY_SIZE(text) - 1] = 0; + break; + } + default: + return ERROR_SUCCESS; + } indirect = control->attributes & msidbControlAttributesIndirect; prop = msi_dialog_dup_property( dialog, control->property, indirect ); path = msi_dialog_dup_property( dialog, prop, TRUE ); + if (!(new_path = msi_alloc( (strlenW(path) + strlenW(text) + 2) * sizeof(WCHAR) ))) + { + msi_free( prop ); + msi_free( path ); + return ERROR_OUTOFMEMORY; + } lstrcpyW( new_path, path ); lstrcatW( new_path, text ); + if (nmhdr->code == LVN_ENDLABELEDITW) CreateDirectoryW( new_path, NULL ); lstrcatW( new_path, szBackSlash ); msi_dialog_set_property( dialog->package, prop, new_path ); @@ -3085,6 +3152,8 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, msi_free( prop ); msi_free( path ); + msi_free( new_path ); + return ERROR_SUCCESS; } @@ -3094,7 +3163,7 @@ static UINT msi_dialog_directory_list( msi_dialog *dialog, MSIRECORD *rec ) LPCWSTR prop; DWORD style; - style = LVS_LIST | WS_VSCROLL | LVS_SHAREIMAGELISTS | + style = LVS_LIST | WS_VSCROLL | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_BORDER | LVS_SORTASCENDING | WS_CHILD | WS_GROUP | WS_TABSTOP; control = msi_dialog_add_control( dialog, rec, WC_LISTVIEWW, style ); @@ -4533,6 +4602,11 @@ static UINT event_directory_list_up( msi_dialog *dialog, const WCHAR *argument ) return msi_dialog_directorylist_up( dialog ); } +static UINT event_directory_list_new( msi_dialog *dialog, const WCHAR *argument ) +{ + return msi_dialog_directorylist_new( dialog ); +} + static UINT event_reinstall_mode( msi_dialog *dialog, const WCHAR *argument ) { return msi_set_property( dialog->package->db, szReinstallMode, argument, -1 ); @@ -4560,6 +4634,7 @@ static const WCHAR set_target_pathW[] = {'S','e','t','T','a','r','g','e','t','P' static const WCHAR resetW[] = {'R','e','s','e','t',0}; static const WCHAR set_install_levelW[] = {'S','e','t','I','n','s','t','a','l','l','L','e','v','e','l',0}; static const WCHAR directory_list_upW[] = {'D','i','r','e','c','t','o','r','y','L','i','s','t','U','p',0}; +static const WCHAR directory_list_newW[] = {'D','i','r','e','c','t','o','r','y','L','i','s','t','N','e','w',0}; static const WCHAR selection_browseW[] = {'S','e','l','e','c','t','i','o','n','B','r','o','w','s','e',0}; static const WCHAR reinstall_modeW[] = {'R','e','i','n','s','t','a','l','l','M','o','d','e',0}; static const WCHAR reinstallW[] = {'R','e','i','n','s','t','a','l','l',0}; @@ -4579,6 +4654,7 @@ static const struct control_event control_events[] = { resetW, event_reset }, { set_install_levelW, event_set_install_level }, { directory_list_upW, event_directory_list_up }, + { directory_list_newW, event_directory_list_new }, { selection_browseW, event_spawn_dialog }, { reinstall_modeW, event_reinstall_mode }, { reinstallW, event_reinstall }, diff --git a/dll/win32/msi/lang/msi_Bg.rc b/dll/win32/msi/lang/msi_Bg.rc index 46ab527b806..ec165ec2b23 100644 --- a/dll/win32/msi/lang/msi_Bg.rc +++ b/dll/win32/msi/lang/msi_Bg.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "ìðåæîâîòî óñòðîéñòâà íóæíî çà ôóíêöèîíàëíîñòòà ëèïñâà " 14 "ôóíêöèîíàëíîñò îò:" 15 "èçáåðåòå ïàïêàòà, êîÿòî ñúäúðæà %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Da.rc b/dll/win32/msi/lang/msi_Da.rc index b14bd9f285e..87f26254b10 100644 --- a/dll/win32/msi/lang/msi_Da.rc +++ b/dll/win32/msi/lang/msi_Da.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "featurens netværksdrev mangler." 14 "feature fra:" 15 "Vælg kataloget som indeholder '%s'." + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_De.rc b/dll/win32/msi/lang/msi_De.rc index 0d486f3f871..d5e68537c82 100644 --- a/dll/win32/msi/lang/msi_De.rc +++ b/dll/win32/msi/lang/msi_De.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "Das Netzwerklaufwerk für das Feature fehlt." 14 "Feature von:" 15 "Wählen Sie das Verzeichnis aus, dass %s enthält." + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_En.rc b/dll/win32/msi/lang/msi_En.rc index d7972f7409f..1015a7d5116 100644 --- a/dll/win32/msi/lang/msi_En.rc +++ b/dll/win32/msi/lang/msi_En.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "network drive for feature missing" 14 "feature from:" 15 "choose which folder contains %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Es.rc b/dll/win32/msi/lang/msi_Es.rc index 8affa466c77..a94859a12f8 100644 --- a/dll/win32/msi/lang/msi_Es.rc +++ b/dll/win32/msi/lang/msi_Es.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "unidad de red para característica ausente" 14 "característica de:" 15 "elija qué carpeta contiene %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Fi.rc b/dll/win32/msi/lang/msi_Fi.rc index 233aa2c3ae0..77f5f4dd102 100644 --- a/dll/win32/msi/lang/msi_Fi.rc +++ b/dll/win32/msi/lang/msi_Fi.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "Ominaisuuden verkkolevy puuttuu." 14 "Ominaisuus:" 15 "Valitse kansio, jossa on %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Fr.rc b/dll/win32/msi/lang/msi_Fr.rc index 026baa11ea9..58393f31ace 100644 --- a/dll/win32/msi/lang/msi_Fr.rc +++ b/dll/win32/msi/lang/msi_Fr.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "lecteur réseau pour la fonctionnalité manquante" 14 "fonctionnalité depuis :" 15 "sélectionnez le dossier contenant %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_He.rc b/dll/win32/msi/lang/msi_He.rc index 492e2aae4c2..ede76d78c3c 100644 --- a/dll/win32/msi/lang/msi_He.rc +++ b/dll/win32/msi/lang/msi_He.rc @@ -34,6 +34,7 @@ STRINGTABLE 13 "כונן רשת עבור התכונה חסר" 14 "מהתקן מ:" 15 "בחר איזו תיקיה מכילה את %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Hu.rc b/dll/win32/msi/lang/msi_Hu.rc index 70ab46f9d9b..33c427c83e3 100644 --- a/dll/win32/msi/lang/msi_Hu.rc +++ b/dll/win32/msi/lang/msi_Hu.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "hiányzó tulajdonság a hálózati meghajtóhoz" 14 "tulajdonság innen:" 15 "válassza ki, melyik mappa tartalmazza ezt: %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Id.rc b/dll/win32/msi/lang/msi_Id.rc index 62c6da9810d..ae8afecc6f4 100644 --- a/dll/win32/msi/lang/msi_Id.rc +++ b/dll/win32/msi/lang/msi_Id.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "drive jatingan untuk fitur hilang" 14 "fitur dari:" 15 "pilih folder yang berisi %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_It.rc b/dll/win32/msi/lang/msi_It.rc index 4a437a8ab20..ecad1172585 100644 --- a/dll/win32/msi/lang/msi_It.rc +++ b/dll/win32/msi/lang/msi_It.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "periferica di rete per la funzionalità mancante" 14 "funzionalità da:" 15 "selezionare la cartella che contiene %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Ja.rc b/dll/win32/msi/lang/msi_Ja.rc index c3ac0197d50..caa036cb77f 100644 --- a/dll/win32/msi/lang/msi_Ja.rc +++ b/dll/win32/msi/lang/msi_Ja.rc @@ -10,6 +10,7 @@ STRINGTABLE 13 "機能があるネットワーク ドライブがありません" 14 "機能の場所:" 15 "%s のあるフォルダを選択してください" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Ko.rc b/dll/win32/msi/lang/msi_Ko.rc index 47d29b92023..f57cb862772 100644 --- a/dll/win32/msi/lang/msi_Ko.rc +++ b/dll/win32/msi/lang/msi_Ko.rc @@ -33,6 +33,7 @@ STRINGTABLE 13 "빠진 부분(feature)을 위한 네트워크 드라이브" 14 "부분(feature)에서:" 15 " %s를 포함하는 폴더 선택" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Lt.rc b/dll/win32/msi/lang/msi_Lt.rc index 597b360ab22..7fb9b00557f 100644 --- a/dll/win32/msi/lang/msi_Lt.rc +++ b/dll/win32/msi/lang/msi_Lt.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "trūksta tinklo disko komponentui" 14 "komponentas iš:" 15 "parinkite aplanką, kuris turi %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Nl.rc b/dll/win32/msi/lang/msi_Nl.rc index 29197e89164..07676578fdf 100644 --- a/dll/win32/msi/lang/msi_Nl.rc +++ b/dll/win32/msi/lang/msi_Nl.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "De netwerkschijf met de feature ontbreekt" 14 "Feature van:" 15 "Kies de map die %s bevat" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_No.rc b/dll/win32/msi/lang/msi_No.rc index 8c020bfe61e..fde6574d80f 100644 --- a/dll/win32/msi/lang/msi_No.rc +++ b/dll/win32/msi/lang/msi_No.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "Egenskapens nettverksstasjon mangler." 14 "Egenskap fra::" 15 "Velg katalogen som inneholder '%s'." + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Pl.rc b/dll/win32/msi/lang/msi_Pl.rc index 01e2de2e72c..d42c1b142c9 100644 --- a/dll/win32/msi/lang/msi_Pl.rc +++ b/dll/win32/msi/lang/msi_Pl.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "dysk siecowy zawierający żądaną funckje jest niedostępny" 14 "funkcja z:" 15 "wybierz folder zawierający '%s'" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Pt.rc b/dll/win32/msi/lang/msi_Pt.rc index 1d919c993b1..136225c1496 100644 --- a/dll/win32/msi/lang/msi_Pt.rc +++ b/dll/win32/msi/lang/msi_Pt.rc @@ -33,6 +33,7 @@ STRINGTABLE 13 "faltando drive de rede para característica" 14 "origem da característica:" 15 "escolha a pasta que contém %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Ro.rc b/dll/win32/msi/lang/msi_Ro.rc index 127ebb49e2f..8fb9e3929e1 100644 --- a/dll/win32/msi/lang/msi_Ro.rc +++ b/dll/win32/msi/lang/msi_Ro.rc @@ -45,6 +45,7 @@ STRINGTABLE 13 "lipsește unitatea de rețea pentru această caracteristică" 14 "caracteristică de la:" 15 "selectați fișierul care conține %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Ru.rc b/dll/win32/msi/lang/msi_Ru.rc index a485fd957c8..c1f577c80c7 100644 --- a/dll/win32/msi/lang/msi_Ru.rc +++ b/dll/win32/msi/lang/msi_Ru.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "сетевой диск для данной возможности не указан" 14 "возможность из:" 15 "выберите каталог, содержащий %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Si.rc b/dll/win32/msi/lang/msi_Si.rc index ed6df345a37..a760270f721 100644 --- a/dll/win32/msi/lang/msi_Si.rc +++ b/dll/win32/msi/lang/msi_Si.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "manjkajoč omrežni pogon za namestitev funkcijo" 14 "funkcija z:" 15 "izberite mapo, ki vsebuje %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Sq.rc b/dll/win32/msi/lang/msi_Sq.rc index bb6c7702bb7..bb1a847b103 100644 --- a/dll/win32/msi/lang/msi_Sq.rc +++ b/dll/win32/msi/lang/msi_Sq.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "rrjet drive-ri për funksionin e munguar" 14 "funksione nga:" 15 "zgjidhni dosjen që përmban %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Sr.rc b/dll/win32/msi/lang/msi_Sr.rc index eaaeb09f058..e7119247e92 100644 --- a/dll/win32/msi/lang/msi_Sr.rc +++ b/dll/win32/msi/lang/msi_Sr.rc @@ -32,6 +32,7 @@ STRINGTABLE 13 "mrežni drajv nedostaje" 14 "dodatak sa:" 15 "izaberite koji folder sadrži %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Sv.rc b/dll/win32/msi/lang/msi_Sv.rc index f4aa3a4a9d6..d6764cc8c65 100644 --- a/dll/win32/msi/lang/msi_Sv.rc +++ b/dll/win32/msi/lang/msi_Sv.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "nätverksenhet för funktion saknar" 14 "funktion från:" 15 "välj den mapp som innehåller %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Tr.rc b/dll/win32/msi/lang/msi_Tr.rc index c9d1029eed9..5abe5a0d208 100644 --- a/dll/win32/msi/lang/msi_Tr.rc +++ b/dll/win32/msi/lang/msi_Tr.rc @@ -31,6 +31,7 @@ STRINGTABLE 13 "Eksik özellik için ağ sürücüsü" 14 "Şuradan özellik:" 15 "%s içeren dizini seçiniz." + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Uk.rc b/dll/win32/msi/lang/msi_Uk.rc index bd293eeb949..ca9b42e04d6 100644 --- a/dll/win32/msi/lang/msi_Uk.rc +++ b/dll/win32/msi/lang/msi_Uk.rc @@ -33,6 +33,7 @@ STRINGTABLE 13 "мережевий диск для даної можливості не вказаний" 14 "можливість з:" 15 "виберіть папку, що містить %s" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/lang/msi_Zh.rc b/dll/win32/msi/lang/msi_Zh.rc index e2b6ed44e54..9270486fb2d 100644 --- a/dll/win32/msi/lang/msi_Zh.rc +++ b/dll/win32/msi/lang/msi_Zh.rc @@ -34,6 +34,7 @@ STRINGTABLE 13 "本功能的网络驱动器不存在" 14 "功能来自:" 15 "选择包含 %s 的文件夹" + 100 "New Folder" } /* Error messages */ diff --git a/dll/win32/msi/resource.h b/dll/win32/msi/resource.h index 7977747f617..f88e587f4bb 100644 --- a/dll/win32/msi/resource.h +++ b/dll/win32/msi/resource.h @@ -25,6 +25,8 @@ #define MSIERR_INFO_ACTIONSTART 14 #define MSIERR_INFO_ACTIONENDED 15 +#define IDS_NEWFOLDER 100 + #define MSIERR_INSERTDISK 1302 #define MSIERR_CABNOTFOUND 1311
2 years, 9 months
1
0
0
0
[reactos] 155/360: [WINESYNC] msi: Fix a couple of memory leaks (Valgrind).
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eab017d18f265882c3a30…
commit eab017d18f265882c3a30f3352107945e734d5b6 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:04:00 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:03 2022 +0100 [WINESYNC] msi: Fix a couple of memory leaks (Valgrind). Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1cb43677632ded6aba8ba0b91937ded934c0c690 by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/install.c | 7 ++++--- dll/win32/msi/package.c | 4 ++++ dll/win32/msi/streams.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index 0afb6b29928..ebed6d4b64a 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -411,8 +411,7 @@ WCHAR *msi_resolve_source_folder( MSIPACKAGE *package, const WCHAR *name, MSIFOL UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DWORD *sz) { MSIPACKAGE *package; - const WCHAR *path; - WCHAR *folderW; + WCHAR *path, *folderW; UINT r; TRACE("%s %p %p\n", debugstr_a(folder), buf, sz); @@ -459,6 +458,7 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DW else r = ERROR_DIRECTORY; + heap_free(path); heap_free(folderW); msiobj_release(&package->hdr); return r; @@ -470,7 +470,7 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DW UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, DWORD *sz) { MSIPACKAGE *package; - const WCHAR *path; + WCHAR *path; UINT r; TRACE("%s %p %p\n", debugstr_w(folder), buf, sz); @@ -510,6 +510,7 @@ UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, else r = ERROR_DIRECTORY; + heap_free(path); msiobj_release(&package->hdr); return r; } diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index 2b3b3ad4e18..80cae055b22 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -2132,6 +2132,7 @@ INT WINAPI MsiProcessMessage( MSIHANDLE hInstall, INSTALLMESSAGE eMessageType, ret = MSI_ProcessMessage( package, eMessageType, record ); + msiobj_release( &record->hdr ); msiobj_release( &package->hdr ); return ret; } @@ -2696,7 +2697,10 @@ UINT __cdecl s_remote_FormatRecord(MSIHANDLE hinst, struct wire_record *remote_r { *value = midl_user_allocate(++size * sizeof(WCHAR)); if (!*value) + { + MsiCloseHandle(rec); return ERROR_OUTOFMEMORY; + } r = MsiFormatRecordW(hinst, rec, *value, &size); } diff --git a/dll/win32/msi/streams.c b/dll/win32/msi/streams.c index e170c0367fc..e3a8c7bc30b 100644 --- a/dll/win32/msi/streams.c +++ b/dll/win32/msi/streams.c @@ -141,9 +141,9 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U old = sv->db->streams[row].stream; hr = IStream_QueryInterface( new, &IID_IStream, (void **)&sv->db->streams[row].stream ); + IStream_Release( new ); if (FAILED( hr )) { - IStream_Release( new ); return ERROR_FUNCTION_FAILED; } if (old) IStream_Release( old );
2 years, 9 months
1
0
0
0
[reactos] 154/360: [WINESYNC] msi: Add support for ARPNOMODIFY, APRNOREMOVE and ARPNOREPAIR.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f342a37a3e084648bda7…
commit 0f342a37a3e084648bda765c0c37297458401fb0 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:03:59 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:03 2022 +0100 [WINESYNC] msi: Add support for ARPNOMODIFY, APRNOREMOVE and ARPNOREPAIR. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 78af6e341fcdf1030bb5b0a4bed4b32e5caf09a3 by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/action.c | 66 ++++++++++++++++++++++++--------- modules/rostests/winetests/msi/action.c | 51 +++++++++++++++---------- 2 files changed, 80 insertions(+), 37 deletions(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index e71b8aeb705..d73657e98a3 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -5191,19 +5191,8 @@ static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package) static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey) { - SYSTEMTIME systime; - DWORD size, langid; - WCHAR date[9], *val, *buffer; - const WCHAR *prop, *key; - - static const WCHAR date_fmt[] = {'%','i','%','0','2','i','%','0','2','i',0}; - static const WCHAR modpath_fmt[] = - {'M','s','i','E','x','e','c','.','e','x','e',' ', - '/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0}; - static const WCHAR szModifyPath[] = - {'M','o','d','i','f','y','P','a','t','h',0}; - static const WCHAR szUninstallString[] = - {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0}; + static const WCHAR date_fmt[] = + {'%','i','%','0','2','i','%','0','2','i',0}; static const WCHAR szEstimatedSize[] = {'E','s','t','i','m','a','t','e','d','S','i','z','e',0}; static const WCHAR szDisplayVersion[] = @@ -5260,6 +5249,18 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey) {'A','R','P','S','Y','S','T','E','M','C','O','M','P','O','N','E','N','T',0}; static const WCHAR szSystemComponent[] = {'S','y','s','t','e','m','C','o','m','p','o','n','e','n','t',0}; + static const WCHAR szARPNOMODIFY[] = + {'A','R','P','N','O','M','O','D','I','F','Y',0}; + static const WCHAR szNoModify[] = + {'N','o','M','o','d','i','f','y',0}; + static const WCHAR szARPNOREMOVE[] = + {'A','R','P','N','O','R','E','M','O','V','E',0}; + static const WCHAR szNoRemove[] = + {'N','o','R','e','m','o','v','e',0}; + static const WCHAR szARPNOREPAIR[] = + {'A','R','P','N','O','R','E','P','A','I','R',0}; + static const WCHAR szNoRepair[] = + {'N','o','R','e','p','a','i','r',0}; static const WCHAR *propval[] = { szARPAUTHORIZEDCDFPREFIX, szAuthorizedCDFPrefix, @@ -5278,6 +5279,10 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey) NULL }; const WCHAR **p = propval; + SYSTEMTIME systime; + DWORD size, langid; + WCHAR date[9], *val, *buffer; + const WCHAR *prop, *key; while (*p) { @@ -5293,10 +5298,37 @@ static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey) { msi_reg_set_val_dword( hkey, szSystemComponent, 1 ); } - size = deformat_string(package, modpath_fmt, &buffer) * sizeof(WCHAR); - RegSetValueExW(hkey, szModifyPath, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size); - RegSetValueExW(hkey, szUninstallString, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size); - msi_free(buffer); + + if (msi_get_property_int( package->db, szARPNOREMOVE, 0 )) + msi_reg_set_val_dword( hkey, szNoRemove, 1 ); + else + { + static const WCHAR fmt_install[] = + {'M','s','i','E','x','e','c','.','e','x','e',' ', + '/','I','[','P','r','o','d','u','c','t','C','o','d','e',']',0}; + static const WCHAR fmt_uninstall[] = + {'M','s','i','E','x','e','c','.','e','x','e',' ', + '/','X','[','P','r','o','d','u','c','t','C','o','d','e',']',0}; + static const WCHAR szModifyPath[] = + {'M','o','d','i','f','y','P','a','t','h',0}; + static const WCHAR szUninstallString[] = + {'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0}; + const WCHAR *fmt = fmt_install; + + if (msi_get_property_int( package->db, szARPNOREPAIR, 0 )) + msi_reg_set_val_dword( hkey, szNoRepair, 1 ); + + if (msi_get_property_int( package->db, szARPNOMODIFY, 0 )) + { + msi_reg_set_val_dword( hkey, szNoModify, 1 ); + fmt = fmt_uninstall; + } + + size = deformat_string(package, fmt, &buffer) * sizeof(WCHAR); + RegSetValueExW(hkey, szModifyPath, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size); + RegSetValueExW(hkey, szUninstallString, 0, REG_EXPAND_SZ, (LPBYTE)buffer, size); + msi_free(buffer); + } /* FIXME: Write real Estimated Size when we have it */ msi_reg_set_val_dword(hkey, szEstimatedSize, 0); diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index 1e7c8bcbc1e..6a34adf7ac5 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -185,6 +185,7 @@ static const char property_dat[] = "SERVDISP\tTestServiceDisp\n" "SERVDISP2\tTestServiceDisp2\n" "MSIFASTINSTALL\t1\n" + "ARPNOMODIFY\t1\n" "regdata17\t#1\n"; static const char env_install_exec_seq_dat[] = @@ -2680,15 +2681,16 @@ static void test_register_product(void) CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(hkey, "InstallDate", date); CHECK_DEL_REG_STR(hkey, "InstallSource", temp); - CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); - CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); CHECK_DEL_REG_STR(hkey, "Comments", NULL); CHECK_DEL_REG_STR(hkey, "Contact", NULL); CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); CHECK_DEL_REG_STR(hkey, "Readme", NULL); CHECK_DEL_REG_STR(hkey, "Size", NULL); CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); @@ -2721,15 +2723,16 @@ static void test_register_product(void) CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(props, "InstallDate", date); CHECK_DEL_REG_STR(props, "InstallSource", temp); - CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "Publisher", "Wine"); - CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); CHECK_DEL_REG_STR(props, "Comments", NULL); CHECK_DEL_REG_STR(props, "Contact", NULL); CHECK_DEL_REG_STR(props, "HelpLink", NULL); CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(props, "NoModify", 1); CHECK_DEL_REG_STR(props, "Readme", NULL); CHECK_DEL_REG_STR(props, "Size", NULL); CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); @@ -2785,15 +2788,16 @@ todo_wine CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(hkey, "InstallDate", date); CHECK_DEL_REG_STR(hkey, "InstallSource", temp); - CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); - CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); CHECK_DEL_REG_STR(hkey, "Comments", NULL); CHECK_DEL_REG_STR(hkey, "Contact", NULL); CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); CHECK_DEL_REG_STR(hkey, "Readme", NULL); CHECK_DEL_REG_STR(hkey, "Size", NULL); CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); @@ -2826,15 +2830,16 @@ todo_wine CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(props, "InstallDate", date); CHECK_DEL_REG_STR(props, "InstallSource", temp); - CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "Publisher", "Wine"); - CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); CHECK_DEL_REG_STR(props, "Comments", NULL); CHECK_DEL_REG_STR(props, "Contact", NULL); CHECK_DEL_REG_STR(props, "HelpLink", NULL); CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_DWORD(props, "NoModify", 1); CHECK_DEL_REG_STR(props, "Readme", NULL); CHECK_DEL_REG_STR(props, "Size", NULL); CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); @@ -3696,15 +3701,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); @@ -3800,15 +3806,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); @@ -3881,15 +3888,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); @@ -3939,15 +3947,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); @@ -3997,15 +4006,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); @@ -4078,15 +4088,16 @@ static void test_publish(void) CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); CHECK_REG_STR(prodkey, "InstallDate", date); CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); + CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); CHECK_REG_STR(prodkey, "Comments", NULL); CHECK_REG_STR(prodkey, "Contact", NULL); CHECK_REG_STR(prodkey, "HelpLink", NULL); CHECK_REG_STR(prodkey, "HelpTelephone", NULL); CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_DWORD(prodkey, "NoModify", 1); CHECK_REG_STR(prodkey, "Readme", NULL); CHECK_REG_STR(prodkey, "Size", NULL); CHECK_REG_STR(prodkey, "URLInfoAbout", NULL);
2 years, 9 months
1
0
0
0
[reactos] 153/360: [WINESYNC] msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers installed.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f0841e860facf1c9cca13…
commit f0841e860facf1c9cca1382e117c95edccc096db Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:03:59 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:03 2022 +0100 [WINESYNC] msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers installed. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1be65cbb46bf792773a5aabc550851ed51f727cd by Hans Leidekker <hans(a)codeweavers.com> --- modules/rostests/winetests/msi/custom.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index cd6cb0c3787..c7ce4d20aeb 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -1424,9 +1424,10 @@ UINT WINAPI odbc_present(MSIHANDLE hinst) WORD len; BOOL r; + buffer[0] = 0; + len = sizeof(buffer); r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len); - ok(hinst, len < sizeof(buffer), "buffer too small\n"); - ok(hinst, r, "SQLGetInstalledDrivers failed\n"); + if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n"); for (p = buffer; *p; p += strlen(p) + 1) { if (!strcmp(p, "ODBC test driver")) @@ -1446,9 +1447,10 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst) WORD len; BOOL r; + buffer[0] = 0; + len = sizeof(buffer); r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len); - ok(hinst, len < sizeof(buffer), "buffer too small\n"); - ok(hinst, r, "SQLGetInstalledDrivers failed\n"); + if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n"); for (p = buffer; *p; p += strlen(p) + 1) { if (!strcmp(p, "ODBC test driver"))
2 years, 9 months
1
0
0
0
[reactos] 152/360: [WINESYNC] msi: Allow recursive changes to the target folder path.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bc149d9d1499212dee9f6…
commit bc149d9d1499212dee9f602ef1573c7a18fd5660 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 00:03:58 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:03 2022 +0100 [WINESYNC] msi: Allow recursive changes to the target folder path. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 7bf2a1b2099b534fd4472962d2e945bc9ab9e2b8 by Hans Leidekker <hans(a)codeweavers.com> --- dll/win32/msi/action.c | 10 +++------- modules/rostests/winetests/msi/msi.c | 24 ++++++++---------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index 1ef6da8562b..e71b8aeb705 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -2401,15 +2401,11 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa else path = msi_build_directory_name( 2, folder->TargetDefault, NULL ); } + normalized_path = msi_normalize_path( path ); - msi_free( path ); - if (folder->ResolvedTarget && !strcmpiW( normalized_path, folder->ResolvedTarget )) - { - TRACE("%s already resolved to %s\n", debugstr_w(name), debugstr_w(folder->ResolvedTarget)); - msi_free( normalized_path ); - return; - } msi_set_property( package->db, folder->Directory, normalized_path, -1 ); + msi_free( path ); + msi_free( folder->ResolvedTarget ); folder->ResolvedTarget = normalized_path; diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c index ee962b52f80..17efddd8236 100644 --- a/modules/rostests/winetests/msi/msi.c +++ b/modules/rostests/winetests/msi/msi.c @@ -336,16 +336,18 @@ static const char spf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" "s72\ti2\tS64\tS0\tS255\n" "CustomAction\tAction\n" - "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n"; + "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n" + "SetFolderProp2\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\\added2\t\n"; static const char spf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "s72\tS255\tI2\n" "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" "CostInitialize\t\t800\n" "FileCost\t\t900\n" "SetFolderProp\t\t950\n" + "SetFolderProp2\t\t960\n" + "CostFinalize\t\t1000\n" "InstallFiles\t\t4000\n" "InstallServices\t\t5000\n" "InstallFinalize\t\t6600\n" @@ -14103,7 +14105,6 @@ static void test_setpropertyfolder(void) { UINT r; CHAR path[MAX_PATH]; - DWORD attr; if (is_process_limited()) { @@ -14128,19 +14129,10 @@ static void test_setpropertyfolder(void) goto error; } ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - attr = GetFileAttributesA(path); - if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY)) - { - ok(delete_pf("msitest\\added\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\added", FALSE), "Directory not created\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - } - else - { - trace("changing folder property not supported\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - } + ok(delete_pf("msitest\\added\\added2\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\added\\added2", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\added", FALSE), "Directory not created\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); error: DeleteFileA(msifile);
2 years, 9 months
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
44
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
Results per page:
10
25
50
100
200