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

Side by Side Diff: dev_install.cmd

Issue 11058028: Developer installation, gyp version
Patch Set: Created July 2, 2013, 3:13 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 @echo off
2 setlocal
3 set argc=0
4 for %%x in (%*) do set /a argc+=1
5 if %argc% geq 4 goto check1
6 :: Not enough arguments. Print help text.
7 echo usage:
8 echo dev_install.cmd ^<DLL path^> ^<project path^> ^<reg.exe 32 directory^> ^< reg.exe 64 directory^>
9 echo(
10 echo Install Adblock Plus for IE in the developer mode
11 echo * Register the DLL as a per-user COM object with CSLID of the Adblock Plu s for IE BHO
12 echo * Copy html/ and locale/ directories to the DLL directory
13 echo * Copy files/settings.ini to the DLL directory
14 echo(
15 echo arguments:
16 echo ^<DLL path^> Path to the DLL to be registered.
17 echo ^<project path^> Path to the project directory, assumed to be i n ^<root^>/build/^<Configuration^>
18 echo ^<reg.exe 32 directory^> ^| The directory for reg.exe to write into for 32 (resp. 64) bit registry
19 echo ^<reg.exe 64 directory^> ^| One of "system32", "SysWOW64", or "sysnativ e"
20 exit /b 0
21 :check1
22 :: We have at least one argument, which is for the DLL. Verify its existence.
23 set DLL="%~1"
24 if exist %DLL% goto check2
25 echo DLL %DLL% not found. Aborting.
26 exit /b 1
27 :check2
28 if exist %2 goto checkend
29 echo project path "%~2" not found. Aborting.
30 exit /b 1
31 :checkend
32
33 :: Set REG. It's based on either the third or fourth argument.
34 :: We test against "x86" because there are two possible 64-bit values.
35 if /i %PROCESSOR_ARCHITECTURE% equ x86 (set R=%3) else set R=%4
36 set REG="%WINDIR%\%R%\reg.exe"
37 if exist %REG% goto regend
38 echo File %REG% not found. Aborting.
39 exit /b 1
40 :regend
41
42 set OUTDIR=%~dp1
43 set SOURCEDIR=%~2%..\..\
44 echo DLL=%DLL%
45 echo REG=%REG%
46 echo SOURCEDIR=%SOURCEDIR%
47 echo OUTDIR=%OUTDIR%
48 %REG% add HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664} /ve /d "Adblock Plus for IE Browser Helper Object" /f >nul
49 %REG% add HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664}\Inp rocServer32 /ve /d %DLL% /f >nul
50 %REG% add HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664}\Inp rocServer32 /v ThreadingModel /d "Both" /f >nul
51 copy "%SOURCEDIR%files\settings.ini" "%OUTDIR%settings.ini" >nul
52 xcopy /s /I /y /D "%SOURCEDIR%html\*" "%OUTDIR%html" >nul
53 xcopy /s /I /y /D "%SOURCEDIR%locales\*" "%OUTDIR%locales" >nul
54 echo Done
OLDNEW
« adblockplus.gyp ('K') | « adblockplus.gyp ('k') | dev_query.cmd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld