add some files

This commit is contained in:
Ryan Nematz 2015-10-25 20:24:50 -05:00
parent 5ae5252b93
commit 80b7d62e7f
41 changed files with 10332 additions and 0 deletions

View File

@ -0,0 +1,830 @@
[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
Shared Install=TRUE
Default AppID=GREUser
Company Name=mozilla.org
Product Name=GRE
Product NameInternal=GRE
User Agent=1.8.1.24_0000000000
; Destination Path values:
; PROGRAMFILESDIR
; WINDISK
; WINDIR
; WINSYSDIR
Path=[COMMONFILESDIR]\mozilla.org\GRE\1.8.1.24_0000000000
; Sub Path, when set will indicate to Setup to create a subfolder from
; what is offered to the user to change. It will not be shown to the user
; but simply created:
;
; ie: shown to user : [Path]
; actually created: [Path]\[Sub Path]
; (where [Path] is the Path= key above)
Sub Path=
; Controls the Browse button that allows the user to
; change the destination path of the product.
; Default value is FALSE;
Lock Path=FALSE
;Program Name=none.exe
Program Name=xpcom.dll
; Program Folder Path values:
; 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
;
; PROGRAMS (Default value is the same as COMMON_PROGRAMS, but if the user
; has restricted access to the system, then it's the same as
; PERSONAL_PROGRAMS)
;
; PROGRAMFILESDIR
; COMMONFILESDIR
; MEDIAPATH
; CONFIGPATH (supported only under Windows95 and Windows98)
; DEVICEPATH
Program Folder Name=GRE
Program Folder Path=[PROGRAMS]
Uninstall Filename=GREUninstall.exe
; This key is used as a fail over key. This url will be used when the
; url in the Site Selector fails.
url=ftp://not.supplied.invalid
; Default Setup Type values:
; Setup Type 0 - first radio button (default)
; Setup Type 1 - second radio button
; Setup Type 2 - third radio button
; Setup Type 3 - fourth radio button (usually the Custom option)
Default Setup Type=Setup Type 0
; Forces the icons on the system to be refreshed.
; Default value is FALSE.
; Possible values:
; FALSE
; TRUE
Refresh Icons=FALSE
; GRE Cleanup Orphans= will cleanup old copies of GRE that will are no
; longer being used by anyone except for the app that will install/use
; it (dictated by -app_path).
; Possible values: TRUE, FALSE
; Default: FALSE
GRE Cleanup Orphans=TRUE
;*** LOCALIZE ME BABY ***
GRE Cleanup Orphans Message=Cleaning up orphaned GREs (Gecko Runtime Environments), please wait...
; Controls the check to see if user is installing on top of a previous
; installation of the product. If so, then prompt the user that cleanup
; of destination folder is highly recommended, or instability of product
; can occurr.
[Cleanup On Upgrade]
Cleanup=FALSE
; This section contains info on how to send error information in case of
; either a download or xpinstall error.
; By default, this feature is enabled, unless disabled.
[Message Stream]
; Values:
; Enabled
; Disabled
; default is Enabled.
Status=Disabled
; URL to cgi script to send error information to. The information will
; be appended to the url in the form of parameters to the cgi script.
url=http://orb.mcom.com/install/error.cgi
; Indicates whether to show a confirmation dialog or not. If this
; dialog is not shown, the error information will be *automatically*
; sent without any indication to the user unless the Status= is set
; to Disabled.
;
; Default value is TRUE if nothing is set.
Show Confirmation=TRUE
Confirmation Message=There was an error encountered during installation of GRE. The following information will be sent back to us to help us improve the product: %s
[Dialog Welcome]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Welcome
;*** LOCALIZE ME BABY ***
Message0=Welcome to %s Setup. You are about to install %s version 1.0.0.0000000000.
;*** LOCALIZE ME BABY ***
Message1=It is strongly recommended that you exit all Windows programs before running this Setup program.
;*** LOCALIZE ME BABY ***
Message2=Click Cancel to quit Setup and then close any programs you have running. Click Next to continue the Setup program.
[Dialog License]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Software License Agreement
License File=license.txt
;*** LOCALIZE ME BABY ***
Message0=Please read the following license agreement. Use the scroll bar to view the rest of this agreement.
;*** LOCALIZE ME BABY ***
Message1=Click Accept if you accept the terms of the preceeding license agreement. If Decline is clicked, setup will quit.
[Dialog Setup Type]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Setup Type
;*** LOCALIZE ME BABY ***
Message0=Choose the installation directory, then click Next.
Readme Filename=readme.txt
Readme App=notepad.exe
; at least one Setup Type needs to be set, and up to 4 can be
; set (Setup Type0, Setup Type1, Setup Type2, Setup Type3).
[Setup Type0]
;*** LOCALIZE ME BABY ***
;Description Short=&GRE
;*** LOCALIZE ME BABY ***
;Description Long=Install the Gecko Runtime Environment.
; List of components to install/enable for this Setup Type.
; All other components not listed here will be disabled if
; this Setup Type is selected.
C0=Component XPCOM
C1=Component GRE
C2=Component Uninstaller
[Dialog Select Components]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Select Components
;*** LOCALIZE ME BABY ***
Message0=GRE is always installed. Select or clear the additional components you want to install.
[Dialog Select Additional Components]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Select Additional Components
;*** LOCALIZE ME BABY ***
Message0=Select or clear the additional components you want to install.
[Dialog Program Folder]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Select Program Folder
;*** LOCALIZE ME BABY ***
Message0=Setup will add program icons to the Program Folder listed below. You may type a new folder name, or select one from the Existing Folders list. Click Next to continue.
[Dialog Additional Options]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Additional Options
;*** LOCALIZE ME BABY ***
Message1=Select the following option if you wish to save downloaded Setup files on your own computer. This allows you to re-run Setup without downloading the files again. The Setup files will be saved to the path below.
Save Installer=TRUE
; The following settings control whether the Recapture Homepage checkbox is displayed.
; For this option to work the file nsResetPref.js must be installed into the
; components directory
Message0=The following checkbox gives users the option of reverting to
the default home page
Show Homepage Option=FALSE
Recapture Homepage=FALSE
[Dialog Advanced Settings]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Advanced Settings
;*** LOCALIZE ME BABY ***
Message0=If your Internet connection requires a proxy server, enter your server name and port information. If your Internet connection doesn't require a proxy server, leave the fields blank.
Proxy Server=
Proxy Port=
Proxy User=
Proxy Password=
; Use Protocol accepts only two options:
; FTP
; HTTP
; Default is FTP if key is not set.
Use Protocol=HTTP
; Use Protocol Settings key shows or hides the
; Use FTP/Use HTTP radio buttons in the Download Dialog.
; Default value is ENABLED unless DISABLED is specified.
Use Protocol Settings=ENABLED
; Controls the radio buttons visibility
; Default value is TRUE
Show Protocols=TRUE
[Dialog Start Install]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Start Install
;*** LOCALIZE ME BABY ***
Message Install=Setup has enough information to start copying the program files. If you want to review or change settings, click Back. If you are satisfied with the current settings, click Install to begin copying files.
;*** LOCALIZE ME BABY ***
Message Download=Setup has enough information to start downloading and copying the program files. If you want to review or change settings, click Back. If you are satisfied with the current settings, make sure you are currently connected to the internet and click Install to begin downloading files.
[Dialog Download]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=GRE Setup - Download
;*** LOCALIZE ME BABY ***
Message Download0=Setup is downloading the required files now. This may take some time depending on your network connection speed.
;*** LOCALIZE ME BABY ***
Message Retry0=Some files have failed the CRC check and are being downloaded again. Only those files that have failed will be downloaded.
[Dialog Reboot]
; Show Dialog values are:
; TRUE - Always show
; FALSE - Don't show unless at least one component has its reboot show value set
; to TRUE. This will not show even if some files were in use and a reboot
; is necessary.
; AUTO - Don't show unless a component has its reboot show value set to
; TRUE or there was at least one file in use and a reboot is
; is required for the file to be replaced correctly.
Show Dialog=AUTO
; These SmartDownload sections contain information to configure SmartDownload.
; The info is applied to all components to be downloaded.
[SmartDownload-Netscape Install]
;core_file=base.zip
;core_dir=[SETUP PATH]
no_ads=true
silent=false
execution=false
confirm_install=false
;extract_msg=Uncompressing Seamonkey. Please wait...
[SmartDownload-Proxy]
[SmartDownload-Execution]
exe=
exe_param=
[Check Instance0]
Class Name=GREMessageWindow
Window Name=
Process Name=retrozilla.exe
Pretty Name=RetroZilla
;*** LOCALIZE ME BABY ***
Message=Download of GRE was successful. However, GRE must be closed to proceed with this installation. Click OK to exit GRE automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message Full Installer=GRE must be closed to proceed with this installation. Click OK to exit GRE automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down GRE. 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 its turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\retrozilla.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
[Check Instance1]
Class Name=MozillaMessageWindow
Window Name=
Process Name=Mozilla.exe
Pretty Name=Mozilla
;*** LOCALIZE ME BABY ***
Message=Download of GRE was successful. However, Mozilla must be closed to proceed with this installation. Click OK to exit Mozilla automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message Full Installer=Mozilla must be closed to proceed with this installation. Click OK to exit Mozilla automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down Mozilla. 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 its turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\Mozilla.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
[Check Instance2]
Class Name=Netscape6MessageWindow
Window Name=
Process Name=Netscp.exe
Pretty Name=Netscape
;*** LOCALIZE ME BABY ***
Message=Download of GRE was successful. However, Netscape must be closed to proceed with this installation. Click OK to exit Netscape automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message Full Installer=Netscape must be closed to proceed with this installation. Click OK to exit Netscape automatically and to begin installation.
;*** 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 its 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
;
;DependeeX=Component A means
; - if Component A gets checked this component gets checked
; - if Component A gets unchecked this component gets unchecked
; - if this component is visible it can still be checked/unchecked
; independantly after Component A has changed its state. I.e
; this components checkbox will not be disabled or hidden.
;Dependee0=
;
;DependencyX= is not supported at this time.
;Dependency0=
;
; Attributes can be the following values:
;
; The following Attributes can be overridden:
; ------------------------------------------
;
; SELECTED - Component is selected to be installed by default.
;
; UNSELECTED - Component is to be displayed unselected in the Options
; dialog. If the component is listed in the non-custom
; Setup Type section, it will be assumed to be selected
; by default.
;
; ADDITIONAL - Component is to be shown in the Additional Options
; dialog (2nd Options dialog) instead of the 1st Options
; dialog.
;
; NOTADDITIONAL - Component will be shown (if visible) in the 1st
; 1st Options dialog rather than the Additional Options
; dialog (default).
;
; VISIBLE - Component is shown in one of the two Options dialogs
; (default).
;
; INVISIBLE - Component is not shown in either of the two Options dialogs.
;
; ENABLED - Component is to be shown as enabled (not greyed out) in
; either of the two Options dialogs.
; (default).
;
; DISABLED - Component is to be shown as disabled (greyed out) in
; either of two Options dialog.
;
;
; The following attributes cannot be overridden:
; ---------------------------------------------
;
; LAUNCHAPP - Component is downloaded and simply run (like a .exe file)
; after all the components have been downloaded and
; xpinstall'ed.
;
; DOWNLOAD_ONLY - Component is to be only downloaded to the ns_temp folder,
; then deleted as Setup is quitting.
;
; FORCE_UPGRADE - Force Upgrade checks for a particular file or directory
; provided in the Force Upgrade FileX= key(s). If any of
; the listed file or directory exists, then this component
; will have its SELECTED and DISABLED Attributes set
; automatically. Force Upgrade will override the following:
;
; Random Install Percentage= setting
; UNSELECTED Attribute setting
; Dependency settings
; Dependee settings
; Setup Type settings - meaning that even if this
; component is not listed in the
; selected Setup Type, it will be
; affected.
;
; IGNORE_DOWNLOAD_ERROR - If the component needs to be downloaded from a
; server, setting this attribute will indicate that
; any download error encountered will be ignored
; and treated as if there were no error.
; If the component does not need to be downloaded,
; then this attribute has no effect.
;
; IGNORE_XPINSTALL_ERROR - If the component is a .xpi file, then any error
; resulting from the installation of the .xpi file
; will be ignored. If the .xpi file is not to be
; installed, then this attribute is ignored.
;
; SUPERSEDE - Component is to be shown as disabled and unselected
; if a file exists.
; Use SupersedeType=File Exists to specify the type of comparison
; Use SupersedeFileX=File Name to specify the file
; Use SupersedeMinVersionX=a.b.c.d (optional) to specify the
; minimum version of the file. If the version of the existing file
; is greater than or equal to the SupersedeMinVersion the component
; will be superseded.
;
[Component XPCOM]
Description Short=Mozilla XPCOM
;*** LOCALIZE ME BABY ***
Description Long=Install Engine
Archive=xpcom.xpi
Install Size=32
Install Size System=1
Install Size Archive=683
Attributes=SELECTED|INVISIBLE|FORCE_UPGRADE
Force Upgrade File0=[SETUP PATH]\xpcom.dll
[Component GRE]
Description Short=Gecko Runtime Environment
;*** LOCALIZE ME BABY ***
Description Long=for use by GRE based applications
Archive=gre.xpi
Install Size=32
Install Size System=1
Install Size Archive=4979
Attributes=SELECTED
[Component Uninstaller]
Description Short=GRE Uninstaller
;*** LOCALIZE ME BABY ***
Description Long=Uninstaller for GRE
Archive=greuninstall.zip
Install Size=151
Install Size System=1
Install Size Archive=76
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
;Since the uninstaller program is going to be installed into the Windows folder,
;Setup.exe need to know to calculate the disk space required for the Windows folder.
;This section overrides the default user-chosen path for Uninstaller only.
[Component Uninstaller-Destination Path0]
Path=[WINDIR]
[Core]
Source=[XPI PATH]\xpcom.xpi
Destination=[WIZTEMP]\xpcom.ns
Install Size=33
Install Size System=0
;*** LOCALIZE ME BABY ***
Message=Preparing Install, please wait...
[Redirect]
Status=Disabled
; This is used in conjunction with the Site Selector info to build a
; url to where to download the needed redirect.ini file from.
; If there's more than one server path, they will be used as fail
; over paths.
;
; The Server Path= keys need to be named in the following convention:
;
; Server Path0=
; Server Path1=
; Server Path2=
;
; and so on...
Server Path=redirect.ini
;*** LOCALIZE ME BABY ***
Description=Redirect File
Message=
; The Timing key needs to be one of the following values:
; pre download - process before any files have been downloaded.
; post download - process after all files have been downloaded.
; pre xpcom - process before the xpcom file has been uncompressed.
; post xpcom - process after the xpcom file has been uncompressed.
; pre smartupdate - process before the smartupdate engine has been launched.
; post smartupdate - process after the smartupdate engine has been launched.
; pre launchapp - process before the launching of executables.
; post launchapp - process after the launching of executables.
; pre archive - process before the launching of each individual archive file.
; post archive - process after the launching of each individual archive file.
; depend reboot - process depending on if a reboot is necessary or not.
; if reboot is necessary, installer can set it up so
; the app runs once upon windows reboot.
;Uncompress FileX sections
[Uncompress File0]
Timing=post smartupdate
Source=[XPI PATH]\greuninstall.zip
Destination=[WINDIR]
;*** LOCALIZE ME BABY ***
Message=Installing the uninstaller, please wait...
Only If Exists=FALSE
;Copy FileX sections
;Copy the uninstaller to the [Setup Path]\Uninstall folder.
;This copy is to be used when the user installed on a system with
;restricted access.
[Copy File0]
Timing=post smartupdate
Source=[WINDIR]\GREUninstall.exe
Destination=[SETUP PATH]\Uninstall
Fail If Exists=FALSE
Do Not Uninstall=FALSE
[Copy File1]
Timing=post smartupdate
Source=[XPI PATH]\GREUninstall.exe
Destination=[WINDIR]
Fail If Exists=FALSE
Do Not Uninstall=TRUE
;Copy File SequentialX sections
[Copy File Sequential0]
Timing=post launchapp
Filename=install_wizard.log
Source=[SETUP PATH]
Destination=[SETUP PATH]\Uninstall
[Delete File0]
Timing=post launchapp
Destination=[SETUP PATH]\install_wizard.log
; Legal values for the Overwrite Name key are TRUE, FALSE and ENUMERATE.
; ENUMERATE is used for shared installs and means:
; 1) Starting with 01, increment though the NameXX named values in the
; Windows registry (where Name is the value from Name= and XX is
; the integer value being incremented) until a NameXX is found with
; the same value as that in Name Value=.
; 2) If no NameXX is found with that value, create a new name/value pair
; named NameXX where XX is the next unused integer value
;
[Windows Registry0]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\GRE (1.8.1.24_0000000000)
Name=DisplayName
Name Value=Gecko Runtime Environment (1.8.1.24_0000000000)
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=FALSE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
Condition=DefaultApp
[Windows Registry1]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\GRE (1.8.1.24_0000000000)
Name=UninstallString
;*** LOCALIZE ME BABY ***
Name Value=[WINDIR]\GREUninstall.exe /ua "1.8.1.24_0000000000" /app GREUser
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
Condition=DefaultApp
[Windows Registry2]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\AppList\[APP_ID]
Name=Name
Name Value=[APP_ID]
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
[Windows Registry3]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\AppList\[APP_ID]
Name=PathToExe
Name Value=[PATH_TO_APP]
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=ENUMERATE
Timing=post smartupdate
[Windows Registry4]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\Installer
Name=PathToExe
;*** LOCALIZE ME BABY ***
Name Value=[SETUP PATH]\Setup GRE\setup.exe
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
[Windows Registry5]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\Uninstall
Name=Description
Name Value=GRE (1.0)
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=FALSE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=pre smartupdate
[Windows Registry6]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\Uninstall
Name=Uninstall Log Folder
Name Value=[SETUP PATH]\Uninstall
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=pre smartupdate
; Values for Show Folder:
; HIDE Hides the window and activates another window.
; MAXIMIZE Maximizes the specified window.
; MINIMIZE Minimizes the specified window and activates the next
; top-level window in the z-order.
; RESTORE Activates and displays the window. If the window is
; minimized or maximized, Windows restores it to its
; original size and position. An application should specify
; this flag when restoring a minimized window.
; SHOW Activates the window and displays it in its current size
; and position.
; SHOWMAXIMIZED Activates the window and displays it as a maximized
; window.
; SHOWMINIMIZED Activates the window and displays it as a minimized
; window.
; SHOWMINNOACTIVE Displays the window as a minimized window. The active
; window remains active.
; SHOWNA Displays the window in its current state. The active
; window remains active.
; SHOWNOACTIVATE Displays a window in its most recent size and position.
; The active window remains active.
; SHOWNORMAL Activates and displays a window. If the window is
; minimized or maximized, Windows restores it to its
; original size and position. An application should specify
; this flag when displaying the window for the first time.
; Default value:
; IGNORE
;
; Possible values:
; ONLY_RESTRICTED - create shortcut only if user access is restricted
; ONLY_NONRESTRICTED - create shortcut only if user access is not restricted
Restricted Access=ONLY_RESTRICTED
;[Program Folder0-Shortcut1]
;File=[SETUP PATH]\none.exe
;Arguments=-ProfileManager
;Working Dir=[SETUP PATH]
;Description=Profile Manager
;Icon Path=[SETUP PATH]\none.exe
;Icon Id=0
;[Program Folder0-Shortcut2]
;File=[SETUP PATH]\bin\Net2fone.exe
;Arguments=
;Working Dir=[SETUP PATH]
;Description=Net2Fone
;Icon Path=[SETUP PATH]\bin\Net2fone.exe
;Icon Id=0
;[Program Folder1]
;Timing=post download
;Show Folder=SHOW
;Program Folder=[Default Folder]\lala land
;[Program Folder1-Shortcut0]
;File=c:\bin\getver.exe
;Arguments=
;Working Dir=[TEMP]
;Description=Getver Test
;Icon Path=[WINDISK]\4nt\4nt.exe
;Icon Id=0
;[Program Folder1-Shortcut1]
;File=c:\perl\bin\perl.exe
;Arguments=
;Working Dir=[WINSYS]
;Description=Perl
;Icon Path=c:\perl\bin\perl.exe
;Icon Id=0
[Strings]
;*** LOCALIZE ME BABY ***
Message Unfinished Download Restart=A previous session of Setup did not finish downloading all the necessary files. Would you like to use the files previously downloaded, to avoid downloading them again?
;*** LOCALIZE ME BABY ***
Message Unfinished Install Xpi Restart=A previous session of Setup did not finish with installation of all the necessary files. Would you like to use the files previously downloaded, to avoid downloading them again?
;*** LOCALIZE ME BABY ***
Error Corrupted Archives Detected=Setup has detected that the following archives within this Setup are corrupted:%sYou will need to obtain another copy of the GRE Setup in order for installation to proceed.
;*** LOCALIZE ME BABY ***
Error Corrupted Archives Detected AUTO mode=Setup has detected that at least one archive within this Setup is corrupt. You will need to obtain another copy of the GRE Setup in order for installation to proceed.
;*** LOCALIZE ME BABY ***
Error Too Many CRC Failures=Too many download failures. Setup will cancel. Any files already downloaded will not be deleted. The next time Setup is run, these files will be taken into account during the download.
;*** LOCALIZE ME BABY ***
Error Too Many Network Errors=Too many network errors trying to download %s. Please retry again later. Any files already downloaded will not be deleted. The next time Setup is run, these files will be taken into account during the download.
;*** LOCALIZE ME BABY ***
Message Verifying Archives=Verifying integrity of archives, please wait...
;*** LOCALIZE ME BABY ***
Error Undefined=Error undefined
;*** LOCALIZE ME BABY ***
Error Out Of Memory=Out of memory!
;*** LOCALIZE ME BABY ***
Status Download=%s at %.2f KB/sec (%u KB of %u KB downloaded)
;*** LOCALIZE ME BABY ***
Status Retry=%s at %.2f KB/sec (%u KB of %u KB downloaded)
;*** LOCALIZE ME BABY ***
Status File Info=%s
;*** LOCALIZE ME BABY ***
Status Percentage Completed=%d%%
;*** LOCALIZE ME BABY ***
Dialog Download Title Minimized=%d%% completed
;*** LOCALIZE ME BABY ***
STR Force Upgrade Required=(Required)
;*** LOCALIZE ME BABY ***
Message Cancel Setup AUTO mode=Canceling Setup, please wait...
;*** LOCALIZE ME BABY ***
Error File Uncompress=Error uncompressing file %s: %d
;*** LOCALIZE ME BABY ***
UsageMsg Usage=Usage: %s [options]\n [options] can be any of the following combination:\n -h: This help.\n -a [path]: Alternate archive search path.\n -app [app id]: ID of application which is launching the installer (shared installs)\n -app_path [app]: Points to (full path) representative file of application (Shared installs)\n * -dd [path]: Suggested install destination directory. (Shared installs)\n * -greLocal: Forces GRE to be installed into the application dir.\n * -greShared: Forces GRE to be installed into a global, shared dir (normally)\n c:\program files\common files\mozilla.org\GRE\n -reg_path [path]: Where to make entries in the Windows registry. (Shared installs)\n -f: Force install of GRE installer (Shared installs), though it'll work\n for non GRE installers too.\n -greForce: Force 'Component GRE' to be downloaded, run, and installed. This\n bypasses GRE's logic of determining when to install by running its\n installer with a '-f' flag.\n -n [filename]: Setup's parent process filename.\n * -ma: Run setup in Auto mode.\n * -ms: Run setup in Silent mode.\n -ira: Ignore the [RunAppX] sections\n -ispf: Ignore the [Program FolderX] sections that show\n the Start Menu shortcut folder at the end of installation.\n * -showBanner: Show the banner image in the download and install progress dialogs\n * -hideBanner: Hide the banner image in the download and install progress dialogs\n * -cleanupOnUpgrade: Tells Setup to check to see if user is upgrading (installing on top\n of previous version of product). If user is upgrading:\n * NORMAL mode: prompt user on how to proceed\n * All other modes: assume user wants to cleanup.\n * -noCleanupOnUpgrade: Tells Setup to not check if user is upgrading (installing on top\n of previous version of product). This will disable the cleanup feature.\n\n * means it will override config.ini
;*** LOCALIZE ME BABY ***
IDC Use FTP=Use &FTP for downloading files
;*** LOCALIZE ME BABY ***
IDC Use HTTP=Use &HTTP for downloading files
;*** LOCALIZE ME BABY ***
IDC Save Installer Files=&Save installer files locally
;*** LOCALIZE ME BABY ***
IDC Recapture Homepage=&Make Netscape.com my home page
;*** LOCALIZE ME BABY ***
IDC Turbo Mode=&Use Quick Launch for faster startup times when possible
;*** LOCALIZE ME BABY ***
Message Download Paused=Setup has encountered a network problem and has paused the download. If you have just lost your network connection, please click Resume once your network has been reestablished.
;*** LOCALIZE ME BABY ***
Message NORMAL Restricted Access=Setup has detected that you do not have the appropriate Administrator privileges to this system. It is highly recommended that you do not continue with the installation of GRE, or it may not function properly. Would you still like to continue?
;*** LOCALIZE ME BABY ***
Message AUTO Restricted Access=Setup has detected that you do not have the appropriate Administrator privileges to this system. Setup cannot continue with the installation of GRE.
;*** LOCALIZE ME BABY ***
Message Cleanup On Upgrade=A previous GRE installation has been found in the chosen directory.\n\nUnrecognized 3rd party components will be removed from this directory to prevent version incompatibilities and will have to be re-installed. Your GRE profile information will not be affected.
;*** LOCALIZE ME BABY ***
Message Cleanup On Upgrade Windir=Setup has detected that the previous installation of GRE was installed to a folder within your Windows folder. Setup will not attempt to cleanup the previous installation of GRE due to the potential removal of critical system files.
;*** LOCALIZE ME BABY ***
Cleanup On Upgrade Path Box String=Path to be cleaned up:
[Site Selector]
; Dictates whether or not to show the pull down menu.
; Default value is SHOW.
; If Status= is set to HIDE, then Indentifier0 will be used
; and all other IdentifiersX will be ignored.
Status=HIDE
Identifier0=Site0
;*** LOCALIZE ME BABY ***
Description0=Default
;*** LOCALIZE ME BABY ***
Domain0=ftp://not.supplied.invalid
Identifier1=Site1
;*** LOCALIZE ME BABY ***
Description1=North America
;*** LOCALIZE ME BABY ***
Domain1=ftp://not.supplied.invalid

View File

@ -0,0 +1,259 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
function IsWinnt()
{
/* Determines if the script is running under NT or not.
*
*/
var winreg = getWinRegistry();
var subkey;
var valname;
var szCurrentVersion;
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
valname = "CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, valname);
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
return false;
}
else
{
return true;
}
}
function registerKeys()
{
var subkey; //the name of the subkey you are poking around in
var err;
var winreg;
var tmpstr;
winreg = getWinRegistry();
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
createRootRegKey(winreg);
subkey = regRootKey;
err = winreg.setValueString(subkey, "Version", "1.8.1.24_0000000000");
err = winreg.setValueString(subkey, "BuildID", "0000000000");
tmpstr = new String(fProgram);
err = winreg.setValueString(subkey, "GreHome", tmpstr.substring(0, tmpstr.length-1));
err = winreg.setValueString(subkey, "GreComponentsDir", fProgram + "Components");
registerMainKeys(winreg);
}
function createRootRegKey(winreg)
{
var subkey;
var tmpstr;
var tmpstr2;
var index;
tmpstr = new String(regRootKey);
index = tmpstr.indexOf("\\");
subkey = "";
while(index > 0)
{
subkey = subkey + tmpstr.substring(0, index);
winreg.createKey(subkey,"");
tmpstr2 = tmpstr.substring(index+1, tmpstr.length);
tmpstr = new String(tmpstr2);
index = tmpstr.indexOf("\\");
subkey = subkey + "\\";
}
if(tmpstr.length > 0)
{
subkey = subkey + tmpstr;
logComment("subkey: " + subkey);
winreg.createKey(subkey,"");
}
winreg.createKey(subkey,"");
}
function registerMainKeys(winreg)
{
var subkey; //the name of the subkey you are poking around in
var valname; //the name of the value you want to look at
var value; //the data in the value you want to look at.
var err;
winreg.createKey(regRootKey, "");
subkey = regRootKey + "\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
subkey = regRootKey + "\\Uninstall";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Uninstall Log Folder", fProgram + "Uninstall");
err = winreg.setValueString(subkey, "Description", "GRE (1.0)");
}
// main
var srDest;
var err;
var err2;
var fProgram;
var fWindowsSystem;
var fileComponentRegStr;
var fileComponentReg;
var restrictedAccess;
var fileToRegister;
var regRootKey;
// So far the only argument passed in is the root path into the Windows registry.
regRootKey = new String(Install.arguments);
srDest = 1;
err = initInstall("GRE", "GRE", "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
err = addDirectory("",
"",
"gre", // 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);
err = addDirectory("",
"",
"Embed", // 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);
// Let the uninstaller know about this generated file.
logComment("Installing: " + fProgram + ".autoreg");
// check return value
if( err == SUCCESS )
{
registerKeys();
// // we don't want to fail on errors for the above
// resetError();
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,259 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
function IsWinnt()
{
/* Determines if the script is running under NT or not.
*
*/
var winreg = getWinRegistry();
var subkey;
var valname;
var szCurrentVersion;
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
valname = "CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, valname);
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
return false;
}
else
{
return true;
}
}
function registerKeys()
{
var subkey; //the name of the subkey you are poking around in
var err;
var winreg;
var tmpstr;
winreg = getWinRegistry();
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
createRootRegKey(winreg);
subkey = regRootKey;
err = winreg.setValueString(subkey, "Version", "$GreUniqueID$");
err = winreg.setValueString(subkey, "BuildID", "$GreBuildID$");
tmpstr = new String(fProgram);
err = winreg.setValueString(subkey, "GreHome", tmpstr.substring(0, tmpstr.length-1));
err = winreg.setValueString(subkey, "GreComponentsDir", fProgram + "Components");
registerMainKeys(winreg);
}
function createRootRegKey(winreg)
{
var subkey;
var tmpstr;
var tmpstr2;
var index;
tmpstr = new String(regRootKey);
index = tmpstr.indexOf("\\");
subkey = "";
while(index > 0)
{
subkey = subkey + tmpstr.substring(0, index);
winreg.createKey(subkey,"");
tmpstr2 = tmpstr.substring(index+1, tmpstr.length);
tmpstr = new String(tmpstr2);
index = tmpstr.indexOf("\\");
subkey = subkey + "\\";
}
if(tmpstr.length > 0)
{
subkey = subkey + tmpstr;
logComment("subkey: " + subkey);
winreg.createKey(subkey,"");
}
winreg.createKey(subkey,"");
}
function registerMainKeys(winreg)
{
var subkey; //the name of the subkey you are poking around in
var valname; //the name of the value you want to look at
var value; //the data in the value you want to look at.
var err;
winreg.createKey(regRootKey, "");
subkey = regRootKey + "\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
subkey = regRootKey + "\\Uninstall";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Uninstall Log Folder", fProgram + "Uninstall");
err = winreg.setValueString(subkey, "Description", "$ProductName$ ($UserAgentShort$)");
}
// main
var srDest;
var err;
var err2;
var fProgram;
var fWindowsSystem;
var fileComponentRegStr;
var fileComponentReg;
var restrictedAccess;
var fileToRegister;
var regRootKey;
// So far the only argument passed in is the root path into the Windows registry.
regRootKey = new String(Install.arguments);
srDest = $SpaceRequired$:bin;
err = initInstall("$ProductName$", "GRE", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
err = addDirectory("",
"",
"gre", // 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);
err = addDirectory("",
"",
"Embed", // 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);
// Let the uninstaller know about this generated file.
logComment("Installing: " + fProgram + ".autoreg");
// check return value
if( err == SUCCESS )
{
registerKeys();
// // we don't want to fail on errors for the above
// resetError();
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,130 @@
[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
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 GRE, 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:
DESTINATIONDIRECTORY=Destination Directory
BROWSE_=B&rowse...
CURRENTSETTINGS=Current Settings:
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=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.
ERROR_MESSAGE_TITLE=GRE Setup Error
STR_FILE_NUMBER=File count:
STR_FILENAME=Filename:
MSG_PLEASE_WAIT=Please wait...
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=GRE 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=Setup has detected that you have selected a directory within the Windows directory and will not allow the installation to proceed. Please choose a different directory.

View File

@ -0,0 +1,169 @@
[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=mozilla.org
Product Name=GRE
Shared Install=TRUE
Default AppID=GREUser
; 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=SOFTWARE\mozilla.org\GRE\1.8.1.24_0000000000\Uninstall
Decrypt Key=TRUE
Uninstall Filename=GREUninstall.exe
Defaults Info Filename=defaults_info.ini
[Check Instance0]
Class Name=GREMessageWindow
Window Name=
Process Name=retrozilla.exe
Pretty Name=RetroZilla
;*** LOCALIZE ME BABY ***
Message=RetroZilla is detected to be currently running. Please quit SeaMonkey before continuing. Click OK to exit SeaMonkey automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down RetroZilla. 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 its turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\retrozilla.exe
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 its 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=GRE 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 GRE 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,208 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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 = 1;
err = initInstall("Mozilla XPCOM", "XPCOM", "1.0.0.0000000000");
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("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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",
"1.0.0.0000000000",
"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",
"1.0.0.0000000000",
"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

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$:bin;
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$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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

View File

@ -0,0 +1,208 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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$:bin;
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$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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

View File

@ -0,0 +1,850 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
function registerProgramFolderKey(winreg, fFolderPath)
{
var subkey;
var err;
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
winreg.createKey("SOFTWARE\\RetroZilla","");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "1.0 (en)");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)\\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 + "RetroZilla.exe";
fileExe = getFolder("file:///", fTemp);
fileReadme = getFolder("file:///", fProgram + "readme.txt");
fileLicense = getFolder("file:///", fProgram + "license.txt");
scExeDesc = "RetroZilla";
scReadmeDesc = "Readme";
scLicenseDesc = "License";
scProfileDesc = "Profile Manager";
scProfileDescParam = "-ProfileManager";
scFolderName = "RetroZilla";
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);
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\\RetroZilla\\RetroZilla\\1.0 (en)\\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);
// This is so that Windows Media Player works with us
var subkey = "SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\RetroZilla.exe";
winreg.createKey(subkey, "");
subkey = "SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\SEAMON~1.exe"
winreg.createKey(subkey, "");
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerProgramFolderKey(winreg, fFolderPath);
/* remove turbo mode shortcut */
fFolderPath = getFolder("file:///", szStartupFolder);
/* remove shortcut from the startup folder */
basename = "RetroZilla.exe"
fTemp = fFolderPath + basename + ".lnk";
fFolderPath = getFolder("file:///", fTemp);
if (File.exists(fFolderPath))
{
logComment("Removing Quick Launch shortcut from Windows startup folder\n");
fileDelete(fFolderPath);
}
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)\\Setup";
regvalue = winreg.getValueString(subkey, "browserargs");
/* log this so if the user turns on turbo mode in the browser the uninstaller will undo it */
logComment( "store registry value string: HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run [RetroZilla Quick Launch]");
if (regvalue && regvalue != undefined && regvalue.length != 0)
{
var value = new String(regvalue);
var index = value.indexOf("turbo");
if (index != -1)
{
var index2 = value.indexOf("=", index);
if (index2 != -1)
{
turboarg = value.slice(index2 + 1, index2 + 2);
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
valname = "RetroZilla Quick Launch";
if ( turboarg == "Y" || turboarg == "y")
{
fTemp = fileExe;
fileExe = getFolder("file:///", fTemp);
newKey = '"' + fileExe + '"' + ' -turbo';
winreg.createKey(subkey,"");
winreg.setValueString(subkey, valname, newKey);
}
else
{
winreg.deleteValue(subkey, valname);
}
}
}
}
}
else
{
logComment("winreg is null");
}
}
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\\RetroZilla","");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "1.0 (en)");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
// The following keys are required to be created to supply information
// about the location of the Gecko Embedded Client to 3rd party apps.
// "SOFTWARE\\Mozilla" must not be localized!
subkey = "SOFTWARE\\Mozilla\\RetroZilla 1.0";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "GeckoVer", "$GreVersion$");
subkey = "SOFTWARE\\Mozilla\\RetroZilla 1.0\\Extensions";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Components", fProgram + "Components");
err = winreg.setValueString(subkey, "Plugins", fProgram + "Plugins");
subkey = "SOFTWARE\\Mozilla\\RetroZilla 1.0\\bin";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "PathToExe", fProgram + "RetroZilla.exe");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)\\Main";
err = winreg.setValueString(subkey, "PathToExe", fProgram + "RetroZilla.exe");
// Register as a windows XP internet browser
if( IsWinnt() )
{
subkey = "Software\\Clients\\StartMenuInternet\\RetroZilla.exe";
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, "", "RetroZilla");
// path does not need to be quoted per MS doc
data = fProgram + "RetroZilla.exe,0";
winreg.setValueString(subkey + "\\DefaultIcon", "", data);
data = "\"" + fProgram + "RetroZilla.exe\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\retrozillaUninstall.exe\" /ua \"1.0 (en)\" /hs browser";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 1);
data = "\"" + fProgram + "RetroZilla.exe\" -silent -nosplash -setDefaultBrowser ";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\retrozillaUninstall.exe\" /ua \"1.0 (en)\" /ss browser";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}
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\\RetroZilla.exe";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "", fProgram + "RetroZilla.exe");
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.
deleteThisFile("Program", "oji.dll");
deleteThisFile("Program", "jsdom.dll");
deleteThisFile("Program", "img3250.dll");
deleteThisFile("Program", "gkgfxwin.dll");
deleteThisFile("Program", "gkwidget.dll");
deleteThisFile("Program", "jpeg3250.dll");
deleteThisFile("Program", "mozreg.dll");
deleteThisFile("Program", "ISimpleDOMNodeMarshal.dll");
deleteThisFile("Program", "ISimpleDOMDocumentMarshal.dll");
deleteThisFile("Program", "defaults/pref/config.js");
deleteThisFile("Program", "defaults/pref/initpref.js");
deleteThisFile("Program", "defaults/pref/psm-glue.js");
deleteThisFile("Program", "defaults/pref/typeaheadfind.js");
deleteThisFile("Program", "defaults/pref/bug307259.js");
deleteThisFile("Program", "defaults/wallet/URLFieldSchema.tbl");
deleteThisFile("Program", "res/samples/collapsing.css");
deleteThisFile("Program", "res/samples/collapsing.xul");
deleteThisFile("Program", "res/samples/import-test.html");
deleteThisFile("Program", "res/samples/sampleimages/xpconnect-sample.html");
deleteThisFile("Components", "gkhtml.dll");
deleteThisFile("Components", "mozucth.dll");
deleteThisFile("Components", "mozxfer.dll");
deleteThisFile("Components", "nsgif.dll");
deleteThisFile("Components", "nsjpg.dll");
deleteThisFile("Components", "nsmng.dll");
deleteThisFile("Components", "nspng.dll");
deleteThisFile("Components", "smime.dll");
deleteThisFile("Components", "AcctIdl.dll");
deleteThisFile("Components", "chardetc.dll");
deleteThisFile("Components", "evntloop.dll");
deleteThisFile("Components", "nativapp.dll");
deleteThisFile("Components", "ucvja.dll");
deleteThisFile("Components", "ucvko.dll");
deleteThisFile("Components", "ucvtw.dll");
deleteThisFile("Components", "ucvtw2.dll");
deleteThisFile("Components", "ucvlatin.dll");
deleteThisFile("Components", "ucvcn.dll");
deleteThisFile("Components", "ucvibm.dll");
deleteThisFile("Components", "txtsvc.dll");
deleteThisFile("Components", "gfx2.dll");
deleteThisFile("Components", "gfx2.xpt");
deleteThisFile("Components", "imggif.dll");
deleteThisFile("Components", "imgjpeg.dll");
deleteThisFile("Components", "imgpng.dll");
deleteThisFile("Components", "imgbmp.dll");
deleteThisFile("Components", "imgxbm.dll");
deleteThisFile("Components", "imgppm.dll");
deleteThisFile("Components", "ucharuti.dll");
deleteThisFile("Components", "chardet.dll");
deleteThisFile("Components", "lwbrk.dll");
deleteThisFile("Components", "nslocale.dll");
deleteThisFile("Components", "strres.dll");
deleteThisFile("Components", "mozbrwsr.dll");
deleteThisFile("Components", "nkcache.dll");
deleteThisFile("Components", "jsloader.dll");
deleteThisFile("Components", "gkcontent.dll");
deleteThisFile("Components", "inspector.dll");
deleteThisFile("Components", "psm.xpt");
deleteThisFile("Components", "typeaheadfind.xpt");
deleteThisFile("Components", "xmlextras_interfaceinfo.xpt");
deleteThisFile("Components", "xmlsoap.xpt");
deleteThisFile("Components", "xmlschema.xpt");
deleteThisFile("Components", "wsdl.xpt");
deleteThisFile("Components", "wsproxy.xpt");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "xptitemp.dat");
deleteThisFile("Chrome", "chrome.rdf");
deleteThisFile("Chrome", "overlays.rdf");
deleteThisFile("Chrome", "stylesheets.rdf");
deleteThisFile("Chrome", "forms.jar");
deleteThisFile("Chrome", "typeaheadfind.jar");
deleteThisFolder("Chrome", "overlayinfo");
deleteThisFolder("Components", "myspell");
deleteThisFolder("Components", "Netscape/Gecko1.0");
deleteThisFolder("Components", "Netscape/Netscape6.00");
deleteThisFolder("Components", "Netscape/Netscape6.01");
deleteThisFolder("Components", "Netscape/Netscape6.10");
deleteThisFolder("Components", "Netscape/Netscape6.20");
deleteThisFolder("Components", "Netscape/Netscape6.21");
deleteThisFolder("Components", "Netscape/Netscape6.22");
deleteThisFolder("Components", "Netscape/Netscape6.23");
deleteThisFolder("Components", "Netscape/Mozilla1.2");
deleteThisFolder("Components", "Netscape/MozillaBranch");
if(!gGreLocal)
{
// If GRE is not local, meaning it's installed in a
// global area, then cleanup obsolete files that are
// now part of the GRE installer package.
deleteThisFile("Program", "gkgfx.dll");
deleteThisFile("Program", "js3250.dll");
deleteThisFile("Program", "jsj3250.dll");
deleteThisFile("Program", "mozctl.dll");
deleteThisFile("Program", "mozctlx.dll");
deleteThisFile("Program", "nss3.dll");
deleteThisFile("Program", "nssckbi.dll");
deleteThisFile("Program", "smime3.dll");
deleteThisFile("Program", "softokn3.dll");
deleteThisFile("Program", "softokn3.chk");
deleteThisFile("Program", "freebl3.dll");
deleteThisFile("Program", "freebl3.chk");
deleteThisFile("Program", "ssl3.dll");
deleteThisFile("Program", "xpcom.dll");
deleteThisFile("Program", "xpcom_core.dll");
deleteThisFile("Program", "xpistub.dll");
deleteThisFile("Program", "zlib.dll");
deleteThisFile("Program", "mozz.dll");
deleteThisFile("Components", "accessibility.xpt");
deleteThisFile("Components", "content_base.xpt");
deleteThisFile("Components", "docshell_base.xpt");
deleteThisFile("Components", "dom.xpt");
deleteThisFile("Components", "dom_base.xpt");
deleteThisFile("Components", "dom_core.xpt");
deleteThisFile("Components", "dom_css.xpt");
deleteThisFile("Components", "dom_events.xpt");
deleteThisFile("Components", "dom_html.xpt");
deleteThisFile("Components", "dom_range.xpt");
deleteThisFile("Components", "dom_stylesheets.xpt");
deleteThisFile("Components", "dom_traversal.xpt");
deleteThisFile("Components", "dom_views.xpt");
deleteThisFile("Components", "dom_xbl.xpt");
deleteThisFile("Components", "dom_xul.xpt");
deleteThisFile("Components", "gfx.xpt");
deleteThisFile("Components", "history.xpt");
deleteThisFile("Components", "htmlparser.xpt");
deleteThisFile("Components", "intl.xpt");
deleteThisFile("Components", "jar.xpt");
deleteThisFile("Components", "jsurl.xpt");
deleteThisFile("Components", "layout_base.xpt");
deleteThisFile("Components", "layout_printing.xpt");
deleteThisFile("Components", "layout_xul.xpt");
deleteThisFile("Components", "locale.xpt");
deleteThisFile("Components", "necko_about.xpt");
deleteThisFile("Components", "necko_cache.xpt");
deleteThisFile("Components", "necko_data.xpt");
deleteThisFile("Components", "necko_dns.xpt");
deleteThisFile("Components", "necko_file.xpt");
deleteThisFile("Components", "necko_ftp.xpt");
deleteThisFile("Components", "necko_http.xpt");
deleteThisFile("Components", "necko_jar.xpt");
deleteThisFile("Components", "necko_res.xpt");
deleteThisFile("Components", "necko_strconv.xpt");
deleteThisFile("Components", "necko_viewsource.xpt");
deleteThisFile("Components", "plugin.xpt");
deleteThisFile("Components", "pref.xpt");
deleteThisFile("Components", "regviewr.dll");
deleteThisFile("Components", "txtsvc.xpt");
deleteThisFile("Components", "unicharutil.xpt");
deleteThisFile("Components", "universalchardet.dll");
deleteThisFile("Components", "uriloader.xpt");
deleteThisFile("Components", "webbrowserpersist.xpt");
deleteThisFile("Components", "webBrowser_core.xpt");
deleteThisFile("Components", "widget.xpt");
deleteThisFile("Components", "windowwatcher.xpt");
deleteThisFile("Components", "xpcom_base.xpt");
deleteThisFile("Components", "xpcom_components.xpt");
deleteThisFile("Components", "xpcom_ds.xpt");
deleteThisFile("Components", "xpcom_io.xpt");
deleteThisFile("Components", "xpcom_thread.xpt");
deleteThisFile("Components", "xpcom_xpti.xpt");
deleteThisFile("Components", "xpconnect.xpt");
deleteThisFile("Components", "xpinstall.xpt");
deleteThisFile("Components", "xuldoc.xpt");
deleteThisFile("Components", "accessibility.dll");
deleteThisFile("Components", "appshell.dll");
deleteThisFile("Components", "appshell.xpt");
deleteThisFile("Components", "caps.dll");
deleteThisFile("Components", "caps.xpt");
deleteThisFile("Components", "chrome.dll");
deleteThisFile("Components", "chrome.xpt");
deleteThisFile("Components", "cookie.dll");
deleteThisFile("Components", "docshell.dll");
deleteThisFile("Components", "editor.dll");
deleteThisFile("Components", "editor.xpt");
deleteThisFile("Components", "embedcomponents.dll");
deleteThisFile("Components", "gkgfxwin.dll");
deleteThisFile("Components", "gklayout.dll");
deleteThisFile("Components", "gkparser.dll");
deleteThisFile("Components", "gkplugin.dll");
deleteThisFile("Components", "gkview.dll");
deleteThisFile("Components", "gkwidget.dll");
deleteThisFile("Components", "i18n.dll");
deleteThisFile("Components", "imgicon.dll");
deleteThisFile("Components", "imgicon.xpt");
deleteThisFile("Components", "imglib2.dll");
deleteThisFile("Components", "imglib2.xpt");
deleteThisFile("Components", "imgmng.dll");
deleteThisFile("Components", "jar50.dll");
deleteThisFile("Components", "jsdom.dll");
deleteThisFile("Components", "jsurl.dll");
deleteThisFile("Components", "necko.dll");
deleteThisFile("Components", "necko.xpt");
deleteThisFile("Components", "necko2.dll");
deleteThisFile("Components", "necko_cookie.xpt");
deleteThisFile("Components", "oji.dll");
deleteThisFile("Components", "oji.xpt");
deleteThisFile("Components", "pipboot.dll");
deleteThisFile("Components", "pipboot.xpt");
deleteThisFile("Components", "pipnss.dll");
deleteThisFile("Components", "pipnss.xpt");
deleteThisFile("Components", "profile.dll");
deleteThisFile("Components", "profile.xpt");
deleteThisFile("Components", "rdf.dll");
deleteThisFile("Components", "rdf.xpt");
deleteThisFile("Components", "shistory.dll");
deleteThisFile("Components", "shistory.xpt");
deleteThisFile("Components", "uconv.dll");
deleteThisFile("Components", "uconv.xpt");
deleteThisFile("Components", "ucvmath.dll");
deleteThisFile("Components", "urildr.dll");
deleteThisFile("Components", "wallet.dll");
deleteThisFile("Components", "wallet.xpt");
deleteThisFile("Components", "webbrwsr.dll");
deleteThisFile("Components", "xmlextras.dll");
deleteThisFile("Components", "xmlextras.xpt");
deleteThisFile("Components", "xpc3250.dll");
deleteThisFile("Components", "xpinstal.dll");
deleteThisFile("Components", "xppref32.dll");
deleteThisFile("Components", "p3p.dll");
}
}
// 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 = 1;
err = initInstall("RetroZilla", "Browser", "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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();
// we don't want to fail on errors for the above two
resetError();
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/autoconfig/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/cookie/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/wallet/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","content-packs.jar"), "content/content-packs/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator/downloadmanager/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/branding/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/editor/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/editor-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/necko/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/mozldap/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/messenger/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/navigator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/messenger/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","help.jar"),"content/help/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/xbl-marquee/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/p3p/");
// We need to register the psm chrome files.
// We're checking to see if they exist first in case
// they were not built and packaged up.
var pki = getFolder("Chrome", "pippki.jar");
if(File.exists(pki))
registerChrome(CONTENT | DELAYED_CHROME, pki, "content/pippki/");
var nss = getFolder("Chrome", "pipnss.jar");
if(File.exists(nss))
registerChrome(CONTENT | DELAYED_CHROME, nss, "content/pipnss/");
/* 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("Installing: " + fProgram + "chrome\\overlays.rdf");
logComment("Installing: " + fProgram + "chrome\\stylesheets.rdf");
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", "Browser/xpicleanup", "1.0.0.0000000000");
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,850 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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$";
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);
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);
// This is so that Windows Media Player works with us
var subkey = "SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\$MainExeFile$";
winreg.createKey(subkey, "");
subkey = "SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\SEAMON~1.exe"
winreg.createKey(subkey, "");
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerProgramFolderKey(winreg, fFolderPath);
/* remove turbo mode shortcut */
fFolderPath = getFolder("file:///", szStartupFolder);
/* remove shortcut from the startup folder */
basename = "$MainExeFile$"
fTemp = fFolderPath + basename + ".lnk";
fFolderPath = getFolder("file:///", fTemp);
if (File.exists(fFolderPath))
{
logComment("Removing Quick Launch shortcut from Windows startup folder\n");
fileDelete(fFolderPath);
}
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Setup";
regvalue = winreg.getValueString(subkey, "browserargs");
/* log this so if the user turns on turbo mode in the browser the uninstaller will undo it */
logComment( "store registry value string: HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run [RetroZilla Quick Launch]");
if (regvalue && regvalue != undefined && regvalue.length != 0)
{
var value = new String(regvalue);
var index = value.indexOf("turbo");
if (index != -1)
{
var index2 = value.indexOf("=", index);
if (index2 != -1)
{
turboarg = value.slice(index2 + 1, index2 + 2);
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
valname = "RetroZilla Quick Launch";
if ( turboarg == "Y" || turboarg == "y")
{
fTemp = fileExe;
fileExe = getFolder("file:///", fTemp);
newKey = '"' + fileExe + '"' + ' -turbo';
winreg.createKey(subkey,"");
winreg.setValueString(subkey, valname, newKey);
}
else
{
winreg.deleteValue(subkey, valname);
}
}
}
}
}
else
{
logComment("winreg is null");
}
}
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);
// The following keys are required to be created to supply information
// about the location of the Gecko Embedded Client to 3rd party apps.
// "SOFTWARE\\Mozilla" must not be localized!
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "GeckoVer", "$GreVersion$");
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$\\Extensions";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Components", fProgram + "Components");
err = winreg.setValueString(subkey, "Plugins", fProgram + "Plugins");
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$\\bin";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
// Register as a windows XP internet browser
if( IsWinnt() )
{
subkey = "Software\\Clients\\StartMenuInternet\\$MainExeFile$";
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, "", "$ProductNameInternal$");
// path does not need to be quoted per MS doc
data = fProgram + "$MainExeFile$,0";
winreg.setValueString(subkey + "\\DefaultIcon", "", data);
data = "\"" + fProgram + "$MainExeFile$\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs browser";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 1);
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash -setDefaultBrowser ";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss browser";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}
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.
deleteThisFile("Program", "oji.dll");
deleteThisFile("Program", "jsdom.dll");
deleteThisFile("Program", "img3250.dll");
deleteThisFile("Program", "gkgfxwin.dll");
deleteThisFile("Program", "gkwidget.dll");
deleteThisFile("Program", "jpeg3250.dll");
deleteThisFile("Program", "mozreg.dll");
deleteThisFile("Program", "ISimpleDOMNodeMarshal.dll");
deleteThisFile("Program", "ISimpleDOMDocumentMarshal.dll");
deleteThisFile("Program", "defaults/pref/config.js");
deleteThisFile("Program", "defaults/pref/initpref.js");
deleteThisFile("Program", "defaults/pref/psm-glue.js");
deleteThisFile("Program", "defaults/pref/typeaheadfind.js");
deleteThisFile("Program", "defaults/pref/bug307259.js");
deleteThisFile("Program", "defaults/wallet/URLFieldSchema.tbl");
deleteThisFile("Program", "res/samples/collapsing.css");
deleteThisFile("Program", "res/samples/collapsing.xul");
deleteThisFile("Program", "res/samples/import-test.html");
deleteThisFile("Program", "res/samples/sampleimages/xpconnect-sample.html");
deleteThisFile("Components", "gkhtml.dll");
deleteThisFile("Components", "mozucth.dll");
deleteThisFile("Components", "mozxfer.dll");
deleteThisFile("Components", "nsgif.dll");
deleteThisFile("Components", "nsjpg.dll");
deleteThisFile("Components", "nsmng.dll");
deleteThisFile("Components", "nspng.dll");
deleteThisFile("Components", "smime.dll");
deleteThisFile("Components", "AcctIdl.dll");
deleteThisFile("Components", "chardetc.dll");
deleteThisFile("Components", "evntloop.dll");
deleteThisFile("Components", "nativapp.dll");
deleteThisFile("Components", "ucvja.dll");
deleteThisFile("Components", "ucvko.dll");
deleteThisFile("Components", "ucvtw.dll");
deleteThisFile("Components", "ucvtw2.dll");
deleteThisFile("Components", "ucvlatin.dll");
deleteThisFile("Components", "ucvcn.dll");
deleteThisFile("Components", "ucvibm.dll");
deleteThisFile("Components", "txtsvc.dll");
deleteThisFile("Components", "gfx2.dll");
deleteThisFile("Components", "gfx2.xpt");
deleteThisFile("Components", "imggif.dll");
deleteThisFile("Components", "imgjpeg.dll");
deleteThisFile("Components", "imgpng.dll");
deleteThisFile("Components", "imgbmp.dll");
deleteThisFile("Components", "imgxbm.dll");
deleteThisFile("Components", "imgppm.dll");
deleteThisFile("Components", "ucharuti.dll");
deleteThisFile("Components", "chardet.dll");
deleteThisFile("Components", "lwbrk.dll");
deleteThisFile("Components", "nslocale.dll");
deleteThisFile("Components", "strres.dll");
deleteThisFile("Components", "mozbrwsr.dll");
deleteThisFile("Components", "nkcache.dll");
deleteThisFile("Components", "jsloader.dll");
deleteThisFile("Components", "gkcontent.dll");
deleteThisFile("Components", "inspector.dll");
deleteThisFile("Components", "psm.xpt");
deleteThisFile("Components", "typeaheadfind.xpt");
deleteThisFile("Components", "xmlextras_interfaceinfo.xpt");
deleteThisFile("Components", "xmlsoap.xpt");
deleteThisFile("Components", "xmlschema.xpt");
deleteThisFile("Components", "wsdl.xpt");
deleteThisFile("Components", "wsproxy.xpt");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "xptitemp.dat");
deleteThisFile("Chrome", "chrome.rdf");
deleteThisFile("Chrome", "overlays.rdf");
deleteThisFile("Chrome", "stylesheets.rdf");
deleteThisFile("Chrome", "forms.jar");
deleteThisFile("Chrome", "typeaheadfind.jar");
deleteThisFolder("Chrome", "overlayinfo");
deleteThisFolder("Components", "myspell");
deleteThisFolder("Components", "Netscape/Gecko1.0");
deleteThisFolder("Components", "Netscape/Netscape6.00");
deleteThisFolder("Components", "Netscape/Netscape6.01");
deleteThisFolder("Components", "Netscape/Netscape6.10");
deleteThisFolder("Components", "Netscape/Netscape6.20");
deleteThisFolder("Components", "Netscape/Netscape6.21");
deleteThisFolder("Components", "Netscape/Netscape6.22");
deleteThisFolder("Components", "Netscape/Netscape6.23");
deleteThisFolder("Components", "Netscape/Mozilla1.2");
deleteThisFolder("Components", "Netscape/MozillaBranch");
if(!gGreLocal)
{
// If GRE is not local, meaning it's installed in a
// global area, then cleanup obsolete files that are
// now part of the GRE installer package.
deleteThisFile("Program", "gkgfx.dll");
deleteThisFile("Program", "js3250.dll");
deleteThisFile("Program", "jsj3250.dll");
deleteThisFile("Program", "mozctl.dll");
deleteThisFile("Program", "mozctlx.dll");
deleteThisFile("Program", "nss3.dll");
deleteThisFile("Program", "nssckbi.dll");
deleteThisFile("Program", "smime3.dll");
deleteThisFile("Program", "softokn3.dll");
deleteThisFile("Program", "softokn3.chk");
deleteThisFile("Program", "freebl3.dll");
deleteThisFile("Program", "freebl3.chk");
deleteThisFile("Program", "ssl3.dll");
deleteThisFile("Program", "xpcom.dll");
deleteThisFile("Program", "xpcom_core.dll");
deleteThisFile("Program", "xpistub.dll");
deleteThisFile("Program", "zlib.dll");
deleteThisFile("Program", "mozz.dll");
deleteThisFile("Components", "accessibility.xpt");
deleteThisFile("Components", "content_base.xpt");
deleteThisFile("Components", "docshell_base.xpt");
deleteThisFile("Components", "dom.xpt");
deleteThisFile("Components", "dom_base.xpt");
deleteThisFile("Components", "dom_core.xpt");
deleteThisFile("Components", "dom_css.xpt");
deleteThisFile("Components", "dom_events.xpt");
deleteThisFile("Components", "dom_html.xpt");
deleteThisFile("Components", "dom_range.xpt");
deleteThisFile("Components", "dom_stylesheets.xpt");
deleteThisFile("Components", "dom_traversal.xpt");
deleteThisFile("Components", "dom_views.xpt");
deleteThisFile("Components", "dom_xbl.xpt");
deleteThisFile("Components", "dom_xul.xpt");
deleteThisFile("Components", "gfx.xpt");
deleteThisFile("Components", "history.xpt");
deleteThisFile("Components", "htmlparser.xpt");
deleteThisFile("Components", "intl.xpt");
deleteThisFile("Components", "jar.xpt");
deleteThisFile("Components", "jsurl.xpt");
deleteThisFile("Components", "layout_base.xpt");
deleteThisFile("Components", "layout_printing.xpt");
deleteThisFile("Components", "layout_xul.xpt");
deleteThisFile("Components", "locale.xpt");
deleteThisFile("Components", "necko_about.xpt");
deleteThisFile("Components", "necko_cache.xpt");
deleteThisFile("Components", "necko_data.xpt");
deleteThisFile("Components", "necko_dns.xpt");
deleteThisFile("Components", "necko_file.xpt");
deleteThisFile("Components", "necko_ftp.xpt");
deleteThisFile("Components", "necko_http.xpt");
deleteThisFile("Components", "necko_jar.xpt");
deleteThisFile("Components", "necko_res.xpt");
deleteThisFile("Components", "necko_strconv.xpt");
deleteThisFile("Components", "necko_viewsource.xpt");
deleteThisFile("Components", "plugin.xpt");
deleteThisFile("Components", "pref.xpt");
deleteThisFile("Components", "regviewr.dll");
deleteThisFile("Components", "txtsvc.xpt");
deleteThisFile("Components", "unicharutil.xpt");
deleteThisFile("Components", "universalchardet.dll");
deleteThisFile("Components", "uriloader.xpt");
deleteThisFile("Components", "webbrowserpersist.xpt");
deleteThisFile("Components", "webBrowser_core.xpt");
deleteThisFile("Components", "widget.xpt");
deleteThisFile("Components", "windowwatcher.xpt");
deleteThisFile("Components", "xpcom_base.xpt");
deleteThisFile("Components", "xpcom_components.xpt");
deleteThisFile("Components", "xpcom_ds.xpt");
deleteThisFile("Components", "xpcom_io.xpt");
deleteThisFile("Components", "xpcom_thread.xpt");
deleteThisFile("Components", "xpcom_xpti.xpt");
deleteThisFile("Components", "xpconnect.xpt");
deleteThisFile("Components", "xpinstall.xpt");
deleteThisFile("Components", "xuldoc.xpt");
deleteThisFile("Components", "accessibility.dll");
deleteThisFile("Components", "appshell.dll");
deleteThisFile("Components", "appshell.xpt");
deleteThisFile("Components", "caps.dll");
deleteThisFile("Components", "caps.xpt");
deleteThisFile("Components", "chrome.dll");
deleteThisFile("Components", "chrome.xpt");
deleteThisFile("Components", "cookie.dll");
deleteThisFile("Components", "docshell.dll");
deleteThisFile("Components", "editor.dll");
deleteThisFile("Components", "editor.xpt");
deleteThisFile("Components", "embedcomponents.dll");
deleteThisFile("Components", "gkgfxwin.dll");
deleteThisFile("Components", "gklayout.dll");
deleteThisFile("Components", "gkparser.dll");
deleteThisFile("Components", "gkplugin.dll");
deleteThisFile("Components", "gkview.dll");
deleteThisFile("Components", "gkwidget.dll");
deleteThisFile("Components", "i18n.dll");
deleteThisFile("Components", "imgicon.dll");
deleteThisFile("Components", "imgicon.xpt");
deleteThisFile("Components", "imglib2.dll");
deleteThisFile("Components", "imglib2.xpt");
deleteThisFile("Components", "imgmng.dll");
deleteThisFile("Components", "jar50.dll");
deleteThisFile("Components", "jsdom.dll");
deleteThisFile("Components", "jsurl.dll");
deleteThisFile("Components", "necko.dll");
deleteThisFile("Components", "necko.xpt");
deleteThisFile("Components", "necko2.dll");
deleteThisFile("Components", "necko_cookie.xpt");
deleteThisFile("Components", "oji.dll");
deleteThisFile("Components", "oji.xpt");
deleteThisFile("Components", "pipboot.dll");
deleteThisFile("Components", "pipboot.xpt");
deleteThisFile("Components", "pipnss.dll");
deleteThisFile("Components", "pipnss.xpt");
deleteThisFile("Components", "profile.dll");
deleteThisFile("Components", "profile.xpt");
deleteThisFile("Components", "rdf.dll");
deleteThisFile("Components", "rdf.xpt");
deleteThisFile("Components", "shistory.dll");
deleteThisFile("Components", "shistory.xpt");
deleteThisFile("Components", "uconv.dll");
deleteThisFile("Components", "uconv.xpt");
deleteThisFile("Components", "ucvmath.dll");
deleteThisFile("Components", "urildr.dll");
deleteThisFile("Components", "wallet.dll");
deleteThisFile("Components", "wallet.xpt");
deleteThisFile("Components", "webbrwsr.dll");
deleteThisFile("Components", "xmlextras.dll");
deleteThisFile("Components", "xmlextras.xpt");
deleteThisFile("Components", "xpc3250.dll");
deleteThisFile("Components", "xpinstal.dll");
deleteThisFile("Components", "xppref32.dll");
deleteThisFile("Components", "p3p.dll");
}
}
// 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$:bin;
err = initInstall("$ProductName$", "Browser", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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();
// we don't want to fail on errors for the above two
resetError();
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","toolkit.jar"),"content/global-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/autoconfig/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/cookie/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/wallet/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","content-packs.jar"), "content/content-packs/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator/downloadmanager/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/communicator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/branding/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/editor/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/editor-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/navigator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/necko/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/mozldap/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/messenger/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","classic.jar"),"skin/classic/navigator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/messenger/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","modern.jar"),"skin/modern/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","help.jar"),"content/help/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/xbl-marquee/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","comm.jar"),"content/p3p/");
// We need to register the psm chrome files.
// We're checking to see if they exist first in case
// they were not built and packaged up.
var pki = getFolder("Chrome", "pippki.jar");
if(File.exists(pki))
registerChrome(CONTENT | DELAYED_CHROME, pki, "content/pippki/");
var nss = getFolder("Chrome", "pipnss.jar");
if(File.exists(nss))
registerChrome(CONTENT | DELAYED_CHROME, nss, "content/pipnss/");
/* 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("Installing: " + fProgram + "chrome\\overlays.rdf");
logComment("Installing: " + fProgram + "chrome\\stylesheets.rdf");
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", "Browser/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,126 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("Chatzilla v0.5", "Chatzilla", "1.0.0.0000000000");
logComment("initInstall: " + err);
addFile("Chatzilla service",
"bin/components/chatzilla-service.js",
getFolder("Components"),
"");
addFile("Chatzilla Chrome",
"bin/chrome/chatzilla.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
addDirectory("Chatzilla Icons",
"bin/chrome/icons", // jar source folder
getFolder("Chrome", "icons"), // target folder
""); // target subdir
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/sm/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "skin/modern/chatzilla/");
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "locale/en-US/chatzilla/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

View File

@ -0,0 +1,126 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("Chatzilla v0.5", "Chatzilla", "$Version$");
logComment("initInstall: " + err);
addFile("Chatzilla service",
"bin/components/chatzilla-service.js",
getFolder("Components"),
"");
addFile("Chatzilla Chrome",
"bin/chrome/chatzilla.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
addDirectory("Chatzilla Icons",
"bin/chrome/icons", // jar source folder
getFolder("Chrome", "icons"), // target folder
""); // target subdir
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "content/chatzilla/sm/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "skin/modern/chatzilla/");
registerChrome(LOCALE | DELAYED_CHROME, getFolder("Chrome","chatzilla.jar"), "locale/en-US/chatzilla/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,139 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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 = 1;
err = initInstall(prettyName, regName, "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
err = addDirectory("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,139 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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$:bin;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("DOM Inspector", "Inspector", "1.0.0.0000000000");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
err = addDirectory("", "1.0.0.0000000000", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
addFile("Inspector Command Line Handler",
"bin/components/inspector-cmdline.js",
getFolder("Components"),
"");
var jarFolder = getFolder("Chrome", "inspector.jar");
registerChrome(CONTENT | 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);

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("DOM Inspector", "Inspector", "$Version$");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
err = addDirectory("", "$Version$", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
addFile("Inspector Command Line Handler",
"bin/components/inspector-cmdline.js",
getFolder("Components"),
"");
var jarFolder = getFolder("Chrome", "inspector.jar");
registerChrome(CONTENT | 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);

View File

@ -0,0 +1,130 @@
[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
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 RetroZilla, 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:
DESTINATIONDIRECTORY=Destination Directory
BROWSE_=B&rowse...
CURRENTSETTINGS=Current Settings:
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=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.
ERROR_MESSAGE_TITLE=RetroZilla Setup Error
STR_FILE_NUMBER=File count:
STR_FILENAME=Filename:
MSG_PLEASE_WAIT=Please wait...
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=RetroZilla 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=Setup has detected that you have selected a directory within the Windows directory and will not allow the installation to proceed. Please choose a different directory.

View File

@ -0,0 +1,195 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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 = 1;
err = initInstall(prettyName, regName, "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
err = addDirectory("",
"bin", // 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, cf, localeName + "communicator/");
registerChrome(chromeType, cf, localeName + "branding/");
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 + "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 + "pippki/");
registerChrome(chromeType, cf, localeName + "pipnss/");
registerChrome(chromeType, cf, localeName + "p3p/");
registerChrome(chromeType, pf, localeName + "global-platform/");
registerChrome(chromeType, pf, localeName + "communicator-platform/");
registerChrome(chromeType, pf, localeName + "navigator-platform/");
// mesenger-mapi package exists only on windows.
// Register this package only for windows.
if (platformNode == "win")
registerChrome(chromeType, cf, localeName + "messenger-mapi/");
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,195 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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$:bin;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
err = addDirectory("",
"bin", // 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, cf, localeName + "communicator/");
registerChrome(chromeType, cf, localeName + "branding/");
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 + "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 + "pippki/");
registerChrome(chromeType, cf, localeName + "pipnss/");
registerChrome(chromeType, cf, localeName + "p3p/");
registerChrome(chromeType, pf, localeName + "global-platform/");
registerChrome(chromeType, pf, localeName + "communicator-platform/");
registerChrome(chromeType, pf, localeName + "navigator-platform/");
// mesenger-mapi package exists only on windows.
// Register this package only for windows.
if (platformNode == "win")
registerChrome(chromeType, cf, localeName + "messenger-mapi/");
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,571 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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 registerProgramFolderKey(winreg, fFolderPath)
{
var subkey;
var err;
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
winreg.createKey("SOFTWARE\\RetroZilla", "");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "1.0 (en)");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\RetroZilla\\RetroZilla\\1.0 (en)\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Program Folder Path", fFolderPath);
}
function createShortcuts()
{
var subkey;
var szStartMenuPrograms;
var szStartMenu;
var szFolderDesktop;
var szFolderQuickLaunch;
var szFolderSendTo;
var szFolderAppData;
var winreg;
var fWindows;
var fTemp;
var fProgram;
var fileExe;
var scExeDesc;
var scProfileDesc;
var scProfileDescParam;
var scFolderName;
var fFolderDesktop;
var fFolderPath;
var fFolderPathStr;
var fFolderQuickLaunch;
var is_winnt;
var szCurrentVersion;
var restrictedAccess;
var ikwDefined;
var folderQuickLaunchExists;
var filePalmSyncInstallExe;
var scDescPalmSyncInstall;
var scDescPalmSyncUninstall;
var folderPalmSyncName;
winreg = getWinRegistry();
fWindows = getFolder("Windows");
fProgram = getFolder("Program");
fileExe = getFolder("Program", "RetroZilla.exe");
filePalmSyncInstallExe = getFolder("Program", "PalmSyncInstall.exe");
scDescPalmSyncInstall = "Address Book Palm Sync Install";
scDescPalmSyncUninstall = "Address Book Palm Sync Uninstall";
filePalmSyncReadme = getFolder("Program", "palm.html");
scDescPalmSyncReadme = "Palm Sync User Guide";
fileMailIcon = getFolder("Chrome", "icons/default/messengerWindow.ico");
scExeDesc = "Mail";
scParam = "-mail";
scFolderName = "RetroZilla";
folderPalmSyncName = "Palm Tools";
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;
}
/* 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");
}
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");
}
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\\RetroZilla\\RetroZilla\\1.0 (en)\\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);
/* create the shortcuts */
File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, scParam, fileMailIcon, 0);
// only create these two shortcuts if the files exist
if(File.exists(filePalmSyncInstallExe))
{
/* build the path to the sub folder to Palm Sync files */
var fStartMenuPalmSync = getFolder("file:///", fFolderPath + "/" + folderPalmSyncName);
if(!File.exists(fStartMenuPalmSync))
File.dirCreate(fStartMenuPalmSync);
/* clean up the shortcuts in the old place */
deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncInstall);
deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncUninstall);
/* create the shortcuts in the new sub folder */
File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncInstall, fProgram, "", filePalmSyncInstallExe, 0);
File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncUninstall, fProgram, "/u", filePalmSyncInstallExe, 1);
// only create the palm sync readme shortcut if the file exist
if(File.exists(filePalmSyncReadme))
{
/* create the shortcuts in the new sub folder */
File.windowsShortcut(filePalmSyncReadme, fStartMenuPalmSync, scDescPalmSyncReadme, fProgram, "", filePalmSyncReadme, 0);
}
}
//
// Disabled for now because mail does not have a different shortcut icon from Mozilla
//
//// 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\\RetroZilla";
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, "", "RetroZilla Mail");
// 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 + "RetroZilla.exe\" -mail";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\retrozillaUninstall.exe\" /ua \"1.0 (en)\" /hs mail";
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 + "RetroZilla.exe\" -silent -nosplash -setDefaultMail";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\retrozillaUninstall.exe\" /ua \"1.0 (en)\" /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 = "RetroZilla Mail";
winreg = getWinRegistry();
if(winreg != null)
{
mainExePath = getFolder("Program", "RetroZilla.exe");
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 == "RetroZilla"))
{
// 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("",
"1.0.0.0000000000",
"bin/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\\RetroZilla";
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 + " -mail");
// Register MapiProxy.dll
mapiProxyFile = getFolder("Program", "MapiProxy.dll");
err = File.windowsRegisterServer(mapiProxyFile);
logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
}
}
function upgradeCleanup()
{
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
// need to be cleaned up.
deleteThisFile("Program", "msgMapi.dll");
deleteThisFile("Components", "signed.dll");
deleteThisFile("Components", "smimestb.dll");
deleteThisFile("Components", "nsMapiRegistry.dll");
deleteThisFile("Components", "absyncsv.dll");
}
function updateWinIni()
{
var fWinIni = getWinProfile(getFolder("Windows"), "win.ini");
if(fWinIni != null)
{
fWinIni.writeString("Mail", "MAPI", "1");
fWinIni.writeString("Mail", "MAPIX", "1");
}
}
// main
var srDest;
var err;
var fProgram;
srDest = 1;
err = initInstall("RetroZilla Mail", "Mail", "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if( err == SUCCESS )
{
createShortcuts();
updateWinIni();
updateMapi();
// we don't want to fail on errors for the above
resetError();
// register chrome
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/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-mdn/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-views/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-mapi/");
// 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\\RetroZilla []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla [DLLPath]");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\DefaultIcon []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\protocols\\mailto\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\RetroZilla\\shell\\open\\command []");
// check return value
err = getLastError();
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
// Commenting this out for now until bug 182423 is fixed. This will at least prevent
// people who have not run PalmSyncInstall.exe to run into bug 182423. However,
// if they run the PalmSync uninstall by hand via the Start menu, then they will
// still run into the bug.
//if(err == SUCCESS)
//{
// // Log the uninstall command to run PalmSyncInstall.exe to uninstall itself.
// // This needs to be logged after all the files have been installed.
// logComment("Uninstall Command: \"" + fProgram + "PalmSyncInstall.exe\" /us");
//}
}
else
cancelInstall(err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,571 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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 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 szStartMenuPrograms;
var szStartMenu;
var szFolderDesktop;
var szFolderQuickLaunch;
var szFolderSendTo;
var szFolderAppData;
var winreg;
var fWindows;
var fTemp;
var fProgram;
var fileExe;
var scExeDesc;
var scProfileDesc;
var scProfileDescParam;
var scFolderName;
var fFolderDesktop;
var fFolderPath;
var fFolderPathStr;
var fFolderQuickLaunch;
var is_winnt;
var szCurrentVersion;
var restrictedAccess;
var ikwDefined;
var folderQuickLaunchExists;
var filePalmSyncInstallExe;
var scDescPalmSyncInstall;
var scDescPalmSyncUninstall;
var folderPalmSyncName;
winreg = getWinRegistry();
fWindows = getFolder("Windows");
fProgram = getFolder("Program");
fileExe = getFolder("Program", "$MainExeFile$");
filePalmSyncInstallExe = getFolder("Program", "PalmSyncInstall.exe");
scDescPalmSyncInstall = "Address Book Palm Sync Install";
scDescPalmSyncUninstall = "Address Book Palm Sync Uninstall";
filePalmSyncReadme = getFolder("Program", "palm.html");
scDescPalmSyncReadme = "Palm Sync User Guide";
fileMailIcon = getFolder("Chrome", "icons/default/messengerWindow.ico");
scExeDesc = "Mail";
scParam = "-mail";
scFolderName = "$ProductName$";
folderPalmSyncName = "Palm Tools";
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;
}
/* 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");
}
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");
}
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);
/* create the shortcuts */
File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, scParam, fileMailIcon, 0);
// only create these two shortcuts if the files exist
if(File.exists(filePalmSyncInstallExe))
{
/* build the path to the sub folder to Palm Sync files */
var fStartMenuPalmSync = getFolder("file:///", fFolderPath + "/" + folderPalmSyncName);
if(!File.exists(fStartMenuPalmSync))
File.dirCreate(fStartMenuPalmSync);
/* clean up the shortcuts in the old place */
deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncInstall);
deleteThisFile("file:///", fFolderPath + "/" + scDescPalmSyncUninstall);
/* create the shortcuts in the new sub folder */
File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncInstall, fProgram, "", filePalmSyncInstallExe, 0);
File.windowsShortcut(filePalmSyncInstallExe, fStartMenuPalmSync, scDescPalmSyncUninstall, fProgram, "/u", filePalmSyncInstallExe, 1);
// only create the palm sync readme shortcut if the file exist
if(File.exists(filePalmSyncReadme))
{
/* create the shortcuts in the new sub folder */
File.windowsShortcut(filePalmSyncReadme, fStartMenuPalmSync, scDescPalmSyncReadme, fProgram, "", filePalmSyncReadme, 0);
}
}
//
// Disabled for now because mail does not have a different shortcut icon from Mozilla
//
//// 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$ Mail");
// 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$\" -mail";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs mail";
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$ Mail";
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$",
"bin/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 + " -mail");
// Register MapiProxy.dll
mapiProxyFile = getFolder("Program", "MapiProxy.dll");
err = File.windowsRegisterServer(mapiProxyFile);
logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
}
}
function upgradeCleanup()
{
// Obsolete files from Netscape 6.0 and Netscape 6.01 that
// need to be cleaned up.
deleteThisFile("Program", "msgMapi.dll");
deleteThisFile("Components", "signed.dll");
deleteThisFile("Components", "smimestb.dll");
deleteThisFile("Components", "nsMapiRegistry.dll");
deleteThisFile("Components", "absyncsv.dll");
}
function updateWinIni()
{
var fWinIni = getWinProfile(getFolder("Windows"), "win.ini");
if(fWinIni != null)
{
fWinIni.writeString("Mail", "MAPI", "1");
fWinIni.writeString("Mail", "MAPIX", "1");
}
}
// main
var srDest;
var err;
var fProgram;
srDest = $SpaceRequired$:bin;
err = initInstall("RetroZilla Mail", "Mail", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if( err == SUCCESS )
{
createShortcuts();
updateWinIni();
updateMapi();
// we don't want to fail on errors for the above
resetError();
// register chrome
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/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-mdn/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-views/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-mapi/");
// 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 []");
// check return value
err = getLastError();
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
// Commenting this out for now until bug 182423 is fixed. This will at least prevent
// people who have not run PalmSyncInstall.exe to run into bug 182423. However,
// if they run the PalmSync uninstall by hand via the Start menu, then they will
// still run into the bug.
//if(err == SUCCESS)
//{
// // Log the uninstall command to run PalmSyncInstall.exe to uninstall itself.
// // This needs to be logged after all the files have been installed.
// logComment("Uninstall Command: \"" + fProgram + "PalmSyncInstall.exe\" /us");
//}
}
else
cancelInstall(err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,192 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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 = 1;
err = initInstall(prettyName, regName, "1.0.0.0000000000");
logComment("initInstall: " + err);
if (platformNode == 'mac')
{
searchPlugins = "Search Plugins";
}
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
var fTarget;
setPackageFolder(fProgram);
fTarget = getFolder("Chrome");
err = addDirectory("",
"bin/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);
if (err == SUCCESS)
{
fTarget = getFolder("Program", "defaults");
logComment("fTarget: " + fTarget);
err = addDirectory("",
"bin/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)
{
fTarget = getFolder("Program", searchPlugins);
logComment("fTarget: " + fTarget);
err = addDirectory("",
"bin/searchplugins", // 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("","bin/chrome",fProgram,"chrome");
}
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);
// end main

View File

@ -0,0 +1,192 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
// 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$:bin;
err = initInstall(prettyName, regName, "$Version$");
logComment("initInstall: " + err);
if (platformNode == 'mac')
{
searchPlugins = "Search Plugins";
}
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
var chromeType = LOCALE;
var fTarget;
setPackageFolder(fProgram);
fTarget = getFolder("Chrome");
err = addDirectory("",
"bin/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);
if (err == SUCCESS)
{
fTarget = getFolder("Program", "defaults");
logComment("fTarget: " + fTarget);
err = addDirectory("",
"bin/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)
{
fTarget = getFolder("Program", searchPlugins);
logComment("fTarget: " + fTarget);
err = addDirectory("",
"bin/searchplugins", // 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("","bin/chrome",fProgram,"chrome");
}
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);
// end main

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("Website Reporter", "Reporter", "1.0.0.0000000000");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
var srDest = 1;
if (verifyDiskSpace(fProgram, srDest))
{
err = addDirectory("", "1.0.0.0000000000", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
var jarFolder = getFolder("Chrome", "reporter.jar");
registerChrome(CONTENT | DELAYED_CHROME, jarFolder, "content/reporter/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/classic/reporter/");
registerChrome(LOCALE | DELAYED_CHROME, jarFolder, "locale/en-US/reporter/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("Website Reporter", "Reporter", "$Version$");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
var srDest = $SpaceRequired$;
if (verifyDiskSpace(fProgram, srDest))
{
err = addDirectory("", "$Version$", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
var jarFolder = getFolder("Chrome", "reporter.jar");
registerChrome(CONTENT | DELAYED_CHROME, jarFolder, "content/reporter/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/classic/reporter/");
registerChrome(LOCALE | DELAYED_CHROME, jarFolder, "locale/en-US/reporter/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@ -0,0 +1,97 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}

View File

@ -0,0 +1,97 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}

View File

@ -0,0 +1,97 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}

View File

@ -0,0 +1,97 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var srDest = 1;
var err = initInstall("RetroZilla Myspell Spellchecker", "Spellchecker", "1.0.0.0000000000");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram)
if (verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
addDirectory("Spellchecker",
"1.0.0.0000000000",
"bin",
fProgram,
"");
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var srDest = $SpaceRequired$;
var err = initInstall("RetroZilla Myspell Spellchecker", "Spellchecker", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
logComment("fProgram: " + fProgram)
if (verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
addDirectory("Spellchecker",
"$Version$",
"bin",
fProgram,
"");
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("SRoaming v0.1", "Roaming", "1.0.0.0000000000");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
err = addDirectory("", "1.0.0.0000000000", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
addFile("SRoaming Chrome",
"bin/chrome/sroaming.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
var jarFolder = getFolder("Chrome", "sroaming.jar");
registerChrome(CONTENT | DELAYED_CHROME, jarFolder, "content/sroaming/");
registerChrome(LOCALE | DELAYED_CHROME, jarFolder, "locale/en-US/sroaming/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/modern/sroaming/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/classic/sroaming/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

View File

@ -0,0 +1,122 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("SRoaming v0.1", "Roaming", "$Version$");
logComment("initInstall: " + err);
var fProgram = getFolder("Program");
logComment("fProgram: " + fProgram);
err = addDirectory("", "$Version$", "bin", fProgram, "", true);
logComment("addDirectory: " + err);
addFile("SRoaming Chrome",
"bin/chrome/sroaming.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
var jarFolder = getFolder("Chrome", "sroaming.jar");
registerChrome(CONTENT | DELAYED_CHROME, jarFolder, "content/sroaming/");
registerChrome(LOCALE | DELAYED_CHROME, jarFolder, "locale/en-US/sroaming/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/modern/sroaming/");
registerChrome(SKIN | DELAYED_CHROME, jarFolder, "skin/classic/sroaming/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

View File

@ -0,0 +1,142 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
function upgradeCleanup()
{
// Obsolete files from previous Netscape installation which
// need to be cleaned up.
deleteThisFile("Components", "l10n.ini");
}
// main
var srDest;
var err;
var communicatorFolder;
srDest = 1;
err = initInstall("Quality Feedback Utility", "Quality Feedback Utility", "1.0.0.0000000000");
logComment("initInstall: " + err);
communicatorFolder = getFolder("Communicator");
logComment("communicatorFolder: " + communicatorFolder);
if(verifyDiskSpace(communicatorFolder, srDest))
{
setPackageFolder(communicatorFolder);
upgradeCleanup();
err = addDirectory("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
communicatorFolder, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to communicatorFolder
true ); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if(!err)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,142 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
function upgradeCleanup()
{
// Obsolete files from previous Netscape installation which
// need to be cleaned up.
deleteThisFile("Components", "l10n.ini");
}
// main
var srDest;
var err;
var communicatorFolder;
srDest = $SpaceRequired$;
err = initInstall("Quality Feedback Utility", "Quality Feedback Utility", "$Version$");
logComment("initInstall: " + err);
communicatorFolder = getFolder("Communicator");
logComment("communicatorFolder: " + communicatorFolder);
if(verifyDiskSpace(communicatorFolder, srDest))
{
setPackageFolder(communicatorFolder);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
communicatorFolder, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to communicatorFolder
true ); // Force Flag
logComment("addDirectory() returned: " + err);
// check return value
if(!err)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main

View File

@ -0,0 +1,188 @@
[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=RetroZilla
Product Name=RetroZilla
; 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=retrozillaUninstall.exe
Defaults Info Filename=defaults_info.ini
[Check Instance0]
Class Name=RetroZillaMessageWindow
Window Name=
Process Name=RetroZilla.exe
Pretty Name=RetroZilla
;*** LOCALIZE ME BABY ***
Message=RetroZilla is detected to be currently running. Please quit RetroZilla before continuing. Click OK to exit RetroZilla automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down RetroZilla. 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 its turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\RetroZilla.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
[Check Instance1]
Class Name=MozillaMessageWindow
Window Name=
Process Name=Mozilla.exe
Pretty Name=Mozilla
;*** LOCALIZE ME BABY ***
Message=Mozilla is detected to be currently running. Please quit Mozilla before continuing. Click OK to exit Mozilla automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
Message wait=Shutting down Mozilla. 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 its turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\Mozilla.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill
[Check Instance2]
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 its 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=RetroZilla 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 RetroZilla 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,124 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("JavaScript Debugger", "Venkman", "1.0.0.0000000000");
logComment("initInstall: " + err);
addFile("Venkman Service",
"bin/components/venkman-service.js",
getFolder("Components"),
"");
addFile("Venkman Chrome",
"bin/chrome/venkman.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
addDirectory("Venkman Icons",
"bin/chrome/icons", // jar source folder
getFolder("Chrome", "icons"), // target folder
""); // target subdir
registerChrome(CONTENT | 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/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

View File

@ -0,0 +1,124 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
var err = initInstall("JavaScript Debugger", "Venkman", "$Version$");
logComment("initInstall: " + err);
addFile("Venkman Service",
"bin/components/venkman-service.js",
getFolder("Components"),
"");
addFile("Venkman Chrome",
"bin/chrome/venkman.jar", // jar source folder
getFolder("Chrome"), // target folder
""); // target subdir
addDirectory("Venkman Icons",
"bin/chrome/icons", // jar source folder
getFolder("Chrome", "icons"), // target folder
""); // target subdir
registerChrome(CONTENT | 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/");
err = getLastError();
if (err==SUCCESS)
performInstall();
else
cancelInstall(err);

View File

@ -0,0 +1,208 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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 = 1;
err = initInstall("Mozilla XPCOM", "XPCOM", "1.0.0.0000000000");
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("",
"1.0.0.0000000000",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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",
"1.0.0.0000000000",
"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",
"1.0.0.0000000000",
"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

View File

@ -0,0 +1,208 @@
// this function verifies disk space in kilobytes
function verifyDiskSpace(dirPath, spaceRequired)
{
var spaceAvailable;
// Get the available disk space on the given path
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
// Convert the available disk space into kilobytes
spaceAvailable = parseInt(spaceAvailable / 1024);
// do the verification
if(spaceAvailable < spaceRequired)
{
logComment("Insufficient disk space: " + dirPath);
logComment(" required : " + spaceRequired + " K");
logComment(" available: " + spaceAvailable + " K");
return(false);
}
return(true);
}
// this function deletes a file if it exists
function deleteThisFile(dirKey, file)
{
var fFileToDelete;
fFileToDelete = getFolder(dirKey, file);
logComment("File to delete: " + fFileToDelete);
if(File.isFile(fFileToDelete))
{
File.remove(fFileToDelete);
return(true);
}
else
return(false);
}
// this function deletes a folder if it exists
function deleteThisFolder(dirKey, folder, recursiveDelete)
{
var fToDelete;
if(typeof recursiveDelete == "undefined")
recursiveDelete = true;
fToDelete = getFolder(dirKey, folder);
logComment("folder to delete: " + fToDelete);
if(File.isDirectory(fToDelete))
{
File.dirRemove(fToDelete, recursiveDelete);
return(true);
}
else
return(false);
}
// OS type detection
// which platform?
function getPlatform()
{
var platformStr;
var platformNode;
if('platform' in Install)
{
platformStr = new String(Install.platform);
if (!platformStr.search(/^Macintosh/))
platformNode = 'mac';
else if (!platformStr.search(/^Win/))
platformNode = 'win';
else if (!platformStr.search(/^OS\/2/))
platformNode = 'win';
else
platformNode = 'unix';
}
else
{
var fOSMac = getFolder("Mac System");
var fOSWin = getFolder("Win System");
logComment("fOSMac: " + fOSMac);
logComment("fOSWin: " + fOSWin);
if(fOSMac != null)
platformNode = 'mac';
else if(fOSWin != null)
platformNode = 'win';
else
platformNode = 'unix';
}
return platformNode;
}
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$:bin;
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$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() 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