зеркало из https://github.com/mozilla/pjs.git
48 строки
1.2 KiB
Plaintext
48 строки
1.2 KiB
Plaintext
// main
|
|
var srDest;
|
|
var err;
|
|
var fDesktop;
|
|
var szFolderDesktop;
|
|
|
|
srDest = $SpaceRequired$;
|
|
err = initInstall("Mozilla Installer", "/mozilla.org/Mozilla 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("",
|
|
"",
|
|
"mozilla-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("mozilla-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
|
|
|