I want to check to make sure that my xpi is installed on mozilla 1.0 and
a windows system. Is this the correct way to do it?
First check windows...
if ('platform' in Install) {
platformStr = new String( Install.platform );
if (!platformStr.search(/^Win/))
platformNode = 'win';
else
cancelInstall(err);
}
else {
var fOSWin = getFolder( "Win System" );
logComment( "fOSWin: " + fOSWin );
if (fOSWin != null)
platformNode = 'win';
else
cancelInstall(err);
}
if (platformNode == 'win') {
logComment("Installation started for Win32 platform");
addFile(COMNT_3, G_SPLASH_FILE, G_PROGRAM_DIR, "");
registerChrome(CONTENT | DELAYED_CHROME, getFolder(G_CHROME,
G_JAR_FILE), G_CONTENT);
}
else
cancelInstall(err);
Then check if mozilla version 1.0 (buildID is 20020530)...
if(!typeof buildID == "undefined")
{
if(buildID != "20020530)
cancelInstall(err);
}
I think the windows part works ( it recognizes that I am using windows
but I dont have any other OS to test it on to see if it fails).
It gives me errors when I try to check the mozilla part.
The error is...
** Line: 87 unterminated string literal
Install **FAILED** with error -229 -- 09/30/2002 15:51:27
Line 87 is this line -> if(!typeof buildID == "undefined")
I have tried if(typeof buildID != "undefined") and getting rid of that
and just checking if(buildID != "20020530") as well but it gives me the
same error!!
Can anyone see what I am doing wrong?
Thanks!
Jason