(Not built yet)

First pass at basic Win32 Installer files
This commit is contained in:
scott%scott-macgregor.org 2004-02-24 03:55:59 +00:00
parent be28f2e687
commit fa255cac43
10 changed files with 2873 additions and 0 deletions

View File

@ -0,0 +1,346 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Base Thunderbird Package File for Win32
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[langenus]
thunderbird\chrome\en-US-mail.jar
thunderbird\chrome\en-win.jar
[regus]
thunderbird\defaults\profile\US\localstore.rdf
thunderbird\defaults\profile\US\mimeTypes.rdf
[deflenus]
thunderbird\defaults\messenger\mailViews.dat
thunderbird\defaults\profile\localstore.rdf
thunderbird\defaults\profile\mimeTypes.rdf
[xpcom]
thunderbird\xpcom.dll
thunderbird\xpcom_compat.dll
thunderbird\xpistub.dll
thunderbird\components\jar50.dll
thunderbird\components\xpcom_base.xpt
thunderbird\components\xpcom_components.xpt
thunderbird\components\xpcom_ds.xpt
thunderbird\components\xpcom_io.xpt
thunderbird\components\xpcom_thread.xpt
thunderbird\components\xpcom_xpti.xpt
thunderbird\components\xpcom_obsolete.xpt
thunderbird\nspr4.dll
thunderbird\plc4.dll
thunderbird\plds4.dll
thunderbird\js3250.dll
thunderbird\components\jsd3250.dll
thunderbird\components\xpinstal.dll
thunderbird\mozz.dll
[mail]
thunderbird\xpicleanup.exe
thunderbird\thunderbird.exe
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Mail Specific Files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
thunderbird\components\mail.dll
thunderbird\components\import.dll
thunderbird\components\addrbook.xpt
thunderbird\components\mime.xpt
thunderbird\components\mailnews.xpt
thunderbird\components\msgbase.xpt
thunderbird\components\msgcompo.xpt
thunderbird\components\msgdb.xpt
thunderbird\components\msgimap.xpt
thunderbird\components\msglocal.xpt
thunderbird\components\msgnews.xpt
thunderbird\components\msgsearch.xpt
thunderbird\components\import.xpt
thunderbird\components\impComm4xMail.xpt
thunderbird\components\mailview.xpt
thunderbird\chrome\mail.jar
thunderbird\chrome\icons\default\abcardWindow.ico
thunderbird\chrome\icons\default\addressbookWindow.ico
thunderbird\chrome\icons\default\messengerWindow.ico
thunderbird\chrome\icons\default\msgcomposeWindow.ico
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Mail Extensions (smime, etc.)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
thunderbird\MapiProxy.dll
thunderbird\mozMapi32.dll
thunderbird\components\msgMapi.dll
thunderbird\components\mapihook.xpt
thunderbird\components\nsSetDefaultMail.js
thunderbird\components\nsUnsetDefaultMail.js
thunderbird\components\offlineStartup.js
thunderbird\components\mdn-service.js
thunderbird\components\smime-service.js
thunderbird\components\msgsmime.xpt
thunderbird\components\msgsmime.dll
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Chrome Files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
thunderbird\chrome\qute.jar
thunderbird\chrome\overlayinfo\messenger\content\overlays.rdf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Default Profile Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; default pref files
thunderbird\defaults\pref\
thunderbird\greprefs\
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; App extensions to Mail
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LDAP components
thunderbird\components\mozldap.dll
thunderbird\components\mozldap.xpt
thunderbird\components\nsLDAPPrefsService.js
thunderbird\nsldap32v50.dll
thunderbird\nsldappr32v50.dll
; wallet
thunderbird\components\wallet.dll
thunderbird\components\wallet.xpt
thunderbird\components\signonviewer.xpt
; download progress
thunderbird\components\nsProgressDialog.js
thunderbird\components\nsHelperAppDlg.js
thunderbird\components\nsDownloadProgressListener.js
thunderbird\components\downloadmanager.xpt
; spellchecker (may not be present)
thunderbird\components\myspell.dll
thunderbird\components\spellchecker.xpt
thunderbird\components\spellchk.dll
;; XXX these two files are bogus, they should not be in components\myspell...
thunderbird\components\myspell\*
; xpinstall (needed to dynamically install themes
thunderbird\components\xpinstall.xpt
; xmlextras (for RSS feeds and the like)
thunderbird\components\xmlextras.dll
thunderbird\components\xmlextras.xpt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Base Package Files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Javascript:
thunderbird\components\jsurl.xpt
; xpconnect
thunderbird\components\xpc3250.dll
thunderbird\components\xpconnect.xpt
; XP widgets/graphics
thunderbird\gkgfx.dll
thunderbird\components\gkgfxwin.dll
thunderbird\components\gkwidget.dll
thunderbird\components\widget.xpt
thunderbird\components\gfx.xpt
; layout
thunderbird\components\gklayout.dll
thunderbird\components\gkparser.dll
thunderbird\components\layout_base.xpt
thunderbird\components\layout_xul.xpt
thunderbird\components\content_base.xpt
thunderbird\components\htmlparser.xpt
thunderbird\components\content_html.xpt
thunderbird\components\content_htmldoc.xpt
thunderbird\components\content_xmldoc.xpt
thunderbird\components\content_xslt.xpt
thunderbird\components\xultmpl.xpt
thunderbird\components\xuldoc.xpt
; Imaging:
thunderbird\components\imglib2.dll
thunderbird\components\imgicon.dll
thunderbird\components\imgicon.xpt
thunderbird\components\imglib2.xpt
; accessibility (out of process API support)
thunderbird\components\accessibility.dll
thunderbird\components\accessibility.xpt
thunderbird\components\accessibility-msaa.xpt
; caps (JavaScript security)
thunderbird\components\caps.dll
thunderbird\components\caps.xpt
; glue: appshell, docshell, uriloader, chrome, components
thunderbird\components\appshell.dll
thunderbird\components\appshell.xpt
thunderbird\components\docshell.dll
thunderbird\components\docshell_base.xpt
thunderbird\components\uriloader.xpt
thunderbird\components\chrome.dll
thunderbird\components\webbrwsr.dll
thunderbird\components\webBrowser_core.xpt
thunderbird\components\embedcomponents.dll
thunderbird\components\windowwatcher.xpt
thunderbird\components\webbrowserpersist.xpt
thunderbird\components\commandhandler.xpt
; we need mozbrwser.xpt for nsIXULWindow.xpt
thunderbird\components\mozbrwsr.xpt
; jar
thunderbird\components\jar.xpt
; prefs
thunderbird\components\pref.xpt
thunderbird\components\xppref32.dll
; profile
thunderbird\components\profile.dll
thunderbird\components\profile.xpt
; rdf
thunderbird\components\rdf.dll
thunderbird\components\rdf.xpt
; required i18n libraries
thunderbird\components\i18n.dll
thunderbird\components\intl.xpt
thunderbird\components\locale.xpt
thunderbird\components\uconv.dll
thunderbird\components\uconv.xpt
thunderbird\components\unicharutil.xpt
thunderbird\components\ucnative.xpt
; dom
thunderbird\components\jsdom.dll
thunderbird\components\dom.xpt
thunderbird\components\dom_base.xpt
thunderbird\components\dom_core.xpt
thunderbird\components\dom_css.xpt
thunderbird\components\dom_events.xpt
thunderbird\components\dom_html.xpt
thunderbird\components\dom_range.xpt
thunderbird\components\dom_stylesheets.xpt
thunderbird\components\dom_traversal.xpt
thunderbird\components\dom_views.xpt
thunderbird\components\dom_xbl.xpt
thunderbird\components\dom_xul.xpt
; editor / composer for HTML compose
thunderbird\components\editor.dll
thunderbird\components\editor.xpt
thunderbird\components\composer.xpt
thunderbird\components\composer.dll
thunderbird\components\txmgr.dll
thunderbird\components\txmgr.xpt
; find functionality
; Optional - only if your code uses nsIWebBrowserFind
thunderbird\components\txtsvc.xpt
; netwerk
thunderbird\components\necko.dll
thunderbird\components\necko2.dll
thunderbird\components\necko.xpt
thunderbird\components\necko_data.xpt
thunderbird\components\necko_dns.xpt
thunderbird\components\necko_http.xpt
thunderbird\components\necko_jar.xpt
thunderbird\components\necko_res.xpt
thunderbird\components\necko_strconv.xpt
thunderbird\components\necko_file.xpt
thunderbird\components\necko_cache.xpt
thunderbird\components\necko_cookie.xpt
thunderbird\components\nsProxyAutoConfig.js
; psm2
; Optional - only if you need HTTPS support
thunderbird\components\pipboot.dll
thunderbird\components\pipboot.xpt
thunderbird\components\pipnss.dll
thunderbird\components\pipnss.xpt
thunderbird\components\pippki.dll
thunderbird\components\pippki.xpt
thunderbird\nss3.dll
thunderbird\smime3.dll
thunderbird\softokn3.chk
thunderbird\softokn3.dll
thunderbird\ssl3.dll
thunderbird\nssckbi.dll
; core platform files
thunderbird\regxpcom.exe
thunderbird\components\appcomps.dll
thunderbird\components\autocomplete.xpt
thunderbird\components\alerts.xpt
thunderbird\components\jsdservice.xpt
thunderbird\components\find.xpt
thunderbird\components\chardet.xpt
thunderbird\components\jsconsole-clhandler.js
thunderbird\components\layout_xul_tree.xpt
thunderbird\components\mork.dll
thunderbird\components\mozfind.dll
thunderbird\components\mozfind.xpt
thunderbird\components\mimetype.xpt
thunderbird\components\nsprefm.dll
thunderbird\components\prefmigr.xpt
thunderbird\components\proxyObject.xpt
thunderbird\components\exthandler.xpt
thunderbird\components\embed_base.xpt
thunderbird\components\webshell_idls.xpt
thunderbird\components\widget.xpt
thunderbird\components\windowds.xpt
thunderbird\components\wlltvwrs.dll
thunderbird\components\helperAppDlg.xpt
thunderbird\components\progressDlg.xpt
thunderbird\components\dom_xpath.xpt
thunderbird\AccessibleMarshal.dll
thunderbird\components\lwbrk.xpt
thunderbird\components\nsCloseAllWindows.js
thunderbird\components\winhooks.xpt
thunderbird\res\ua.css
thunderbird\res\html.css
thunderbird\res\quirk.css
thunderbird\res\forms.css
thunderbird\res\platform-forms.css
thunderbird\res\charsetData.properties
thunderbird\res\charsetalias.properties
thunderbird\res\langGroups.properties
thunderbird\res\language.properties
thunderbird\res\wincharset.properties
thunderbird\res\builtin\*
thunderbird\res\entityTables\*
; editor resource files
thunderbird\res\EditorOverride.css
thunderbird\res\grabber.gif
thunderbird\res\table-add-column-after-active.gif
thunderbird\res\table-add-column-after-hover.gif
thunderbird\res\table-add-column-after.gif
thunderbird\res\table-add-column-before-active.gif
thunderbird\res\table-add-column-before-hover.gif
thunderbird\res\table-add-column-before.gif
thunderbird\res\table-add-row-after-active.gif
thunderbird\res\table-add-row-after-hover.gif
thunderbird\res\table-add-row-after.gif
thunderbird\res\table-add-row-before-active.gif
thunderbird\res\table-add-row-before-hover.gif
thunderbird\res\table-add-row-before.gif
thunderbird\res\table-remove-column-active.gif
thunderbird\res\table-remove-column-hover.gif
thunderbird\res\table-remove-column.gif
thunderbird\res\table-remove-row-active.gif
thunderbird\res\table-remove-row-hover.gif
thunderbird\res\table-remove-row.gif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
// main
var srDest;
var err;
var fProgram;
// ----LOCALIZATION NOTE: translate only these ------
var prettyName = "US English profile default";
var regName = "defaults/mozilla/en-US";
// --- END CHANGABLE STUFF ---
srDest = $SpaceRequired$:thunderbird;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
err = addDirectory("",
"$Version$",
"thunderbird", // 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

View File

@ -0,0 +1,137 @@
[General]
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
OK_=&OK
OK=OK
CANCEL=Cancel
CANCEL_=&Cancel
NEXT_=&Next >
BACK_=< &Back
IGNORE_=&Ignore
PROXY_MESSAGE=To configure a Proxy server for this download, click the Connection... button.
PROXY_BUTTON=&Connection...
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 $ProductNameInternal$, you must restart Windows or your computer. Choose one of the following options and click OK to finish setup.
RESTART=Restart
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:
BROWSEINFO=Choose a Folder to install $ProductName$ into:
DESTINATIONDIRECTORY=Install Folder
BROWSE_=B&rowse...
DOWNLOADSIZE=Download Size: %u KB
CURRENTSETTINGS=Current Settings:
INSTALLFOLDER=...to the following location:
ADDTLCOMPWRAPPER=- %s
PRIMCOMPOTHERS=%s, and:
PRIMCOMPNOOTHERS=%s
INSTALL_=&Install
DELETE_=&Delete
CONTINUE_=&Continue
SKIP_=&Skip
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=You have not finished installing $ProductName$. If you exit Setup now, $ProductName$ will not be installed. 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 retrieves its configuration script 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.
ERROR_MESSAGE_TITLE=$ProductNameInternal$ Setup Error
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=$ProductName$ can only run on Windows 95 or newer. Setup will now exit.
DLG_EXTRACTING_TITLE=$ProductName$ Setup - 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!
DLG_USAGE_TITLE=Usage
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.
MSG_FORCE_QUIT_PROCESS=Setup has detected that %s (%s) is still running. Click OK to quit %s and proceed with installation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with installation.
MSG_FORCE_QUIT_PROCESS_FAILED=Setup will now exit. Setup could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Setup again.
ERROR_PATH_WITHIN_WINDIR=$ProductName$ cannot be installed into a folder that is inside the Windows folder. Please choose a different folder.

View File

@ -0,0 +1,14 @@
VersionLanguage = en
NameCompany = mozilla.org
NameProduct = Mozilla Thunderbird
NameProductInternal = Mozilla Thunderbird
VersionProduct = 0.5+
DistSubdir = thunderbird
packagesFile = basemail-win
FileInstallerEXE = ThunderbirdSetup.exe
FileMainEXE = thunderbird.exe
FileUninstall = UninstallThunderbird.exe
FileUninstallZIP = UninstallThunderbird.zip
FileInstallerNETRoot = ThunderbirdNetSetup
ComponentList = xpcom,mail,deflenus,langenus,regus
LicenseFile = mail/LICENSE

View File

@ -0,0 +1,98 @@
// main
var srDest;
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 CHANGABLE STUFF ---
var regName = "locales/mozilla/" + chromeNode;
var chromeName = chromeNode + ".jar";
var platformName = langcode + "-" + platformNode + ".jar";
var localeName = "locale/" + chromeNode + "/";
srDest = $SpaceRequired$:thunderbird;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
err = addDirectory("",
"thunderbird", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
""); // Force Flag
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, pf, localeName + "global-platform/");
registerChrome(chromeType, cf, localeName + "browser/");
registerChrome(chromeType, cf, localeName + "browser-region/");
registerChrome(chromeType, cf, localeName + "passwordmgr/");
registerChrome(chromeType, cf, localeName + "mozapps/");
registerChrome(chromeType, cf, localeName + "necko/");
registerChrome(chromeType, cf, localeName + "autoconfig/");
registerChrome(chromeType, cf, localeName + "cookie/");
registerChrome(chromeType, cf, localeName + "wallet/");
registerChrome(chromeType, cf, localeName + "pippki/");
registerChrome(chromeType, cf, localeName + "pipnss/");
registerChrome(chromeType, cf, localeName + "editor/");
registerChrome(chromeType, cf, localeName + "mozldap/");
registerChrome(chromeType, cf, localeName + "messenger-mdn/");
registerChrome(chromeType, cf, localeName + "messenger-views/");
registerChrome(chromeType, cf, localeName + "messenger-smime/");
registerChrome(chromeType, cf, localeName + "messenger/");
registerChrome(chromeType, cf, localeName + "messenger-mapi/");
registerChrome(chromeType, cf, localeName + "communicator/");
registerChrome(chromeType, pf, localeName + "communicator-platform/");
registerChrome(chromeType, cf, localeName + "navigator/");
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);
// end main

View File

@ -0,0 +1,603 @@
function registerProgramFolderKey(winreg, fFolderPath)
{
var subkey;
var err;
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
winreg.createKey("SOFTWARE\\$CompanyName$","");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Program Folder Path", fFolderPath);
}
function createShortcuts()
{
var subkey;
var valname;
var szStartMenuPrograms;
var szStartMenu;
var szFolderDesktop;
var szFolderQuickLaunch;
var szFolderSendTo;
var szFolderAppData;
var szStartupFolder;
var winreg;
var fWindows;
var fTemp;
var fProgram;
var fDefShortcuts;
var fileExe;
var fileReadme;
var fileLicense;
var scExeDesc;
var scReadmeDesc;
var scLicenseDesc;
var scProfileDesc;
var scProfileDescParam;
var scFolderName;
var fFolderDesktop;
var fFolderPath;
var fFolderPathStr;
var fFolderQuickLaunch;
var is_winnt;
var szCurrentVersion;
var folderQuickLaunchExists;
winreg = getWinRegistry();
fWindows = getFolder("Windows");
fProgram = getFolder("Program");
fDefShortcuts = getFolder("Program","defaults/shortcuts");
fTemp = fProgram + "$MainExeFile$";
fileExe = getFolder("file:///", fTemp);
fileReadme = getFolder("file:///", fProgram + "readme.txt");
fileLicense = getFolder("file:///", fProgram + "license.txt");
scExeDesc = "$ProductName$";
scReadmeDesc = "Readme";
scLicenseDesc = "License";
scProfileDesc = "Profile Manager";
scProfileDescParam = "-ProfileManager";
scFolderName = "$ProductName$";
fileMailIcon = getFolder("Chrome", "icons/default/messengerWindow.ico");
if(winreg != null)
{
/* determine if the script is running under NT or not */
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
is_winnt = false;
}
else
{
is_winnt = true;
}
logComment("is_winnt value: " + is_winnt);
logComment("restrictedAccess value: " + restrictedAccess);
if(!is_winnt || restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szStartMenuPrograms = winreg.getValueString(subkey, "Programs");
szStartMenu = winreg.getValueString(subkey, "Start Menu");
szFolderDesktop = winreg.getValueString(subkey, "Desktop");
szStartupFolder = winreg.getValueString(subkey, "Startup");
}
else
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szStartMenuPrograms = winreg.getValueString(subkey, "Common Programs");
szStartMenu = winreg.getValueString(subkey, "Common Start Menu");
szFolderDesktop = winreg.getValueString(subkey, "Common Desktop");
szStartupFolder = winreg.getValueString(subkey, "Common Startup");
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szFolderSendTo = winreg.getValueString(subkey, "SendTo");
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szFolderAppData = winreg.getValueString(subkey, "AppData");
// locate the Quick Launch folder
szFolderQuickLaunch = szFolderAppData + "\\Microsoft\\Internet Explorer\\Quick Launch";
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
folderQuickLaunchExists = File.isDirectory(fFolderQuickLaunch);
if(!folderQuickLaunchExists)
{
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
szFolderQuickLaunch = winreg.getValueString(subkey, "Quick Launch");
folderQuickLaunchExists = File.isDirectory(fFolderPath);
if(folderQuickLaunchExists)
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
}
logComment("folderQuickLaunchExists: " + folderQuickLaunchExists);
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
fFolderPathStr = winreg.getValueString(subkey, "Program Folder Path");
if((fFolderPathStr == "") || (fFolderPathStr == null))
{
fTemp = szStartMenuPrograms + "\\" + scFolderName;
fFolderPath = getFolder("file:///", fTemp);
}
else
{
/* convert the path string to a path folder object */
fFolderPath = getFolder("file:///", fFolderPathStr);
}
/* convert the path string to a path folder object */
fFolderDesktop = getFolder("file:///", szFolderDesktop);
logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
logComment("Folder StartMenu : " + szStartMenu);
logComment("Folder FolderDesktop : " + szFolderDesktop);
logComment("Folder FolderSendTo : " + szFolderSendTo);
logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
logComment("fileExe : " + fileExe);
logComment("fFolderPath : " + fFolderPath);
logComment("scExeDesc : " + scExeDesc);
logComment("fProgram : " + fProgram);
/* explicitly create the fFolderPath even though the windowsShortcut function creates the folder.
* This is so that the folder creation gets logged for uninstall to remove it. */
if(!File.exists(fFolderPath))
File.dirCreate(fFolderPath);
if(!File.exists(fDefShortcuts))
File.dirCreate(fDefShortcuts);
/* create the shortcuts */
File.windowsShortcut(fileExe, fFolderDesktop, scExeDesc, fProgram, "", fileExe, 0);
File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, "", fileExe, 0);
File.windowsShortcut(fileExe, fDefShortcuts, scExeDesc, fProgram, "", fileExe, 0);
File.windowsShortcut(fileExe, fFolderPath, scProfileDesc, fProgram, scProfileDescParam, fileExe, 0);
File.windowsShortcut(fileReadme, fFolderPath, scReadmeDesc, fProgram, "", fileReadme, 0);
File.windowsShortcut(fileLicense, fFolderPath, scLicenseDesc, fProgram, "", fileLicense, 0);
// create shortcut in the Quick Launch folder
if(folderQuickLaunchExists)
File.windowsShortcut(fileExe, fFolderQuickLaunch, scExeDesc, fProgram, "", fileExe, 0);
if(!restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
registerProgramFolderKey(winreg, fFolderPath);
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerProgramFolderKey(winreg, fFolderPath);
// Register as a windows XP mail application
if( IsWinnt() )
{
subkey = "Software\\Clients\\Mail\\$ProductNameInternal$";
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
winreg.createKey(subkey,"");
winreg.createKey(subkey + "\\DefaultIcon", "");
winreg.createKey(subkey + "\\shell", "");
winreg.createKey(subkey + "\\shell\\open", "");
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.createKey(subkey + "\\InstallInfo","");
winreg.setValueString(subkey, "", "$ProductName$");
// path does not need to be quoted per MS doc
data = fProgram + "chrome\\icons\\default\\messengerWindow.ico,0";
winreg.setValueString(subkey + "\\DefaultIcon", "", data);
data = "\"" + fProgram + "$MainExeFile$\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
// set this value to 0 because we're not creating the mail shortcuts yet.
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 0);
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash -setDefaultMail";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss mail";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}
else
{
logComment("winreg is null");
}
}
function updateMapi()
{
var winreg;
var szValue;
var szMapiBackupDll;
var szDefaultMailClient;
var programMozMapi32File;
var mainExePath;
var sfpProgramMozMapi32File;
var sfpMainExePath;
var winsysMapi32File;
var mapiProxyFile;
var subkey;
var mailDefaultDescription = "$ProductName$";
winreg = getWinRegistry();
if(winreg != null)
{
mainExePath = getFolder("Program", "$MainExeFile$");
programMozMapi32File = getFolder("Program", "mozMapi32.dll");
winsysMapi32File = getFolder("Win System", "Mapi32.dll");
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
// If Mapi_backup_dll *and* the default var of
// HKEY_LOCAL_MACHINE\Software\Clients\Mail is set, then install
// mozMapi32.dll to the windows system dir as Mapi32.dll.
szMapiBackupDll = winreg.getValueString("SOFTWARE\\Mozilla\\Desktop", "Mapi_backup_dll");
szDefaultMailClient = winreg.getValueString("SOFTWARE\\Clients\\Mail", "");
logComment("szMapiBackupDll: " + szMapiBackupDll);
logComment("szDefaultMailClient: " + szDefaultMailClient);
if((szMapiBackupDll != null) && (szMapiBackupDll != "") &&
(szDefaultMailClient != null) && (szDefaultMailClient == "$ProductName$"))
{
// We do not want to log this file to be uninstalled because the
// uninstaller already has a special way to deal with restoring the
// appropriate previous Mapi32.dll.
addFile("",
"$Version$",
"thunderbird/mozMapi32.dll", // file name in jar to extract
getFolder("Win System"), // Where to put this file (Returned from getFolder)
"Mapi32.dll", // new name when installed
DO_NOT_UNINSTALL);
}
sfpProgramMozMapi32File = File.windowsGetShortName(programMozMapi32File);
sfpMainExePath = File.windowsGetShortName(mainExePath);
subkey = "SOFTWARE\\Clients\\Mail\\$ProductName$";
winreg.createKey(subkey, "");
winreg.setValueString(subkey, "", mailDefaultDescription);
winreg.setValueString(subkey, "DLLPath", sfpProgramMozMapi32File);
winreg.createKey(subkey + "\\DefaultIcon", "");
winreg.setValueString(subkey + "\\DefaultIcon", "", sfpMainExePath + ",0");
winreg.createKey(subkey + "\\protocols", "");
winreg.createKey(subkey + "\\protocols\\mailto", "");
winreg.setValueString(subkey + "\\protocols\\mailto", "", "URL:MailTo Protocol");
winreg.createKey(subkey + "\\protocols\\mailto\\shell", "");
winreg.createKey(subkey + "\\protocols\\mailto\\shell\\open", "");
winreg.createKey(subkey + "\\protocols\\mailto\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\protocols\\mailto\\shell\\open\\command", "", sfpMainExePath + " \"%1\"");
winreg.createKey(subkey + "\\shell", "");
winreg.createKey(subkey + "\\shell\\open", "");
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\shell\\open\\command", "", sfpMainExePath);
// Register MapiProxy.dll
mapiProxyFile = getFolder("Program", "MapiProxy.dll");
err = File.windowsRegisterServer(mapiProxyFile);
logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
}
}
function updateWinIni()
{
var fWinIni = getWinProfile(getFolder("Windows"), "win.ini");
if(fWinIni != null)
{
fWinIni.writeString("Mail", "MAPI", "1");
fWinIni.writeString("Mail", "MAPIX", "1");
}
}
function IsWinnt()
{
/* Determines if the script is running under NT or not.
*
*/
var winreg = getWinRegistry();
var subkey;
var szCurrentVersion;
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
return false;
}
else
{
return true;
}
}
function registerMainKeys(winreg)
{
var subkey; //the name of the subkey you are poking around in
var data;
var err;
winreg.createKey("SOFTWARE\\$CompanyName$","");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
}
function updateWinReg()
{
//Notes:
// can't use a double backslash before subkey - Windows already puts it in.
// subkeys have to exist before values can be put in.
var winreg = getWinRegistry();
var subkey; //the name of the subkey you are poking around in
var err;
var ikwDefined;
if(winreg != null)
{
/* This will check to see if the user has restricted access or not.
* It checks to see if HKEY_LOCALMACHINE\SOFTWARE is writable. If
* it is, then access is not restricted. This is only used to
* determine which Desktop, Programs, and Start Menu folders
* are to used: common or per user
*/
restrictedAccess = false;
ikwDefined = typeof(winreg.isKeyWritable);
logComment("winreg.isKeyWritable(): " + ikwDefined);
if(ikwDefined == "function")
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
if(!winreg.isKeyWritable("SOFTWARE"))
restrictedAccess = true;
}
logComment("restrictedAccess value: " + restrictedAccess);
if(!restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
registerMainKeys(winreg);
// set the App Paths key here
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\$MainExeFile$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "", fProgram + "$MainExeFile$");
err = winreg.setValueString(subkey, "Path", fProgram);
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerMainKeys(winreg);
}
}
function upgradeCleanup()
{
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
// need to be cleaned up.
// For now, since we're new, we have no such files.
}
// main
var srDest;
var err;
var err2;
var fProgram;
var fWindowsSystem;
var fileComponentRegStr;
var fileComponentReg;
var restrictedAccess;
var fileToRegister;
var args;
var gGreLocal = false;
args = new String(Install.arguments);
logComment("args: " + args);
// If -gGreLocal is passed in, then we need to *not* cleanup GRE files if they
// exist in the browser dir.
// The default is to delete any GRE files because we default GRE will be global.
if(args == "-greLocal")
gGreLocal = true;
srDest = $SpaceRequired$:thunderbird;
err = initInstall("$ProductName$", "Mail", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"thunderbird", // 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() of Program returned: " + err);
// check return value
if( err == SUCCESS )
{
fileToRegister = getFolder(fProgram, "AccessibleMarshal.dll");
err2 = File.windowsRegisterServer(fileToRegister);
logComment("windowsRegisterServer() returned: " + err2);
updateWinReg(); // Finish registering above marshalling dll's
createShortcuts();
updateWinIni();
updateMapi();
// we don't want to fail on errors for the above two
resetError();
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "mail.jar"), "content/browser/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "mail.jar"), "content/passwordmgr/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "mail.jar"), "content/mozapps/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/autoconfig/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/necko/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/cookie/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/wallet/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/xbl-marquee/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global-platform/");
// XXXben Stuff that will become obsolete
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator-platform/");
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/editor/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/editor-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/help/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/mozldap/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-smime/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-mdn/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-views/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-mapi/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/communicator/downloadmanager/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/pippki/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/pipnss/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/mozapps/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/browser/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/navigator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/messenger/");
// Create the uninstall folder.
err = File.dirCreate(getFolder("Program", "uninstall"));
logComment("dirCreate() of Program/uninstall returned: " + err);
/* Log files that are created after the installer is done, so they can be uninstalled */
logComment("Installing: " + fProgram + ".autoreg");
logComment("Installing: " + fProgram + "Xpcs Registry.dat");
logComment("Installing: " + fProgram + "xpcom.log");
logComment("Create Folder: " + fProgram + "components");
logComment("Installing: " + fProgram + "components\\xpti.dat");
logComment("Installing: " + fProgram + "components\\xptitemp.dat");
logComment("Installing: " + fProgram + "components\\compreg.dat");
logComment("Create Folder: " + fProgram + "components\\Netscape");
logComment("Create Folder: " + fProgram + "components\\Netscape\\MozillaTrunk");
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\manifest.ini");
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\permdata.box");
logComment("Installing: " + fProgram + "components\\Netscape\\MozillaTrunk\\Talkback.ini");
logComment("Create Folder: " + fProgram + "chrome");
logComment("Installing: " + fProgram + "chrome\\installed-chrome.txt");
logComment("Installing: " + fProgram + "chrome\\chrome.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\cookie\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\inspector");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\inspector\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\inspector\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\communicator\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\editor\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\messenger\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\skin");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\skin\\stylesheets.rdf");
logComment("Create Folder: " + fProgram + "uninstall");
// log comments for uninstalling the registry keys created by mail for setting
// itself up in WinXP's Start menu
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ [DLLPath]");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\DefaultIcon []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open\\command []");
err = getLastError();
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", "Mail/xpicleanup", "$Version$");
cleanupUtility = getFolder(fProgram, "xpicleanup.exe");
err = File.execute(cleanupUtility);
logComment("execute() returned: " + err);
err = performInstall();
}
}
else
cancelInstall(err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,79 @@
// main
var srDest;
var err;
var fProgram;
var searchPlugins = "searchplugins";
var platformNode = getPlatform();
// ----LOCALIZATION NOTE: translate only these ------
var prettyName = "US Region Pack";
var chromeNode = "US";
// --- END CHANGABLE STUFF ---
var regName = "locales/mozilla/" + chromeNode;
var chromeName = chromeNode + ".jar";
var localeName = "locale/" + chromeNode + "/";
srDest = $SpaceRequired$:thunderbird;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
var fTarget;
setPackageFolder(fProgram);
//fTarget = getFolder("Chrome");
//err = addDirectory("",
// "thunderbird/chrome", // dir name in jar to extract
// fTarget, // Where to put this file (Returned from GetFolder)
// ""); // subdir name to create relative to fProgram
//logComment("addDirectory() returned: " + err);
fTarget = getFolder("Program", "defaults");
logComment("fTarget: " + fTarget);
err = addDirectory("",
"thunderbird/defaults", // dir name in jar to extract
fTarget, // Where to put this file (Returned from GetFolder)
""); // subdir name to create relative to 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("","thunderbird/chrome",fProgram,"chrome");
}
if (err == SUCCESS)
{
// register chrome
var cf = getFolder(fProgram, "chrome/"+ chromeName);
registerChrome(chromeType, cf, localeName + "global-region/");
registerChrome(chromeType, cf, localeName + "browser-region/");
registerChrome(chromeType, cf, localeName + "messenger-region/");
registerChrome(chromeType, cf, localeName + "communicator-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);
// end main

View File

@ -0,0 +1,166 @@
[General]
; Run Mode values:
; Normal - Shows all dialogs. Requires user input.
; Auto - Shows some dialogs, but none requiring user input. It will
; automatically uninstall the product using default values.
; Silent - Show no dialogs at all. It will uninstall 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$
[Check Instance0]
Class Name=MozillaMessageWindow
Window Name=
Process Name=$MainExeFile$
Pretty Name=$ProductNameInternal$
;*** LOCALIZE ME BABY ***
Message=$ProductNameInternal$ is detected to be currently running. Please quit $ProductNameInternal$ before continuing. Click OK to exit $ProductNameInternal$ automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down $ProductNameInternal$. Please wait...
; This key indicates whether or not to close all the windows associated with
; the process id of this app instance window found.
Close All Process Windows=TRUE
; 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 Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\$MainExeFile$
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
[Check Instance1]
Class Name=Netscape6MessageWindow
Window Name=
Process Name=Netscp.exe
Pretty Name=Netscape
;*** LOCALIZE ME BABY ***
Message=Netscape is detected to be currently running. Please quit Netscape before continuing. Click OK to exit Netscape automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down Netscape. Please wait...
; This key indicates whether or not to close all the windows associated with
; the process id of this app instance window found.
Close All Process Windows=TRUE
; These keys are not normally necessary for checking instances. They are
; set here because Netscape 6 requires a way to shut down it's turbo mode.
; This will stop at the first one that succeeds (key and file found).
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\Netscp6.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
Extra Cmd1 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd1 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\Netscp.exe
Extra Cmd1 Reg Name=
Extra Cmd1 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
; 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=Uninstall was not able to create the TEMP directory: %s
ERROR_SETUP_REQUIREMENT=Windows95 or greater Operating System is required! Exiting Uninstall...
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!
MB_ATTENTION_STR=Attention
MSG_FORCE_QUIT_PROCESS=Uninstall has detected that %s (%s) is still running. Click OK to quit %s and proceed with uninstallation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with uninstallation.
MSG_FORCE_QUIT_PROCESS_FAILED=Uninstall will now exit. Uninstall could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Uninstall again.
MSG_DELETE_INSTALLATION_PATH=Not all files were uninstalled from the installation directory:\n\n %s\n\nDo you want to completely delete this directory?
MSG_INSTALLATION_PATH_WITHIN_WINDIR=Uninstall has detected that the installation path of $ProductNameInternal$ is installed to a folder within your Windows folder. Uninstall will not attempt to delete this installation due to the potential removal of critical system files.

View File

@ -0,0 +1,111 @@
function upgradeCleanup()
{
deleteThisFile("Program", "zlib.dll");
deleteThisFile("Program", "component.reg");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "xptitemp.dat");
}
// main
var srDest;
var err;
var szUninstall;
var fProgram;
var fWindowsSystem;
var fileComponentReg;
var fileComponentRegStr;
var fileMsvcrt;
var fileMsvcirt;
srDest = $SpaceRequired$:thunderbird;
err = initInstall("Mozilla XPCOM", "XPCOM", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
// build the uninstall folder path
szUninstall = fProgram + "Uninstall";
// Log component.reg file so it can be deleted by the uninstaller.
// These two files are created after installation is done, thus
// are normally not logged for uninstall.
logComment("Installing: " + fProgram + "component.reg");
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"thunderbird", // 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() of Program returned: " + err);
if( err == SUCCESS )
{
// install msvcrt.dll *only* if it does not exist
// we don't care if addFile() fails (if the file does not exist in the archive)
// bacause it will still install
fileMsvcrt = getFolder(fWindowsSystem, "msvcrt.dll");
rv = File.exists(fileMsvcrt);
logComment("fileExists() returned: " + rv);
if(rv == false)
{
logComment("File not found: " + fileMsvcrt);
addFile("/Microsoft/Shared/msvcrt.dll",
"$Version$",
"msvcrt.dll", // dir name in jar to extract
fWindowsSystem, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to fProgram
WIN_SHARED_FILE);
logComment("addFile() of msvcrt.dll returned: " + err);
}
else
{
logComment("File found: " + fileMsvcrt);
}
// install msvcirt.dll *only* if it does not exist
// we don't care if addFile() fails (if the file does not exist in the archive)
// bacause it will still install
fileMsvcirt = getFolder(fWindowsSystem, "msvcirt.dll");
rv = File.exists(fileMsvcirt);
logComment("fileExists() returned: " + rv);
if(rv == false)
{
logComment("File not found: " + fileMsvcirt);
addFile("/Microsoft/Shared/msvcirt.dll",
"$Version$",
"msvcirt.dll", // dir name in jar to extract
fWindowsSystem, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to fProgram
WIN_SHARED_FILE);
logComment("addFile() of msvcirt.dll returned: " + err);
}
else
{
logComment("File found: " + fileMsvcirt);
}
}
// check return value
if( err == SUCCESS )
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main