Help for installation of xpcom components

"Ajit Web" <[email protected]> Mon, 7 Mar 2005 15:07:26 +0530
Newsgroups gmane.comp.mozilla.devel.xpinstall,gmane.comp.mozilla.devel.xpcom
Message-ID <011501c522f9$48f62860$4d01a8c0@lwebsamhita>
This is a multi-part message in MIME format.

------=_NextPart_000_0112_01C52327.5F618350
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
         I am trying to install an XPCOM component in the mozilla client =
in the components directory.
         I am able to place the XPCOM components in the components =
directory. Hence if I access the component just after installation it =
gives the error  "Type Error Components.classes[cid] has no properties " =
my install.js file is as below.

-----------------------------------------------------------------
var err =3D initInstall("WSInstall","SamTest",1.0);
if(err !=3D SUCCESS)
    alert("Initialised");

var chromeDir =3D getFolder("chrome");
var compDir =3D getFolder("components");

err =3D addFile("SamTest.dll",1.0, "SamTest.dll",compDir,"",1);
if (err !=3D SUCCESS)
 alert("SamTest.dll could not be downloaded in Components dir");

err =3D addFile("ISamTest.xpt",1.0, "ISamTest.xpt",compDir,"",1);
if (err !=3D SUCCESS)
 alert("ISamTest.xpt could not be downloaded in Components dir");


err =3D addFile("wsinstall.jar",1.0, "wsinstall.jar",chromeDir,"");
if (err !=3D SUCCESS)
 alert("wsinstall.jar could not be downloaded in Components dir");

err =3D =
registerChrome(CONTENT,getFolder(chromeDir,"wsinstall.jar"),"content/wsin=
stall/");
if (err !=3D SUCCESS)
 alert("register chrome failed");

if (err=3D=3DSUCCESS)
{
 err =3D performInstall();
 alert ("performInstall() returned: " + err);
  logComment("performInstall() returned: " + err);
}
else
 cancelInstall(err);
---------------------------------------------------------------------
 I want to register SamTest.dll .

With Regards,
Ajit=20


------=_NextPart_000_0112_01C52327.5F618350
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I=20
am trying to install an XPCOM component in the mozilla client in the =
components=20
directory.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I=20
am able to place the XPCOM components in the components directory. Hence =
if I=20
access the component just after installation it gives the error&nbsp; =
"Type=20
Error Components.classes[cid] has no properties&nbsp;" my install.js =
file is as=20
below.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
-</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>var err =3D=20
initInstall("WSInstall","SamTest",1.0);<BR>if(err !=3D=20
SUCCESS)<BR>&nbsp;&nbsp;&nbsp; alert("Initialised");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>var chromeDir =3D =
getFolder("chrome");<BR>var compDir=20
=3D getFolder("components");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>err =3D =
addFile("<STRONG>SamTest.dll</STRONG>",1.0,=20
"SamTest.dll",compDir,"",1);<BR>if (err !=3D =
SUCCESS)<BR>&nbsp;alert("SamTest.dll=20
could not be downloaded in Components dir");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>err =3D addFile("ISamTest.xpt",1.0,=20
"ISamTest.xpt",compDir,"",1);<BR>if (err !=3D=20
SUCCESS)<BR>&nbsp;alert("ISamTest.xpt could not be downloaded in =
Components=20
dir");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2>
<DIV><BR>err =3D addFile("wsinstall.jar",1.0, =
"wsinstall.jar",chromeDir,"");<BR>if=20
(err !=3D SUCCESS)<BR>&nbsp;alert("wsinstall.jar could not be downloaded =
in=20
Components dir");</DIV>
<DIV>&nbsp;</DIV>
<DIV>err =3D=20
registerChrome(CONTENT,getFolder(chromeDir,"wsinstall.jar"),"content/wsin=
stall/");<BR>if=20
(err !=3D SUCCESS)<BR>&nbsp;alert("register chrome failed");</DIV>
<DIV>&nbsp;</DIV>
<DIV>if (err=3D=3DSUCCESS)<BR>{<BR>&nbsp;err =3D =
performInstall();<BR>&nbsp;alert=20
("performInstall() returned: " + err);<BR>&nbsp; =
logComment("performInstall()=20
returned: " + =
err);<BR>}<BR>else<BR>&nbsp;cancelInstall(err);</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
-----</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;I want to register=20
SamTest.dll&nbsp;.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>With Regards,<BR>Ajit=20
<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_0112_01C52327.5F618350--