initial checkin to fix bug 7874 (on going). affects only windows platforms. Not hooked up to build system yet.

This commit is contained in:
ssu%netscape.com 2000-04-16 00:05:39 +00:00
Родитель 5aac7db22a
Коммит 927ca62511
2 изменённых файлов: 276 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,106 @@
#!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
#
# UserAgent
# - user agent to use in the windows registry. should be the same as the one
# built into the browser (ie "6.0b2 (en)")
#
# ie: perl makecfgini.pl uninstall.it 6.0.0.1999120608 "6.0b2 (en)"
#
#
print "argc: $#ARGV\n";
if($#ARGV < 2)
{
die "usage: $0 <.it file> <version> <UserAgent>
.it file : input ini template file
version : version to be shown in setup. Typically the same version
as show in mozilla.exe.
UserAgent : user agent to use in the windows registry. should be the same as the one
built into the browser (ie \"6.0b2 (en)\")
\n";
}
$inItFile = $ARGV[0];
$inVersion = $ARGV[1];
$inUserAgent = $ARGV[2];
$uaShort = ParseUserAgentShort($inUserAgent);
# 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/i;
$line =~ s/\$UserAgentShort\$/$uaShort/i;
$line =~ s/\$UserAgent\$/$inUserAgent/i;
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);
}

Просмотреть файл

@ -0,0 +1,170 @@
[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
Product Name=Mozilla Seamonkey
; 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=[WinRegKey Mozilla Seamonkey]
Decrypt Main Key=TRUE
Root Key=HKEY_LOCAL_MACHINE
Key=[Mozilla Seamonkey CurrentVersion]\Uninstall
Decrypt Key=TRUE
[Dialog Uninstall]
Show Dialog=FALSE
Title=Mozilla Seamonkey $UserAgentShort$ Uninstaller
Message0=This will uninstall Mozilla Seamonkey from you system. Click Uninstall to begin.
;[Check Instance0]
;Class Name=NetscapeWindowClass
;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.
; 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 core - process before the core file has been uncompressed.
; post core - process after the core 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.
; 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 download
;Source=[XPI PATH]\core.xpi
;Destination=[SETUP PATH]
;Message=Configuring Seamonkey, please wait...
;[Uncompress File1]
;Timing=post download
;Source=[XPI PATH]\extratest.xpi
;Destination=[SETUP PATH]
;Message=Configuring Extra test files, please wait...
;Move FileX sections
;[Move File0]
;Timing=post download
;Source=[SETUP PATH]\bin\*
;Destination=[SETUP PATH]\program
;[Move File1]
;Timing=post download
;Source=[SETUP PATH]\ftmain\*
;Destination=[SETUP PATH]\program
;Copy FileX sections
;[Copy File0]
;Timing=post launchapp
;Source=[JRE BIN PATH]\npjava*.dll
;Destination=[SETUP PATH]\Plugins
;Fail If Exists=FALSE
;[Copy File1]
;Timing=post launchapp
;Source=[TEMP]\xtratest\bin\*.*
;Destination=[SETUP PATH]
;Fail If Exists=FALSE
;[Copy File1]
;Timing=post download
;Source=[SETUP PATH]\bin\*.exe
;Destination=[TEMP]
;Fail If Exists=
;Create DirectoryX sections
;[Create Directory0]
;Timing=post download
;Destination=[SETUP PATH]\Plugins
;[Create Directory1]
;Timing=post download
;Destination=[TEMP]\Test\temp
;Delete FileX sections
;[Delete File0]
;Timing=post download
;Destination=[COMMON_PROGRAMS]\Mozilla Seamonkey\Mozilla AppRunner.lnk
;Remove DirectoryX sections
;[Remove Directory0]
;Timing=post launchapp
;Destination=[TEMP]\xtratest
;Remove subdirs=TRUE
;RunAppX sections
;[RunApp0]
;Timing=depend reboot
;Wait=FALSE
;Target=[SETUP PATH]\mozilla.exe
;Parameters=-installer
;WorkingDir=[SETUP PATH]
;[Windows Registry0]
;Root Key=HKEY_LOCAL_MACHINE
;Key=Software\Mozilla\Mozilla Seamonkey\$UserAgent$\Main
;Name=Program Folder Path
;Name Value=[Default Folder]
;Type=REG_SZ
;Decrypt Key=FALSE
;Decrypt Name=FALSE
;Decrypt Name Value=TRUE
;Overwrite Key=TRUE
;Overwrite Name=TRUE
;Timing=pre smartupdate