|
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.
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
|
Total messages: 10
|