OLD | NEW |
1 @echo off | 1 @echo off |
2 setlocal | 2 setlocal |
3 set argc=0 | 3 set argc=0 |
4 for %%x in (%*) do set /a argc+=1 | 4 for %%x in (%*) do set /a argc+=1 |
5 if %argc% geq 4 goto check1 | 5 if %argc% geq 4 goto check1 |
6 :: Not enough arguments. Print help text. | 6 :: Not enough arguments. Print help text. |
7 echo usage: | 7 echo usage: |
8 echo dev_install.cmd ^<DLL path^> ^<project path^> ^<reg.exe 32 directory^> ^<
reg.exe 64 directory^> | 8 echo dev_install.cmd ^<DLL path^> ^<project path^> ^<reg.exe 32 directory^> ^<
reg.exe 64 directory^> |
9 echo( | 9 echo( |
10 echo Install Adblock Plus for IE in the developer mode | 10 echo Install Adblock Plus for IE in the developer mode |
(...skipping 23 matching lines...) Expand all Loading... |
34 :: We test against "x86" because there are two possible 64-bit values. | 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 | 35 if /i %PROCESSOR_ARCHITECTURE% equ x86 (set R=%3) else set R=%4 |
36 set REG="%WINDIR%\%R%\reg.exe" | 36 set REG="%WINDIR%\%R%\reg.exe" |
37 if exist %REG% goto regend | 37 if exist %REG% goto regend |
38 echo File %REG% not found. Aborting. | 38 echo File %REG% not found. Aborting. |
39 exit /b 1 | 39 exit /b 1 |
40 :regend | 40 :regend |
41 | 41 |
42 set OUTDIR=%~dp1 | 42 set OUTDIR=%~dp1 |
43 set SOURCEDIR=%~2%..\..\ | 43 set SOURCEDIR=%~2%..\..\ |
| 44 :: Adjust SOURCEDIR to eliminate relative directory specification. Something in
the code doesn't like it. |
| 45 pushd %SOURCEDIR% |
| 46 :: This hack substitutes for backtick-execution in Unix-like shells. |
| 47 for /f "delims=" %%i in ('cd') do set SOURCEDIR=%%i\ |
| 48 popd |
| 49 set ENGINE=%OUTDIR%AdblockPlusEngine.exe |
44 echo DLL=%DLL% | 50 echo DLL=%DLL% |
45 echo REG=%REG% | 51 echo REG=%REG% |
46 echo SOURCEDIR=%SOURCEDIR% | 52 echo SOURCEDIR=%SOURCEDIR% |
47 echo OUTDIR=%OUTDIR% | 53 echo OUTDIR=%OUTDIR% |
| 54 echo ENGINE=%ENGINE% |
48 %REG% add HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664} /ve
/d "Adblock Plus for IE Browser Helper Object" /f >nul | 55 %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 | 56 %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 | 57 %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 | 58 %REG% add "HKCU\Software\Adblock Plus for IE" /v engine /d "%ENGINE%" /f >nul |
52 xcopy /s /I /y /D "%SOURCEDIR%html\*" "%OUTDIR%html" >nul | 59 %REG% add "HKCU\Software\Adblock Plus for IE" /v html_dir /d "%SOURCEDIR%html\\"
/f >nul |
53 xcopy /s /I /y /D "%SOURCEDIR%locales\*" "%OUTDIR%locales" >nul | 60 %REG% add "HKCU\Software\Adblock Plus for IE" /v locales_dir /d "%SOURCEDIR%loca
les\\" /f >nul |
54 echo Done | 61 echo Done |
OLD | NEW |