RetroZilla/xpinstall/packager/mac/update.html

105 lines
2.6 KiB
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<html>
<head>
<title>Mozilla Build Update</title>
</head>
<body>
<script>
var xpi = new Object();
var numxpi = 0;
var numstatus = 0;
function showprops(obj) {
var props = "";
for (i in obj) {
props += i+":"+obj[i]+"\n ";
}
alert(props);
}
function statusCallback(url,status) {
for (i in xpi) {
if ( url.indexOf(xpi[i]) != -1 ) {
xpi[i] = status;
numstatus++;
break;
}
}
// if we've gotten all results then display them
if (numstatus == numxpi)
{
var text;
var restart = false;
dlg = window.open("","resultWindow");
dlg.document.write("<head><title>XPInstall Results</title></head>");
dlg.document.write("<body><h1>XPInstall Results</h1>");
for (i in xpi)
{
text = " "+i+": ";
switch (status) {
case 999:
restart = true; // fall-through
case 0:
text += "Successful";
break;
default:
text += "Error encountered -- "+status;
break;
}
text += "<br>";
dlg.document.write(text);
}
if (restart) {
dlg.document.write("<p>Some files were in use, you must restart to complete the installation");
}
dlg.document.write("</body>");
dlg.document.close();
}
}
function launch() {
for (var i = 0; i < document.installForm.elements.length; i++)
{
e = document.installForm.elements[i];
if (e.type.match(/checkbox/i) && e.checked )
{
if ( e.name.match(/browser/i) )
{
// browser made up of browser.xpi + install.xpi on the Mac
xpi["Browser"] = "xpi/browser.xpi";
xpi["XPCOM"] = "xpi/xpcom.xpi";
numxpi += 2;
}
else
{
xpi[e.value] = "xpi/"+e.name+".xpi";
numxpi++;
}
}
}
// showprops(xpi);
InstallTrigger.install(xpi,statusCallback);
}
</script>
<h2>Mozilla Build Update</h2>
Select the parts of Seamonkey you wish to update and press the Launch button.
<p>
Update all of the pieces you use at once; mismatched versions
will cause you grief.
<form name="installForm">
<input type="checkbox" name="browser" value="Navigator" checked> Navigator <br>
<input type="checkbox" name="mail" value="Mail" checked> Mail <br>
<input type="checkbox" name="chatzilla" value="Chatzilla" checked> Chatzilla <br>
<input type="button" value="Launch XPInstall" onclick="launch()">
</form>
</body>
</html>