Search completed in 1.42 seconds.
33 results for "performInstall":
Your results are loading. Please wait...
performInstall - Archive of obsolete content
method of install syntax int performinstall(); parameters none.
...err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
most installation scripts, including the one discussed here, take the following basic form (in pseudo-code and with links to the sections in which these installation steps are documented): initinstall(); if (verify_space()) { err = add_dirs_and_files; register_files; if (err==success) { performinstall() }; else { cancelinstall() }; } as you can see in the code listing, the verification process at the top is on lines 1 to 18; the file addition process, here part of the main installation block, is on lines 24 to 41; the registration part of the main installation block is on lines 42-58; and the execution at the end of the main block is on lines 59 to 71.
... note also that when you call methods on the install--as you do so often in installation scripts (getfolder, initinstall, addfile, and performinstall are all examples of common install object methods)--the install object is implicit; like the window object in regular web page scripts, the install object does not need to be prefixed to the method.
...in the example above, all of the contents of the "bin" directory in the archive are queued for installation, and the target of that installation (when the installation is actually begun with a call to performinstall at the end), is the communicatorfolder directory defined at line 22 as "program." "program" is one of a short list of keywords that can be used in place of full path names in methods such as addfile.
...And 5 more matches
initInstall - Archive of obsolete content
after calling initinstall, your script must call performinstall or cancelinstall before it finishes.
... if your script does not call performinstall or cancelinstall, netscape 6 will not be able to clean up properly after your script finishes.
...err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); ...
Install script template - Archive of obsolete content
!=0) { logcomment("could not add " + component_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } } else { logcomment("cancelling current browser install due to lack of space..."); cancellinstall(); } // secondary install block, which sets up plugins and xpt in another location in addition to the current browser errblock2 = createsecondaryinstall(); // performinstall block, in which error conditions from previous blocks are checked.
... if(errblock2 == success) { // now take care of writing plids to the win32 registry err = writeplidsolution(); if(err!=success) { logcomment("could not write win32 keys as specified: " + err); } else { logcomment("plid entries are present in the win32 registry"); } } reseterror(); err = performinstall(); if (err == success) refreshplugins(true); // call refreshplugins(true) if you'd like the web page which invoked the plugin to // reload.
Using XPInstall to Install Plugins - Archive of obsolete content
// by passing 'true' we are telling the install script to block // on the execution of the installable, and do it synchronously // must call performinstall to make it all happen...
... err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); installing plugin files to the current browser installing to the current browser is the task that is the most important for the xpi package to succeed in.
Install.addDirectory - Archive of obsolete content
install.adddirectory the install object's adddirectory method queues an entire directory for installation once performinstall is called.
... var vi = "10.10.10.10"; var xpisrc = "adddir1"; initinstall("addfilenovers1", "adddir_1", vi, 1); f = getfolder("program"); setpackagefolder(f); err = adddirectory(xpisrc); logcomment("the error = " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Windows Install - Archive of obsolete content
note the disk space verification, the editing of the windows registry, the writing to the installation log, and the error checking before either performinstall or cancelinstall is called.
...dest)) { setpackagefolder(fprogram); err = adddirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fprogram, // where to put this file // (returned from getfolder) "", // subdir name to create relative to fprogram true); // force flag logcomment("adddirectory() returned: " + err); // check return value if(err == success) { err = performinstall(); logcomment("performinstall() returned: " + err); } else cancelinstall(err); } else cancelinstall(insufficient_disk_space); // end main ...
execute - Archive of obsolete content
description the specified file is not actually executed until the performinstall method is called.
... see performinstall for more information about queued commands during the installation process.
addFile - Archive of obsolete content
to move this and all other files to their final location, call the performinstall method after you've successfully added all files.
...example var xpisrc = "file.txt"; initinstall("adding a file", "addfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
refreshPlugins - Archive of obsolete content
note that refreshplugins must be called after the performinstall method that initiates the actual installation.
...all dll into plugins // install xpt into components var xpisrc = "npmcult3dp.dll"; var xpisrc2 = "nsic3dpscriptablepeer.xpt"; initinstall( "cult3d plugin file", "@cycore.com/cult3d;version=1.0.0", "1.0.0"); setpackagefolder(getfolder("plugins")); addfile(xpisrc); addfile("",xpisrc2,getfolder("components"),""); var err = getlasterror(); if (err == success) { err = performinstall(); if (err == success) refreshplugins(); } else cancelinstall(err); ...
Installer Script - Archive of obsolete content
err = performinstall(); 62.
... logcomment("performinstall() returned: " + err); 63.
Install Scripts - Archive of obsolete content
to complete the process and begin copying files, call the performinstall() function.
...iles","/xulplanet/find files","0.5.0.0"); finddir = getfolder("chrome","findfile"); setpackagefolder(finddir); adddirectory("findfile"); registerchrome(install.content | install.delayed_chrome, getfolder(finddir, "content")); registerchrome(install.skin | install.delayed_chrome, getfolder(finddir, "skin")); registerchrome(install.locale | install.delayed_chrome, getfolder(finddir, "locale")); performinstall(); next, we'll look at some additional install functions.
Index - Archive of obsolete content
718 install.adddirectory the install object's adddirectory method queues an entire directory for installation once performinstall is called.
Install.js - Archive of obsolete content
calenames[locale] + '/' + this.extshortname + '/'; install.registerchrome(install.locale | installtype, jarpath, regpath); } // register skins for (var skin in this.extskinnames) { var regpath = 'skin/' + this.extskinnames[skin] + '/' + this.extshortname + '/'; install.registerchrome(install.skin | installtype, jarpath, regpath); } // perform install var err = install.performinstall(); if (err == install.success || err == install.reboot_needed) { if (!this.silentinstall && this.extpostinstallmessage) { install.alert(this.extpostinstallmessage); } } else { this.handleerror(err); return; } }, parsearguments: function() { // can't use string handling in install, so use if statement instead var args = install.arguments; if (args == 'p=0'...
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
rdf> install.js, on the other hand, goes into the tinderstatus-installer directory: initinstall( "mozilla tinderstatus extension", "/mozdev/tinderstatus", "0.1"); var installdir = getfolder("chrome","tinderstatus"); setpackagefolder(installdir); adddirectory("tinderstatus"); registerchrome( content | delayed_chrome, getfolder(installdir, "content")); var result = performinstall(); if ( result != success ) cancelinstall(result); once all the files are in place, use your zip utility from within the tinderstatus-installer directory to create a zip archive called tinderstatus.xpi with install.js and the entire contents of the tinderstatus/ directory.
Mozilla Application Framework in Detail - Archive of obsolete content
-platform installations that use the mozilla browser: // register chrome registerchrome(package | delayed_chrome, getfolder("chrome","xmlterm.jar"), "content/xmlterm/"); registerchrome(skin | delayed_chrome, getfolder("chrome","xmlterm.jar"), "skin/modern/xmlterm/"); registerchrome(locale | delayed_chrome, getfolder("chrome","xmlterm.jar"), "locale/xmlterm/"); if (getlasterror() == success) performinstall(); else { alert("error detected: "+getlasterror()); cancelinstall(); } other features a resource description framework (rdf) parser with support for creating rdf graphs programmatically or by parsing files, compositing multiple sources into a single rdf graph, querying and manipulating graphs, and populating xul widgets (trees, menus, etc.) with graph data; an xslt/xpath processor; scal...
Creating XPI Installer Modules - Archive of obsolete content
ley", ""); logcomment("initinstall: " + err); addfile("barley grain", // displayname from contents.rdf "barley.jar", // jar source getfolder("chrome"), // target folder ""); // target subdir // registerchrome(type, location, source) registerchrome(package | delayed_chrome, getfolder("chrome","barley.jar"), "content/"); if (err==success) performinstall(); else cancelinstall(err); note that there is no version number on barley, and so the name + version parameter has a "v" and then nothing else.
File.macAlias - Archive of obsolete content
xpisrc = "miscellaneous program"; var vi = "1.1.1.1"; initinstall( "macintosh alias", "misc", vi, 0); f = getfolder("program"); g = getfolder("mac desktop"); addfile( "filemacalias", "2.2.2.2", xpisrc, f, xpisrc, true); err = file.macalias(f, xpisrc, g, xpisrc + " alias"); logcomment("file.macalias returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
File.windowsShortcut - Archive of obsolete content
", "test", vi, 0); f = getfolder("windows"); g = getfolder("temporary"); addfile( "miscshortcut", "2.2.2.2", xpisrc, f, xpisrc, true); target = getfolder(f, xpisrc); shortcutpath = getfolder("program"); err = file.windowsshortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logcomment("file.windowsshortcut returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Install.addFile - Archive of obsolete content
var xpisrc = "file.txt"; initinstall( "adding a file", "testfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
diskSpaceAvailable - Archive of obsolete content
g, ...); if (err == 0) performinstall(); else cancelinstall(); } else { alert("not enough disk space.
addDirectory - Archive of obsolete content
to move the files and all other subcomponents to their final location, call the performinstall method after you've successfully added all subcomponents.
cancelInstall - Archive of obsolete content
err = getlasterror(); if (!err) performinstall(); else cancelinstall(err); ...
execute - Archive of obsolete content
your code must call the performinstall method to actually execute the file.
patch - Archive of obsolete content
if performinstall indicates that a reboot is necessary to complete the installation, patch may not work in subsequent xpinstall processes until the reboot is performed.
Methods - Archive of obsolete content
performinstall finalizes the installation of the software.
Install Object - Archive of obsolete content
perform installation check that the files have been added successfully (e.g., by checking the error return codes from many of the main installation methods, and go ahead with the install if everything is in order: performorcancel(); function performorcancel() { if (0 == getlasterror()) performinstall(); else cancelinstall(); } for complete script examples, see script examples.
writeString - Archive of obsolete content
values are not actually written until performinstall is called.
WinReg Object - Archive of obsolete content
however, writing to the registry is delayed until performinstall is called.
XPInstall API reference - Archive of obsolete content
objects install properties methods adddirectory addfile alert cancelinstall confirm deleteregisteredfile execute gestalt getcomponentfolder getfolder getlasterror getwinprofile getwinregistry initinstall loadresources logcomment patch performinstall refreshplugins registerchrome reseterror setpackagefolder installtrigger no properties methods compareversion enabled getversion install installchrome startsoftwareupdate installversion properties methods compareto init tostring file ...
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
ate a plain text file named: install.js copy the following content, and paste it into the new file: const title = "custom toolbar button" const name = "custombutton" const version = "1.0" r = initinstall(title, name, version) || adddirectory(null, "content", getfolder("chrome"), name) || registerchrome(content + delayed_chrome, getfolder("chrome", name), "") if (r) cancelinstall(r) else performinstall(), alert("now restart seamonkey") customize the title, name and (optionally) version definitions, changing the text between double-quote characters on those three lines.
Additional Install Features - Archive of obsolete content
for example, you might put the following as the last section of your script: if (getlasterror() == success) { performinstall(); } else { cancelinstall(); } error codes that could be returned by getlasterror() are listed in the mozilla source file nsinstall.h.
Packaging WebLock
// register the new ui with the mozilla chrome registry registerchrome(content, getfolder(cf,"weblock.xpi"),"weblock"); registerchrome(skin, getfolder(cf, "weblock.xpi"),"weblock"); // perform the installation if there are no errors if (err==success) performinstall(); else cancelinstall(err); the weblock trigger script the trigger script is the script placed on a web page that actually initiates an xpinstall installation and calls the installation script that appears in the xpi.