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

Issue 10952045: Developer installation from within Visual Studio (Closed)

Created:
June 18, 2013, 12:10 p.m. by Eric
Modified:
Sept. 11, 2013, 5:52 p.m.
Visibility:
Public.

Description

SUPERSEDED: http://codereview.adblockplus.org/11058028/ Patch set 1: This isn't fully working yet, but it's ready for initial review. The one thing that's not working is that 'regedit' is not writing to the registry when invoked from within the Makefile. The same .REG file (for debugging copied out to a .txt file during the build), however, works fine when invoked directly from the command line, which then causes the 64-bit plugin to work. I've got no idea why this might be. Also, I discovered that you cannot use HKCU to register a BHO, contrary to some previous information I had bookmarked. (HKCU to register the CLSID works fine.) That means that there's a need for a UAC elevation. Luckily, for a developer install, you only need to do it once. The amount of ugly hacking to get this to work was far more than I expected. Passing Visual Studio variables to the Makefile command line needs to be done manually, contrary to what's in the VS dialog both. There are problems in dealing with inconsistent conventions for string quoting, needed for spaces in file names. There's a need to break out of the 32-bit ghetto of NMAKE to write to the 64-bit registry. Patch set 2: The BHO key sits within HKLM. The only thing in the build it depends upon is the CLSID of the BHO, which is basically fixed. Registering this key semi-permanently does no harm; if the CLSID ID isn't found, there's no IE error. Therefore, I moved add/remove for this key into a pair of ".reg" files. The developer can merge these into the registry from Explorer by double-clicking. Also, this is exactly the same value for this key that get registered by the ordinary installer, so there's no conflict there. I added checking for this key to the project build, so that there's a notice to the developer if it's not present. Fortuitously, Visual Studio even marks it with a yellow warning flag. Therefore, at a tiny cost to the developer, we can avoid the entire issue of UAC elevation from within VS for now, maybe forever. We can always revisit it later if it turns out to be a problem. There's a build target "query"; use "nmake -f Makefile.DevInstall query" to invoke it from the command line. It looks for every relevant registry entry that could lead to IE not loading the BHO. I used it to check that everything was in place. It's much faster than looking manually with regedit. I'm sure that someone will find use for it later.

Patch Set 1 #

Total comments: 16

Patch Set 2 : Took UAC out of the build loop #

Total comments: 8

Patch Set 3 : Fixes addressing comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M AdblockPlusDeveloperInstall.vcxproj View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Makefile.DevInstall View 1 2 2 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 10
Eric
June 18, 2013, 12:24 p.m. (2013-06-18 12:24:26 UTC) #1
Wladimir Palant
Looking forward to seeing the elevation prompt implemented as we discussed it. http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj File AdblockPlusDeveloperInstall.vcxproj ...
June 18, 2013, 3:18 p.m. (2013-06-18 15:18:33 UTC) #2
Eric
http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj File AdblockPlusDeveloperInstall.vcxproj (right): http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj#newcode106 AdblockPlusDeveloperInstall.vcxproj:106: <NMakeMacros>$(NMakeMacros) OutDir="$(OutDir)\" DLL="$(OutDir)AdblockPlusx64.dll" DLL32="$(OutDir32)AdblockPlus.dll"</NMakeMacros> On a 64-bit system, we ...
June 18, 2013, 4 p.m. (2013-06-18 16:00:18 UTC) #3
Wladimir Palant
http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj File AdblockPlusDeveloperInstall.vcxproj (right): http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj#newcode106 AdblockPlusDeveloperInstall.vcxproj:106: <NMakeMacros>$(NMakeMacros) OutDir="$(OutDir)\" DLL="$(OutDir)AdblockPlusx64.dll" DLL32="$(OutDir32)AdblockPlus.dll"</NMakeMacros> On 2013/06/18 16:00:19, Eric wrote: ...
June 19, 2013, 7:14 a.m. (2013-06-19 07:14:15 UTC) #4
Eric
http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj File AdblockPlusDeveloperInstall.vcxproj (right): http://codereview.adblockplus.org/10952045/diff/1/AdblockPlusDeveloperInstall.vcxproj#newcode106 AdblockPlusDeveloperInstall.vcxproj:106: <NMakeMacros>$(NMakeMacros) OutDir="$(OutDir)\" DLL="$(OutDir)AdblockPlusx64.dll" DLL32="$(OutDir32)AdblockPlus.dll"</NMakeMacros> On 2013/06/19 07:14:15, Wladimir Palant ...
June 19, 2013, 3:22 p.m. (2013-06-19 15:22:54 UTC) #5
Eric
See edited description for patch set 2.
June 19, 2013, 4:56 p.m. (2013-06-19 16:56:12 UTC) #6
Wladimir Palant
http://codereview.adblockplus.org/10952045/diff/1/Makefile.DevInstall File Makefile.DevInstall (right): http://codereview.adblockplus.org/10952045/diff/1/Makefile.DevInstall#newcode2 Makefile.DevInstall:2: # NMAKE is a 32-bit application, which makes it ...
June 20, 2013, 7:10 a.m. (2013-06-20 07:10:38 UTC) #7
Eric
I realized I haven't put the removal of the "regsvr32" calls and the other post-build ...
June 20, 2013, 2:13 p.m. (2013-06-20 14:13:47 UTC) #8
Eric
June 20, 2013, 3:22 p.m. (2013-06-20 15:22:38 UTC) #9
Eric
Sept. 11, 2013, 5:52 p.m. (2013-09-11 17:52:12 UTC) #10

Powered by Google App Engine
This is Rietveld