Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 11521026: initial custom action library, "hello, world" quality (Closed)

Created:
Sept. 3, 2013, 12:48 p.m. by Eric
Modified:
Oct. 16, 2013, 2:19 p.m.
Visibility:
Public.

Description

This code is adapted from the WiX custom action library. As a disclosure, I really hate the code quality. Nevertheless, it does provide an initial version to rewrite, something I expect will be faster than trying to deal with CA's from scratch. I've cut down most of the WiX library cruft (the stuff in "dutil"). There's only six of the ~50 source files needed at all, and I've removed most of the code in those. The wca* files are its more specific CA library. I've left that largely intact, even though we'll end up stripping it down eventually. For now there are a number of debugging function in there we might find useful during development; I don't know yet. As will be immediately apparent, the WiX team is mostly ex-Microsoft people, and they code like it. Most everything is declared 'extern "C"' so they can stay close the Windows calling conventions, so it's mostly really C code rather than C++. There's no RIAA, for example, even for some obvious stuff like some of the string allocation they use. There are also way too many global variables. Personally, I'd treat this code as FYI, rather than something to spend much time commenting on at this time. So other than policy, why a review at all? The WiX source "adblockplusie.wxs" has all the modifications needed to link and bind a custom action and its DLL embodiment into the installer. That part works. This version of the installer starts up and immediately fails because the custom action returns an error code. The UI fails (as it should), and the log files show the details. That's the goal of this chunk of work, at that's done. The custom action itself is in "close_application.cpp". It's a mostly-unaltered copy of the corresponding WiX custom action; there's one line to make it always return an error. Nevertheless, it initializes itself correctly otherwise, including all the MSI-specific resources. I want to commit this on a branch, not only because the installer fails immediately (which isn't, ahem, a shippable product), but also because I'm sure we'll need some experimentation with what UI we want. Not to mention how awful the code quality is.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+7577 lines, -1 line) Patch
M adblockplus.gyp View 1 chunk +45 lines, -1 line 1 comment Download
M installer/adblockplusie.wxs View 1 chunk +30 lines, -0 lines 1 comment Download
A src/installer-ca/Doxyfile View 1 chunk +1908 lines, -0 lines 0 comments Download
A src/installer-ca/abp_ca.cpp View 1 chunk +37 lines, -0 lines 0 comments Download
A src/installer-ca/abp_ca.def View 1 chunk +10 lines, -0 lines 0 comments Download
A src/installer-ca/abp_ca.rc View 1 chunk +38 lines, -0 lines 0 comments Download
A src/installer-ca/caSuffix.h View 1 chunk +22 lines, -0 lines 0 comments Download
A src/installer-ca/close_application.cpp View 1 chunk +408 lines, -0 lines 0 comments Download
A src/installer-ca/cost.h View 1 chunk +19 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/dutil.h View 1 chunk +211 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/dutil.cpp View 1 chunk +448 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/fileutil.h View 1 chunk +26 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/fileutil.cpp View 1 chunk +61 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/memutil.h View 1 chunk +45 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/memutil.cpp View 1 chunk +75 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/proc2utl.cpp View 1 chunk +79 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/procutil.h View 1 chunk +85 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/procutil.cpp View 1 chunk +499 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/strutil.h View 1 chunk +123 lines, -0 lines 0 comments Download
A src/installer-ca/dutil/strutil.cpp View 1 chunk +755 lines, -0 lines 0 comments Download
A src/installer-ca/precomp.h View 1 chunk +49 lines, -0 lines 0 comments Download
A src/installer-ca/wcalog.h View 1 chunk +24 lines, -0 lines 0 comments Download
A src/installer-ca/wcalog.cpp View 1 chunk +262 lines, -0 lines 0 comments Download
A src/installer-ca/wcautil.h View 1 chunk +363 lines, -0 lines 0 comments Download
A src/installer-ca/wcautil.cpp View 1 chunk +227 lines, -0 lines 0 comments Download
A src/installer-ca/wcawrap.cpp View 1 chunk +1588 lines, -0 lines 0 comments Download
A src/installer-ca/wix.rc View 1 chunk +140 lines, -0 lines 0 comments Download

Messages

Total messages: 10
Eric
The only file that is really worth review is "adblockplusie.wxs", whose code is close to ...
Sept. 3, 2013, 12:52 p.m. (2013-09-03 12:52:56 UTC) #1
Felix Dahlke
To summarise, what we need this for is: 1. Ask the user before shutting engine/IE ...
Sept. 3, 2013, 9:32 p.m. (2013-09-03 21:32:56 UTC) #2
Felix Dahlke
On 2013/09/03 21:32:56, Felix H. Dahlke wrote: > To summarise, what we need this for ...
Sept. 5, 2013, 11:52 a.m. (2013-09-05 11:52:00 UTC) #3
Eric
On 2013/09/05 11:52:00, Felix H. Dahlke wrote: > Have looked a bit into this, since ...
Sept. 5, 2013, 2 p.m. (2013-09-05 14:00:15 UTC) #4
Eric
Hit the wrong button before pasting in the URL. > FYI. The Wayback Machine has ...
Sept. 5, 2013, 2:01 p.m. (2013-09-05 14:01:02 UTC) #5
Felix Dahlke
On 2013/09/05 14:00:15, Eric wrote: > FYI. The Wayback Machine has the only documentation I ...
Sept. 5, 2013, 2:39 p.m. (2013-09-05 14:39:32 UTC) #6
Felix Dahlke
Some remarks. I agree that we need this, if only for experimentation. I also agree ...
Sept. 6, 2013, 4:59 p.m. (2013-09-06 16:59:03 UTC) #7
Wladimir Palant
Eric, are you seriously saying that a basic custom action requires 24 source files, most ...
Sept. 11, 2013, 12:05 p.m. (2013-09-11 12:05:34 UTC) #8
Felix Dahlke
So it looks like we settled on creating a custom action library that's not based ...
Oct. 16, 2013, 8:21 a.m. (2013-10-16 08:21:07 UTC) #9
Eric
Oct. 16, 2013, 2:19 p.m. (2013-10-16 14:19:12 UTC) #10
On 2013/10/16 08:21:07, Felix H. Dahlke wrote:
> I guess this can be closed then?
Yep. What small bits will reappear (the .def file, for example) can easily go in
another review.

Powered by Google App Engine
This is Rietveld