Bug 39632 - Consolidate GetMsiProperty()
Summary: Consolidate GetMsiProperty()
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: Mat M
QA Contact:
URL:
Whiteboard: EasyHack DifficultyBeginner SkillWind...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 09:43 UTC by Björn Michaelsen
Modified: 2013-10-04 18:48 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Björn Michaelsen 2011-07-28 09:43:43 UTC
=== Consolidate GetMsiProperty() ===

'''Background:''' GetMsiProperty() is being copy'n'pasted from file to file, see [http://opengrok.libreoffice.org/search?q=GetMsiProperty&project=components&defs=&refs=&path=&hist= this link]. Instead of the copy'n'paste, we should define it as an inline in a header, and use it where appropriate.

'''Skills:''' Building on Windows, simple C++
Comment 1 Florian Reisinger 2012-05-18 09:06:59 UTC
Deteted "Easyhack" from summary
Comment 2 Andras Timar 2012-05-31 00:31:28 UTC
Same should be done for GetMsiProp(), in fact GetMsiProperty() calls could be converted to GetMsiProp() calls, too.
Comment 3 Mat M 2013-01-19 17:51:52 UTC
I think we can do the same for SetMsiProperty

Since all those functions will require #include <msiquery.h>, should we replace all these with a #include "msiprop.hxx" or just the ones which are used by the inlined functions ?

And I plan to put msipro.hxx in setup_native/source/win32customactions/inc (new folder). Is it ok ?
Comment 4 Mat M 2013-01-19 22:57:49 UTC
Another advice is needed:

In the code, I found TCHAR *, LPTSTR and wchar_t *, beside string & TCHAR in code targeted y the issue.
I started to use LPTSTR for pointers, as it is standard in Windows, but am not sure about readability.
I am a cpp fresher, so any advice welcome.
Comment 5 Not Assigned 2013-01-23 11:31:07 UTC
Mathias Michel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=95ee7d9cd3a0b0f397def8e607759c81feb8c592

fix for fdo#39632 : Consolidate GetMsiProperty()



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Andras Timar 2013-01-23 12:02:02 UTC
Good job, thanks.
Comment 7 Not Assigned 2013-01-27 19:40:58 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=55fc2b96bb808381fff62b3d34f0e25c13de84a4

Revert "fix for fdo#39632 : Consolidate GetMsiProperty()"



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Andras Timar 2013-01-27 19:44:30 UTC
I'm sorry, but I had to revert your patch. It looked OK at the first glance, but after some testing it showed problems. I tested two CustonActions, DotNetCHeck and SelectLanguage, neither of them worked. Even when I uncommented the commented MessageBox calls in DotNetCheck, I got no MessageBoxes at all. Can you please have a second look at the patch? Thanks.
Comment 9 Mat M 2013-02-05 00:03:35 UTC
I tried activating Message boxes in setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx, because I think this action is always called. I did so by uncommenting lines in the extern "C" UINT __stdcall DotNetCheck(MSIHANDLE handle) function
I did it on a standard commit :
 commit 484bb96aa975d834e326d927d36ee17808b8b6b5
 Author: Tor Lillqvist <tml@iki.fi>
 Date: Sat Jan 12 15:34:28 2013 +0200
Boxes did not appear and installer complained it was interrupt before the end (although all is working fine and desktop shortcut is created.
My leads are:
1) I need to do more than just uncommenting code to activate message boxes
2) dotnetcheck custom action is not called unconditionally

If 1), could you give me some pointers, or do you have any idea on how to go further ?
If 2), As I checked in the idt files it seems to always trigger. Some pointers on how to understand idt files needed, then.
Comment 10 Björn Michaelsen 2013-10-04 18:48:05 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.