rem: var bundle = document.getElementById("bundle_cckwizard");    var installerfilename = document.getElementById("filename").value; if (installerfilename.length == 0) installerfilename = "cck"; installerfilename += "-installer.xpi"; 
context: function CreateCCK(){ /* ---------- */  var destdir = Components.classes["@mozilla.org/file/local;1"]                          .createInstance(Components.interfaces.nsILocalFile);  destdir.initWithPath(currentconfigpath);    CCKWriteConfigFile(destdir);  destdir.append("jar");  destdir.append("content");  destdir.append("cck");  try {    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}    CCKWriteXULOverlay(destdir);  CCKWriteDTD(destdir);  CCKWriteCSS(destdir);  CCKWriteProperties(destdir);  CCKCopyFile(document.getElementById("iconURL").value, destdir);  CCKCopyFile(document.getElementById("LargeAnimPath").value, destdir);  CCKCopyFile(document.getElementById("LargeStillPath").value, destdir);  CCKCopyChromeToFile("cck.js", destdir)    CCKCopyFile(document.getElementById("CertPath1").value, destdir);  CCKCopyFile(document.getElementById("CertPath2").value, destdir);  CCKCopyFile(document.getElementById("CertPath3").value, destdir);  CCKCopyFile(document.getElementById("CertPath4").value, destdir);  CCKCopyFile(document.getElementById("CertPath5").value, destdir);  /* copy/create contents.rdf if 1.0 */  var zipdir = Components.classes["@mozilla.org/file/local;1"]                         .createInstance(Components.interfaces.nsILocalFile);  zipdir.initWithPath(currentconfigpath);  zipdir.append("jar");  CCKZip("cck.jar", zipdir, "content");  /* ---------- */  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  destdir.append("chrome");  try {    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}  zipdir.append("cck.jar");  CCKCopyFile(zipdir.path, destdir);/* ---------- */  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  destdir.append("components");  try {    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}  CCKCopyChromeToFile("cckService.js", destdir);  /* ---------- */  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  destdir.append("defaults");  destdir.append("preferences");  try {    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}  CCKWriteDefaultJS(destdir)  /* ---------- */  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  destdir.append("plugins");  try {    destdir.remove(true);    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}  haveplugins = CCKCopyFile(document.getElementById("BrowserPluginPath1").value, destdir);  haveplugins |= CCKCopyFile(document.getElementById("BrowserPluginPath2").value, destdir);  haveplugins |= CCKCopyFile(document.getElementById("BrowserPluginPath3").value, destdir);  haveplugins |= CCKCopyFile(document.getElementById("BrowserPluginPath4").value, destdir);  haveplugins |=CCKCopyFile(document.getElementById("BrowserPluginPath5").value, destdir);  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  destdir.append("searchplugins");  try {    destdir.remove(true);    destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}    listbox = document.getElementById('searchPluginList');  if (listbox.getRowCount() > 0)    havesearchplugins = true;  for (var i=0; i < listbox.getRowCount(); i++) {    listitem = listbox.getItemAtIndex(i);    CCKCopyFile(listitem.childNodes[0].value, destdir);    CCKCopyFile(listitem.childNodes[1].value, destdir);  }  destdir.initWithPath(currentconfigpath);  destdir.append("xpi");  CCKCopyChromeToFile("chrome.manifest", destdir)  CCKWriteInstallRDF(destdir);// For now, do to a Firefox 1.5 bug, we have to put install.rdf in a subdir and install// it from there. So the installer needs a different XPI.  var installrdfdir = destdir.clone();  installrdfdir.append("installrdf");  try {    installrdfdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);  } catch(ex) {}  CCKWriteInstallRDF(installrdfdir);  CCKWriteInstallJS(destdir);    var filename = document.getElementById("filename").value;  if (filename.length == 0)    filename = "cck";  filename += ".xpi";    CCKZip(filename, destdir,         "chrome", "components", "defaults", "plugins", "searchplugins", "chrome.manifest", "install.rdf", "install.js");  var bundle = document.getElementById("bundle_cckwizard");  // For now, do to a Firefox 1.5 bug, we have to put install.rdf in a subdir and install// it from there. So the installer needs a different XPI.  var installerfilename = document.getElementById("filename").value;  if (installerfilename.length == 0)    installerfilename = "cck";  installerfilename += "-installer.xpi";  CCKZip(installerfilename, destdir,         "chrome", "components", "defaults", "plugins", "searchplugins", "chrome.manifest", "installrdf", "install.js");  var bundle = document.getElementById("bundle_cckwizard");  gPromptService.alert(window, bundle.getString("windowTitle"),                       bundle.getString("outputLocation") + destdir.path + "\\" + filename);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e9a51a32bc6f9b73a6ef72ef8ec7e8b46437de4c/cckwizard.js/clean/extensions/cck/browser/resources/content/cckwizard/cckwizard.js