mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
fixing bug 190362 - MFCEmbed installer crashing during setup. r=sgehani, sr=dveditz, a=dbaron
This commit is contained in:
parent
a8a4d1797a
commit
ef69bc64eb
@ -49,18 +49,21 @@ sub StageProduct
|
||||
|
||||
StageUtils::CleanupStage($aDirStage, $aProductName);
|
||||
StageUtils::CleanupDistPackages("$aDirSrcDist/packages", $aProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/pkgs-mfcembed-win", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/pkgs-mfcembed-win-supp", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/xpcom-win.pkg", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/pkgs-mfcembed-win", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/pkgs-mfcembed-win-supp", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozRoot/embedding/config/basebrowser-win-supp", $dirDistPackagesProductName);
|
||||
StageUtils::CopyAdditionalPackage("$dirMozRoot/embedding/config/gre-win-supp", $dirDistPackagesProductName);
|
||||
|
||||
mkdir("$aDirStage", 775) if (!(-e "$aDirStage"));
|
||||
mkdir("$aDirStage/$aProductName", 775) if (!(-e "$aDirStage/$aProductName"));
|
||||
mkdir("$aDirStage", 775) if (!(-e "$aDirStage"));
|
||||
mkdir("$aDirStage/$aProductName", 775) if (!(-e "$aDirStage/$aProductName"));
|
||||
mkdir("$aDirStage/$aProductName/mfcembed", 775) if (!(-e "$aDirStage/$aProductName/mfcembed"));
|
||||
|
||||
# Call pkgcp.pl on each of the package list
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName\" -f \"$dirDistPackagesProductName/pkgs-mfcembed-win\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/gre_app_support\" -d \"$dirStageProductName\" -f \"$dirDistPackagesProductName/pkgs-mfcembed-win-supp\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName\" -f \"$dirDistPackagesProductName/basebrowser-win-supp\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName\" -f \"$dirDistPackagesProductName/gre-win-supp\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist\" -d \"$dirStageProductName\" -f \"$dirDistPackagesProductName/xpcom-win.pkg\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName/mfcembed\" -f \"$dirDistPackagesProductName/pkgs-mfcembed-win\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/gre_app_support\" -d \"$dirStageProductName/mfcembed\" -f \"$dirDistPackagesProductName/pkgs-mfcembed-win-supp\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName/mfcembed\" -f \"$dirDistPackagesProductName/basebrowser-win-supp\" -o $aOsPkg -v");
|
||||
system("perl \"$dirMozPackager/pkgcp.pl\" -s \"$aDirSrcDist/bin\" -d \"$dirStageProductName/mfcembed\" -f \"$dirDistPackagesProductName/gre-win-supp\" -o $aOsPkg -v");
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,6 @@ sub StageProduct
|
||||
StageUtils::CopyAdditionalPackage("$dirMozPackager/packages-win", $dirDistPackagesProductName);
|
||||
# StageUtils::GeneratePackagesFromSinglePackage($inOs, "$dirMozPackager/packages-win", $dirDistPackagesProductName);
|
||||
|
||||
# Not needed right now since it only copies xpcom-win.pkg.
|
||||
# This pkg file should be part of the GRE build.
|
||||
#StageUtils::CopyAdditionalPackage("$dirMozPackager/xpcom-win.pkg", $dirDistPackagesProductName);
|
||||
|
||||
# Call CreateStage() to create the aProductName stage dir using the packages
|
||||
# in dist/packages.
|
||||
StageUtils::CreateStage($aDirSrcDist, $dirStageProductName, $dirDistPackagesProductName, $aOsPkg);
|
||||
|
@ -94,6 +94,33 @@ Default Setup Type=Setup Type 0
|
||||
; TRUE
|
||||
Refresh Icons=FALSE
|
||||
|
||||
; Setting to control whether or not GRE should be installed to app's dir
|
||||
; to be used as a private/local GRE.
|
||||
;
|
||||
; Possible values (default is 'Shared'):
|
||||
; Local
|
||||
; Shared
|
||||
;
|
||||
; If this key is set to 'Local', make
|
||||
; sure to provide a GRE Private Key= below!
|
||||
GRE Type=Shared
|
||||
|
||||
; Private key that overrides the default shared key
|
||||
; (HKEY_LOCAL_MACHINE\Software\mozilla.org\GRE) set by GRE's installer.
|
||||
; This key will be created under HKEY_LOCAL_MACHINE and should be
|
||||
; declared in the following format:
|
||||
;
|
||||
; Software\[company name]\[product name]
|
||||
; (ie: Software\mozilla.org\GRE_PRIVATE)
|
||||
;
|
||||
; If it is not in the above format, the GRE installer/uninstaller can
|
||||
; fail to work properly.
|
||||
; The value to Prodduct Name Internal= (at the beginning of this
|
||||
; config.ini file) will be appended as follows:
|
||||
;
|
||||
; Software\mozilla.org\GRE_PRIVATE_[Product Name Internal]
|
||||
GRE Private Key=Software\mozilla.org\GRE_PRIVATE
|
||||
|
||||
; 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.
|
||||
@ -174,8 +201,10 @@ Readme App=notepad.exe
|
||||
; 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 MFCEmbed
|
||||
C1=Component Uninstaller
|
||||
C0=Component XPCOM
|
||||
C1=Component GRE
|
||||
C2=Component MFCEmbed
|
||||
C3=Component Uninstaller
|
||||
|
||||
[Dialog Select Components]
|
||||
Show Dialog=FALSE
|
||||
@ -386,16 +415,33 @@ Close All Process Windows=TRUE
|
||||
; will be superseded.
|
||||
;
|
||||
|
||||
;[Component XPCOM]
|
||||
;Description Short=Mozilla XPCOM
|
||||
;;*** LOCALIZE ME BABY ***
|
||||
;Description Long=Install Engine
|
||||
;Archive=xpcom.xpi
|
||||
;$InstallSize$:xpcom
|
||||
;$InstallSizeSystem$
|
||||
;$InstallSizeArchive$:xpcom.xpi
|
||||
;Attributes=SELECTED|INVISIBLE|FORCE_UPGRADE
|
||||
;Force Upgrade File0=[SETUP PATH]\xpcom.dll
|
||||
[Component XPCOM]
|
||||
Description Short=Mozilla XPCOM
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Description Long=Install Engine
|
||||
Archive=xpcom.xpi
|
||||
$InstallSize$:xpcom
|
||||
$InstallSizeSystem$
|
||||
$InstallSizeArchive$:xpcom.xpi
|
||||
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
|
||||
|
||||
[Component GRE]
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Description Short=GRE
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Description Long=Gecko Runtime Environment
|
||||
Archive=gre-win32-installer.zip
|
||||
Archive Uncompressed=gre-win32-installer.exe
|
||||
$InstallSize$:gre
|
||||
$InstallSizeSystem$
|
||||
$InstallSizeArchive$:gre-win32-installer.zip
|
||||
Attributes=SELECTED|UNCOMPRESS|SUPERSEDE|LAUNCHAPP|INVISIBLE
|
||||
Parameter=-mmi -ma -app $ProductName$ -app_path "[SETUP PATH]\$MainExeFile$"
|
||||
SupersedeType=GRE
|
||||
SupersedeWinReg0=HKEY_LOCAL_MACHINE\Software\mozilla.org\GRE
|
||||
SupersedeVersion0=1.3.0.0
|
||||
SupersedeMinVersion=1.3.0.0
|
||||
SupersedeMaxVersion=1.3.0.0
|
||||
|
||||
[Component MFCEmbed]
|
||||
Description Short=MFCEmbed
|
||||
@ -430,6 +476,11 @@ $InstallSize$:xpcom
|
||||
Cleanup=TRUE
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Message=Preparing Install, please wait...
|
||||
; Status= values: Disabled, Enabled
|
||||
; If nothing is set, default value is Enabled. If set to Disabled,
|
||||
; it will then use GRE as the xpinstall engine, in which case, there
|
||||
; should be a GRE component in this installer package!
|
||||
Status=Enabled
|
||||
|
||||
[Redirect]
|
||||
Status=Disabled
|
||||
@ -673,9 +724,3 @@ Description1=North America
|
||||
;*** LOCALIZE ME BABY ***
|
||||
Domain1=$ArchiveUrl$
|
||||
|
||||
;RunApp section
|
||||
[RunApp0]
|
||||
Timing=pre launchapp
|
||||
Wait=TRUE
|
||||
Target=gre-win32-installer.exe
|
||||
Parameters=-mmi -ma -app mfcembed -app_path "[SETUP PATH]"\mfcembed.exe
|
||||
|
@ -75,7 +75,27 @@ ParseArgv(@ARGV);
|
||||
|
||||
$gDirPackager = "$topsrcdir/xpinstall/packager";
|
||||
$gDirDistInstall = "$inDistPath/inst_mfcembed";
|
||||
$gDirStageProduct = "$inStagePath";
|
||||
$gDirDistInstGre = "$inDistPath/inst_gre";
|
||||
$gDirStageProduct = "$inStagePath/mfcembed";
|
||||
$seiFileNameGeneric = "nsinstall.exe";
|
||||
$seiFileNameSpecific = "mfcembed-win32-installer.exe";
|
||||
$seiStubRootName = "mfcembed-win32-stub-installer";
|
||||
$seiFileNameSpecificStub = "$seiStubRootName.exe";
|
||||
$seuFileNameSpecific = "MfcEmbedUninstall.exe";
|
||||
$seuzFileNameSpecific = "mfcembeduninstall.zip";
|
||||
$seiGreFileNameSpecific = "gre-win32-installer.exe";
|
||||
$seizGreFileNameSpecific = "gre-win32-installer.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";
|
||||
|
||||
|
||||
# Build GRE installer package first before building Mozilla! GRE installer is required by the mozilla installer.
|
||||
@ -91,30 +111,21 @@ if(system("perl \"$gDirPackager/make_stage.pl\" -pn mfcembed -os win -sd \"$inSt
|
||||
die "\n Error: perl \"$gDirPackager/make_stage.pl\" -pn mfcembed -os win -sd \"$inStagePath\" -dd \"$inDistPath\"\n";
|
||||
}
|
||||
|
||||
# Copy the GRE installer to the Ns' stage area
|
||||
if(!(-e "$gDirDistInstGre/$seiGreFileNameSpecific"))
|
||||
{
|
||||
die "\"$gDirDistInstGre/$seiGreFileNameSpecific\": file missing\n";
|
||||
}
|
||||
mkdir "$gDirStageProduct/gre";
|
||||
copy("$gDirDistInstGre/$seiGreFileNameSpecific", "$gDirStageProduct/gre") ||
|
||||
die "copy(\"$gDirDistInstGre/$seiGreFileNameSpecific\", \"$gDirStageProduct/gre\"): $!\n";
|
||||
|
||||
# Until we really figure out what to do with this batch file, this will get it
|
||||
# into the installer, at least
|
||||
print "\n Copying runapp.bat $gDirStageProduct/mfcembed/gre_app_support\n";
|
||||
copy("runapp.bat", "$gDirStageProduct/mfcembed/gre_app_support") ||
|
||||
die "copy runapp.bat $gDirStageProduct/mfcembed/gre_app_support: $!\n";
|
||||
|
||||
|
||||
$seiFileNameGeneric = "nsinstall.exe";
|
||||
$seiFileNameSpecific = "mfcembed-win32-installer.exe";
|
||||
$seiStubRootName = "mfcembed-win32-stub-installer";
|
||||
$seiFileNameSpecificStub = "$seiStubRootName.exe";
|
||||
$seuFileNameSpecific = "MfcEmbedUninstall.exe";
|
||||
$seuzFileNameSpecific = "mfcembeduninstall.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.org";
|
||||
$ENV{WIZ_nameProduct} = "MfcEmbed";
|
||||
$ENV{WIZ_nameProductInternal} = "MfcEmbed"; # product name without any version string
|
||||
@ -140,7 +151,8 @@ if(!(-d "$gDirStageProduct"))
|
||||
}
|
||||
|
||||
# List of components for to create xpi files from
|
||||
@gComponentList = ("mfcembed");
|
||||
@gComponentList = ("xpcom",
|
||||
"mfcembed");
|
||||
|
||||
if(VerifyComponents()) # return value of 0 means no errors encountered
|
||||
{
|
||||
@ -180,19 +192,17 @@ else
|
||||
mkdir ("$gDirDistInstall/setup",0775);
|
||||
}
|
||||
|
||||
if(!(-e "$inDistPath/inst_gre/$seiGreFileNameSpecific"))
|
||||
{
|
||||
die "\"$inDistPath/inst_gre/$seiGreFileNameSpecific\": file missing\n";
|
||||
}
|
||||
MakeExeZip("$inDistPath/inst_gre", $seiGreFileNameSpecific, $seizGreFileNameSpecific);
|
||||
|
||||
if(MakeXpiFile())
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# Grab xpcom from mozilla build
|
||||
copy("$gDirDistInstall/../install/xpi/xpcom.xpi", "$gDirDistInstall") ||
|
||||
die "copy $gDirDistInstall/../install/xpi/xpcom.xpi $gDirDistInstall: $!\n";
|
||||
copy("$gDirDistInstall/../install/xpi/xpcom.xpi", "$gDirDistInstall/xpi") ||
|
||||
die "copy $gDirDistInstall/../install/xpi/xpcom.xpi $gDirDistInstall/xpi: $!\n";
|
||||
|
||||
|
||||
if(MakeUninstall())
|
||||
{
|
||||
exit(1);
|
||||
|
@ -158,6 +158,13 @@ if(verifyDiskSpace(fProgram, srDest))
|
||||
fSubdir = getFolder("Program", "components");
|
||||
File.dirCreate(fSubdir);
|
||||
|
||||
// Let the uninstaller know about this generated file.
|
||||
logComment("Installing: " + fProgram + ".autoreg");
|
||||
logComment("Create Folder: " + fProgram + "components");
|
||||
logComment("Installing: " + fProgram + "components\\xpti.dat");
|
||||
logComment("Installing: " + fProgram + "components\\xptitemp.dat");
|
||||
logComment("Installing: " + fProgram + "components\\compreg.dat");
|
||||
|
||||
// check return value
|
||||
if( err == SUCCESS )
|
||||
{
|
||||
|
@ -2,9 +2,18 @@
|
||||
REM --------------------------------------------------------
|
||||
REM Modify GRE_DIR below to match your GRE install location
|
||||
REM --------------------------------------------------------
|
||||
set GRE_VERSION=1.3a
|
||||
set GRE_DIR=c:\Program Files\mozilla.org\GRE\%GRE_VERSION%
|
||||
set GRE_VERSION=1.3b
|
||||
|
||||
set PATH=%PATH%;%GRE_DIR%;%GRE_DIR%\components
|
||||
if exist "%ProgramFiles%\nul" set GRE_DIR=%ProgramFiles%\common files\mozilla.org\GRE\%GRE_VERSION%
|
||||
if not exist "%ProgramFiles%\nul" set GRE_DIR=c:\Program Files\common files\mozilla.org\GRE\%GRE_VERSION%
|
||||
|
||||
if not exist "%GRE_DIR%\nul" echo.
|
||||
if not exist "%GRE_DIR%\nul" echo. GRE version %GRE_VERSION% not found at: %GRE_DIR%
|
||||
if not exist "%GRE_DIR%\nul" echo.
|
||||
if not exist "%GRE_DIR%\nul" goto end
|
||||
|
||||
set PATH=%GRE_DIR%;%GRE_DIR%\components;%PATH%
|
||||
mfcembed.exe -console
|
||||
goto end
|
||||
|
||||
:end
|
||||
|
@ -2306,6 +2306,10 @@ HRESULT LaunchApps()
|
||||
HRESULT ProcessGre(greInfo *aGre)
|
||||
{
|
||||
char greUninstallCommand[MAX_BUF];
|
||||
|
||||
if(!aGre)
|
||||
return(WIZ_OK);
|
||||
|
||||
/* If aGre->homePath does not exist, it means that a compatible version of GRE was
|
||||
* not found on the system, so we need to install one. We also need to get the
|
||||
* path to where it's going to install the GRE for in case we need to use it
|
||||
@ -2327,7 +2331,8 @@ HRESULT ProcessGre(greInfo *aGre)
|
||||
* in the config.ini file.
|
||||
*/
|
||||
/* Unset "Component GRE"'s SELECTED attribute so it doesn't get spawned again later from LaunchApps() */
|
||||
aGre->siCGreComponent->dwAttributes &= ~SIC_SELECTED;
|
||||
if(aGre->siCGreComponent)
|
||||
aGre->siCGreComponent->dwAttributes &= ~SIC_SELECTED;
|
||||
|
||||
/* Log the GRE uninstall command to call in order for this app's uninstaller to
|
||||
* uninstall GRE.
|
||||
|
Loading…
Reference in New Issue
Block a user