gecko-dev/xpinstall/packager/os2/mozilla-os2-stub-installer.jst

48 строки
1.2 KiB
Plaintext

// main
var srDest;
var err;
var fDesktop;
var szFolderDesktop;
srDest = $SpaceRequired$;
err = initInstall("SeaMonkey Installer", "/mozilla.org/SeaMonkey Installer", "$Version$");
logComment("initInstall: " + err);
// Find the current user's desktop
// Doesn't appear to be possible from the OS2.INI
// Currently hardcoding to C:\\DESKTOP - THIS IS WRONG (especially for translation)
szFolderDesktop = "C:\\Desktop";
fDesktop = getFolder("file:///", szFolderDesktop);
logComment("Desktop location: " + fDesktop);
if(verifyDiskSpace(fDesktop, srDest))
{
setPackageFolder(fDesktop);
err = addFile("",
"",
"seamonkey-os2-stub-installer.exe", // dir name in jar to extract
fDesktop, // Where to put this file (Returned from getFolder)
""); // subdir name to create relative to fProgram
logComment("addFile() returned: " + err);
err = execute("seamonkey-os2-stub-installer.exe", "", false);
logComment("execute() returned: " + err);
// check return value
if(err==SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main