зеркало из https://github.com/mozilla/gecko-dev.git
No bug - not part of build
Checkin files for OS/2 packaging
This commit is contained in:
Родитель
943dd39f49
Коммит
2b3c8e49d0
|
@ -0,0 +1,108 @@
|
|||
function upgradeCleanup()
|
||||
{
|
||||
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
|
||||
// need to be cleaned up.
|
||||
deleteThisFile("Components", "libmozucth.so");
|
||||
deleteThisFile("Components", "libpsmglue.so");
|
||||
deleteThisFile("Components", "libsample.so");
|
||||
deleteThisFile("Components", "nsSample.js");
|
||||
deleteThisFile("Components", "libucvja.so");
|
||||
deleteThisFile("Components", "libucvko.so");
|
||||
deleteThisFile("Components", "libucvtw.so");
|
||||
deleteThisFile("Components", "libucvtw2.so");
|
||||
deleteThisFile("Components", "libucvlatin.so");
|
||||
deleteThisFile("Components", "libucvcn.so");
|
||||
deleteThisFile("Components", "libucvibm.so");
|
||||
deleteThisFile("Program", "defaults/pref/config.js");
|
||||
deleteThisFile("Program", "defaults/pref/initpref.js");
|
||||
deleteThisFile("Program", "defaults/wallet/URLFieldSchema.tbl");
|
||||
deleteThisFile("Program", "libcmt.so");
|
||||
deleteThisFile("Program", "libjpeg.so");
|
||||
deleteThisFile("Program", "libprotocol.so");
|
||||
}
|
||||
|
||||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("Mozilla Navigator", "Browser", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var communicatorFolder = getFolder("Program");
|
||||
logComment("communicatorFolder: " + communicatorFolder);
|
||||
|
||||
if (verifyDiskSpace(communicatorFolder, srDest))
|
||||
{
|
||||
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
||||
// delete files that we happen to be also installing. This way, if we do,
|
||||
// it will just get reinstalled. This is for safety measure.
|
||||
upgradeCleanup();
|
||||
err = addDirectory("Program",
|
||||
"$Version$",
|
||||
"bin", // jar source folder
|
||||
communicatorFolder, // target folder
|
||||
"", // target subdir
|
||||
true ); // force flag
|
||||
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
// create the plugins folder next to mozilla
|
||||
var pluginsFolder = getFolder("Plugins");
|
||||
var ignoreErr = dirCreate(pluginsFolder);
|
||||
logComment("dirCreate() returned: " + ignoreErr);
|
||||
|
||||
var cf = getFolder("Chrome");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global-platform/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator-platform/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator-platform/");
|
||||
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global-region/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator-region/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/editor-region/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator-region/");
|
||||
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"toolkit.jar"),"content/global/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/autoconfig/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/cookie/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/wallet/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"content-packs.jar"),"content/content-packs/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/communicator/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/editor/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/navigator/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/necko/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/mozldap/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"forms.jar"),"content/forms/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"forms.jar"),"skin/classic/forms/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/communicator/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/editor/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/global/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/messenger/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"classic.jar"),"skin/classic/navigator/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/communicator/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/editor/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/global/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/messenger/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder(cf,"modern.jar"),"skin/modern/navigator/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"help.jar"),"content/help/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, getFolder(cf,"comm.jar"),"content/xbl-marquee/");
|
||||
|
||||
if (err==SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
if (! ('buildID' in Install))
|
||||
{
|
||||
logComment("Running Pre-Mozilla 0.9.1");
|
||||
initInstall("Post-install Cleanup Utility", "Browser/xpicleanup", "$Version$");
|
||||
cleanupUtility = getFolder(communicatorFolder, "xpicleanup");
|
||||
err = File.execute(cleanupUtility);
|
||||
logComment("execute() returned: " + err);
|
||||
err = performInstall();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall() due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,30 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("Chatzilla v0.5", "Chatzilla", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
if (verifyDiskSpace(getFolder("Program"), srDest))
|
||||
{
|
||||
addFile("Chatzilla service",
|
||||
"$Version$",
|
||||
"bin/components/chatzilla-service.js",
|
||||
getFolder("Components"),
|
||||
"chatzilla-service.js",
|
||||
true);
|
||||
|
||||
addFile("Chatzilla Chrome",
|
||||
"bin/chrome/chatzilla.jar", // jar source folder
|
||||
getFolder("Chrome"), // target folder
|
||||
""); // target subdir
|
||||
|
||||
registerChrome(PACKAGE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "skin/modern/chatzilla/");
|
||||
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "locale/en-US/chatzilla/");
|
||||
|
||||
if (err==SUCCESS)
|
||||
performInstall();
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,38 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
// ----LOCALIZATION NOTE: translate only these ------
|
||||
var prettyName = "US Regional Pack";
|
||||
var regName = "defaults/mozilla/US";
|
||||
// --- END CHANGABLE STUFF ---
|
||||
|
||||
err = initInstall(prettyName, regName, "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if (verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
err = addDirectory("",
|
||||
"$Version$",
|
||||
"bin",
|
||||
fProgram,
|
||||
"",
|
||||
true);
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
if (err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,33 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("Mozilla Editor", "Editor", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var communicatorFolder = getFolder("Program");
|
||||
logComment("communicatorFolder: " + communicatorFolder);
|
||||
|
||||
if (verifyDiskSpace(communicatorFolder, srDest))
|
||||
{
|
||||
err = addDirectory("Program",
|
||||
"$Version$",
|
||||
"bin", // jar source folder
|
||||
communicatorFolder, // target folder
|
||||
"", // target subdir
|
||||
true ); // force Flag
|
||||
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
err = getLastError();
|
||||
if (err==SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall() due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,25 @@
|
|||
var err = initInstall("DOM Inspector", "Inspector", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var fProgram = getFolder("Program");
|
||||
var srDest = $SpaceRequired$;
|
||||
|
||||
if (verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
err = addDirectory("", "$Version$", "bin", fProgram, "", true);
|
||||
logComment("addDirectory: " + err);
|
||||
|
||||
var jarFolder = getFolder("Chrome", "inspector.jar");
|
||||
registerChrome(PACKAGE | DELAYED_CHROME, jarFolder, "content/inspector/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/modern/inspector/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/classic/inspector/");
|
||||
registerChrome(LOCALE | DELAYED_CHROME, jarFolder, "locale/en-US/inspector/");
|
||||
|
||||
err = getLastError();
|
||||
if (err==SUCCESS)
|
||||
performInstall();
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,120 @@
|
|||
[General]
|
||||
FONTNAME=WarpSans
|
||||
FONTSIZE=9
|
||||
CHARSET=0
|
||||
;Here is a partial list CHAR_SETS
|
||||
; ANSI_CHARSET = 0
|
||||
; DEFAULT_CHARSET = 1
|
||||
; SYMBOL_CHARSET = 2
|
||||
; SHIFTJIS_CHARSET = 128
|
||||
; GB2312_CHARSET = 134
|
||||
; HANGEUL_CHARSET = 129
|
||||
; CHINESEBIG5_CHARSET = 136
|
||||
; OEM_CHARSET 255
|
||||
|
||||
OK_=~OK
|
||||
OK=OK
|
||||
CANCEL=Cancel
|
||||
CANCEL_=~Cancel
|
||||
NEXT_=~Next >
|
||||
BACK_=< ~Back
|
||||
PROXYSETTINGS=Proxy Settings:
|
||||
PROXYSETTINGS_=~Proxy Settings
|
||||
SERVER=Server:
|
||||
PORT=Port:
|
||||
USERID=User id:
|
||||
PASSWORD=Password:
|
||||
SELECTDIRECTORY=Select a directory
|
||||
DIRECTORIES_=~Directories:
|
||||
DRIVES_=Dri~ves:
|
||||
STATUS=Remaining:
|
||||
FILE=File:
|
||||
URL=URL:
|
||||
TO=To Path:
|
||||
ACCEPT_=~Accept
|
||||
DECLINE_=~Decline
|
||||
PROGRAMFOLDER_=~Program Folder:
|
||||
EXISTINGFOLDERS_=E~xisting Folders:
|
||||
SETUPMESSAGE=Setup has finished copying files to your computer. Before you can use the program, you must restart Windows or your computer. Choose one of the following options and click OK to finish setup.
|
||||
YESRESTART=Yes, I want to restart my computer now.
|
||||
NORESTART=No, I will restart my computer later.
|
||||
ADDITIONALCOMPONENTS_=~Additional Components:
|
||||
DESCRIPTION=Description
|
||||
TOTALDOWNLOADSIZE=Total download size:
|
||||
SPACEAVAILABLE=Space Available:
|
||||
COMPONENTS_=C~omponents:
|
||||
DESTINATIONDIRECTORY=Destination Directory
|
||||
BROWSE_=B~rowse...
|
||||
CURRENTSETTINGS=Current Settings:
|
||||
INSTALL_=~Install
|
||||
DELETE_=~Delete
|
||||
README=Re~ad Me
|
||||
PAUSE_=~Pause
|
||||
RESUME_=~Resume
|
||||
CHECKED=Checked
|
||||
UNCHECKED=Unchecked
|
||||
|
||||
EXTRACTING=Extracting...
|
||||
|
||||
|
||||
[Messages]
|
||||
|
||||
ERROR_DIALOG_CREATE=Could not create %s dialog.
|
||||
ERROR_FAILED=%s failed.
|
||||
ERROR_FILE_NOT_FOUND=File not found: %s
|
||||
ERROR_GET_SYSTEM_DIRECTORY_FAILED=GetSystemDirectory() failed.
|
||||
ERROR_GET_WINDOWS_DIRECTORY_FAILED =GetWindowsDirectory() failed.
|
||||
DLGQUITTITLE=Exit Setup
|
||||
DLGQUITMSG=Setup is not complete. If you quit the Setup program now, the program will not be installed. You may run the Setup program at a later time to complete the installation. Are you sure you want to cancel Setup?
|
||||
DLG_REBOOT_TITLE=Restarting Windows
|
||||
ERROR_GETPROCADDRESS=GetProcAddress() of %s failed.
|
||||
ERROR_WRITEPRIVATEPROFILESTRING=WritePrivateProfileString() failed for file %s
|
||||
MSG_RETRIEVE_CONFIGINI=Please wait while Setup is attempting to retrieve Config.ini, required by Setup, from the Web...
|
||||
ERROR_CREATE_TEMP_DIR=Setup was unable to create the TEMP directory: %s
|
||||
DLGBROWSETITLE=Select a directory
|
||||
ERROR_DETERMINING_DISK_SPACE=Could not determine available disk space for: %s
|
||||
DLG_DISK_SPACE_CHECK_TITLE=Disk space check
|
||||
DLG_DISK_SPACE_CHECK_CRUTIAL_MSG=Setup has detected insufficient disk space to continue with installation on %s for the path: %sRequired: %sAvailable: %sClick Retry if more disk space has been made available, or click Cancel to cancel Setup.
|
||||
DLG_DISK_SPACE_CHECK_MSG=Setup has detected insufficient disk space to continue with installation process on %s for the path: %sRequired: %sAvailable: %sClick OK to go back and choose a different destination path.
|
||||
ERROR_CREATE_DIRECTORY=Could not create folder: %sMake sure you have access to create the folder.
|
||||
STR_FILE_NUMBER=File count:
|
||||
STR_FILENAME=Filename:
|
||||
MSG_SMARTUPDATE_START=Preparing Install, please wait...
|
||||
MSG_CONFIGURING=Configuring %s, please wait...
|
||||
ERROR_XPI_INSTALL=Error occurred during installation
|
||||
ERROR_SETUP_REQUIREMENT=Windows95 or greater Operating System is required! Exiting setup...
|
||||
DLG_EXTRACTING_TITLE=Install Progress
|
||||
STR_PROCESSINGFILE=Preparing file: %s
|
||||
STR_INSTALLING=Currently installing %s
|
||||
STR_COPYINGFILE=Copying file: %s
|
||||
MB_WARNING_STR=Warning
|
||||
MB_MESSAGE_STR=Message
|
||||
MB_ATTENTION_STR=Attention
|
||||
MSG_CREATE_DIRECTORY=The following directory does not exist:%sWould you like to create it?
|
||||
STR_CREATE_DIRECTORY=Create Directory?
|
||||
ERROR_PROGRAM_FOLDER_NAME=Invalid Program folder name entered.
|
||||
CB_DEFAULT=Default
|
||||
ERROR_DESTINATION_PATH=Invalid path entered.
|
||||
STR_SETUP_TYPE=Setup Type:
|
||||
STR_SELECTED_COMPONENTS=Selected Components:
|
||||
STR_DESTINATION_DIRECTORY=Destination Directory:
|
||||
STR_PROGRAM_FOLDER=Program Folder:
|
||||
STR_DELETING_DESTINATION_DIR=Deleting destination directory to be able to upgrade, please wait...
|
||||
STR_SETUP=Setup
|
||||
STR_DOWNLOAD_SITE=Download Site:
|
||||
STR_SAVE_INSTALLER_FILES=Save downloaded and Setup program files to:
|
||||
MSG_INIT_SETUP=Initializing Setup, please wait...
|
||||
STR_MESSAGEBOX_TITLE=%s Setup
|
||||
ERROR_GETVERSION=GetVersionEx() failed!
|
||||
|
||||
STATUS_EXTRACTING=Extracting %s
|
||||
STATUS_LAUNCHING_SETUP=Launching Setup...
|
||||
ERROR_FILE_WRITE=Unable to write file %s
|
||||
TITLE=Installation
|
||||
ERROR_OUT_OF_MEMORY=Out of memory!
|
||||
|
||||
ERROR_DLL_LOAD=Could not load %s
|
||||
ERROR_STRING_LOAD=Could not load string resource ID %d
|
||||
ERROR_STRING_NULL=Null pointer encountered.
|
||||
ERROR_GLOBALALLOC=Memory allocation error.
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
var err;
|
||||
var fProgram;
|
||||
var platformNode;
|
||||
|
||||
platformNode = getPlatform();
|
||||
logComment("initInstall: platformNode=" + platformNode);
|
||||
// end
|
||||
// end - OS type detection
|
||||
|
||||
// --- LOCALIZATION NOTE: translate only these ---
|
||||
var prettyName = "English (US) Language Pack";
|
||||
var langcode = "en";
|
||||
var chromeNode = langcode + "-US";
|
||||
// --- END LOCALIZABLE RESOURCES ---
|
||||
var regName = "locales/mozilla/" + chromeNode;
|
||||
var chromeName = chromeNode + ".jar";
|
||||
var platformName = langcode + "-" + platformNode + ".jar";
|
||||
var localeName = "locale/" + chromeNode + "/";
|
||||
|
||||
err = initInstall(prettyName, regName, "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if (verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
var chromeType = LOCALE;
|
||||
err = addDirectory("",
|
||||
"bin",
|
||||
fProgram,
|
||||
"");
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
if (err != SUCCESS)
|
||||
{
|
||||
logComment("addDirectory() to " + fProgram + "failed!");
|
||||
// couldn't install globally, try installing to the profile
|
||||
resetError();
|
||||
chromeType |= PROFILE_CHROME;
|
||||
fProgram = getFolder("Profile");
|
||||
logComment("try installing to the user profile:" + fProgram);
|
||||
err = addDirectory("","bin",fProgram,"");
|
||||
}
|
||||
|
||||
setPackageFolder(fProgram);
|
||||
|
||||
// check return value
|
||||
if (err == SUCCESS)
|
||||
{
|
||||
// register chrome
|
||||
var cf = getFolder(fProgram, "chrome/"+chromeName);
|
||||
var pf = getFolder(fProgram, "chrome/"+platformName);
|
||||
|
||||
registerChrome(chromeType, cf, localeName + "global/");
|
||||
registerChrome(chromeType, cf, localeName + "communicator/");
|
||||
|
||||
registerChrome(chromeType, cf, localeName + "messenger/");
|
||||
registerChrome(chromeType, cf, localeName + "messenger-smime/");
|
||||
|
||||
registerChrome(chromeType, cf, localeName + "editor/");
|
||||
registerChrome(chromeType, cf, localeName + "navigator/");
|
||||
registerChrome(chromeType, cf, localeName + "aim/");
|
||||
registerChrome(chromeType, cf, localeName + "necko/");
|
||||
registerChrome(chromeType, cf, localeName + "mozldap/");
|
||||
registerChrome(chromeType, cf, localeName + "autoconfig/");
|
||||
registerChrome(chromeType, cf, localeName + "cookie/");
|
||||
registerChrome(chromeType, cf, localeName + "wallet/");
|
||||
registerChrome(chromeType, cf, localeName + "content-packs/");
|
||||
registerChrome(chromeType, cf, localeName + "help/");
|
||||
registerChrome(chromeType, cf, localeName + "net2phone/");
|
||||
registerChrome(chromeType, cf, localeName + "pipnss/");
|
||||
registerChrome(chromeType, cf, localeName + "pippki/");
|
||||
registerChrome(chromeType, cf, localeName + "forms/");
|
||||
|
||||
registerChrome(chromeType, pf, localeName + "global-platform/");
|
||||
registerChrome(chromeType, pf, localeName + "communicator-platform/");
|
||||
registerChrome(chromeType, pf, localeName + "navigator-platform/");
|
||||
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,55 @@
|
|||
function upgradeCleanup()
|
||||
{
|
||||
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
|
||||
// need to be cleaned up.
|
||||
deleteThisFile("Components", "libsigned.so");
|
||||
}
|
||||
|
||||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("Mozilla Mail", "Mail", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var communicatorFolder = getFolder("Program");
|
||||
logComment("communicatorFolder: " + communicatorFolder);
|
||||
|
||||
if (verifyDiskSpace(communicatorFolder, srDest))
|
||||
{
|
||||
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
||||
// delete files that we happen to be also installing. This way, if we do,
|
||||
// it will just get reinstalled. This is for safety measure.
|
||||
upgradeCleanup();
|
||||
err = addDirectory("Program",
|
||||
"$Version$",
|
||||
"bin", // jar source folder
|
||||
communicatorFolder, // target folder
|
||||
"", // target subdir
|
||||
true ); // force flag
|
||||
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
registerChrome(CONTENT | DELAYED_CHROME,
|
||||
getFolder("Chrome","messenger.jar"),
|
||||
"content/messenger/");
|
||||
|
||||
registerChrome(CONTENT | DELAYED_CHROME,
|
||||
getFolder("Chrome","messenger.jar"),
|
||||
"content/messenger-region/");
|
||||
|
||||
registerChrome(CONTENT | DELAYED_CHROME,
|
||||
getFolder("Chrome","messenger.jar"),
|
||||
"content/messenger-smime/");
|
||||
|
||||
if (err==SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall() due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,703 @@
|
|||
#!c:\perl\bin\perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
|
||||
#
|
||||
# This perl script builds the xpi, config.ini, and js files.
|
||||
#
|
||||
|
||||
use File::Copy;
|
||||
use File::Basename;
|
||||
use Cwd;
|
||||
|
||||
# Make sure MOZ_SRC is set.
|
||||
if($ENV{MOZ_SRC} eq "")
|
||||
{
|
||||
print "Error: MOZ_SRC not set!";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Make sure there are at least three arguments
|
||||
if($#ARGV < 2)
|
||||
{
|
||||
PrintUsage();
|
||||
}
|
||||
|
||||
$inDefaultVersion = $ARGV[0];
|
||||
# $ARGV[0] has the form maj.min.release.bld where maj, min, release
|
||||
# and bld are numerics representing version information.
|
||||
# Other variables need to use parts of the version info also so we'll
|
||||
# split out the dot seperated values into the array @versionParts
|
||||
# such that:
|
||||
#
|
||||
# $versionParts[0] = maj
|
||||
# $versionParts[1] = min
|
||||
# $versionParts[2] = release
|
||||
# $versionParts[3] = bld
|
||||
@versionParts = split /\./, $inDefaultVersion;
|
||||
|
||||
# We allow non-numeric characters to be included as the last
|
||||
# characters in fields of $ARG[0] for display purposes (mostly to
|
||||
# show that we have moved past a certain version by adding a '+'
|
||||
# character). Non-numerics must be stripped out of $inDefaultVersion,
|
||||
# however, since this variable is used to identify the the product
|
||||
# for comparison with other installations, so the values in each field
|
||||
# must be numeric only:
|
||||
$inDefaultVersion =~ s/[^0-9.][^.]*//g;
|
||||
print "The raw version id is: $inDefaultVersion\n";
|
||||
|
||||
$inStagePath = $ARGV[1];
|
||||
$inDistPath = $ARGV[2];
|
||||
|
||||
$inXpiURL = "";
|
||||
$inRedirIniURL = "";
|
||||
|
||||
ParseArgv(@ARGV);
|
||||
if($inXpiURL eq "")
|
||||
{
|
||||
# archive url not supplied, set it to default values
|
||||
$inXpiURL = "ftp://not.supplied.com";
|
||||
}
|
||||
if($inRedirIniURL eq "")
|
||||
{
|
||||
# redirect url not supplied, set it to default value.
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
|
||||
$seiFileNameGeneric = "nsinstall.exe";
|
||||
$seiFileNameGenericRes = "nsinstall.res";
|
||||
$seiFileNameSpecific = "mozilla-os2-installer.exe";
|
||||
$seiFileNameSpecificRes = "mozilla-os2-installer.res";
|
||||
$seiStubRootName = "mozilla-os2-stub-installer";
|
||||
$seiFileNameSpecificStub = "$seiStubRootName.exe";
|
||||
$seiFileNameSpecificStubRes = "$seiStubRootName.res";
|
||||
$seuFileNameSpecific = "MozillaUninstall.exe";
|
||||
$seuzFileNameSpecific = "mozillauninstall.zip";
|
||||
|
||||
# set environment vars for use by other .pl scripts called from this script.
|
||||
if($versionParts[2] eq "0")
|
||||
{
|
||||
$versionMain = "$versionParts[0]\.$versionParts[1]";
|
||||
}
|
||||
else
|
||||
{
|
||||
$versionMain = "$versionParts[0]\.$versionParts[1]\.$versionParts[2]";
|
||||
}
|
||||
print "The display version is: $versionMain\n";
|
||||
$versionLanguage = "en";
|
||||
$ENV{WIZ_nameCompany} = "mozilla.org";
|
||||
$ENV{WIZ_nameProduct} = "Mozilla";
|
||||
$ENV{WIZ_nameProductNoVersion} = "Mozilla";
|
||||
$ENV{WIZ_fileMainExe} = "Mozilla.exe";
|
||||
$ENV{WIZ_fileUninstall} = $seuFileNameSpecific;
|
||||
$ENV{WIZ_fileUninstallZip} = $seuzFileNameSpecific;
|
||||
# The following variables are for displaying version info in the
|
||||
# the installer.
|
||||
$ENV{WIZ_userAgent} = "$versionMain ($versionLanguage)";
|
||||
$ENV{WIZ_userAgentShort} = "$versionMain";
|
||||
$ENV{WIZ_xpinstallVersion} = "$versionMain";
|
||||
|
||||
# Set the location of the local tmp stage directory
|
||||
$gLocalTmpStage = $inStagePath;
|
||||
|
||||
# Check for existence of staging path
|
||||
if(!(-d "$inStagePath"))
|
||||
{
|
||||
die "\n Invalid path: $inStagePath\n";
|
||||
}
|
||||
|
||||
# List of components for to create xpi files from
|
||||
@gComponentList = ("xpcom",
|
||||
"browser",
|
||||
"mail",
|
||||
"psm",
|
||||
"chatzilla",
|
||||
"deflenus",
|
||||
"langenus",
|
||||
"regus",
|
||||
"venkman",
|
||||
"inspector");
|
||||
|
||||
if(VerifyComponents()) # return value of 0 means no errors encountered
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Make sure inDistPath exists
|
||||
if(!(-d "$inDistPath"))
|
||||
{
|
||||
mkdir ("$inDistPath",0775);
|
||||
}
|
||||
|
||||
if(-d "$inDistPath\\xpi")
|
||||
{
|
||||
unlink <$inDistPath/xpi/*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath\\xpi",0775);
|
||||
}
|
||||
|
||||
if(-d "$inDistPath\\uninstall")
|
||||
{
|
||||
unlink <$inDistPath/uninstall/*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath\\uninstall",0775);
|
||||
}
|
||||
|
||||
if(-d "$inDistPath\\setup")
|
||||
{
|
||||
unlink <$inDistPath/setup/*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath\\setup",0775);
|
||||
}
|
||||
|
||||
if(MakeXpiFile())
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
#if(MakeUninstall())
|
||||
#{
|
||||
# exit(1);
|
||||
#}
|
||||
if(MakeConfigFile())
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Copy the setup files to the dist setup directory.
|
||||
if(system("cp install.ini $inDistPath"))
|
||||
{
|
||||
die "\n Error: copy install.ini $inDistPath\n";
|
||||
}
|
||||
if(system("cp install.ini $inDistPath\\setup"))
|
||||
{
|
||||
die "\n Error: copy install.ini $inDistPath\\setup\n";
|
||||
}
|
||||
if(system("cp config.ini $inDistPath"))
|
||||
{
|
||||
die "\n Error: copy config.ini $inDistPath\n";
|
||||
}
|
||||
if(system("cp config.ini $inDistPath\\setup"))
|
||||
{
|
||||
die "\n Error: copy config.ini $inDistPath\\setup\n";
|
||||
}
|
||||
if(system("cp $inDistPath\\setup.exe $inDistPath\\setup"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\setup.exe $inDistPath\\setup\n";
|
||||
}
|
||||
if(system("cp $inDistPath\\setuprsc.dll $inDistPath\\setup"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\setuprsc.dll $inDistPath\\setup\n";
|
||||
}
|
||||
|
||||
# copy license file for the installer
|
||||
if(system("cp $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt"))
|
||||
{
|
||||
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt\n";
|
||||
}
|
||||
if(system("cp $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt"))
|
||||
{
|
||||
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt\n";
|
||||
}
|
||||
|
||||
# build the self-extracting .exe (installer) file.
|
||||
print "\nbuilding self-extracting stub installer ($seiFileNameSpecificStub)...\n";
|
||||
if(system("cp $inDistPath\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecificStub"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecificStub\n";
|
||||
}
|
||||
|
||||
if(system("cp $inDistPath\\$seiFileNameGenericRes $inDistPath\\$seiFileNameSpecificStubRes"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameGenericRes $inDistPath\\$seiFileNameSpecificStubRes\n";
|
||||
}
|
||||
|
||||
@stubFiles = <$inDistPath/setup/*.*>;
|
||||
|
||||
$size = (-s "$inDistPath\\$seiFileNameSpecificStubRes");
|
||||
truncate("$inDistPath\\$seiFileNameSpecificStubRes", "$size-1");
|
||||
open(OUTPUTFILE, ">$inDistPath\\temp.rc");
|
||||
print OUTPUTFILE "#include <os2.h>\n";
|
||||
print OUTPUTFILE "STRINGTABLE DISCARDABLE\n";
|
||||
print OUTPUTFILE "BEGIN\n";
|
||||
$currentResourceID = 10000+1;
|
||||
foreach $entry ( @stubFiles )
|
||||
{
|
||||
$filename = basename($entry);
|
||||
print OUTPUTFILE "$currentResourceID \"$filename\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
print OUTPUTFILE "END\n";
|
||||
$currentResourceID = 10000+1;
|
||||
foreach $entry ( @stubFiles )
|
||||
{
|
||||
print OUTPUTFILE "RESOURCE RT_RCDATA $currentResourceID \"$entry\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
close(OUTPUTFILE);
|
||||
system("rc -r $inDistPath\\temp.rc");
|
||||
system("cat $inDistPath\\$seiFileNameSpecificStubRes $inDistPath\\temp.res > $inDistPath\\new.res");
|
||||
unlink("$inDistPath\\$seiFileNameSpecificStubRes");
|
||||
rename("$inDistPath\\new.res", "$inDistPath\\$seiFileNameSpecificStubRes");
|
||||
unlink("$inDistPath\\temp.res");
|
||||
#unlink("$inDistPath\\temp.rc");
|
||||
system("rc $inDistPath\\$seiFileNameSpecificStubRes $inDistPath\\$seiFileNameSpecificStub");
|
||||
|
||||
# copy the lean installer to stub\ dir
|
||||
print "\n****************************\n";
|
||||
print "* *\n";
|
||||
print "* creating Stub files... *\n";
|
||||
print "* *\n";
|
||||
print "****************************\n";
|
||||
if(-d "$inDistPath\\stub")
|
||||
{
|
||||
unlink <$inDistPath/stub/*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath/stub",0775);
|
||||
}
|
||||
if(system("cp $inDistPath\\$seiFileNameSpecificStub $inDistPath\\stub"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\stub\n";
|
||||
}
|
||||
|
||||
# create the xpi for launching the stub installer
|
||||
print "\n**********************************\n";
|
||||
print "* *\n";
|
||||
print "* creating stub installer xpi... *\n";
|
||||
print "* *\n";
|
||||
print "************************************\n";
|
||||
if(-d "$inStagePath\\$seiStubRootName")
|
||||
{
|
||||
unlink <$inStagePath\\$seiStubRootName\\*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inStagePath\\$seiStubRootName",0775);
|
||||
}
|
||||
if(system("cp $inDistPath\\stub\\$seiFileNameSpecificStub $gLocalTmpStage\\$seiStubRootName"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\stub\\$seiFileNameSpecificStub $gLocalTmpStage\\$seiStubRootName\n";
|
||||
}
|
||||
|
||||
# Make .js files
|
||||
if(MakeJsFile($seiStubRootName))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make .xpi file
|
||||
if(system("perl makexpi.pl $seiStubRootName $gLocalTmpStage $inDistPath"))
|
||||
{
|
||||
print "\n Error: perl makexpi.pl $seiStubRootName $gLocalTmpStage $inDistPath\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# group files for CD
|
||||
print "\n************************************\n";
|
||||
print "* *\n";
|
||||
print "* creating Compact Disk files... *\n";
|
||||
print "* *\n";
|
||||
print "************************************\n";
|
||||
if(-d "$inDistPath\\cd")
|
||||
{
|
||||
unlink <$inDistPath\\cd\\*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath\\cd",0775);
|
||||
}
|
||||
if(system("cp $inDistPath\\$seiFileNameSpecificStub $inDistPath\\cd"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\cd\n";
|
||||
}
|
||||
if(system("cp $inDistPath/xpi/* $inDistPath/cd"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\xpi $inDistPath\\cd\n";
|
||||
}
|
||||
|
||||
# create the big self extracting .exe installer
|
||||
print "\n**************************************************************\n";
|
||||
print "* *\n";
|
||||
print "* creating Self Extracting Executable Full Install file... *\n";
|
||||
print "* *\n";
|
||||
print "**************************************************************\n";
|
||||
if(-d "$inDistPath\\sea")
|
||||
{
|
||||
unlink <$inDistPath\\sea\\*>;
|
||||
}
|
||||
else
|
||||
{
|
||||
mkdir ("$inDistPath\\sea",0775);
|
||||
}
|
||||
if(system("cp $inDistPath\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecific"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecific\n";
|
||||
}
|
||||
|
||||
if(system("cp $inDistPath\\$seiFileNameGenericRes $inDistPath\\$seiFileNameSpecificRes"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameGenericRes $inDistPath\\$seiFileNameSpecificRes\n";
|
||||
}
|
||||
|
||||
@stubFiles = <$inDistPath/setup/*.*>;
|
||||
@xpiFiles = <$inDistPath/xpi/*.*>;
|
||||
|
||||
$size = (-s "$inDistPath\\$seiFileNameSpecificRes");
|
||||
truncate("$inDistPath\\$seiFileNameSpecificRes", "$size-1");
|
||||
open(OUTPUTFILE, ">$inDistPath\\temp.rc");
|
||||
print OUTPUTFILE "#include <os2.h>\n";
|
||||
print OUTPUTFILE "STRINGTABLE DISCARDABLE\n";
|
||||
print OUTPUTFILE "BEGIN\n";
|
||||
$currentResourceID = 10000+1;
|
||||
foreach $entry ( @stubFiles )
|
||||
{
|
||||
$filename = basename($entry);
|
||||
print OUTPUTFILE "$currentResourceID \"$filename\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
foreach $entry ( @xpiFiles )
|
||||
{
|
||||
$filename = basename($entry);
|
||||
print OUTPUTFILE "$currentResourceID \"$filename\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
print OUTPUTFILE "END\n";
|
||||
$currentResourceID = 10000+1;
|
||||
foreach $entry ( @stubFiles )
|
||||
{
|
||||
print OUTPUTFILE "RESOURCE RT_RCDATA $currentResourceID \"$entry\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
foreach $entry ( @xpiFiles )
|
||||
{
|
||||
print OUTPUTFILE "RESOURCE RT_RCDATA $currentResourceID \"$entry\"\n";
|
||||
$currentResourceID++;
|
||||
}
|
||||
close(OUTPUTFILE);
|
||||
system("rc -r $inDistPath\\temp.rc");
|
||||
system("cat $inDistPath\\$seiFileNameSpecificRes $inDistPath\\temp.res > $inDistPath\\new.res");
|
||||
unlink("$inDistPath\\$seiFileNameSpecificRes");
|
||||
rename("$inDistPath\\new.res", "$inDistPath\\$seiFileNameSpecificRes");
|
||||
unlink("$inDistPath\\temp.res");
|
||||
#unlink("$inDistPath\\temp.rc");
|
||||
system("rc $inDistPath\\$seiFileNameSpecificRes $inDistPath\\$seiFileNameSpecific");
|
||||
|
||||
if(system("cp $inDistPath\\$seiFileNameSpecific $inDistPath\\sea"))
|
||||
{
|
||||
die "\n Error: copy $inDistPath\\$seiFileNameSpecific $inDistPath\\sea\n";
|
||||
}
|
||||
#unlink <$inDistPath\\$seiFileNameSpecificStub>;
|
||||
|
||||
print " done!\n\n";
|
||||
|
||||
# end of script
|
||||
exit(0);
|
||||
|
||||
sub MakeExeZip
|
||||
{
|
||||
my($aSrcDir, $aExeFile, $aZipFile) = @_;
|
||||
my($saveCwdir);
|
||||
|
||||
$saveCwdir = cwd();
|
||||
chdir($aSrcDir);
|
||||
if(system("zip $inDistPath\\xpi\\$aZipFile $aExeFile"))
|
||||
{
|
||||
chdir($saveCwdir);
|
||||
die "\n Error: zip $inDistPath\\xpi\\$aZipFile $aExeFile";
|
||||
}
|
||||
chdir($saveCwdir);
|
||||
}
|
||||
|
||||
sub PrintUsage
|
||||
{
|
||||
die "usage: $0 <default version> <staging path> <dist install path> [options]
|
||||
|
||||
default version : y2k compliant based date version.
|
||||
ie: 5.0.0.2000040413
|
||||
|
||||
staging path : full path to where the components are staged at
|
||||
|
||||
dist install path : full path to where the dist install dir is at.
|
||||
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install
|
||||
|
||||
options include:
|
||||
-aurl <archive url> : either ftp:// or http:// url to where the
|
||||
archives (.xpi, .exe, .zip, etc...) reside
|
||||
|
||||
-rurl <redirect.ini url> : either ftp:// or http:// url to where the
|
||||
redirec.ini resides. If not supplied, it
|
||||
will be assumed to be the same as archive
|
||||
url.
|
||||
\n";
|
||||
}
|
||||
|
||||
sub ParseArgv
|
||||
{
|
||||
my(@myArgv) = @_;
|
||||
my($counter);
|
||||
|
||||
# The first 3 arguments are required, so start on the 4th.
|
||||
for($counter = 3; $counter <= $#myArgv; $counter++)
|
||||
{
|
||||
if($myArgv[$counter] =~ /^[-,\/]h$/i)
|
||||
{
|
||||
PrintUsage();
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inXpiURL = $myArgv[$counter];
|
||||
$inRedirIniURL = $inXpiURL;
|
||||
}
|
||||
}
|
||||
elsif($myArgv[$counter] =~ /^[-,\/]rurl$/i)
|
||||
{
|
||||
if($#myArgv >= ($counter + 1))
|
||||
{
|
||||
++$counter;
|
||||
$inRedirIniURL = $myArgv[$counter];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub MakeConfigFile
|
||||
{
|
||||
# Make config.ini file
|
||||
if(system("perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make install.ini file
|
||||
if(system("perl makecfgini.pl install.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
|
||||
{
|
||||
print "\n Error: perl makecfgini.pl install.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub MakeUninstall
|
||||
{
|
||||
if(MakeUninstallIniFile())
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Copy the uninstall files to the dist uninstall directory.
|
||||
if(system("copy uninstall.ini $inDistPath"))
|
||||
{
|
||||
print "\n Error: copy uninstall.ini $inDistPath\n";
|
||||
return(1);
|
||||
}
|
||||
if(system("copy uninstall.ini $inDistPath\\uninstall"))
|
||||
{
|
||||
print "\n Error: copy uninstall.ini $inDistPath\\uninstall\n";
|
||||
return(1);
|
||||
}
|
||||
if(system("copy defaults_info.ini $inDistPath"))
|
||||
{
|
||||
print "\n Error: copy defaults_info.ini $inDistPath\n";
|
||||
return(1);
|
||||
}
|
||||
if(system("copy defaults_info.ini $inDistPath\\uninstall"))
|
||||
{
|
||||
print "\n Error: copy defaults_info.ini $inDistPath\\uninstall\n";
|
||||
return(1);
|
||||
}
|
||||
if(system("copy $inDistPath\\uninstall.exe $inDistPath\\uninstall"))
|
||||
{
|
||||
print "\n Error: copy $inDistPath\\uninstall.exe $inDistPath\\uninstall\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# build the self-extracting .exe (uninstaller) file.
|
||||
print "\nbuilding self-extracting uninstaller ($seuFileNameSpecific)...\n";
|
||||
if(system("copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific"))
|
||||
{
|
||||
print "\n Error: copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific\n";
|
||||
return(1);
|
||||
}
|
||||
if(system("$inDistPath\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*"))
|
||||
{
|
||||
print "\n Error: $inDistPath\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
MakeExeZip($inDistPath, $seuFileNameSpecific, $seuzFileNameSpecific);
|
||||
unlink <$inDistPath\\$seuFileNameSpecific>;
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub MakeUninstallIniFile
|
||||
{
|
||||
# Make config.ini file
|
||||
if(system("perl makeuninstallini.pl uninstall.it $inDefaultVersion"))
|
||||
{
|
||||
print "\n Error: perl makeuninstallini.pl uninstall.it $inDefaultVersion\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub MakeJsFile
|
||||
{
|
||||
my($mComponent) = @_;
|
||||
|
||||
# Make .js file
|
||||
if(system("perl makejs.pl $mComponent.jst $inDefaultVersion $gLocalTmpStage\\$mComponent"))
|
||||
{
|
||||
print "\n Error: perl makejs.pl $mComponent.jst $inDefaultVersion $gLocalTmpStage\\$mComponent\n";
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub MakeXpiFile
|
||||
{
|
||||
my($mComponent);
|
||||
|
||||
foreach $mComponent (@gComponentList)
|
||||
{
|
||||
# Make .js files
|
||||
if(MakeJsFile($mComponent))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make .xpi file
|
||||
if(system("perl makexpi.pl $mComponent $gLocalTmpStage $inDistPath\\xpi"))
|
||||
{
|
||||
print "\n Error: perl makexpi.pl $mComponent $gLocalTmpStage $inDistPath\\xpi\n";
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub RemoveLocalTmpStage()
|
||||
{
|
||||
# Remove tmpstage area
|
||||
if(-d "$gLocalTmpStage")
|
||||
{
|
||||
system("perl rdir.pl $gLocalTmpStage");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub CreateTmpStage()
|
||||
{
|
||||
my($mComponent);
|
||||
|
||||
# Remove previous tmpstage area if one was left around
|
||||
if(-d "$gLocalTmpStage")
|
||||
{
|
||||
system("perl rdir.pl $gLocalTmpStage");
|
||||
}
|
||||
|
||||
print "\n Creating the local TmpStage directory:\n";
|
||||
print " $gLocalTmpStage\n";
|
||||
|
||||
# Copy the component's staging dir locally so that the chrome packages, locales, and skins dirs can be
|
||||
# removed prior to creating the .xpi file.
|
||||
mkdir("$gLocalTmpStage", 775);
|
||||
|
||||
foreach $mComponent (@gComponentList)
|
||||
{
|
||||
print "\n Copying $mComponent:\n";
|
||||
print " From: $inStagePath\\$mComponent\n";
|
||||
print " To: $gLocalTmpStage\\$mComponent\n\n";
|
||||
mkdir("$gLocalTmpStage\\$mComponent", 775);
|
||||
|
||||
# If it's not talkback then copy the component over to the local tmp stage.
|
||||
# If it is, then skip the copy because there will be nothing at the source.
|
||||
# Talkback is a dummy place holder .xpi right now. Mozilla release team
|
||||
# replaces this place holder .xpi with a real talkback when delivering the
|
||||
# build to mozilla.org.
|
||||
if(!($mComponent =~ /talkback/i))
|
||||
{
|
||||
if(system("xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\"))
|
||||
{
|
||||
print "\n Error: xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\\n";
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(-d "$gLocalTmpStage\\$mComponent\\bin\\chrome")
|
||||
{
|
||||
# Make chrome archive files
|
||||
if(&ZipChrome("win32", "noupdate", "$gLocalTmpStage\\$mComponent\\bin\\chrome", "$gLocalTmpStage\\$mComponent\\bin\\chrome"))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Remove the locales, packages, and skins dirs if they exist.
|
||||
my @dirs = <$gLocalTmpStage\\$mComponent\\bin\\chrome\\*>;
|
||||
foreach $d (@dirs) {
|
||||
if(-d "$d")
|
||||
{
|
||||
system("perl rdir.pl $d");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub VerifyComponents()
|
||||
{
|
||||
my($mComponent);
|
||||
my($mError) = 0;
|
||||
|
||||
print "\n Verifying existence of required components...\n";
|
||||
foreach $mComponent (@gComponentList)
|
||||
{
|
||||
if($mComponent =~ /talkback/i)
|
||||
{
|
||||
print " place holder: $inStagePath\\$mComponent\n";
|
||||
mkdir("$inStagePath\\$mComponent", 775);
|
||||
}
|
||||
elsif(-d "$inStagePath\\$mComponent")
|
||||
{
|
||||
print " ok: $inStagePath\\$mComponent\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print " Error: $inStagePath\\$mComponent does not exist!\n";
|
||||
$mError = 1;
|
||||
}
|
||||
}
|
||||
return($mError);
|
||||
}
|
||||
|
|
@ -0,0 +1,292 @@
|
|||
#!c:\perl\bin\perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
|
||||
#
|
||||
# This perl script parses the input file for special variables
|
||||
# in the format of $Variable$ and replace it with the appropriate
|
||||
# value(s).
|
||||
#
|
||||
# Input: .it file
|
||||
# - which is a .ini template
|
||||
#
|
||||
# version
|
||||
# - version to display on the blue background
|
||||
#
|
||||
# Path to staging area
|
||||
# - path on where the seamonkey built bits are staged to
|
||||
#
|
||||
# xpi path
|
||||
# - path on where xpi files will be located at
|
||||
#
|
||||
# redirect file url
|
||||
# - url to where the redirect.ini file will be staged at.
|
||||
# Either ftp:// or http:// can be used
|
||||
# ie: ftp://ftp.netscape.com/pub/seamonkey
|
||||
#
|
||||
# xpi url
|
||||
# - url to where the .xpi files will be staged at.
|
||||
# Either ftp:// or http:// can be used
|
||||
# ie: ftp://ftp.netscape.com/pub/seamonkey/xpi
|
||||
#
|
||||
# ie: perl makecfgini.pl config.it 5.0.0.1999120608 k:\windows\32bit\5.0 d:\builds\mozilla\dist\win32_o.obj\install\xpi ftp://ftp.netscape.com/pub/seamonkey/windows/32bit/x86/1999-09-13-10-M10 ftp://ftp.netscape.com/pub/seamonkey/windows/32bit/x86/1999-09-13-10-M10/xpi
|
||||
#
|
||||
#
|
||||
|
||||
# Make sure there are at least two arguments
|
||||
if($#ARGV < 5)
|
||||
{
|
||||
die "usage: $0 <.it file> <version> <staging path> <.xpi path> <redirect file url> <xpi url>
|
||||
|
||||
.it file : input ini template file
|
||||
|
||||
version : version to be shown in setup. Typically the same version
|
||||
as show in mozilla.exe.
|
||||
|
||||
staging path : path to where the components are staged at
|
||||
|
||||
.xpi path : path to where the .xpi files have been built to
|
||||
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install\\xpi
|
||||
|
||||
redirect file : url to where the redirect.ini file will be staged at.
|
||||
|
||||
xpi url : url to where the .xpi files will be staged at.
|
||||
Either ftp:// or http:// can be used
|
||||
ie: ftp://ftp.netscape.com/pub/seamonkey/xpi
|
||||
\n";
|
||||
}
|
||||
|
||||
$inItFile = $ARGV[0];
|
||||
$inVersion = $ARGV[1];
|
||||
$inStagePath = $ARGV[2];
|
||||
$inXpiPath = $ARGV[3];
|
||||
$inRedirIniUrl = $ARGV[4];
|
||||
$inUrl = $ARGV[5];
|
||||
|
||||
# get environment vars
|
||||
$userAgent = $ENV{WIZ_userAgent};
|
||||
$userAgentShort = $ENV{WIZ_userAgentShort};
|
||||
$xpinstallVersion = $ENV{WIZ_xpinstallVersion};
|
||||
$nameCompany = $ENV{WIZ_nameCompany};
|
||||
$nameProduct = $ENV{WIZ_nameProduct};
|
||||
$nameProductNoVersion = $ENV{WIZ_nameProductNoVersion};
|
||||
$fileMainExe = $ENV{WIZ_fileMainExe};
|
||||
$fileUninstall = $ENV{WIZ_fileUninstall};
|
||||
$fileUninstallZip = $ENV{WIZ_fileUninstallZip};
|
||||
|
||||
$inDomain;
|
||||
$inRedirDomain;
|
||||
$inServerPath;
|
||||
$inRedirServerPath;
|
||||
|
||||
($inDomain, $inServerPath) = ParseDomainAndPath($inUrl);
|
||||
($inRedirDomain, $inRedirServerPath) = ParseDomainAndPath($inRedirIniUrl);
|
||||
|
||||
# Get the name of the file replacing the .it extension with a .ini extension
|
||||
@inItFileSplit = split(/\./,$inItFile);
|
||||
$outIniFile = $inItFileSplit[0];
|
||||
$outIniFile .= ".ini";
|
||||
|
||||
# Open the input file
|
||||
open(fpInIt, $inItFile) || die "\ncould not open $ARGV[0]: $!\n";
|
||||
|
||||
# Open the output file
|
||||
open(fpOutIni, ">$outIniFile") || die "\nCould not open $outIniFile: $!\n";
|
||||
|
||||
print "\n Making $outIniFile...\n";
|
||||
|
||||
# While loop to read each line from input file
|
||||
while($line = <fpInIt>)
|
||||
{
|
||||
# For each line read, search and replace $InstallSize$ with the calculated size
|
||||
if($line =~ /\$InstallSize\$/i)
|
||||
{
|
||||
$installSize = 0;
|
||||
|
||||
# split read line by ":" deliminator
|
||||
@colonSplit = split(/:/, $line);
|
||||
if($#colonSplit >= 0)
|
||||
{
|
||||
$componentName = $colonSplit[1];
|
||||
chop($componentName);
|
||||
|
||||
if($componentName =~ /\$UninstallFileZip\$/i)
|
||||
{
|
||||
$installSize = OutputInstallSizeArchive("$inXpiPath\\$fileUninstallZip") * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$installSize = OutputInstallSize("$inStagePath\\$componentName");
|
||||
}
|
||||
}
|
||||
|
||||
print fpOutIni "Install Size=$installSize\n";
|
||||
}
|
||||
elsif($line =~ /\$InstallSizeArchive\$/i)
|
||||
{
|
||||
$installSizeArchive = 0;
|
||||
|
||||
# split read line by ":" deliminator
|
||||
@colonSplit = split(/:/, $line);
|
||||
if($#colonSplit >= 0)
|
||||
{
|
||||
$componentName = $colonSplit[1];
|
||||
chop($componentName);
|
||||
$componentName =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
|
||||
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath\\$componentName");
|
||||
}
|
||||
|
||||
print fpOutIni "Install Size Archive=$installSizeArchive\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
# For each line read, search and replace $Version$ with the version passed in
|
||||
$line =~ s/\$Version\$/$inVersion/gi;
|
||||
$line =~ s/\$Domain\$/$inDomain/gi;
|
||||
$line =~ s/\$ServerPath\$/$inServerPath/gi;
|
||||
$line =~ s/\$RedirIniUrl\$/$inRedirIniUrl/gi;
|
||||
$line =~ s/\$ArchiveServerPath\$/$inServerPath/gi;
|
||||
$line =~ s/\$ArchiveUrl\$/$inUrl/gi;
|
||||
$line =~ s/\$RedirectServerPath\$/$inRedirServerPath/gi;
|
||||
$line =~ s/\$RedirectUrl\$/$inRedirUrl/gi;
|
||||
$line =~ s/\$UserAgent\$/$userAgent/gi;
|
||||
$line =~ s/\$UserAgentShort\$/$userAgentShort/gi;
|
||||
$line =~ s/\$XPInstallVersion\$/$xpinstallVersion/gi;
|
||||
$line =~ s/\$CompanyName\$/$nameCompany/gi;
|
||||
$line =~ s/\$ProductName\$/$nameProduct/gi;
|
||||
$line =~ s/\$ProductNameNoVersion\$/$nameProductNoVersion/gi;
|
||||
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
|
||||
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
|
||||
$line =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
|
||||
print fpOutIni $line;
|
||||
}
|
||||
}
|
||||
|
||||
print " done!\n";
|
||||
|
||||
# end of script
|
||||
exit(0);
|
||||
|
||||
sub ParseDomainAndPath()
|
||||
{
|
||||
my($aUrl) = @_;
|
||||
my($aDomain, $aServerPath);
|
||||
|
||||
@slashSplit = split(/\//, $aUrl);
|
||||
if($#slashSplit >= 0)
|
||||
{
|
||||
for($i = 0; $i <= $#slashSplit; $i++)
|
||||
{
|
||||
if($i <= 2)
|
||||
{
|
||||
if($aDomain eq "")
|
||||
{
|
||||
$aDomain = "$slashSplit[$i]";
|
||||
}
|
||||
else
|
||||
{
|
||||
$aDomain = "$aDomain/$slashSplit[$i]";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($aServerPath eq "")
|
||||
{
|
||||
$aServerPath = "/$slashSplit[$i]";
|
||||
}
|
||||
else
|
||||
{
|
||||
$aServerPath = "$aServerPath/$slashSplit[$i]";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return($aDomain, $aServerPath);
|
||||
}
|
||||
|
||||
sub OutputInstallSize()
|
||||
{
|
||||
my($inPath) = @_;
|
||||
my($installSize);
|
||||
|
||||
print " calculating size for $inPath\n";
|
||||
$installSize = GetSpaceRequired($inPath);
|
||||
$installSize += 32768; # take into account install.js
|
||||
$installSize = int($installSize / 1024);
|
||||
$installSize += 1;
|
||||
return($installSize);
|
||||
}
|
||||
|
||||
sub OutputInstallSizeArchive()
|
||||
{
|
||||
my($inPath) = @_;
|
||||
my($installSizeArchive);
|
||||
my($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks);
|
||||
|
||||
print " calculating size for $inPath\n";
|
||||
($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat $inPath;
|
||||
$installSizeArchive = int($size / 1024);
|
||||
$installSizeArchive += 1;
|
||||
return($installSizeArchive);
|
||||
}
|
||||
|
||||
##
|
||||
# GetSpaceRequired
|
||||
#
|
||||
# Finds the space used by the contents of a dir by recursively
|
||||
# traversing the subdir hierarchy and counting individual file
|
||||
# sizes
|
||||
#
|
||||
# @param targetDir the directory whose space usage to find
|
||||
# @return spaceUsed the number of bytes used by the dir contents
|
||||
# @author sgehani@netscape.com
|
||||
##
|
||||
sub GetSpaceRequired()
|
||||
{
|
||||
my($targetDir) = $_[0];
|
||||
my($spaceUsed) = 0;
|
||||
my(@dirEntries) = ();
|
||||
my($item) = "";
|
||||
|
||||
@dirEntries = <$targetDir/*>;
|
||||
|
||||
# iterate over all dir entries
|
||||
foreach $item ( @dirEntries )
|
||||
{
|
||||
# if dir entry is dir
|
||||
if (-d $item)
|
||||
{
|
||||
# add GetSpaceRequired(<dirEntry>) to space used
|
||||
$spaceUsed += GetSpaceRequired($item);
|
||||
}
|
||||
# else if dir entry is file
|
||||
elsif (-e $item)
|
||||
{
|
||||
# add size of file to space used
|
||||
$spaceUsed += (-s $item);
|
||||
}
|
||||
}
|
||||
|
||||
return $spaceUsed;
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
#!c:\perl\bin\perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
|
||||
#
|
||||
# This perl script parses the input file for special variables
|
||||
# in the format of $Variable$ and replace it with the appropriate
|
||||
# value(s).
|
||||
#
|
||||
# Input: .jst file - which is a .js template
|
||||
# default version - a date in the form of:
|
||||
# major.minor.release.yyyymmdyhr
|
||||
# ie: 5.0.0.1999120910
|
||||
# component staging path - path to where the components are staged at
|
||||
#
|
||||
# ie: perl makejs.pl xpcom.jst 5.0.0.99256
|
||||
#
|
||||
|
||||
use File::Copy;
|
||||
|
||||
# Make sure there are at least two arguments
|
||||
if($#ARGV < 2)
|
||||
{
|
||||
die "usage: $0 <.jst file> <default version> <staging path>
|
||||
|
||||
.jst file : .js template input file
|
||||
default version : default julian base version number to use in the
|
||||
form of: major.minor.release.yydoy
|
||||
ie: 5.0.0.99256
|
||||
component staging path : path to where this component is staged at
|
||||
ie: z:\\stage\\windows\\32bit\\en\\5.0\\xpcom
|
||||
\n";
|
||||
}
|
||||
|
||||
$inJstFile = $ARGV[0];
|
||||
$inVersion = $ARGV[1];
|
||||
$inStagePath = $ARGV[2];
|
||||
|
||||
# get environment vars
|
||||
$userAgent = $ENV{WIZ_userAgent};
|
||||
$userAgentShort = $ENV{WIZ_userAgentShort};
|
||||
$xpinstallVersion = $ENV{WIZ_xpinstallVersion};
|
||||
$nameCompany = $ENV{WIZ_nameCompany};
|
||||
$nameProduct = $ENV{WIZ_nameProduct};
|
||||
$nameProductNoVersion = $ENV{WIZ_nameProductNoVersion};
|
||||
$fileMainExe = $ENV{WIZ_fileMainExe};
|
||||
$fileUninstall = $ENV{WIZ_fileUninstall};
|
||||
|
||||
# Get the name of the file replacing the .jst extension with a .js extension
|
||||
@inJstFileSplit = split(/\./,$inJstFile);
|
||||
$outJsFile = $inJstFileSplit[0];
|
||||
$outJsFile .= ".js";
|
||||
$outTempFile = $inJstFileSplit[0];
|
||||
$outTempFile .= ".template";
|
||||
$foundLongFiles = 0;
|
||||
|
||||
print "cp \"$ENV{MOZ_SRC}\\mozilla\\xpinstall\\packager\\common\\share.t\" $outTempFile\n";
|
||||
copy("$ENV{MOZ_SRC}\\mozilla\\xpinstall\\packager\\common\\share.t", "$outTempFile");
|
||||
system("cat $inJstFile >> $outTempFile");
|
||||
|
||||
# Open the input .template file
|
||||
open(fpInTemplate, $outTempFile) || die "\ncould not open $outTempFile: $!\n";
|
||||
|
||||
# Open the output .js file
|
||||
open(fpOutJs, ">$outJsFile") || die "\nCould not open $outJsFile: $!\n";
|
||||
|
||||
# While loop to read each line from input file
|
||||
while($line = <fpInTemplate>)
|
||||
{
|
||||
if($line =~ /\$SpaceRequired\$/i) # For each line read, search and replace $SpaceRequired$ with the calculated size
|
||||
{
|
||||
$spaceRequired = 0;
|
||||
|
||||
# split read line by ":" deliminator
|
||||
@colonSplit = split(/:/, $line);
|
||||
if($#colonSplit > 0)
|
||||
{
|
||||
@semiColonSplit = split(/;/, $colonSplit[1]);
|
||||
$subDir = $semiColonSplit[0];
|
||||
$spaceRequired = GetSpaceRequired("$inStagePath\\$subDir");
|
||||
$spaceRequired = int($spaceRequired/1024) + 1;
|
||||
$line =~ s/\$SpaceRequired\$:$subDir/$spaceRequired/i;
|
||||
}
|
||||
else
|
||||
{
|
||||
$spaceRequired = GetSpaceRequired("$inStagePath");
|
||||
$spaceRequired = int($spaceRequired/1024) + 1;
|
||||
$line =~ s/\$SpaceRequired\$/$spaceRequired/i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$line =~ s/\$Version\$/$inVersion/i;
|
||||
$line =~ s/\$UserAgent\$/$userAgent/i;
|
||||
$line =~ s/\$UserAgentShort\$/$userAgentShort/i;
|
||||
$line =~ s/\$XPInstallVersion\$/$xpinstallVersion/i;
|
||||
$line =~ s/\$CompanyName\$/$nameCompany/i;
|
||||
$line =~ s/\$ProductName\$/$nameProduct/i;
|
||||
$line =~ s/\$ProductNameNoVersion\$/$nameProductNoVersion/i;
|
||||
$line =~ s/\$MainExeFile\$/$fileMainExe/i;
|
||||
$line =~ s/\$UninstallFile\$/$fileUninstall/i;
|
||||
}
|
||||
|
||||
print fpOutJs $line;
|
||||
}
|
||||
|
||||
close(fpInTemplate);
|
||||
close(fpOutJs);
|
||||
exit(0);
|
||||
|
||||
sub GetSpaceRequired()
|
||||
{
|
||||
my($targetDir) = $_[0];
|
||||
my($spaceRequired) = 0;
|
||||
my(@dirEntries) = ();
|
||||
my($item) = "";
|
||||
|
||||
@dirEntries = <$targetDir/*>;
|
||||
|
||||
# iterate over all dir entries
|
||||
foreach $item ( @dirEntries )
|
||||
{
|
||||
# if dir entry is dir
|
||||
if (-d $item)
|
||||
{
|
||||
# add GetSpaceRequired(<dirEntry>) to space used
|
||||
$spaceRequired += GetSpaceRequired($item);
|
||||
}
|
||||
# else if dir entry is file
|
||||
elsif (-e $item)
|
||||
{
|
||||
# add size of file to space used
|
||||
$spaceRequired += (-s $item);
|
||||
}
|
||||
}
|
||||
|
||||
return $spaceRequired;
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
#!c:\perl\bin\perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
# IBM Corporation
|
||||
#
|
||||
|
||||
#
|
||||
# This perl script creates .xpi files given component input name
|
||||
#
|
||||
# Input: component name
|
||||
# - name of the component directory located in the staging path
|
||||
# staging path
|
||||
# - path to where the built files are staged at
|
||||
# dest path
|
||||
# - path to where the .xpi files are are to be created at.
|
||||
# ** MUST BE AN ABSOLUTE PATH, NOT A RELATIVE PATH **
|
||||
#
|
||||
# ie: perl makexpi.pl xpcom z:\exposed\windows\32bit\en\5.0 d:\build\mozilla\dist\win32_o.obj\install\working
|
||||
#
|
||||
|
||||
use File::Copy;
|
||||
use Cwd;
|
||||
|
||||
##
|
||||
# RecursiveModify
|
||||
#
|
||||
# Modify libs by recursing into all directories and calling
|
||||
# the DLLRNAME utility on all the DLLs.
|
||||
#
|
||||
# We could also use this to add LXLITE later
|
||||
#
|
||||
# @param targetDir the directory to traverse recursively
|
||||
#
|
||||
sub RecursiveModify
|
||||
{
|
||||
my($targetDir) = $_[0];
|
||||
my(@dirEntries) = ();
|
||||
my($entry) = "";
|
||||
my($saveCwd) = cwd();
|
||||
|
||||
@dirEntries = <$targetDir/*>;
|
||||
|
||||
# iterate over all subdir entries
|
||||
foreach $entry ( @dirEntries )
|
||||
{
|
||||
# if dir entry is dir
|
||||
if (-d $entry)
|
||||
{
|
||||
# recurse into subdir
|
||||
RecursiveModify($entry);
|
||||
} else {
|
||||
if(($entry =~ /\.dll/i) || ($entry =~ /\.dll/i))
|
||||
{
|
||||
# Make sure it is not read only
|
||||
system("chmod 755 $entry");
|
||||
# DLLRNAME it
|
||||
system("dllrname $entry CPPRMI36=MOZRMI36");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# Make sure there are at least three arguments
|
||||
if($#ARGV < 2)
|
||||
{
|
||||
die "usage: $0 <component name> <staging path> <dest path>
|
||||
|
||||
component name : name of component directory within staging path
|
||||
staging path : path to where the components are staged at
|
||||
dest path : path to where the .xpi files are to be created at
|
||||
\n";
|
||||
}
|
||||
|
||||
$inComponentName = $ARGV[0];
|
||||
$inStagePath = $ARGV[1];
|
||||
$inDestPath = $ARGV[2];
|
||||
|
||||
$inStagePath =~ s/\//\\/g;
|
||||
$inDestPath =~ s/\//\\/g;
|
||||
|
||||
# check for existance of staging component path
|
||||
if(!(-e "$inStagePath\\$inComponentName"))
|
||||
{
|
||||
die "invalid path: $inStagePath\\$inComponentName\n";
|
||||
}
|
||||
|
||||
if($inComponentName =~ /xpcom/i)
|
||||
{
|
||||
# copy msvcrt.dll to xpcom dir
|
||||
if(-e "$ENV{VACPP365}\\runtime\\cpprmi36.dll")
|
||||
{
|
||||
copy("$ENV{VACPP365}\\runtime\\cpprmi36.dll", "$inStagePath\\$inComponentName\\bin");
|
||||
}
|
||||
}
|
||||
|
||||
# check for existance of .js script
|
||||
if(!(-e "$inComponentName.js"))
|
||||
{
|
||||
die "missing .js script: $inComponentName.js\n";
|
||||
}
|
||||
|
||||
# delete component .xpi file
|
||||
if(-e "$inDestPath\\$inComponentName.xpi")
|
||||
{
|
||||
unlink("$inDestPath\\$inComponentName.xpi");
|
||||
}
|
||||
if(-e "$inStagePath\\$inComponentName\\$inComponentName.xpi")
|
||||
{
|
||||
unlink("$inDestPath\\$inComponentName.xpi");
|
||||
}
|
||||
|
||||
# delete install.js
|
||||
if(-e "install.js")
|
||||
{
|
||||
unlink("install.js");
|
||||
}
|
||||
|
||||
# make sure inDestPath exists
|
||||
if(!(-d "$inDestPath"))
|
||||
{
|
||||
mkdir("$inDestPath",0775);
|
||||
}
|
||||
|
||||
print "\n Making $inComponentName.xpi...\n";
|
||||
|
||||
$saveCwdir = cwd();
|
||||
|
||||
copy("$inComponentName.js", "$inStagePath\\$inComponentName\\install.js");
|
||||
|
||||
# DLLRNAME and possibly LXLITE DLLs
|
||||
print "Modifying DLLs in $inStagePath/$inComponentName...\n";
|
||||
RecursiveModify("$inStagePath\\$inComponentName");
|
||||
|
||||
# change directory to where the files are, else zip will store
|
||||
# unwanted path information.
|
||||
chdir("$inStagePath\\$inComponentName");
|
||||
if(system("zip -r $inDestPath\\$inComponentName.xpi *"))
|
||||
{
|
||||
chdir("$saveCwdir");
|
||||
die "\n Error: zip -r $inDestPath\\$inComponentName.xpi *\n";
|
||||
}
|
||||
chdir("$saveCwdir");
|
||||
|
||||
# delete install.js
|
||||
if(-e "install.js")
|
||||
{
|
||||
unlink("install.js");
|
||||
}
|
||||
|
||||
print "\n $inComponentName.xpi done!\n";
|
||||
|
||||
# end of script
|
||||
exit(0);
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
function upgradeCleanup()
|
||||
{
|
||||
// Obsolete files that need to be cleaned up.
|
||||
deleteThisFolder("Communicator", "psm");
|
||||
}
|
||||
|
||||
var srDest = $SpaceRequired$;
|
||||
var err;
|
||||
|
||||
err = initInstall("Personal Security Manager", "Personal Security Manager", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var communicatorFolder = getFolder("Communicator");
|
||||
logComment("communicatorFolder: " + communicatorFolder);
|
||||
|
||||
if(verifyDiskSpace(communicatorFolder, srDest))
|
||||
{
|
||||
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
||||
// delete files that we happen to be also installing. This way, if we do,
|
||||
// it will just get reinstalled. This is for safety measure.
|
||||
upgradeCleanup();
|
||||
err = addDirectory("Program", // reg entry
|
||||
"$Version$", // version
|
||||
"bin", // jar source
|
||||
communicatorFolder, // target folder
|
||||
"", // relative subdir
|
||||
true ); // force flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
if(err==SUCCESS)
|
||||
{
|
||||
var pki = getFolder("Chrome","pippki.jar");
|
||||
var nss = getFolder("Chrome","pipnss.jar");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, pki, "content/pippki/");
|
||||
registerChrome(CONTENT | DELAYED_CHROME, nss, "content/pipnss/");
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall();
|
||||
logComment("cancelInstall() due to error: "+err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,4 @@
|
|||
[Site Selector]
|
||||
Site0=$ArchiveUrl$
|
||||
Site1=$ArchiveUrl$
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
// --- LOCALIZATION NOTE: translate only these ---
|
||||
var prettyName = "US Regional Pack";
|
||||
var chromeNode = "US";
|
||||
// --- END LOCALIZABLE RESOURCES ---
|
||||
var regName = "locales/mozilla/" + chromeNode;
|
||||
var chromeName = chromeNode + ".jar";
|
||||
var localeName = "locale/" + chromeNode + "/";
|
||||
|
||||
err = initInstall(prettyName, regName, "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if (verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
var chromeType = LOCALE;
|
||||
err = addDirectory("",
|
||||
"bin",
|
||||
fProgram,
|
||||
"");
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
if (err != SUCCESS)
|
||||
{
|
||||
logComment("addDirectory() to " + fProgram + "failed!");
|
||||
// couldn't install globally, try installing to the profile
|
||||
resetError();
|
||||
chromeType |= PROFILE_CHROME;
|
||||
fProgram = getFolder("Profile");
|
||||
logComment("try installing to the profile: " + fProgram);
|
||||
err = addDirectory("","bin/chrome",fProgram,"chrome");
|
||||
}
|
||||
|
||||
setPackageFolder(fProgram);
|
||||
|
||||
if (err == SUCCESS)
|
||||
{
|
||||
// register chrome
|
||||
var cf = getFolder(fProgram, "chrome/"+ chromeName);
|
||||
registerChrome(chromeType, cf, localeName + "global-region/");
|
||||
registerChrome(chromeType, cf, localeName + "communicator-region/");
|
||||
registerChrome(chromeType, cf, localeName + "editor-region/");
|
||||
registerChrome(chromeType, cf, localeName + "messenger-region/");
|
||||
registerChrome(chromeType, cf, localeName + "navigator-region/");
|
||||
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall due to error: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,136 @@
|
|||
[General]
|
||||
; Run Mode values:
|
||||
; Normal - Shows all dialogs. Requires user input.
|
||||
; Auto - Shows some dialogs, but none requiring user input. It will
|
||||
; automatically install the product using default values.
|
||||
; Silent - Show no dialogs at all. It will install product using default
|
||||
; values.
|
||||
Run Mode=Normal
|
||||
|
||||
Company Name=$CompanyName$
|
||||
Product Name=$ProductName$
|
||||
|
||||
; Valid Path values:
|
||||
; PROGRAMFILESDIR
|
||||
; WINDISK
|
||||
; WINDIR
|
||||
; WINSYSDIR
|
||||
; COMMON_STARTUP
|
||||
; COMMON_PROGRAMS
|
||||
; COMMON_STARTMENU
|
||||
; COMMON_DESKTOP
|
||||
;
|
||||
; PERSONAL_STARTUP
|
||||
; PERSONAL_PROGRAMS
|
||||
; PERSONAL_STARTMENU
|
||||
; PERSONAL_DESKTOP
|
||||
;
|
||||
; PERSONAL_APPDATA
|
||||
; PERSONAL_CACHE
|
||||
; PERSONAL_COOKIES
|
||||
; PERSONAL_FAVORITES
|
||||
; PERSONAL_FONTS
|
||||
; PERSONAL_HISTORY
|
||||
; PERSONAL_NETHOOD
|
||||
; PERSONAL_PERSONAL
|
||||
; PERSONAL_PRINTHOOD (supported only under Windows NT)
|
||||
; PERSONAL_RECENT
|
||||
; PERSONAL_SENDTO
|
||||
; PERSONAL_TEMPLATES
|
||||
;
|
||||
; PROGRAMFILESDIR
|
||||
; COMMONFILESDIR
|
||||
; MEDIAPATH
|
||||
; CONFIGPATH (supported only under Windows95 and Windows98)
|
||||
; DEVICEPATH
|
||||
|
||||
; This provides information on where in the Windows Registry to locate the Uninstall log files
|
||||
;
|
||||
Main Root Key=HKEY_LOCAL_MACHINE
|
||||
Main Key=[Product WinRegKey]
|
||||
Decrypt Main Key=TRUE
|
||||
|
||||
Root Key=HKEY_LOCAL_MACHINE
|
||||
Key=[Product CurrentVersion]\Uninstall
|
||||
Decrypt Key=TRUE
|
||||
|
||||
Uninstall Filename=$UninstallFile$
|
||||
Defaults Info Filename=defaults_info.ini
|
||||
|
||||
[Check Instance0]
|
||||
Class Name=MozillaMessageWindow
|
||||
Window Name=
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Message=$ProductName$ is detected to be currently running. Please quit $ProductName$ before continuing. Click Retry to perform the check again, or Cancel to exit the uninstaller.
|
||||
|
||||
; These keys are not normally necessary for checking instances. They are
|
||||
; set here because Mozilla requires a way to shut down it's turbo mode.
|
||||
Extra Cmd Reg Key Root=HKEY_LOCAL_MACHINE
|
||||
Extra Cmd Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\$MainExeFile$
|
||||
Extra Cmd Reg Name=
|
||||
Extra Cmd Parameter=-kill
|
||||
|
||||
|
||||
[Dialog Uninstall]
|
||||
FONTNAME=MS Sans Serif
|
||||
FONTSIZE=8
|
||||
CHARSET=0
|
||||
;Here is a partial list CHAR_SETS
|
||||
; ANSI_CHARSET = 0
|
||||
; DEFAULT_CHARSET = 1
|
||||
; SYMBOL_CHARSET = 2
|
||||
; SHIFTJIS_CHARSET = 128
|
||||
; GB2312_CHARSET = 134
|
||||
; HANGEUL_CHARSET = 129
|
||||
; CHINESEBIG5_CHARSET = 136
|
||||
; OEM_CHARSET 255
|
||||
Show Dialog=TRUE
|
||||
Title=$ProductName$ Uninstaller
|
||||
Message0=Are you sure you want to completely remove %s and all of its components?
|
||||
|
||||
Uninstall=&Uninstall
|
||||
Cancel=&Cancel
|
||||
Message1=Uninstall has detected that the following shared file is no longer used by any programs. If any programs still require the shared file and it is removed, those programs may no longer function. Are you sure you want to remove this shared file?
|
||||
Message2=Leaving this file will not harm your system. If you are not sure, it is recommended that the shared file be not removed from the system.
|
||||
FileName=File name:
|
||||
No=&No
|
||||
NoToAll=N&o to all
|
||||
Yes=&Yes
|
||||
YesToAll=Y&es to all
|
||||
|
||||
;[Check Instance0]
|
||||
;Class Name=MozillaWindowClass
|
||||
;Window Name=
|
||||
;Message=Setup has detected that an instance of Seamonkey is currently running. Please quit Seamonkey before continuing Setup.
|
||||
|
||||
;[Check Instance1]
|
||||
;Process Name=psm.exe
|
||||
;Message=Setup has detected that an instance of Personal Security Manager is currently running. Personal Security Manager will quit by itself when there are no other applications running that require it. A reboot might be necessary. Setup will then be able to continue.
|
||||
|
||||
; This section attempts to restore/undo the desktop integration performed by the browser/mail
|
||||
[Restore Desktop Integration]
|
||||
Enabled=TRUE
|
||||
|
||||
; This section attempts to cleanup the UnreadMail registry keys set up by mail.
|
||||
[Cleanup Mail Integration]
|
||||
Enabled=TRUE
|
||||
|
||||
[Messages]
|
||||
ERROR_DLL_LOAD=Could not load %s
|
||||
ERROR_STRING_LOAD=Could not load string resource ID %d
|
||||
ERROR_STRING_NULL=Null pointer encountered.
|
||||
ERROR_GLOBALALLOC=Memory allocation error.
|
||||
ERROR_FAILED=%s failed.
|
||||
ERROR_DIALOG_CREATE=Could not create %s dialog.
|
||||
DLGQUITTITLE=Question
|
||||
DLGQUITMSG=Are you sure you want to cancel?
|
||||
ERROR_GET_SYSTEM_DIRECTORY_FAILED=GetSystemDirectory() failed.
|
||||
ERROR_GET_WINDOWS_DIRECTORY_FAILED=GetWindowsDirectory() failed.
|
||||
ERROR_CREATE_TEMP_DIR=Setup was unable to create the TEMP directory: %s
|
||||
ERROR_SETUP_REQUIREMENT=Windows95 or greater Operating System is required! Exiting setup...
|
||||
MB_WARNING_STR=Warning
|
||||
ERROR_UNINSTALL_LOG_FOLDER=Uninstall log folder not found:%s
|
||||
MB_MESSAGE_STR=Message
|
||||
DLG_REMOVE_FILE_TITLE=Remove File?
|
||||
ERROR_GETVERSION=GetVersionEx() failed!
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("JavaScript Debugger", "Venkman", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
if (verifyDiskSpace(getFolder("Program"), srDest))
|
||||
{
|
||||
addFile("Venkman Service",
|
||||
"$Version$",
|
||||
"bin/components/venkman-service.js",
|
||||
getFolder("Components"),
|
||||
"venkman-service.js",
|
||||
true);
|
||||
|
||||
addFile("Venkman Chrome",
|
||||
"bin/chrome/venkman.jar", // jar source folder
|
||||
getFolder("Chrome"), // target folder
|
||||
""); // target subdir
|
||||
|
||||
registerChrome(PACKAGE | DELAYED_CHROME, getFolder("Chrome","venkman.jar"), "content/venkman/");
|
||||
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","venkman.jar"), "skin/modern/venkman/");
|
||||
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","venkman.jar"), "locale/en-US/venkman/");
|
||||
|
||||
if (err==SUCCESS)
|
||||
performInstall();
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
|
@ -0,0 +1,47 @@
|
|||
function upgradeCleanup()
|
||||
{
|
||||
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
|
||||
// need to be cleaned up.
|
||||
deleteThisFile("Program", "component.reg");
|
||||
deleteThisFile("Program", "libjsdom.so");
|
||||
deleteThisFile("Program", "libz.so");
|
||||
deleteThisFile("Components", "xpti.dat");
|
||||
deleteThisFile("Components", "xptitemp.dat");
|
||||
}
|
||||
|
||||
var srDest = $SpaceRequired$;
|
||||
|
||||
var err = initInstall("Mozilla XPCOM", "XPCOM", "$Version$");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
var communicatorFolder = getFolder("Program");
|
||||
logComment("communicatorFolder: " + communicatorFolder);
|
||||
|
||||
if (verifyDiskSpace(communicatorFolder, srDest))
|
||||
{
|
||||
// Call upgradeCleanup() before addDirectory() in case we accidentaly
|
||||
// delete files that we happen to be also installing. This way, if we do,
|
||||
// it will just get reinstalled. This is for safety measure.
|
||||
upgradeCleanup();
|
||||
err = addDirectory("Program",
|
||||
"$Version$",
|
||||
"bin", // jar source folder
|
||||
communicatorFolder, // target folder
|
||||
"", // target subdir
|
||||
true ); // force flag
|
||||
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
if (err==SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelInstall(err);
|
||||
logComment("cancelInstall() returned: " + err);
|
||||
}
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
Загрузка…
Ссылка в новой задаче