NOT PART OF BUILD. First working version of CAB file packaging and signing script, install file and docs.

This commit is contained in:
locka%iol.ie 2001-10-30 22:32:27 +00:00
Родитель 300a034231
Коммит 603cecab7c
4 изменённых файлов: 47 добавлений и 32 удалений

Просмотреть файл

@ -1,24 +1,26 @@
Mozilla ActiveX Control for hosting Plug-ins
Adam Lock <adamlock@netscape.com>
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 <OBJECT> tag, e.g.
<OBJECT width="100" height="100"
classid="CLSID:DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2"
codebase="http://www.blahblah.com/pluginhostctrl.cab#Version=1,0,0,0">
codebase="http://www.blahblah.com/pluginhostctrl.cab#Version=1,0,0,1">
</OBJECT>
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.
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.

Просмотреть файл

@ -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%

Просмотреть файл

@ -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

Просмотреть файл

@ -6,8 +6,7 @@
<P>Test page to verify CAB file was created and signed correctly</P>
<OBJECT width="100" height="100"
classid="CLSID:DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2"
codebase="pluginhostctrl.cab">
<PARAM name="type" value="*"/>
codebase="pluginhostctrl.cab#Version=1,0,0,1">
</OBJECT>
</BODY>
</HTML>