diff --git a/embedding/browser/activex/src/pluginhostctrl/cab/README.txt b/embedding/browser/activex/src/pluginhostctrl/cab/README.txt index 6971776f7e6c..156f0c983d9f 100644 --- a/embedding/browser/activex/src/pluginhostctrl/cab/README.txt +++ b/embedding/browser/activex/src/pluginhostctrl/cab/README.txt @@ -1,24 +1,26 @@ +Mozilla ActiveX Control for hosting Plug-ins + +Adam Lock + + Want to generate a CAB file for the plugin host control? -First off you need the Cabinet SDK: +First off you need the Cabinet SDK and the signing tools: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp - -And if you want to sign the CAB file you need the signing tool: - http://msdn.microsoft.com/MSDN-FILES/027/000/219/codesign.exe -More blurb about signing is here: +More informative blurb about signing is here: http://www.verisign.com/support/tlc/codesign/install.html Please don't email me questions about signing since I'm just following the -instructions in the above link. +instructions in these links. -Install the tools somewhere and edit the line setting the PATH in makecab.bat -to specify the correct path(s) to these programs. +Install the CAB and signing tools somewhere and edit the line in makecab.bat +to specify the correct PATH to these programs. -Next build the pluginhostctrl.dll (e.g. the ReleaseMinSize target) and type +Next build the pluginhostctrl.dll (e.g. from the ReleaseMinSize target) and type makecab ..\ReleaseMinSize\pluginhostctrl.dll @@ -27,19 +29,30 @@ so IE can download it when it's specified in the tag, e.g. + codebase="http://www.blahblah.com/pluginhostctrl.cab#Version=1,0,0,1"> -If you want to sign the CAB file with a certificate, type +The makecab script automatically signs the CAB file with a TEST CERTIFICATE. YOu +will be prompted to create or enter a password - just make one up and remember +it. + + DO NOT DISTRIBUTE CAB FILES SIGNED WITH THE TEST CERTIFICATE!!!! + +If you want to sign the CAB file with a real certificate, run makecab like this: makecab ..\ReleaseMinSize\pluginhostctrl.dll xx.cer xx.key xx.spc -Where xx.* files are your certificate, key and your software publisher -certificate. +Where xx.* files are your real certificate, key and your software publisher +certificate. If you don't have a real certificate you need to visit somewhere +like Verisign and buy one. -There is a sample verify.htm page where you may try and install the control from. +There is a sample verify.htm page that you may load in IE to see if the +control installs and runs correctly. -STILL TO DO +STILL TO DO: - o Installation from the CAB will probably fail until these scripts have been - sorted out properly. \ No newline at end of file + o Figure out what's wrong with pluginhostctrl.inf that stops atl.dll from + installing. For the time being atl.dll is commented out of the .inf file + which means it won't be installed and the plugin won't work if its not + installed already. + o Script is untested with a real key/cert/spc but should work. diff --git a/embedding/browser/activex/src/pluginhostctrl/cab/makecab.bat b/embedding/browser/activex/src/pluginhostctrl/cab/makecab.bat index 94d0c44b6f4b..f331fae57485 100755 --- a/embedding/browser/activex/src/pluginhostctrl/cab/makecab.bat +++ b/embedding/browser/activex/src/pluginhostctrl/cab/makecab.bat @@ -11,9 +11,11 @@ set CERTFILE=%2 set KEYFILE=%3 set SPCFILE=%4 +REM === Check arguments === + if NOT .%PLUGINHOSTCTRLDLL%.==.. goto have_pluginhostctrl echo Usage : %0 pluginhostctrl [certfile keyfile spcfile] -echo +echo . echo Specify the path to the pluginhostctrl.dll file as the first argument echo and optionally the certificate and keyfile as extra arguments. goto end @@ -36,10 +38,11 @@ cabarc -s 6144 -r -P %OUTDIR%\ N %OUTCAB% out\*.* REM === Generate a test certificate to sign this thing with === if NOT .%TESTCERT%.==.. goto end_testcert +echo Generating a test certificate... set KEYFILE=.\test.key set CERTFILE=.\test.cer set SPCFILE=.\test.spc -makecert -sv %KEYFILE% -n "CN=My Publisher Name" %CERTFILE% +makecert -sv %KEYFILE% -n "CN=testcert.untrusted.org" %CERTFILE% cert2spc %CERTFILE% %SPCFILE% :end_testcert @@ -50,9 +53,9 @@ if .%CERTFILE%.==.. goto the_end if .%KEYFILE%.==.. goto the_end if .%SPCFILE%.==.. goto the_end if NOT EXIST %CERTFILE% goto the_end -if NOT EXIST %KEYFILE$ goto the_end -if NOT EXIST %SPCFILE$ goto the_end - +if NOT EXIST %KEYFILE% goto the_end +if NOT EXIST %SPCFILE% goto the_end +echo Signing %OUTCAB% signcode -spc %SPCFILE% -v %KEYFILE% -n "Mozilla ActiveX control for hosting plugins" %OUTCAB% diff --git a/embedding/browser/activex/src/pluginhostctrl/cab/pluginhostctrl.inf b/embedding/browser/activex/src/pluginhostctrl/cab/pluginhostctrl.inf index 19759d051b6d..7ba88918c613 100644 --- a/embedding/browser/activex/src/pluginhostctrl/cab/pluginhostctrl.inf +++ b/embedding/browser/activex/src/pluginhostctrl/cab/pluginhostctrl.inf @@ -5,18 +5,18 @@ AdvancedINF=2.0 [Add.Code] pluginhostctrl.dll=pluginhostctrl.dll -atl.dll=atl.dll +;atl.dll=atl.dll ; Required DLLs -[atl.dll] -file-win32-x86=thiscab -DestDir=11 -RegisterServer=yes -FileVersion=6,00,0,8449 - [pluginhostctrl.dll] file-win32-x86=thiscab clsid={DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} -FileVersion=1,0,0,0 +FileVersion=1,0,0,1 RegisterServer=yes + +;[atl.dll] +;file-win32-x86=thiscab +;DestDir=11 +;RegisterServer=yes +;FileVersion=6,0,0,8449 diff --git a/embedding/browser/activex/src/pluginhostctrl/cab/verify.htm b/embedding/browser/activex/src/pluginhostctrl/cab/verify.htm index 9cd5ac0b7108..cc1a76845688 100644 --- a/embedding/browser/activex/src/pluginhostctrl/cab/verify.htm +++ b/embedding/browser/activex/src/pluginhostctrl/cab/verify.htm @@ -6,8 +6,7 @@

Test page to verify CAB file was created and signed correctly

- + codebase="pluginhostctrl.cab#Version=1,0,0,1"> \ No newline at end of file