Renaming MRE to GRE (Gecko Runtime Environment)

(Bug 167795, r=chak sr=leaf)
This commit is contained in:
curt%netscape.com 2002-09-12 19:19:39 +00:00
parent 21b6d7bcba
commit 57e667ebd8
12 changed files with 2892 additions and 0 deletions

View File

@ -0,0 +1,202 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Navigator.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corp. Portions created by Netscape Communications Corp. are
# Copyright (C) 1998, 1999, 2000, 2001 Netscape Communications Corp. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
use Cwd;
if($#ARGV < 1)
{
print_usage();
exit(1);
}
print "searching for longfilenames in:\n";
print " $ARGV[0]\n";
$outFile = $ARGV[1];
$start_dir = $ARGV[0];
$start_dir =~ s/\\/\//g;
if(substr($start_dir, -1, 1) ne '/')
{
$start_dir = $start_dir . "/";
}
# Open the output file
open(fpOutFile, ">>$outFile") || die "\nCould not open $outFile: $!\n";
# $rv has the following possible values:
# 0 - Found at least one long filename file
# 1 - Error locating GetShortPathName.exe
# 2 - No long filename file found
$rv = check_dir_structure($ARGV[0]);
print "\n";
close(fpOutFile);
exit($rv);
# end
sub check_dir_structure
{
my($curr_dir) = @_;
my($foundFirstFile) = 2; # This var is also used as a return value:
# 0 - Found at least one long filename file
# 1 - Error locating GetShortPathName.exe
# 2 - No long filename file found
$save_cwd = cwd();
$save_cwd =~ s/\//\\/g;
if((-e "$curr_dir") && (-d "$curr_dir"))
{
$foundFirstFile = check_all_dir($curr_dir, $foundFirstFile);
chdir($save_cwd);
print " done!";
}
else
{
if(!(-e "$curr_dir"))
{
print "\n";
print "$curr_dir does not exist!";
}
elsif(!(-d "$curr_dir"))
{
print "\n";
print "$curr_dir is not a valid directory!";
}
}
# print out the closing brace for the last file written out.
if($foundFirstFile == 0)
{
# at least one file was found
# print the "];\n" for the previous file found.
print fpOutFile "];\n";
}
return($foundFirstFile);
}
sub check_all_dir
{
my($curr_dir, $foundFirstFile) = @_;
my(@dirlist);
my($file);
chdir("$curr_dir");
@dirlist = <*>;
foreach $file (@dirlist)
{
if(-d "$file")
{
print ".";
$foundFirstFile = check_all_dir($file, $foundFirstFile);
}
elsif(-e $file)
{
if(check_extension($file))
{
$short_filename = `$ENV{MOZ_TOOLS}\\bin\\GetShortPathName.exe $file`;
if(($?/256) == 1)
{
print "$ENV{MOZ_TOOLS}\\bin\\GetShortPathName.exe: $!\n";
exit(1);
}
if(!($file =~ /$short_filename/i))
{
if($foundFirstFile == 0)
{
# at least one file was found
# print the ",\n" for the previous file found.
print fpOutFile ",\n";
}
$curr_path = cwd();
# perl has problems dealing with '\\''s in split(), so we need to
# convert them to '/''s.
$curr_path =~ s/\\/\//g;
@relative_path = split(/$start_dir/,$curr_path);
if($relative_path[1] eq "")
{
print_file($file, $foundFirstFile);
}
else
{
print_file("$relative_path[1]/$file", $foundFirstFile);
}
$foundFirstFile = 0;
}
}
}
}
chdir("..");
return($foundFirstFile);
}
sub check_extension
{
my($file) = @_;
my($var);
@listExtension = ("dll",
"com",
"jar",
"exe");
@arrayExtension = split(/\./,$file);
$extension = @arrayExtension[$#arrayExtension];
foreach $var (@listExtension)
{
if($extension eq $var)
{
return(1);
}
}
return(0);
}
sub print_file
{
my($file, $foundFirstFile) = @_;
if($foundFirstFile)
{
# first file in list
print fpOutFile "// This list contains filenames that are long filenames ( > 8.3) critical during installation time.\n";
print fpOutFile "// This list is automatically generated during the build process.\n";
print fpOutFile "// The filenames should include paths relative to the Netscape 6 folder.\n";
print fpOutFile "// '/' must be used as path delimiters regardless of platform.\n";
print fpOutFile "var listLongFilePaths = [\"$file\"";
}
else
{
# middle file in list
print fpOutFile " \"$file\"";
}
}
sub print_usage
{
print "\n usage: $0 <dir> <outfile>\n";
print "\n dir - full path to look for files\n";
print " outfile - file to append to\n";
}

View File

@ -0,0 +1,748 @@
[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=$ProductName$User
Company Name=$CompanyName$
Product Name=$ProductName$
Product NameInternal=$ProductName$
User Agent=$UserAgent$
; Destination Path values:
; PROGRAMFILESDIR
; WINDISK
; WINDIR
; WINSYSDIR
Path=[PROGRAMFILESDIR]\$CompanyName$\$ProductName$\$XPInstallVersion$
; 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=$MainExeFile$
; 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=$ProductName$
Program Folder Path=[PROGRAMS]
Uninstall Filename=$UninstallFile$
; This key is used as a fail over key. This url will be used when the
; url in the Site Selector fails.
url=$ArchiveUrl$
; 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
; 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 $ProductName$. The following information will be sent back to us to help us improve the product: %s
; HKey: valid decryptable setup key is [Product CurrentVersion] or [Product PreviousVersion]
; Decrypt HKey: there are times when '[' and ']' are valid part of windows registry key names.
; Contains Filename: tells setup that the path contains filename needed to be removed before
; using it as a path.
; Verify Existence: FILE or PATH
;
[Locate Previous Product Path0]
HRoot=HKEY_LOCAL_MACHINE
HKey=[Product CurrentVersion]\Main
Name=Install Directory
Decrypt HKey=TRUE
Contains Filename=FALSE
Verify Existence=
[Dialog Welcome]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ Setup - Welcome
;*** LOCALIZE ME BABY ***
Message0=Welcome to %s Setup. You are about to install %s version $Version$.
;*** 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=$ProductName$ 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=$ProductName$ 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 GRE
C1=Component Uninstaller
[Dialog Select Components]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ 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=$ProductName$ Setup - Select Additional Components
;*** LOCALIZE ME BABY ***
Message0=Select or clear the additional components you want to install.
;*** DO NOT LOCALIZE - BEGIN ***
; do not localize this part because it is not currently being used
[Dialog Windows Integration]
Show Dialog=FALSE
Title=$ProductName$ Setup - Windows Integration
Message0=Check the options you would like Setup to perform.
Message1=These settings allow you to set default Internet preferences for browsing and searching. They affect browsers installed on your machine, including Mozilla, Netscape and Microsoft Internet Explorer.
; Only a maximum of 4 "Windows Integration-Item"s are allowded. Each Item
; shows up as a checkbox in the Windows Integration dialog.
[Windows Integration-Item0]
CheckBoxState=FALSE
Description=Make Mozilla my default Internet browser
Archive=
[Windows Integration-Item1]
CheckBoxState=FALSE
Description=Make Mozilla Netcenter my home page
Archive=
[Windows Integration-Item2]
CheckBoxState=FALSE
Description=Use Mozilla Netcenter to search the Web
Archive=
;*** DO NOT LOCALIZE - END ***
[Dialog Program Folder]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ 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=$ProductName$ 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=
; 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=$ProductName$ 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 Quick Launch]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ Setup - Quick Launch
;*** LOCALIZE ME BABY ***
Message0=Quick Launch starts Mozilla faster by keeping portions of the program in computer memory.
;*** LOCALIZE ME BABY ***
Message1=You can access Quick Launch through the icon on the Windows taskbar tray.
;*** LOCALIZE ME BABY ***
Message2=Check the box below to activate Quick Launch when you restart your computer.
; Turbo Mode (Quick Launch) values: TRUE, FALSE
; Defaults to FALSE if not set
Turbo Mode=FALSE
; Turbo Mode Settings value: TRUE, FALSE
; Defaults to FALSE if not set.
; This will hide the turbo mode checkbox in the Start Install dialog
; and ignore the Turbo Mode= key, thus disabling it.
Turbo Mode Enabled=TRUE
[Dialog Start Install]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ 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=$ProductName$ 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=MozillaMessageWindow
Window Name=
;*** LOCALIZE ME BABY ***
Message=Download of $ProductName$ was successful. $ProductNameNoVersion$ must be closed to proceed with installation. Click OK to exit $ProductNameNoVersion$ automatically and to begin installation.
;*** LOCALIZE ME BABY ***
Message Full Installer=$ProductNameNoVersion$ must be closed to proceed with installation. Click OK to exit $ProductNameNoVersion$ automatically and to begin installation.
; 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
;[Component XPCOM]
;Description Short=Mozilla XPCOM
;;*** LOCALIZE ME BABY ***
;Description Long=Install Engine
;Archive=xpcom.xpi
;$InstallSize$:xpcom
;$InstallSizeSystem$
;$InstallSizeArchive$:xpcom.xpi
;
;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.
;
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
$InstallSize$:gre
$InstallSizeSystem$
$InstallSizeArchive$:gre.xpi
Attributes=SELECTED
[Component Uninstaller]
Description Short=$CompanyName$ Uninstaller
;*** LOCALIZE ME BABY ***
Description Long=Uninstaller for $ProductName$
Archive=$UninstallFileZip$
$InstallSize$:$UninstallFileZip$
$InstallSizeSystem$
$InstallSizeArchive$:$UninstallFileZip$
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
$InstallSize$:xpcom
Cleanup=TRUE
;*** 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]\$UninstallFileZip$
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]\$UninstallFile$
Destination=[SETUP PATH]\Uninstall
Fail If Exists=FALSE
Do Not Uninstall=FALSE
[Copy File1]
Timing=post smartupdate
Source=[XPI PATH]\$UninstallFile$
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
[Windows Registry0]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\$ProductName$ ($UserAgentShort$)
Name=DisplayName
Name Value=Gecko Runtime Environment ($UserAgentShort$)
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=FALSE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
[Windows Registry1]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\$ProductName$ ($UserAgentShort$)
Name=UninstallString
;*** LOCALIZE ME BABY ***
Name Value=[WINDIR]\$UninstallFile$ /ua "$UserAgent$"
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post smartupdate
[Windows Registry2]
Root Key=HKEY_LOCAL_MACHINE
Key=[REGPATH]\$UserAgentShort$\AppList\[APP_ID]
Name=Name
;*** LOCALIZE ME BABY ***
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]\$UserAgentShort$\AppList\[APP_ID]
Name=PathToExe
;*** LOCALIZE ME BABY ***
Name Value=[PATH_TO_APP]
Type=REG_SZ
Decrypt Key=TRUE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post 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]\$MainExeFile$
;Arguments=-ProfileManager
;Working Dir=[SETUP PATH]
;Description=Profile Manager
;Icon Path=[SETUP PATH]\$MainExeFile$
;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 $ProductName$ 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 $ProductName$ 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]%s [options] can be any of the following combination:%s -h: This help.%s -a [path]: Alternate archive search path.%s -n [filename]: Setup's parent's process filename.%s -ma: Run setup in Auto mode.%s -ms: Run setup in Silent mode.%s -ira: Ignore the [RunAppX] sections%s -ispf: Ignore the [Program FolderX] sections that show%s the Start Menu shortcut folder at the end of installation.
;*** 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 $ProductName$, 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 $ProductName$.
[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=$ArchiveUrl$
Identifier1=Site1
;*** LOCALIZE ME BABY ***
Description1=North America
;*** LOCALIZE ME BABY ***
Domain1=$ArchiveUrl$

View File

@ -0,0 +1,19 @@
; NOTE to L10n: the .lnk strings are the names of the shortcuts created by
; each component listed as a section. If the shortcut names have been
;localized in their respective .jst file, then these must also be localized.
[browser]
ClientTypeName=StartMenuInternet
ClientProductKey=mozilla.exe
;*** LOCALIZE ME BABY ***
DesktopShortcut0=Mozilla.lnk
;*** LOCALIZE ME BABY ***
QuickLaunchBarShortcut0=Mozilla.lnk
[mail]
ClientTypeName=Mail
ClientProductKey=Mozilla
;*** LOCALIZE ME BABY ***
DesktopShortcut0=Mail.lnk
;*** LOCALIZE ME BABY ***
QuickLaunchBarShortcut0=Mail.lnk

View File

@ -0,0 +1,120 @@
[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
PROXYSETTINGS=Proxy Settings:
PROXYSETTINGS_=&Proxy Settings
SERVER=Server:
PORT=Port:
USERID=User id:
PASSWORD=Password:
SELECTDIRECTORY=Select a directory
DIRECTORIES_=&Directories:
DRIVES_=Dri&ves:
STATUS=Remaining:
FILE=File:
URL=URL:
TO=To Path:
ACCEPT_=&Accept
DECLINE_=&Decline
PROGRAMFOLDER_=&Program Folder:
EXISTINGFOLDERS_=E&xisting Folders:
SETUPMESSAGE=Setup has finished copying files to your computer. Before you can use the program, you must restart Windows or your computer. Choose one of the following options and click OK to finish setup.
YESRESTART=Yes, I want to restart my computer now.
NORESTART=No, I will restart my computer later.
ADDITIONALCOMPONENTS_=&Additional Components:
DESCRIPTION=Description
TOTALDOWNLOADSIZE=Total download size:
SPACEAVAILABLE=Space Available:
COMPONENTS_=C&omponents:
DESTINATIONDIRECTORY=Destination Directory
BROWSE_=B&rowse...
CURRENTSETTINGS=Current Settings:
INSTALL_=&Install
DELETE_=&Delete
README=Re&ad Me
PAUSE_=&Pause
RESUME_=&Resume
CHECKED=Checked
UNCHECKED=Unchecked
EXTRACTING=Extracting...
[Messages]
ERROR_DIALOG_CREATE=Could not create %s dialog.
ERROR_FAILED=%s failed.
ERROR_FILE_NOT_FOUND=File not found: %s
ERROR_GET_SYSTEM_DIRECTORY_FAILED=GetSystemDirectory() failed.
ERROR_GET_WINDOWS_DIRECTORY_FAILED =GetWindowsDirectory() failed.
DLGQUITTITLE=Exit Setup
DLGQUITMSG=Setup is not complete. If you quit the Setup program now, the program will not be installed. You may run the Setup program at a later time to complete the installation. Are you sure you want to cancel Setup?
DLG_REBOOT_TITLE=Restarting Windows
ERROR_GETPROCADDRESS=GetProcAddress() of %s failed.
ERROR_WRITEPRIVATEPROFILESTRING=WritePrivateProfileString() failed for file %s
MSG_RETRIEVE_CONFIGINI=Please wait while Setup is attempting to retrieve Config.ini, required by Setup, from the Web...
ERROR_CREATE_TEMP_DIR=Setup was unable to create the TEMP directory: %s
DLGBROWSETITLE=Select a directory
ERROR_DETERMINING_DISK_SPACE=Could not determine available disk space for: %s
DLG_DISK_SPACE_CHECK_TITLE=Disk space check
DLG_DISK_SPACE_CHECK_CRUTIAL_MSG=Setup has detected insufficient disk space to continue with installation on %s for the path: %sRequired: %sAvailable: %sClick Retry if more disk space has been made available, or click Cancel to cancel Setup.
DLG_DISK_SPACE_CHECK_MSG=Setup has detected insufficient disk space to continue with installation process on %s for the path: %sRequired: %sAvailable: %sClick OK to go back and choose a different destination path.
ERROR_CREATE_DIRECTORY=Could not create folder: %sMake sure you have access to create the folder.
STR_FILE_NUMBER=File count:
STR_FILENAME=Filename:
MSG_SMARTUPDATE_START=Preparing Install, please wait...
MSG_CONFIGURING=Configuring %s, please wait...
ERROR_XPI_INSTALL=Error occurred during installation
ERROR_SETUP_REQUIREMENT=Windows95 or greater Operating System is required! Exiting setup...
DLG_EXTRACTING_TITLE=Install Progress
STR_PROCESSINGFILE=Preparing file: %s
STR_INSTALLING=Currently installing %s
STR_COPYINGFILE=Copying file: %s
MB_WARNING_STR=Warning
MB_MESSAGE_STR=Message
MB_ATTENTION_STR=Attention
MSG_CREATE_DIRECTORY=The following directory does not exist:%sWould you like to create it?
STR_CREATE_DIRECTORY=Create Directory?
ERROR_PROGRAM_FOLDER_NAME=Invalid Program folder name entered.
CB_DEFAULT=Default
ERROR_DESTINATION_PATH=Invalid path entered.
STR_SETUP_TYPE=Setup Type:
STR_SELECTED_COMPONENTS=Selected Components:
STR_DESTINATION_DIRECTORY=Destination Directory:
STR_PROGRAM_FOLDER=Program Folder:
STR_DELETING_DESTINATION_DIR=Deleting destination directory to be able to upgrade, please wait...
STR_SETUP=Setup
STR_DOWNLOAD_SITE=Download Site:
STR_SAVE_INSTALLER_FILES=Save downloaded and Setup program files to:
MSG_INIT_SETUP=Initializing Setup, please wait...
STR_MESSAGEBOX_TITLE=%s Setup
ERROR_GETVERSION=GetVersionEx() failed!
STATUS_EXTRACTING=Extracting %s
STATUS_LAUNCHING_SETUP=Launching Setup...
ERROR_FILE_WRITE=Unable to write file %s
TITLE=Installation
ERROR_OUT_OF_MEMORY=Out of memory!
ERROR_DLL_LOAD=Could not load %s
ERROR_STRING_LOAD=Could not load string resource ID %d
ERROR_STRING_NULL=Null pointer encountered.
ERROR_GLOBALALLOC=Memory allocation error.

View File

@ -0,0 +1,689 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
#
# This perl script builds the xpi, config.ini, and js files.
#
use Cwd;
# Make sure MOZ_SRC is set.
if($ENV{MOZ_SRC} eq "")
{
print "Error: MOZ_SRC not set!";
exit(1);
}
# Make sure there are at least three arguments
if($#ARGV < 2)
{
PrintUsage();
}
require "$ENV{MOZ_SRC}\\mozilla\\config\\zipcfunc.pl";
$inDefaultVersion = $ARGV[0];
# $ARGV[0] has the form maj.min.release.bld where maj, min, release
# and bld are numerics representing version information.
# Other variables need to use parts of the version info also so we'll
# split out the dot seperated values into the array @versionParts
# such that:
#
# $versionParts[0] = maj
# $versionParts[1] = min
# $versionParts[2] = release
# $versionParts[3] = bld
@versionParts = split /\./, $inDefaultVersion;
# We allow non-numeric characters to be included as the last
# characters in fields of $ARG[0] for display purposes (mostly to
# show that we have moved past a certain version by adding a '+'
# character). Non-numerics must be stripped out of $inDefaultVersion,
# however, since this variable is used to identify the the product
# for comparison with other installations, so the values in each field
# must be numeric only:
$inDefaultVersion =~ s/[^0-9.][^.]*//g;
print "The raw version id is: $inDefaultVersion\n";
$inStagePath = $ARGV[1];
$inDistPath = $ARGV[2];
$inXpiURL = "";
$inRedirIniURL = "";
ParseArgv(@ARGV);
if($inXpiURL eq "")
{
# archive url not supplied, set it to default values
$inXpiURL = "ftp://not.supplied.com";
}
if($inRedirIniURL eq "")
{
# redirect url not supplied, set it to default value.
$inRedirIniURL = $inXpiURL;
}
$seiFileNameGeneric = "nsinstall.exe";
$seiFileNameSpecific = "gre-win32-installer.exe";
$seiStubRootName = "gre-win32-stub-installer";
$seiFileNameSpecificStub = "$seiStubRootName.exe";
$seuFileNameSpecific = "GREUninstall.exe";
$seuzFileNameSpecific = "greuninstall.zip";
# set environment vars for use by other .pl scripts called from this script.
if($versionParts[2] eq "0")
{
$versionMain = "$versionParts[0]\.$versionParts[1]";
}
else
{
$versionMain = "$versionParts[0]\.$versionParts[1]\.$versionParts[2]";
}
print "The display version is: $versionMain\n";
$ENV{WIZ_nameCompany} = "Mozilla";
$ENV{WIZ_nameProduct} = "GRE";
$ENV{WIZ_nameProductNoVersion} = "GRE";
$ENV{WIZ_fileMainExe} = "none.exe";
$ENV{WIZ_fileUninstall} = $seuFileNameSpecific;
$ENV{WIZ_fileUninstallZip} = $seuzFileNameSpecific;
# The following variables are for displaying version info in the
# the installer.
$ENV{WIZ_userAgent} = "$versionMain";
$ENV{WIZ_userAgentShort} = "$versionMain";
$ENV{WIZ_xpinstallVersion} = "$versionMain";
# Set the location of the local tmp stage directory
$gLocalTmpStage = $inStagePath;
# Check for existence of staging path
if(!(-d "$inStagePath"))
{
die "\n Invalid path: $inStagePath\n";
}
# List of components for to create xpi files from
@gComponentList = ("gre");
if(VerifyComponents()) # return value of 0 means no errors encountered
{
exit(1);
}
# Make sure inDistPath exists
if(!(-d "$inDistPath"))
{
mkdir ("$inDistPath",0775);
}
if(-d "$inDistPath\\xpi")
{
unlink <$inDistPath\\xpi\\*>;
}
else
{
mkdir ("$inDistPath\\xpi",0775);
}
if(-d "$inDistPath\\uninstall")
{
unlink <$inDistPath\\uninstall\\*>;
}
else
{
mkdir ("$inDistPath\\uninstall",0775);
}
if(-d "$inDistPath\\setup")
{
unlink <$inDistPath\\setup\\*>;
}
else
{
mkdir ("$inDistPath\\setup",0775);
}
if(MakeXpiFile())
{
exit(1);
}
# Grab xpcom from mozilla build
if(system("copy $inDistPath\\..\\install\\xpi\\xpcom.xpi $inDistPath"))
{
die "\n Error: copy $inDistPath\\..\\install\\xpi\\xpcom.xpi $inDistPath\n";
}
if(system("copy $inDistPath\\..\\install\\xpi\\xpcom.xpi $inDistPath\\xpi"))
{
die "\n Error: copy $inDistPath\\..\\install\\xpi\\xpcom.xpi $inDistPath\\xpi\n";
}
if(MakeUninstall())
{
exit(1);
}
print "Before config";
if(MakeConfigFile())
{
exit(1);
}
# Copy the setup files to the dist setup directory.
if(system("copy install.ini $inDistPath"))
{
die "\n Error: copy install.ini $inDistPath\n";
}
#Get setup.exe from mozilla install
if(system("copy $inDistPath\\..\\install\\setup.exe $inDistPath"))
{
die "\n Error: copy $inDistPath\\..\\install\\setup.exe $inDistPath\n";
}
# Get resource file from mozilla install
if(system("copy $inDistPath\\..\\install\\setuprsc.dll $inDistPath"))
{
die "\n Error: copy $inDistPath\\..\\install\\setuprsc.dll $inDistPath\n";
}
if(system("copy install.ini $inDistPath\\setup"))
{
die "\n Error: copy install.ini $inDistPath\\setup\n";
}
if(system("copy config.ini $inDistPath"))
{
die "\n Error: copy config.ini $inDistPath\n";
}
if(system("copy config.ini $inDistPath\\setup"))
{
die "\n Error: copy config.ini $inDistPath\\setup\n";
}
if(system("copy $inDistPath\\setup.exe $inDistPath\\setup"))
{
die "\n Error: copy $inDistPath\\setup.exe $inDistPath\\setup\n";
}
if(system("copy $inDistPath\\setuprsc.dll $inDistPath\\setup"))
{
die "\n Error: copy $inDistPath\\setuprsc.dll $inDistPath\\setup\n";
}
# copy license file for the installer
if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt"))
{
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt\n";
}
if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt"))
{
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt\n";
}
# create the self extracting stub installer
print "\n**************************************************************\n";
print "* *\n";
print "* creating Self Extracting Executable Stub Install file... *\n";
print "* *\n";
print "**************************************************************\n";
# build the self-extracting .exe (installer) file.
print "\nbuilding self-extracting stub installer ($seiFileNameSpecificStub)...\n";
print "copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecificStub\n";
if(system("copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecificStub"))
{
die "\n Error: copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecificStub\n";
}
if(system("$inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seiFileNameSpecificStub $inDistPath\\setup\\*.*"))
{
die "\n Error: inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seiFileNameSpecificStub $inDistPath\\setup\\*.*\n";
}
# copy the lean installer to stub\ dir
print "\n****************************\n";
print "* *\n";
print "* copying Stub files... *\n";
print "* *\n";
print "****************************\n";
if(-d "$inDistPath\\stub")
{
unlink <$inDistPath\\stub\\*>;
}
else
{
mkdir ("$inDistPath\\stub",0775);
}
if(system("copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\stub"))
{
die "\n Error: copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\stub\n";
}
# create the big self extracting .exe installer
print "\n**************************************************************\n";
print "* *\n";
print "* creating Self Extracting Executable Full Install file... *\n";
print "* *\n";
print "**************************************************************\n";
if(-d "$inDistPath\\sea")
{
unlink <$inDistPath\\sea\\*>;
}
else
{
mkdir ("$inDistPath\\sea",0775);
}
if(system("copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecific"))
{
die "\n Error: copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecific\n";
}
if(system("$inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seiFileNameSpecific $inDistPath\\setup\\*.* $inDistPath\\xpi\\*.*"))
{
die "\n Error: $inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seiFileNameSpecific $inDistPath\\setup\\*.* $inDistPath\\xpi\\*.*\n";
}
if(system("copy $inDistPath\\$seiFileNameSpecific $inDistPath\\sea"))
{
die "\n Error: copy $inDistPath\\$seiFileNameSpecific $inDistPath\\sea\n";
}
unlink <$inDistPath\\$seiFileNameSpecificStub>;
print " done!\n\n";
exit(0);
# create the xpi for launching the stub installer
print "\n**********************************\n";
print "* *\n";
print "* creating stub installer xpi... *\n";
print "* *\n";
print "************************************\n";
if(-d "$inStagePath\\$seiStubRootName")
{
unlink <$inStagePath\\$seiStubRootName\\*>;
}
else
{
mkdir ("$inStagePath\\$seiStubRootName",0775);
}
if(system("copy $inDistPath\\stub\\$seiFileNameSpecificStub $gLocalTmpStage\\$seiStubRootName"))
{
die "\n Error: copy $inDistPath\\stub\\$seiFileNameSpecificStub $gLocalTmpStage\\$seiStubRootName\n";
}
# Make .js files
if(MakeJsFile($seiStubRootName))
{
return(1);
}
# Make .xpi file
if(system("perl makexpi.pl $seiStubRootName $gLocalTmpStage $inDistPath"))
{
print "\n Error: perl makexpi.pl $seiStubRootName $gLocalTmpStage $inDistPath\n";
return(1);
}
# group files for CD
print "\n************************************\n";
print "* *\n";
print "* creating Compact Disk files... *\n";
print "* *\n";
print "************************************\n";
if(-d "$inDistPath\\cd")
{
unlink <$inDistPath\\cd\\*>;
}
else
{
mkdir ("$inDistPath\\cd",0775);
}
if(system("copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\cd"))
{
die "\n Error: copy $inDistPath\\$seiFileNameSpecificStub $inDistPath\\cd\n";
}
if(system("copy $inDistPath\\xpi $inDistPath\\cd"))
{
die "\n Error: copy $inDistPath\\xpi $inDistPath\\cd\n";
}
if((!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll")) ||
(!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll")))
{
print "***\n";
print "**\n";
print "** The following required Microsoft redistributable system files were not found\n";
print "** in $ENV{MOZ_SRC}\\redist\\microsoft\\system:\n";
print "**\n";
if(!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll"))
{
print "** msvcrt.dll\n";
}
if(!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll"))
{
print "** msvcirt.dll\n";
}
print "**\n";
print "** The above files are required by the installer and the browser. If you attempt\n";
print "** to run the installer, you may encounter the following bug:\n";
print "**\n";
print "** http://bugzilla.mozilla.org/show_bug.cgi?id=27601\n";
print "**\n";
print "***\n\n";
}
# end of script
exit(0);
sub MakeExeZip
{
my($aSrcDir, $aExeFile, $aZipFile) = @_;
my($saveCwdir);
$saveCwdir = cwd();
chdir($aSrcDir);
if(system("zip $inDistPath\\xpi\\$aZipFile $aExeFile"))
{
chdir($saveCwdir);
die "\n Error: zip $inDistPath\\xpi\\$aZipFile $aExeFile";
}
chdir($saveCwdir);
}
sub PrintUsage
{
die "usage: $0 <default version> <staging path> <dist install path> [options]
default version : y2k compliant based date version.
ie: 5.0.0.2000040413
staging path : full path to where the components are staged at
dist install path : full path to where the dist install dir is at.
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install
options include:
-aurl <archive url> : either ftp:// or http:// url to where the
archives (.xpi, .exe, .zip, etc...) reside
-rurl <redirect.ini url> : either ftp:// or http:// url to where the
redirec.ini resides. If not supplied, it
will be assumed to be the same as archive
url.
\n";
}
sub ParseArgv
{
my(@myArgv) = @_;
my($counter);
# The first 3 arguments are required, so start on the 4th.
for($counter = 3; $counter <= $#myArgv; $counter++)
{
if($myArgv[$counter] =~ /^[-,\/]h$/i)
{
PrintUsage();
}
elsif($myArgv[$counter] =~ /^[-,\/]aurl$/i)
{
if($#myArgv >= ($counter + 1))
{
++$counter;
$inXpiURL = $myArgv[$counter];
$inRedirIniURL = $inXpiURL;
}
}
elsif($myArgv[$counter] =~ /^[-,\/]rurl$/i)
{
if($#myArgv >= ($counter + 1))
{
++$counter;
$inRedirIniURL = $myArgv[$counter];
}
}
}
}
sub MakeConfigFile
{
# Make config.ini file
if(system("perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
{
print "\n Error: perl makecfgini.pl config.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
return(1);
}
# Make install.ini file
if(system("perl makecfgini.pl install.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL"))
{
print "\n Error: perl makecfgini.pl install.it $inDefaultVersion $gLocalTmpStage $inDistPath\\xpi $inRedirIniURL $inXpiURL\n";
return(1);
}
return(0);
}
sub MakeUninstall
{
if(MakeUninstallIniFile())
{
return(1);
}
# Copy the uninstall files to the dist uninstall directory.
if(system("copy uninstall.ini $inDistPath"))
{
print "\n Error: copy uninstall.ini $inDistPath\n";
return(1);
}
if(system("copy uninstall.ini $inDistPath\\uninstall"))
{
print "\n Error: copy uninstall.ini $inDistPath\\uninstall\n";
return(1);
}
if(system("copy defaults_info.ini $inDistPath"))
{
print "\n Error: copy defaults_info.ini $inDistPath\n";
return(1);
}
if(system("copy defaults_info.ini $inDistPath\\uninstall"))
{
print "\n Error: copy defaults_info.ini $inDistPath\\uninstall\n";
return(1);
}
# Get uninstaller from mozilla install
if(system("copy $inDistPath\\..\\install\\uninstall.exe $inDistPath"))
{
die "\n Error: copy $inDistPath\\..\\install\\uninstall.exe $inDistPath\n";
}
if(system("copy $inDistPath\\uninstall.exe $inDistPath\\uninstall"))
{
print "\n Error: copy $inDistPath\\uninstall.exe $inDistPath\\uninstall\n";
return(1);
}
# build the self-extracting .exe (uninstaller) file.
print "\nbuilding self-extracting uninstaller ($seuFileNameSpecific)...\n";
if(system("copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific"))
{
print "\n Error: copy $inDistPath\\..\\install\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific\n";
return(1);
}
if(system("$inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*"))
{
print "\n Error: $inDistPath\\..\\install\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*\n";
return(1);
}
MakeExeZip($inDistPath, $seuFileNameSpecific, $seuzFileNameSpecific);
unlink <$inDistPath\\$seuFileNameSpecific>;
return(0);
}
sub MakeUninstallIniFile
{
# Make config.ini file
if(system("perl makeuninstallini.pl uninstall.it $inDefaultVersion"))
{
print "\n Error: perl makeuninstallini.pl uninstall.it $inDefaultVersion\n";
return(1);
}
return(0);
}
sub MakeJsFile
{
my($mComponent) = @_;
# Make .js file
if(system("perl makejs.pl $mComponent.jst $inDefaultVersion $gLocalTmpStage\\$mComponent"))
{
print "\n Error: perl makejs.pl $mComponent.jst $inDefaultVersion $gLocalTmpStage\\$mComponent\n";
return(1);
}
return(0);
}
sub MakeXpiFile
{
my($mComponent);
foreach $mComponent (@gComponentList)
{
# Make .js files
if(MakeJsFile($mComponent))
{
return(1);
}
# Make .xpi file
if(system("perl makexpi.pl $mComponent $gLocalTmpStage $inDistPath\\xpi"))
{
print "\n Error: perl makexpi.pl $mComponent $gLocalTmpStage $inDistPath\\xpi\n";
return(1);
}
# Put a copy of the xpi with he installer itself
if(system("copy $inDistPath\\xpi\\$mComponent.xpi $inDistPath"))
{
die "\n Error: copy $inDistPath\\xpi\\$mComponent.xpi $inDistPath\n";
}
}
return(0);
}
sub RemoveLocalTmpStage()
{
# Remove tmpstage area
if(-d "$gLocalTmpStage")
{
system("perl rdir.pl $gLocalTmpStage");
}
return(0);
}
sub CreateTmpStage()
{
my($mComponent);
# Remove previous tmpstage area if one was left around
if(-d "$gLocalTmpStage")
{
system("perl rdir.pl $gLocalTmpStage");
}
print "\n Creating the local TmpStage directory:\n";
print " $gLocalTmpStage\n";
# Copy the component's staging dir locally so that the chrome packages, locales, and skins dirs can be
# removed prior to creating the .xpi file.
mkdir("$gLocalTmpStage", 775);
foreach $mComponent (@gComponentList)
{
print "\n Copying $mComponent:\n";
print " From: $inStagePath\\$mComponent\n";
print " To: $gLocalTmpStage\\$mComponent\n\n";
mkdir("$gLocalTmpStage\\$mComponent", 775);
# If it's not talkback then copy the component over to the local tmp stage.
# If it is, then skip the copy because there will be nothing at the source.
# Talkback is a dummy place holder .xpi right now. Mozilla release team
# replaces this place holder .xpi with a real talkback when delivering the
# build to mozilla.org.
if(!($mComponent =~ /talkback/i))
{
if(system("xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\"))
{
print "\n Error: xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\\n";
return(1);
}
}
if(-d "$gLocalTmpStage\\$mComponent\\bin\\chrome")
{
# Make chrome archive files
if(&ZipChrome("win32", "noupdate", "$gLocalTmpStage\\$mComponent\\bin\\chrome", "$gLocalTmpStage\\$mComponent\\bin\\chrome"))
{
return(1);
}
# Remove the locales, packages, and skins dirs if they exist.
my @dirs = <$gLocalTmpStage\\$mComponent\\bin\\chrome\\*>;
foreach $d (@dirs) {
if(-d "$d")
{
system("perl rdir.pl $d");
}
}
}
}
return(0);
}
sub VerifyComponents()
{
my($mComponent);
my($mError) = 0;
print "\n Verifying existence of required components...\n";
foreach $mComponent (@gComponentList)
{
if($mComponent =~ /talkback/i)
{
print " place holder: $inStagePath\\$mComponent\n";
mkdir("$inStagePath\\$mComponent", 775);
}
elsif(-d "$inStagePath\\$mComponent")
{
print " ok: $inStagePath\\$mComponent\n";
}
else
{
print " Error: $inStagePath\\$mComponent does not exist!\n";
$mError = 1;
}
}
return($mError);
}

View File

@ -0,0 +1,315 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
#
# This perl script parses the input file for special variables
# in the format of $Variable$ and replace it with the appropriate
# value(s).
#
# Input: .it file
# - which is a .ini template
#
# version
# - version to display on the blue background
#
# Path to staging area
# - path on where the seamonkey built bits are staged to
#
# xpi path
# - path on where xpi files will be located at
#
# redirect file url
# - url to where the redirect.ini file will be staged at.
# Either ftp:// or http:// can be used
# ie: ftp://ftp.netscape.com/pub/seamonkey
#
# xpi url
# - url to where the .xpi files will be staged at.
# Either ftp:// or http:// can be used
# ie: ftp://ftp.netscape.com/pub/seamonkey/xpi
#
# ie: perl makecfgini.pl config.it 5.0.0.1999120608 k:\windows\32bit\5.0 d:\builds\mozilla\dist\win32_o.obj\install\xpi ftp://ftp.netscape.com/pub/seamonkey/windows/32bit/x86/1999-09-13-10-M10 ftp://ftp.netscape.com/pub/seamonkey/windows/32bit/x86/1999-09-13-10-M10/xpi
#
#
# Make sure there are at least two arguments
if($#ARGV < 5)
{
die "usage: $0 <.it file> <version> <staging path> <.xpi path> <redirect file url> <xpi url>
.it file : input ini template file
version : version to be shown in setup. Typically the same version
as show in mozilla.exe.
staging path : path to where the components are staged at
.xpi path : path to where the .xpi files have been built to
ie: d:\\builds\\mozilla\\dist\\win32_o.obj\\install\\xpi
redirect file : url to where the redirect.ini file will be staged at.
xpi url : url to where the .xpi files will be staged at.
Either ftp:// or http:// can be used
ie: ftp://ftp.netscape.com/pub/seamonkey/xpi
\n";
}
$inItFile = $ARGV[0];
$inVersion = $ARGV[1];
$inStagePath = $ARGV[2];
$inXpiPath = $ARGV[3];
$inRedirIniUrl = $ARGV[4];
$inUrl = $ARGV[5];
# get environment vars
$userAgent = $ENV{WIZ_userAgent};
$userAgentShort = $ENV{WIZ_userAgentShort};
$xpinstallVersion = $ENV{WIZ_xpinstallVersion};
$nameCompany = $ENV{WIZ_nameCompany};
$nameProduct = $ENV{WIZ_nameProduct};
$nameProductNoVersion = $ENV{WIZ_nameProductNoVersion};
$fileMainExe = $ENV{WIZ_fileMainExe};
$fileUninstall = $ENV{WIZ_fileUninstall};
$fileUninstallZip = $ENV{WIZ_fileUninstallZip};
$inDomain;
$inRedirDomain;
$inServerPath;
$inRedirServerPath;
($inDomain, $inServerPath) = ParseDomainAndPath($inUrl);
($inRedirDomain, $inRedirServerPath) = ParseDomainAndPath($inRedirIniUrl);
# Get the name of the file replacing the .it extension with a .ini extension
@inItFileSplit = split(/\./,$inItFile);
$outIniFile = $inItFileSplit[0];
$outIniFile .= ".ini";
# Open the input file
open(fpInIt, $inItFile) || die "\ncould not open $ARGV[0]: $!\n";
# Open the output file
open(fpOutIni, ">$outIniFile") || die "\nCould not open $outIniFile: $!\n";
print "\n Making $outIniFile...\n";
# While loop to read each line from input file
while($line = <fpInIt>)
{
# For each line read, search and replace $InstallSize$ with the calculated size
if($line =~ /\$InstallSize\$/i)
{
$installSize = 0;
$installSizeSystem = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $line);
if($#colonSplit >= 0)
{
$componentName = $colonSplit[1];
chop($componentName);
if($componentName =~ /\$UninstallFileZip\$/i)
{
$installSize = OutputInstallSizeArchive("$inXpiPath\\$fileUninstallZip") * 2;
}
else
{
$installSize = OutputInstallSize("$inStagePath\\$componentName");
# special oji consideration here. Since it's an installer that
# seamonkey installer will be calling, the disk space allocation
# needs to be adjusted by an expansion factor of 3.62.
if($componentName =~ /oji/i)
{
$installSize = int($installSize * 3.62);
}
}
}
# Read the next line to calculate for the "Install Size System="
if($line = <fpInIt>)
{
if($line =~ /\$InstallSizeSystem\$/i)
{
$installSizeSystem = OutputInstallSizeSystem($line, "$inStagePath\\$componentName");
}
}
$installSize -= $installSizeSystem;
print fpOutIni "Install Size=$installSize\n";
print fpOutIni "Install Size System=$installSizeSystem\n";
}
elsif($line =~ /\$InstallSizeArchive\$/i)
{
$installSizeArchive = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $line);
if($#colonSplit >= 0)
{
$componentName = $colonSplit[1];
chop($componentName);
$componentName =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath\\$componentName");
}
print fpOutIni "Install Size Archive=$installSizeArchive\n";
}
else
{
# For each line read, search and replace $Version$ with the version passed in
$line =~ s/\$Version\$/$inVersion/gi;
$line =~ s/\$Domain\$/$inDomain/gi;
$line =~ s/\$ServerPath\$/$inServerPath/gi;
$line =~ s/\$RedirIniUrl\$/$inRedirIniUrl/gi;
$line =~ s/\$ArchiveServerPath\$/$inServerPath/gi;
$line =~ s/\$ArchiveUrl\$/$inUrl/gi;
$line =~ s/\$RedirectServerPath\$/$inRedirServerPath/gi;
$line =~ s/\$RedirectUrl\$/$inRedirUrl/gi;
$line =~ s/\$UserAgent\$/$userAgent/gi;
$line =~ s/\$UserAgentShort\$/$userAgentShort/gi;
$line =~ s/\$XPInstallVersion\$/$xpinstallVersion/gi;
$line =~ s/\$CompanyName\$/$nameCompany/gi;
$line =~ s/\$ProductName\$/$nameProduct/gi;
$line =~ s/\$ProductNameNoVersion\$/$nameProductNoVersion/gi;
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
$line =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
print fpOutIni $line;
}
}
print " done!\n";
# end of script
exit(0);
sub ParseDomainAndPath()
{
my($aUrl) = @_;
my($aDomain, $aServerPath);
@slashSplit = split(/\//, $aUrl);
if($#slashSplit >= 0)
{
for($i = 0; $i <= $#slashSplit; $i++)
{
if($i <= 2)
{
if($aDomain eq "")
{
$aDomain = "$slashSplit[$i]";
}
else
{
$aDomain = "$aDomain/$slashSplit[$i]";
}
}
else
{
if($aServerPath eq "")
{
$aServerPath = "/$slashSplit[$i]";
}
else
{
$aServerPath = "$aServerPath/$slashSplit[$i]";
}
}
}
}
return($aDomain, $aServerPath);
}
sub OutputInstallSize()
{
my($inPath) = @_;
my($installSize);
print " calculating size for $inPath\n";
$installSize = `$ENV{MOZ_TOOLS}\\bin\\ds32.exe /D /L0 /A /S /C 32768 $inPath`;
$installSize += 32768; # take into account install.js
$installSize = int($installSize / 1024);
$installSize += 1;
return($installSize);
}
sub OutputInstallSizeArchive()
{
my($inPath) = @_;
my($installSizeArchive);
my($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks);
print " calculating size for $inPath\n";
($dev, $ino, $mode, $nlink, $uid, $gui, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat $inPath;
$installSizeArchive += 32768; # take into account install.js
$installSizeArchive = int($size / 1024);
$installSizeArchive += 1;
return($installSizeArchive);
}
sub OutputInstallSizeSystem()
{
my($inLine, $inPath) = @_;
my($installSizeSystem) = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $inLine);
if($#colonSplit >= 0)
{
# split line by "," deliminator
@commaSplit = split(/\,/, $colonSplit[1]);
if($#commaSplit >= 0)
{
foreach(@commaSplit)
{
# calculate the size of component installed using ds32.exe in Kbytes
print " calculating size for $inPath\\$_";
$installSizeSystem += `$ENV{MOZ_TOOLS}\\bin\\ds32.exe /D /L0 /A /S /C 32768 $inPath\\$_`;
}
}
}
$installSizeSystem = int($installSizeSystem / 1024);
$installSizeSystem += 1;
return($installSizeSystem);
}
sub ParseUserAgentShort()
{
my($aUserAgent) = @_;
my($aUserAgentShort);
@spaceSplit = split(/ /, $aUserAgent);
if($#spaceSplit >= 0)
{
$aUserAgentShort = $spaceSplit[0];
}
return($aUserAgentShort);
}

View File

@ -0,0 +1,152 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
#
# This perl script parses the input file for special variables
# in the format of $Variable$ and replace it with the appropriate
# value(s).
#
# Input: .jst file - which is a .js template
# default version - a date in the form of:
# major.minor.release.yyyymmdyhr
# ie: 5.0.0.1999120910
# component staging path - path to where the components are staged at
#
# ie: perl makejs.pl xpcom.jst 5.0.0.99256
#
# Make sure there are at least two arguments
if($#ARGV < 2)
{
die "usage: $0 <.jst file> <default version> <staging path>
.jst file : .js template input file
default version : default julian base version number to use in the
form of: major.minor.release.yydoy
ie: 5.0.0.99256
component staging path : path to where this component is staged at
ie: z:\\stage\\windows\\32bit\\en\\5.0\\xpcom
\n";
}
$inJstFile = $ARGV[0];
$inVersion = $ARGV[1];
$inStagePath = $ARGV[2];
# get environment vars
$userAgent = $ENV{WIZ_userAgent};
$userAgentShort = $ENV{WIZ_userAgentShort};
$xpinstallVersion = $ENV{WIZ_xpinstallVersion};
$nameCompany = $ENV{WIZ_nameCompany};
$nameProduct = $ENV{WIZ_nameProduct};
$nameProductNoVersion = $ENV{WIZ_nameProductNoVersion};
$fileMainExe = $ENV{WIZ_fileMainExe};
$fileUninstall = $ENV{WIZ_fileUninstall};
# Get the name of the file replacing the .jst extension with a .js extension
@inJstFileSplit = split(/\./,$inJstFile);
$outJsFile = $inJstFileSplit[0];
$outJsFile .= ".js";
$outTempFile = $inJstFileSplit[0];
$outTempFile .= ".template";
$foundLongFiles = 0;
print "copy \"$ENV{MOZ_SRC}\\mozilla\\xpinstall\\packager\\common\\share.t\" $outTempFile\n";
system("copy \"$ENV{MOZ_SRC}\\mozilla\\xpinstall\\packager\\common\\share.t\" $outTempFile");
system("type $inJstFile >> $outTempFile");
# Open the input .template file
open(fpInTemplate, $outTempFile) || die "\ncould not open $outTempFile: $!\n";
# Open the output .js file
open(fpOutJs, ">$outJsFile") || die "\nCould not open $outJsFile: $!\n";
# While loop to read each line from input file
while($line = <fpInTemplate>)
{
if($line =~ /\$SpaceRequired\$/i) # For each line read, search and replace $SpaceRequired$ with the calculated size
{
$spaceRequired = 0;
# split read line by ":" deliminator
@colonSplit = split(/:/, $line);
if($#colonSplit > 0)
{
@semiColonSplit = split(/;/, $colonSplit[1]);
$subDir = $semiColonSplit[0];
$spaceRequired = GetSpaceRequired("$inStagePath\\$subDir");
$line =~ s/\$SpaceRequired\$:$subDir/$spaceRequired/i;
}
else
{
$spaceRequired = GetSpaceRequired("$inStagePath");
$line =~ s/\$SpaceRequired\$/$spaceRequired/i;
}
}
else
{
$line =~ s/\$Version\$/$inVersion/i;
$line =~ s/\$UserAgent\$/$userAgent/i;
$line =~ s/\$UserAgentShort\$/$userAgentShort/i;
$line =~ s/\$XPInstallVersion\$/$xpinstallVersion/i;
$line =~ s/\$CompanyName\$/$nameCompany/i;
$line =~ s/\$ProductName\$/$nameProduct/i;
$line =~ s/\$ProductNameNoVersion\$/$nameProductNoVersion/i;
$line =~ s/\$MainExeFile\$/$fileMainExe/i;
$line =~ s/\$UninstallFile\$/$fileUninstall/i;
}
print fpOutJs $line;
}
close(fpInTemplate);
close(fpOutJs);
exit(0);
sub GetSpaceRequired()
{
my($inPath) = @_;
my($spaceRequired);
print " calculating size for $inPath\n";
$spaceRequired = `\"$ENV{MOZ_TOOLS}\\bin\\ds32.exe\" /D /L0 /A /S /C 32768 $inPath`;
$spaceRequired = int($spaceRequired / 1024);
$spaceRequired += 1;
return($spaceRequired);
}
sub ParseUserAgentShort()
{
my($aUserAgent) = @_;
my($aUserAgentShort);
@spaceSplit = split(/ /, $aUserAgent);
if($#spaceSplit >= 0)
{
$aUserAgentShort = $spaceSplit[0];
}
return($aUserAgentShort);
}

View File

@ -0,0 +1,113 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
#
# This perl script parses the input file for special variables
# in the format of $Variable$ and replace it with the appropriate
# value(s).
#
# Input: .it file
# - which is a .ini template
#
# version
# - version to display on the blue background
#
# ie: perl makeuninstallini.pl uninstall.it 6.0.0.1999120608
#
#
if($#ARGV < 1)
{
die "usage: $0 <.it file> <version>
.it file : input ini template file
version : version to be shown in setup. Typically the same version
as show in mozilla.exe. This version string will be shown
on the title of the main dialog.
ie: perl makeuninstallini.pl uninstall.it 6.0.0.1999120608
or perl makeuninstallini.pl uninstall.it 6.0b2
\n";
}
$inItFile = $ARGV[0];
$inVersion = $ARGV[1];
# get environment vars
$userAgent = $ENV{WIZ_userAgent};
$userAgentShort = $ENV{WIZ_userAgentShort};
$xpinstallVersion = $ENV{WIZ_xpinstallVersion};
$nameCompany = $ENV{WIZ_nameCompany};
$nameProduct = $ENV{WIZ_nameProduct};
$fileMainExe = $ENV{WIZ_fileMainExe};
$fileUninstall = $ENV{WIZ_fileUninstall};
# Get the name of the file replacing the .it extension with a .ini extension
@inItFileSplit = split(/\./,$inItFile);
$outIniFile = $inItFileSplit[0];
$outIniFile .= ".ini";
# Open the input file
open(fpInIt, $inItFile) || die "\ncould not open $ARGV[0]: $!\n";
# Open the output file
open(fpOutIni, ">$outIniFile") || die "\nCould not open $outIniFile: $!\n";
print "\n Making $outIniFile...\n";
# While loop to read each line from input file
while($line = <fpInIt>)
{
# For each line read, search and replace $Version$ with the version passed in
$line =~ s/\$Version\$/$inVersion/gi;
$line =~ s/\$UserAgent\$/$userAgent/gi;
$line =~ s/\$UserAgentShort\$/$userAgentShort/gi;
$line =~ s/\$XPInstallVersion\$/$xpinstallVersion/gi;
$line =~ s/\$CompanyName\$/$nameCompany/gi;
$line =~ s/\$ProductName\$/$nameProduct/gi;
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
print fpOutIni $line;
}
print " done!\n";
# end of script
exit(0);
sub ParseUserAgentShort()
{
my($aUserAgent) = @_;
my($aUserAgentShort);
@spaceSplit = split(/ /, $aUserAgent);
if($#spaceSplit >= 0)
{
$aUserAgentShort = $spaceSplit[0];
}
return($aUserAgentShort);
}

View File

@ -0,0 +1,135 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
#
# This perl script creates .xpi files given component input name
#
# Input: component name
# - name of the component directory located in the staging path
# staging path
# - path to where the built files are staged at
# dest path
# - path to where the .xpi files are are to be created at.
# ** MUST BE AN ABSOLUTE PATH, NOT A RELATIVE PATH **
#
# ie: perl makexpi.pl xpcom z:\exposed\windows\32bit\en\5.0 d:\build\mozilla\dist\win32_o.obj\install\working
#
use File::Copy;
use Cwd;
# Make sure there are at least three arguments
if($#ARGV < 2)
{
die "usage: $0 <component name> <staging path> <dest path>
component name : name of component directory within staging path
staging path : path to where the components are staged at
dest path : path to where the .xpi files are to be created at
\n";
}
$inComponentName = $ARGV[0];
$inStagePath = $ARGV[1];
$inDestPath = $ARGV[2];
$inStagePath =~ s/\//\\/g;
$inDestPath =~ s/\//\\/g;
# check for existance of staging component path
if(!(-e "$inStagePath\\$inComponentName"))
{
die "invalid path: $inStagePath\\$inComponentName\n";
}
if($inComponentName =~ /xpcom/i)
{
# copy msvcrt.dll to xpcom dir
if(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll")
{
system("copy $ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll $inStagePath\\$inComponentName");
}
# copy msvcirt.dll to xpcom dir
if(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll")
{
system("copy $ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcirt.dll $inStagePath\\$inComponentName");
}
}
# check for existance of .js script
if(!(-e "$inComponentName.js"))
{
die "missing .js script: $inComponentName.js\n";
}
# delete component .xpi file
if(-e "$inDestPath\\$inComponentName.xpi")
{
unlink("$inDestPath\\$inComponentName.xpi");
}
if(-e "$inStagePath\\$inComponentName\\$inComponentName.xpi")
{
unlink("$inDestPath\\$inComponentName.xpi");
}
# delete install.js
if(-e "install.js")
{
unlink("install.js");
}
# make sure inDestPath exists
if(!(-d "$inDestPath"))
{
system("mkdir $inDestPath");
}
print "\n Making $inComponentName.xpi...\n";
$saveCwdir = cwd();
copy("$inComponentName.js", "$inStagePath\\$inComponentName\\install.js");
# change directory to where the files are, else zip will store
# unwanted path information.
chdir("$inStagePath\\$inComponentName");
if(system("zip -r $inDestPath\\$inComponentName.xpi *"))
{
chdir("$saveCwdir");
die "\n Error: zip -r $inDestPath\\$inComponentName.xpi *\n";
}
chdir("$saveCwdir");
# delete install.js
if(-e "install.js")
{
unlink("install.js");
}
print "\n $inComponentName.xpi done!\n";
# end of script
exit(0);

View File

@ -0,0 +1,152 @@
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 + "\\$UserAgent$";
err = winreg.setValueString(subkey, "Version", "1.0");
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 + "\\$UserAgent$","");
}
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;
err = winreg.setValueString(regRootKey, "CurrentVersion", "$UserAgent$");
winreg.createKey(regRootKey + "\\$UserAgent$", "");
subkey = regRootKey + "\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
subkey = regRootKey + "\\$UserAgent$\\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);
// 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,111 @@
#!c:\perl\bin\perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
use Cwd;
if($#ARGV < 0)
{
print_usage();
exit(1);
}
print "removing directory:\n";
for($i = 0; $i <= $#ARGV; $i++)
{
print " $ARGV[$i]";
remove_dir_structure($ARGV[$i]);
print "\n";
}
exit(0);
# end
sub remove_dir_structure
{
my($curr_dir) = @_;
$save_cwd = cwd();
$save_cwd =~ s/\//\\/g;
if((-e "$curr_dir") && (-d "$curr_dir"))
{
remove_all_dir($curr_dir);
chdir($save_cwd);
remove_directory($curr_dir);
print " done!";
}
else
{
if(!(-e "$curr_dir"))
{
print "\n";
print "$curr_dir does not exist!";
}
elsif(!(-d "$curr_dir"))
{
print "\n";
print "$curr_dir is not a valid directory!";
}
}
}
sub remove_all_dir
{
my($curr_dir) = @_;
my(@dirlist);
my($dir);
chdir("$curr_dir");
@dirlist = <*>;
foreach $dir (@dirlist)
{
if(-d "$dir")
{
print ".";
remove_all_dir($dir);
}
}
chdir("..");
remove_directory($curr_dir);
}
sub remove_directory
{
my($directory) = @_;
my($save_cwd);
$save_cwd = cwd();
$save_cwd =~ s/\//\\/g;
if(-e "$directory")
{
chdir($directory);
unlink <*>; # remove files
chdir($save_cwd);
rmdir $directory; # remove directory
}
}
sub print_usage
{
print "usage: $0 <dir1> [dir2 dir3...]\n";
}

View File

@ -0,0 +1,136 @@
[General]
; Run Mode values:
; Normal - Shows all dialogs. Requires user input.
; Auto - Shows some dialogs, but none requiring user input. It will
; automatically install the product using default values.
; Silent - Show no dialogs at all. It will install product using default
; values.
Run Mode=Normal
Company Name=$CompanyName$
Product Name=$ProductName$
; Valid Path values:
; PROGRAMFILESDIR
; WINDISK
; WINDIR
; WINSYSDIR
; COMMON_STARTUP
; COMMON_PROGRAMS
; COMMON_STARTMENU
; COMMON_DESKTOP
;
; PERSONAL_STARTUP
; PERSONAL_PROGRAMS
; PERSONAL_STARTMENU
; PERSONAL_DESKTOP
;
; PERSONAL_APPDATA
; PERSONAL_CACHE
; PERSONAL_COOKIES
; PERSONAL_FAVORITES
; PERSONAL_FONTS
; PERSONAL_HISTORY
; PERSONAL_NETHOOD
; PERSONAL_PERSONAL
; PERSONAL_PRINTHOOD (supported only under Windows NT)
; PERSONAL_RECENT
; PERSONAL_SENDTO
; PERSONAL_TEMPLATES
;
; PROGRAMFILESDIR
; COMMONFILESDIR
; MEDIAPATH
; CONFIGPATH (supported only under Windows95 and Windows98)
; DEVICEPATH
; This provides information on where in the Windows Registry to locate the Uninstall log files
;
Main Root Key=HKEY_LOCAL_MACHINE
Main Key=[Product WinRegKey]
Decrypt Main Key=TRUE
Root Key=HKEY_LOCAL_MACHINE
Key=[Product CurrentVersion]\Uninstall
Decrypt Key=TRUE
Uninstall Filename=$UninstallFile$
Defaults Info Filename=defaults_info.ini
[Check Instance0]
Class Name=MozillaMessageWindow
Window Name=
;*** LOCALIZE ME BABY ***
Message=$ProductName$ is detected to be currently running. Please quit $ProductName$ before continuing. Click Retry to perform the check again, or Cancel to exit the uninstaller.
; These keys are not normally necessary for checking instances. They are
; set here because Mozilla requires a way to shut down it's turbo mode.
Extra Cmd Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\$MainExeFile$
Extra Cmd Reg Name=
Extra Cmd Parameter=-kill
[Dialog Uninstall]
FONTNAME=MS Sans Serif
FONTSIZE=8
CHARSET=0
;Here is a partial list CHAR_SETS
; ANSI_CHARSET = 0
; DEFAULT_CHARSET = 1
; SYMBOL_CHARSET = 2
; SHIFTJIS_CHARSET = 128
; GB2312_CHARSET = 134
; HANGEUL_CHARSET = 129
; CHINESEBIG5_CHARSET = 136
; OEM_CHARSET 255
Show Dialog=TRUE
Title=$ProductName$ Uninstaller
Message0=Are you sure you want to completely remove %s and all of its components?
Uninstall=&Uninstall
Cancel=&Cancel
Message1=Uninstall has detected that the following shared file is no longer used by any programs. If any programs still require the shared file and it is removed, those programs may no longer function. Are you sure you want to remove this shared file?
Message2=Leaving this file will not harm your system. If you are not sure, it is recommended that the shared file be not removed from the system.
FileName=File name:
No=&No
NoToAll=N&o to all
Yes=&Yes
YesToAll=Y&es to all
;[Check Instance0]
;Class Name=MozillaWindowClass
;Window Name=
;Message=Setup has detected that an instance of Seamonkey is currently running. Please quit Seamonkey before continuing Setup.
;[Check Instance1]
;Process Name=psm.exe
;Message=Setup has detected that an instance of Personal Security Manager is currently running. Personal Security Manager will quit by itself when there are no other applications running that require it. A reboot might be necessary. Setup will then be able to continue.
; This section attempts to restore/undo the desktop integration performed by the browser/mail
[Restore Desktop Integration]
Enabled=TRUE
; This section attempts to cleanup the UnreadMail registry keys set up by mail.
[Cleanup Mail Integration]
Enabled=TRUE
[Messages]
ERROR_DLL_LOAD=Could not load %s
ERROR_STRING_LOAD=Could not load string resource ID %d
ERROR_STRING_NULL=Null pointer encountered.
ERROR_GLOBALALLOC=Memory allocation error.
ERROR_FAILED=%s failed.
ERROR_DIALOG_CREATE=Could not create %s dialog.
DLGQUITTITLE=Question
DLGQUITMSG=Are you sure you want to cancel?
ERROR_GET_SYSTEM_DIRECTORY_FAILED=GetSystemDirectory() failed.
ERROR_GET_WINDOWS_DIRECTORY_FAILED=GetWindowsDirectory() failed.
ERROR_CREATE_TEMP_DIR=Setup was unable to create the TEMP directory: %s
ERROR_SETUP_REQUIREMENT=Windows95 or greater Operating System is required! Exiting setup...
MB_WARNING_STR=Warning
ERROR_UNINSTALL_LOG_FOLDER=Uninstall log folder not found:%s
MB_MESSAGE_STR=Message
DLG_REMOVE_FILE_TITLE=Remove File?
ERROR_GETVERSION=GetVersionEx() failed!