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

Issue 11058028: Developer installation, gyp version

Created:
July 2, 2013, 3:13 a.m. by Eric
Modified:
June 19, 2015, 2:05 p.m.
Reviewers:
Visibility:
Public.

Description

See http://codereview.adblockplus.org/10952045/ for previous work. This version uses only gyp, some batch files (w/ extension .cmd), and two .reg files (as before). No special MSBuild syntax, project files, or makefiles. Designed to work with all combinations of 32/64 bit everything.

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -2 lines) Patch
A BHO_add.reg View 1 chunk +9 lines, -0 lines 0 comments Download
A BHO_remove.reg View 1 chunk +4 lines, -0 lines 0 comments Download
M adblockplus.gyp View 2 chunks +112 lines, -2 lines 6 comments Download
A dev_install.cmd View 1 chunk +54 lines, -0 lines 0 comments Download
A dev_query.cmd View 1 chunk +21 lines, -0 lines 0 comments Download
A dev_uninstall.cmd View 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 4
Eric
Ready to review. Tested on my Windows x64 system with the standard VS 2012 toolset.
July 2, 2013, 3:16 a.m. (2013-07-02 03:16:28 UTC) #1
Felix Dahlke
I'm still not sure why we're not just using regsvr32 - there is no single ...
July 2, 2013, 8 a.m. (2013-07-02 08:00:46 UTC) #2
Oleksandr
This looks nice and powerful and all, but also just too convoluted, IMHO. I don't ...
July 2, 2013, 8:16 a.m. (2013-07-02 08:16:17 UTC) #3
Eric
July 2, 2013, 12:58 p.m. (2013-07-02 12:58:06 UTC) #4
Felix: This is preparatory to changing the file layout. It's in the cluster of
issues I first wrote about in
https://intraforum.adblockplus.org/t/code-changes-for-adblock-plus-for-ie-tha...,
now six weeks ago. Once we put the 32-bit DLL in the 32-bit Program Files and
the 64-bit DLL in the 64-bit Program Files, the code in the plugin will have to
find other files in a different way.

Oleksandr: The cmd files are driven by custom actions in two new projects that
appear in the gyp-generated .sln files. Just build "Developer Install" to
install after compiling. Build "Developer Uninstall" to uninstall. Both these
run without UAC. The only UAC elevation is during initial setup, when you double
click on the BHO_add.reg file, which adds the HKLM key. That only needs to be
done once.

http://codereview.adblockplus.org/11058028/diff/1/adblockplus.gyp
File adblockplus.gyp (right):

http://codereview.adblockplus.org/11058028/diff/1/adblockplus.gyp#newcode14
adblockplus.gyp:14: # Architecture Detections
On 2013/07/02 08:00:46, Felix H. Dahlke wrote:
> This describes something that's happening in dev_install.cmd, right? I'd want
to
> move this documentation there then.
It's happening in both the install and uninstall command files. I've moved as
much of the logic as possible into the 'gyp' file, where we can make it common
and catch errors as early as possible.

http://codereview.adblockplus.org/11058028/diff/1/adblockplus.gyp#newcode237
adblockplus.gyp:237: # This file is never written, meaning the action always
runs.
On 2013/07/02 08:16:17, Oleksandr wrote:
> Can you please elaborate on this part? I don't quite get it - if it is never
> written - why is it here?
MSBuild is essentially a glorified Makefile, special-purposed for Microsoft
tools. When there's a target that doesn't exist, the builder runs the action
that builds it. (It does not, however, ensure that it's there afterwards.)
Having a non-written target ensure that the custom action always runs.

It's possible that it might be able to be omitted, but that's one more MSBuild
thing to research, to make sure it won't fail for whatever reason in the future.

http://codereview.adblockplus.org/11058028/diff/1/adblockplus.gyp#newcode258
adblockplus.gyp:258: '..\\..\\dev_uninstall.cmd <(reg32) <(reg64)',
On 2013/07/02 08:00:46, Felix H. Dahlke wrote:
> So this means that I cannot just run dev_uninstall.cmd from the command line
> without arguments? How can I run it?
> 
> I'm wondering if it wouldn't be better to just pass the architecture in to the
> scripts, and they determine the directories from that.
It would be possible to pass in the architecture itself. That would mean adding
more conditional checks to the .cmd files (install and uninstall) and
duplicating the code.

To run it, just build the "Developer Uninstall" project in the generated
solution. Uninstall is on a per-architecture basis. The only time a developer
would need to uninstall the developer keys, though, is to use the regularly
installed (with MSI) version.

Powered by Google App Engine
This is Rietveld