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
April 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
451 discussions
Start a n
N
ew thread
Andrew Eikum : wineoss.drv: Don' t skip over position updates of less than one fragment.
by Alexandre Julliard
02 Apr '15
02 Apr '15
Module: wine Branch: master Commit: 932f392e08980cff3bf74dfdfd35fc10f10364fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=932f392e08980cff3bf74dfdf…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Apr 1 12:20:41 2015 -0500 wineoss.drv: Don't skip over position updates of less than one fragment. --- dlls/wineoss.drv/mmdevdrv.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index cbaf1b2..ccd5c86 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -1393,7 +1393,7 @@ static void oss_write_data(ACImpl *This) { ssize_t written_bytes; UINT32 written_frames, in_oss_frames, write_limit, max_period, write_offs_frames, new_frames; - size_t to_write_frames, to_write_bytes, advanced; + SIZE_T to_write_frames, to_write_bytes, advanced; audio_buf_info bi; BYTE *buf; @@ -1409,9 +1409,7 @@ static void oss_write_data(ACImpl *This) bi.bytes, This->oss_bufsize_bytes); This->oss_bufsize_bytes = bi.bytes; in_oss_frames = 0; - }else if(This->oss_bufsize_bytes - bi.bytes <= bi.fragsize) - in_oss_frames = 0; - else + }else in_oss_frames = (This->oss_bufsize_bytes - bi.bytes) / This->fmt->nBlockAlign; write_limit = 0; @@ -1433,6 +1431,8 @@ static void oss_write_data(ACImpl *This) This->lcl_offs_frames %= This->bufsize_frames; This->held_frames -= advanced; This->in_oss_frames = in_oss_frames; + TRACE("advanced by %lu, lcl_offs: %u, held: %u, in_oss: %u\n", + advanced, This->lcl_offs_frames, This->held_frames, This->in_oss_frames); if(This->held_frames == This->in_oss_frames) @@ -1448,7 +1448,9 @@ static void oss_write_data(ACImpl *This) to_write_frames = min(to_write_frames, write_limit); to_write_bytes = to_write_frames * This->fmt->nBlockAlign; - + TRACE("going to write %lu frames from %u (%lu of %u)\n", to_write_frames, + write_offs_frames, to_write_frames + write_offs_frames, + This->bufsize_frames); buf = This->local_buffer + write_offs_frames * This->fmt->nBlockAlign; @@ -1479,6 +1481,8 @@ static void oss_write_data(ACImpl *This) if(This->session->mute) silence_buffer(This, This->local_buffer, to_write_frames); + TRACE("wrapping to write %lu frames from beginning\n", to_write_frames); + written_bytes = write(This->fd, This->local_buffer, to_write_bytes); if(written_bytes < 0){ WARN("write failed: %d (%s)\n", errno, strerror(errno));
1
0
0
0
Aric Stewart : winmm: sndPlaySound can play resource sounds.
by Alexandre Julliard
02 Apr '15
02 Apr '15
Module: wine Branch: master Commit: 74471e857c44449a0236702b7cf8c607cf153a38 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74471e857c44449a0236702b7…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Apr 1 10:11:24 2015 -0500 winmm: sndPlaySound can play resource sounds. --- dlls/winmm/playsound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 88a4c48..5d9aed0 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -566,7 +566,7 @@ BOOL WINAPI PlaySoundW(LPCWSTR pszSoundW, HMODULE hmod, DWORD fdwSound) */ BOOL WINAPI sndPlaySoundA(LPCSTR pszSoundA, UINT uFlags) { - uFlags &= SND_ALIAS_ID|SND_FILENAME|SND_ASYNC|SND_LOOP|SND_MEMORY|SND_NODEFAULT|SND_NOSTOP|SND_SYNC; + uFlags &= SND_RESOURCE|SND_ALIAS_ID|SND_FILENAME|SND_ASYNC|SND_LOOP|SND_MEMORY|SND_NODEFAULT|SND_NOSTOP|SND_SYNC; return MULTIMEDIA_PlaySound(pszSoundA, 0, uFlags, FALSE); } @@ -575,7 +575,7 @@ BOOL WINAPI sndPlaySoundA(LPCSTR pszSoundA, UINT uFlags) */ BOOL WINAPI sndPlaySoundW(LPCWSTR pszSound, UINT uFlags) { - uFlags &= SND_ALIAS_ID|SND_FILENAME|SND_ASYNC|SND_LOOP|SND_MEMORY|SND_NODEFAULT|SND_NOSTOP|SND_SYNC; + uFlags &= SND_RESOURCE|SND_ALIAS_ID|SND_FILENAME|SND_ASYNC|SND_LOOP|SND_MEMORY|SND_NODEFAULT|SND_NOSTOP|SND_SYNC; return MULTIMEDIA_PlaySound(pszSound, 0, uFlags, TRUE); }
1
0
0
0
Aric Stewart : wineqtdecoder: Unload the AsyncReader on movie processing failure.
by Alexandre Julliard
02 Apr '15
02 Apr '15
Module: wine Branch: master Commit: d0d7c47b65a874553ab1c88e6a5644592df78391 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0d7c47b65a874553ab1c88e6…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Apr 1 09:47:47 2015 -0500 wineqtdecoder: Unload the AsyncReader on movie processing failure. --- dlls/wineqtdecoder/qtsplitter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 8bb51a4..2aafdb4 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -1138,6 +1138,8 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, hr = QT_Process_Movie(impl_from_IBaseFilter(This->pin.pinInfo.pFilter)); if (FAILED(hr)) { + IAsyncReader_Release(This->pReader); + This->pReader = NULL; LeaveCriticalSection(&impl_from_IBaseFilter(This->pin.pinInfo.pFilter)->filter.csFilter); TRACE("Unable to process movie\n"); return hr;
1
0
0
0
Shuai Meng : vbscript: Implemented Oct.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 56ab12ccef84b0e42cddd03a85815beb323ee393 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56ab12ccef84b0e42cddd03a8…
Author: Shuai Meng <mengshuaicalendr(a)gmail.com> Date: Sat Mar 28 17:24:46 2015 +0800 vbscript: Implemented Oct. --- dlls/vbscript/global.c | 39 +++++++++++++++++++++++++++++++++++++-- dlls/vbscript/tests/api.vbs | 30 ++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 74acff7..ee9168b 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -584,8 +584,43 @@ static HRESULT Global_Hex(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA static HRESULT Global_Oct(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - FIXME("\n"); - return E_NOTIMPL; + HRESULT hres; + WCHAR buf[23], *ptr; + DWORD n; + int ret; + + TRACE("%s\n", debugstr_variant(arg)); + + switch(V_VT(arg)) { + case VT_I2: + n = (WORD)V_I2(arg); + break; + case VT_NULL: + if(res) + V_VT(res) = VT_NULL; + return S_OK; + default: + hres = to_int(arg, &ret); + if(FAILED(hres)) + return hres; + else + n = ret; + } + + buf[22] = 0; + ptr = buf + 21; + + if(n) { + do { + *ptr-- = '0' + (n & 0x7); + n >>= 3; + }while(n); + ptr++; + }else { + *ptr = '0'; + } + + return return_string(res, ptr); } static HRESULT Global_VarType(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index 8c92cf5..7b97df4 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -237,6 +237,36 @@ TestHex empty, "0" Call ok(getVT(hex(null)) = "VT_NULL", "getVT(hex(null)) = " & getVT(hex(null))) Call ok(getVT(hex(empty)) = "VT_BSTR", "getVT(hex(empty)) = " & getVT(hex(empty))) +Sub TestOct(x, ex, res_type) + Call ok(Oct(x) = ex, "Oct(" & x & ") = " & Oct(x) & " expected " & ex) + Call ok(getVT(Oct(x)) = res_type, "getVT(Oct(" &x & ")) = " & getVT(Oct(x)) & "expected " & res_type) +End Sub + +Sub TestOctError(num, err_num) + On error resume next + Call Oct(num) + Call ok(Err.number = err_num, "Oct(" & num & ") error number is " & Err.number & " expected " & err_num) +End Sub + +TestOct empty, "0", "VT_BSTR" +TestOct 0, "0", "VT_BSTR" +TestOct 9, "11", "VT_BSTR" +TestOct "9", "11", "VT_BSTR" +TestOct 8.5, "10", "VT_BSTR" +TestOct 9.5, "12", "VT_BSTR" +TestOct -1, "177777", "VT_BSTR" +TestOct -32767, "100001", "VT_BSTR" +TestOct -32768, "37777700000", "VT_BSTR" +TestOct 2147483647.49, "17777777777", "VT_BSTR" +TestOct -2147483648.5, "20000000000", "VT_BSTR" +Call ok(getVT(Oct(null)) = "VT_NULL", "getVT(Oct(null)) = " & getVT(Oct(null))) +newObject.myval = 5 +TestOct newObject, "5", "VT_BSTR" + +TestOctError 2147483647.5, 6 +TestOctError -2147483648.51, 6 +TestOctError "test", 13 + x = InStr(1, "abcd", "bc") Call ok(x = 2, "InStr returned " & x)
1
0
0
0
Sergey Isakov : windowscodecs: Fix wrong pointer to formal parameter.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 98186d42a57f47641413c19731e8a97587a66f99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98186d42a57f47641413c1973…
Author: Sergey Isakov <isakov-sl(a)bk.ru> Date: Fri Mar 27 21:35:23 2015 +0300 windowscodecs: Fix wrong pointer to formal parameter. --- dlls/windowscodecs/icnsformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/icnsformat.c b/dlls/windowscodecs/icnsformat.c index d5d123a..5ce44a2 100644 --- a/dlls/windowscodecs/icnsformat.c +++ b/dlls/windowscodecs/icnsformat.c @@ -397,7 +397,7 @@ static HRESULT WINAPI IcnsFrameEncode_WriteSource(IWICBitmapFrameEncode *iface, if (!This->initialized) return WINCODEC_ERR_WRONGSTATE; - hr = configure_write_source(iface, pIBitmapSource, &prc, + hr = configure_write_source(iface, pIBitmapSource, prc, &GUID_WICPixelFormat32bppBGRA, This->size, This->size, 1.0, 1.0);
1
0
0
0
Christoph von Wittich : riched20: Handle SCF_WORD.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: ca2b70b2855be5f0166a639a07e43c2b3e877ed2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca2b70b2855be5f0166a639a0…
Author: Christoph von Wittich <Christoph_vW(a)ReactOS.org> Date: Sun Mar 29 22:07:50 2015 +0200 riched20: Handle SCF_WORD. --- dlls/riched20/caret.c | 2 +- dlls/riched20/editor.c | 8 ++++++-- dlls/riched20/editor.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 043a32a..e3e42cc 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -710,7 +710,7 @@ int ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) } -static BOOL +BOOL ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) { ME_DisplayItem *pRun = cursor->pRun, *pOtherRun; diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 171ec69..a4403ca 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3510,8 +3510,12 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, if (editor->mode & TM_PLAINTEXT) return 0; if (wParam & SCF_WORD) { - FIXME("EM_SETCHARFORMAT: word selection not supported\n"); - return 0; + ME_Cursor start; + ME_Cursor end = editor->pCursors[0]; + ME_MoveCursorWords(editor, &end, +1); + start = end; + ME_MoveCursorWords(editor, &start, -1); + ME_SetCharFormat(editor, &start, &end, p); } bRepaint = ME_IsSelection(editor); ME_SetSelectionCharFormat(editor, p); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index e4c13a9..e2b837a 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -166,6 +166,7 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) DECLSPEC_ /* caret.c */ void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor) DECLSPEC_HIDDEN; int ME_SetSelection(ME_TextEditor *editor, int from, int to) DECLSPEC_HIDDEN; +BOOL ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs) DECLSPEC_HIDDEN; void ME_HideCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN; void ME_ShowCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN; void ME_MoveCaret(ME_TextEditor *ed) DECLSPEC_HIDDEN;
1
0
0
0
David Hedberg : comdlg32: Only attempt to update the layout if the dialog window exists.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 2afbf9dbbcc56f686c35be03557cabf9589b1a03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2afbf9dbbcc56f686c35be035…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Sun Mar 29 22:56:29 2015 +0200 comdlg32: Only attempt to update the layout if the dialog window exists. --- dlls/comdlg32/itemdlg.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index c37b66e..b5093b8 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -1225,7 +1225,7 @@ static HRESULT init_custom_controls(FileDialogImpl *This) /************************************************************************** * Window related functions. */ -static SIZE update_layout(FileDialogImpl *This) +static void update_layout(FileDialogImpl *This) { HDWP hdwp; HWND hwnd; @@ -1233,21 +1233,19 @@ static SIZE update_layout(FileDialogImpl *This) RECT cancel_rc, open_rc; RECT filetype_rc, filename_rc, filenamelabel_rc; RECT toolbar_rc, ebrowser_rc, customctrls_rc; - int missing_width, missing_height; static const UINT vspacing = 4, hspacing = 4; - SIZE ret; + static const UINT min_width = 320, min_height = 200; - GetClientRect(This->dlg_hwnd, &dialog_rc); - - missing_width = max(0, 320 - dialog_rc.right); - missing_height = max(0, 200 - dialog_rc.bottom); + if (!GetClientRect(This->dlg_hwnd, &dialog_rc)) + { + TRACE("Invalid dialog window, not updating layout\n"); + return; + } - if(missing_width || missing_height) + if(dialog_rc.right < min_width || dialog_rc.bottom < min_height) { - TRACE("Missing (%d, %d)\n", missing_width, missing_height); - ret.cx = missing_width; - ret.cy = missing_height; - return ret; + TRACE("Dialog size (%d, %d) too small, not updating layout\n", dialog_rc.right, dialog_rc.bottom); + return; } /**** @@ -1399,8 +1397,7 @@ static SIZE update_layout(FileDialogImpl *This) else ERR("Failed to position dialog controls.\n"); - ret.cx = 0; ret.cy = 0; - return ret; + return; } static HRESULT init_explorerbrowser(FileDialogImpl *This)
1
0
0
0
Hans Leidekker : msi: Get rid of global variables the cabinet extraction callbacks.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: eb116d6640ba9860bc0ef5bcfdafb63c9d766b3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb116d6640ba9860bc0ef5bcf…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:33:36 2015 +0200 msi: Get rid of global variables the cabinet extraction callbacks. --- dlls/msi/files.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index b6833e9..d1e3ecf 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -278,12 +278,11 @@ static MSIFILE *find_file( MSIPACKAGE *package, UINT disk_id, const WCHAR *filen static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user) { - static MSIFILE *file = NULL; - UINT_PTR disk_id = (UINT_PTR)user; + MSIFILE *file = *(MSIFILE **)user; if (action == MSICABEXTRACT_BEGINEXTRACT) { - if (!(file = find_file( package, disk_id, filename ))) + if (!(file = find_file( package, file->disk_id, filename ))) { TRACE("unknown file in cabinet (%s)\n", debugstr_w(filename)); return FALSE; @@ -297,11 +296,11 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, } *path = strdupW( file->TargetPath ); *attrs = file->Attributes; + *(MSIFILE **)user = file; } else if (action == MSICABEXTRACT_FILEEXTRACTED) { if (!msi_is_global_assembly( file->Component )) file->state = msifs_installed; - file = NULL; } return TRUE; @@ -372,11 +371,12 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) (file->IsCompressed && !mi->is_extracted)) { MSICABDATA data; + MSIFILE *cursor = file; data.mi = mi; data.package = package; data.cb = installfiles_cb; - data.user = (PVOID)(UINT_PTR)mi->disk_id; + data.user = &cursor; if (file->IsCompressed && !msi_cabextract(package, mi, &data)) { @@ -451,21 +451,20 @@ static MSIFILEPATCH *find_filepatch( MSIPACKAGE *package, UINT disk_id, const WC static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user) { - static MSIFILEPATCH *patch; - UINT_PTR disk_id = (UINT_PTR)user; + MSIFILEPATCH *patch = *(MSIFILEPATCH **)user; if (action == MSICABEXTRACT_BEGINEXTRACT) { - if (!(patch = find_filepatch( package, disk_id, file ))) return FALSE; + if (!(patch = find_filepatch( package, patch->disk_id, file ))) return FALSE; patch->path = msi_create_temp_file( package->db ); *path = strdupW( patch->path ); *attrs = patch->File->Attributes; + *(MSIFILEPATCH **)user = patch; } else if (action == MSICABEXTRACT_FILEEXTRACTED) { patch->extracted = TRUE; - patch = NULL; } return TRUE; @@ -501,6 +500,7 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) if (!patch->extracted) { MSICABDATA data; + MSIFILEPATCH *cursor = patch; rc = ready_media( package, TRUE, mi ); if (rc != ERROR_SUCCESS) @@ -511,7 +511,7 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) data.mi = mi; data.package = package; data.cb = patchfiles_cb; - data.user = (PVOID)(UINT_PTR)mi->disk_id; + data.user = &cursor; if (!msi_cabextract( package, mi, &data )) {
1
0
0
0
Hans Leidekker : msi: Clean up handling of temporary files.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 17b05316a5a62d48cca50f416da5e7f2f14fef99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17b05316a5a62d48cca50f416…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:33:11 2015 +0200 msi: Clean up handling of temporary files. --- dlls/msi/action.c | 37 ++++++++++++++++++------ dlls/msi/custom.c | 81 +++++++++++++++++++++++++++++++---------------------- dlls/msi/database.c | 1 + dlls/msi/dialog.c | 29 ++----------------- dlls/msi/files.c | 49 +++++++++++++++----------------- dlls/msi/msipriv.h | 9 ++---- dlls/msi/package.c | 65 +++++++++++------------------------------- 7 files changed, 120 insertions(+), 151 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=17b05316a5a62d48cca50…
1
0
0
0
Hans Leidekker : msi: Don' t mark global assembly files as installed when they are extracted.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 20ef12a762b73519147d4920a37697bc3c9e8921 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20ef12a762b73519147d4920a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:32:44 2015 +0200 msi: Don't mark global assembly files as installed when they are extracted. --- dlls/msi/action.c | 11 ++++++++--- dlls/msi/files.c | 17 +++++++++-------- dlls/msi/install.c | 2 +- dlls/msi/msi.c | 2 +- dlls/msi/msipriv.h | 1 + 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a9a157b..4eec12a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2169,13 +2169,18 @@ WCHAR *msi_build_directory_name( DWORD count, ... ) return dir; } -static void set_target_path( MSIPACKAGE *package, MSIFILE *file ) +BOOL msi_is_global_assembly( MSICOMPONENT *comp ) { - MSIASSEMBLY *assembly = file->Component->assembly; + return comp->assembly && !comp->assembly->application; +} +static void set_target_path( MSIPACKAGE *package, MSIFILE *file ) +{ msi_free( file->TargetPath ); - if (assembly && !assembly->application) + if (msi_is_global_assembly( file->Component )) { + MSIASSEMBLY *assembly = file->Component->assembly; + if (!assembly->tempdir) assembly->tempdir = get_temp_dir(); file->TargetPath = msi_build_directory_name( 2, assembly->tempdir, file->FileName ); msi_track_tempfile( package, file->TargetPath ); diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 96fb48a..fb56a6d 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -80,7 +80,7 @@ static msi_file_state calculate_install_state( MSIPACKAGE *package, MSIFILE *fil TRACE("skipping %s (not part of patch)\n", debugstr_w(file->File)); return msifs_skipped; } - if ((comp->assembly && !comp->assembly->application && !comp->assembly->installed) || + if ((msi_is_global_assembly( comp ) && !comp->assembly->installed) || GetFileAttributesW( file->TargetPath ) == INVALID_FILE_ATTRIBUTES) { TRACE("installing %s (missing)\n", debugstr_w(file->File)); @@ -291,7 +291,7 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, if (f->disk_id != disk_id || (f->state != msifs_missing && f->state != msifs_overwrite)) return FALSE; - if (!f->Component->assembly || f->Component->assembly->application) + if (!msi_is_global_assembly( f->Component )) { msi_create_directory(package, f->Component->Directory); } @@ -300,7 +300,7 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, } else if (action == MSICABEXTRACT_FILEEXTRACTED) { - f->state = msifs_installed; + if (!msi_is_global_assembly( f->Component )) f->state = msifs_installed; f = NULL; } @@ -393,22 +393,22 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath)); - if (!file->Component->assembly || file->Component->assembly->application) + if (!msi_is_global_assembly( file->Component )) { msi_create_directory(package, file->Component->Directory); } rc = copy_install_file(package, file, source); if (rc != ERROR_SUCCESS) { - ERR("Failed to copy %s to %s (%d)\n", debugstr_w(source), - debugstr_w(file->TargetPath), rc); + ERR("Failed to copy %s to %s (%u)\n", debugstr_w(source), debugstr_w(file->TargetPath), rc); rc = ERROR_INSTALL_FAILURE; msi_free(source); goto done; } msi_free(source); } - else if (file->state != msifs_installed && !(file->Attributes & msidbFileAttributesPatchAdded)) + else if (!msi_is_global_assembly( file->Component ) && + file->state != msifs_installed && !(file->Attributes & msidbFileAttributesPatchAdded)) { ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File)); rc = ERROR_INSTALL_FAILURE; @@ -419,7 +419,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) { MSICOMPONENT *comp = file->Component; - if (!comp->assembly || (file->state != msifs_missing && file->state != msifs_overwrite)) + if (!msi_is_global_assembly( comp ) || (file->state != msifs_missing && file->state != msifs_overwrite)) continue; rc = msi_install_assembly( package, comp ); @@ -429,6 +429,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) rc = ERROR_INSTALL_FAILURE; break; } + file->state = msifs_installed; } done: diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 5810a1e..a0f69c9 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -588,7 +588,7 @@ UINT MSI_SetTargetPathW( MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolder const WCHAR *dir; MSICOMPONENT *comp = file->Component; - if (!comp->Enabled || (comp->assembly && !comp->assembly->application)) continue; + if (!comp->Enabled || msi_is_global_assembly( comp )) continue; dir = msi_get_target_folder( package, comp->Directory ); msi_free( file->TargetPath ); diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index df71ed2..9dc30be 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -2048,7 +2048,7 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i GetWindowsDirectoryW( path, MAX_PATH ); if (component && component[0]) { - if (comp->assembly && !comp->assembly->application) *temp = comp->Cost; + if (msi_is_global_assembly( comp )) *temp = comp->Cost; if (!comp->Enabled || !comp->KeyPath) { *cost = 0; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index fe4f6d6..9c016f3 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1045,6 +1045,7 @@ extern UINT msi_install_assembly(MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN; extern UINT msi_uninstall_assembly(MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN; extern BOOL msi_init_assembly_caches(MSIPACKAGE *) DECLSPEC_HIDDEN; extern void msi_destroy_assembly_caches(MSIPACKAGE *) DECLSPEC_HIDDEN; +extern BOOL msi_is_global_assembly(MSICOMPONENT *) DECLSPEC_HIDDEN; extern WCHAR *msi_font_version_from_file(const WCHAR *) DECLSPEC_HIDDEN; extern WCHAR **msi_split_string(const WCHAR *, WCHAR) DECLSPEC_HIDDEN; extern UINT msi_set_original_database_property(MSIDATABASE *, const WCHAR *) DECLSPEC_HIDDEN;
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
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
Results per page:
10
25
50
100
200