зеркало из https://github.com/mozilla/pjs.git
fixing bug 93327 - Win32 installer cannot CRC check .exe files. r=dveditz, sr=mscott. affects windows platforms only
This commit is contained in:
Родитель
71af83ce89
Коммит
82ec0b91da
|
@ -607,10 +607,10 @@ OS=NT51
|
||||||
Description Short=$CompanyName$ Uninstaller
|
Description Short=$CompanyName$ Uninstaller
|
||||||
;*** LOCALIZE ME BABY ***
|
;*** LOCALIZE ME BABY ***
|
||||||
Description Long=Uninstaller for $ProductName$
|
Description Long=Uninstaller for $ProductName$
|
||||||
Archive=$UninstallFile$
|
Archive=$UninstallFileZip$
|
||||||
$InstallSize$:$UninstallFile$
|
$InstallSize$:$UninstallFileZip$
|
||||||
$InstallSizeSystem$
|
$InstallSizeSystem$
|
||||||
$InstallSizeArchive$:$UninstallFile$
|
$InstallSizeArchive$:$UninstallFileZip$
|
||||||
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
|
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
|
||||||
|
|
||||||
;Since the uninstaller program is going to be installed into the Windows folder,
|
;Since the uninstaller program is going to be installed into the Windows folder,
|
||||||
|
@ -741,35 +741,25 @@ Message=
|
||||||
; the app runs once upon windows reboot.
|
; the app runs once upon windows reboot.
|
||||||
|
|
||||||
;Uncompress FileX sections
|
;Uncompress FileX sections
|
||||||
;[Uncompress File0]
|
[Uncompress File0]
|
||||||
;Timing=post download
|
Timing=post smartupdate
|
||||||
;Source=[XPI PATH]\xpcom.xpi
|
Source=[XPI PATH]\$UninstallFileZip$
|
||||||
;Destination=[SETUP PATH]
|
Destination=[WINDIR]
|
||||||
;Message=Configuring Seamonkey, please wait...
|
;*** LOCALIZE ME BABY ***
|
||||||
|
Message=Installing the uninstaller, please wait...
|
||||||
|
Only If Exists=FALSE
|
||||||
|
|
||||||
;[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 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]
|
[Copy File0]
|
||||||
Timing=post launchapp
|
Timing=post smartupdate
|
||||||
Source=[JRE BIN PATH]\np*.dll
|
Source=[WINDIR]\$UninstallFile$
|
||||||
Destination=[SETUP PATH]\Plugins
|
Destination=[SETUP PATH]\Uninstall
|
||||||
Fail If Exists=FALSE
|
Fail If Exists=FALSE
|
||||||
|
Do Not Uninstall=FALSE
|
||||||
|
|
||||||
[Copy File1]
|
[Copy File1]
|
||||||
Timing=post smartupdate
|
Timing=post smartupdate
|
||||||
|
@ -778,16 +768,6 @@ Destination=[WINDIR]
|
||||||
Fail If Exists=FALSE
|
Fail If Exists=FALSE
|
||||||
Do Not Uninstall=TRUE
|
Do Not Uninstall=TRUE
|
||||||
|
|
||||||
;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 File2]
|
|
||||||
Timing=post smartupdate
|
|
||||||
Source=[XPI PATH]\$UninstallFile$
|
|
||||||
Destination=[SETUP PATH]\Uninstall
|
|
||||||
Fail If Exists=FALSE
|
|
||||||
Do Not Uninstall=FALSE
|
|
||||||
|
|
||||||
|
|
||||||
;Copy File SequentialX sections
|
;Copy File SequentialX sections
|
||||||
[Copy File Sequential0]
|
[Copy File Sequential0]
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# This perl script builds the xpi, config.ini, and js files.
|
# This perl script builds the xpi, config.ini, and js files.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
# Make sure MOZ_SRC is set.
|
# Make sure MOZ_SRC is set.
|
||||||
if($ENV{MOZ_SRC} eq "")
|
if($ENV{MOZ_SRC} eq "")
|
||||||
{
|
{
|
||||||
|
@ -64,15 +66,17 @@ $seiFileNameGeneric = "nsinstall.exe";
|
||||||
$seiFileNameSpecific = "mozilla-win32-installer.exe";
|
$seiFileNameSpecific = "mozilla-win32-installer.exe";
|
||||||
$seiFileNameSpecificStub = "mozilla-win32-stub-installer.exe";
|
$seiFileNameSpecificStub = "mozilla-win32-stub-installer.exe";
|
||||||
$seuFileNameSpecific = "MozillaUninstall.exe";
|
$seuFileNameSpecific = "MozillaUninstall.exe";
|
||||||
|
$seuzFileNameSpecific = "mozillauninstall.zip";
|
||||||
|
|
||||||
# set environment vars for use by other .pl scripts called from this script.
|
# set environment vars for use by other .pl scripts called from this script.
|
||||||
$ENV{WIZ_userAgent} = "0.9.2 (en)"; # ie: "0.9 (en)"
|
$ENV{WIZ_userAgent} = "0.9.4 (en)"; # ie: "0.9 (en)"
|
||||||
$ENV{WIZ_userAgentShort} = "0.9.2"; # ie: "0.9"
|
$ENV{WIZ_userAgentShort} = "0.9.4"; # ie: "0.9"
|
||||||
$ENV{WIZ_xpinstallVersion} = "0.9.2"; # ie: "0.9.0"
|
$ENV{WIZ_xpinstallVersion} = "0.9.4"; # ie: "0.9.0"
|
||||||
$ENV{WIZ_nameCompany} = "mozilla.org";
|
$ENV{WIZ_nameCompany} = "mozilla.org";
|
||||||
$ENV{WIZ_nameProduct} = "Mozilla";
|
$ENV{WIZ_nameProduct} = "Mozilla";
|
||||||
$ENV{WIZ_fileMainExe} = "Mozilla.exe";
|
$ENV{WIZ_fileMainExe} = "Mozilla.exe";
|
||||||
$ENV{WIZ_fileUninstall} = $seuFileNameSpecific;
|
$ENV{WIZ_fileUninstall} = $seuFileNameSpecific;
|
||||||
|
$ENV{WIZ_fileUninstallZip} = $seuzFileNameSpecific;
|
||||||
|
|
||||||
# Set the location of the local tmp stage directory
|
# Set the location of the local tmp stage directory
|
||||||
$gLocalTmpStage = $inStagePath;
|
$gLocalTmpStage = $inStagePath;
|
||||||
|
@ -292,6 +296,21 @@ if((!(-e "$ENV{MOZ_SRC}\\redist\\microsoft\\system\\msvcrt.dll")) ||
|
||||||
# end of script
|
# end of script
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
sub MakeExeZip
|
||||||
|
{
|
||||||
|
my($aSrcDir, $aExeFile, $aZipFile) = @_;
|
||||||
|
my($saveCwdir);
|
||||||
|
|
||||||
|
$saveCwdir = cwd();
|
||||||
|
chdir($aSrcDir);
|
||||||
|
if(system("$ENV{MOZ_TOOLS}\\bin\\zip $inDistPath\\xpi\\$aZipFile $aExeFile"))
|
||||||
|
{
|
||||||
|
chdir($saveCwdir);
|
||||||
|
die "\n Error: $ENV{MOZ_TOOLS}\\bin\\zip $inDistPath\\xpi\\$aZipFile $aExeFile";
|
||||||
|
}
|
||||||
|
chdir($saveCwdir);
|
||||||
|
}
|
||||||
|
|
||||||
sub PrintUsage
|
sub PrintUsage
|
||||||
{
|
{
|
||||||
die "usage: $0 <default version> <staging path> <dist install path> [options]
|
die "usage: $0 <default version> <staging path> <dist install path> [options]
|
||||||
|
@ -401,11 +420,9 @@ sub MakeUninstall
|
||||||
print "\n Error: $inDistPath\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*\n";
|
print "\n Error: $inDistPath\\nsztool.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*\n";
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if(system("copy $inDistPath\\$seuFileNameSpecific $inDistPath\\xpi"))
|
|
||||||
{
|
MakeExeZip($inDistPath, $seuFileNameSpecific, $seuzFileNameSpecific);
|
||||||
print "\n Error: copy $inDistPath\\$seuFileNameSpecific $inDistPath\\xpi\n";
|
unlink <$inDistPath\\$seuFileNameSpecific>;
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,7 @@ $nameCompany = $ENV{WIZ_nameCompany};
|
||||||
$nameProduct = $ENV{WIZ_nameProduct};
|
$nameProduct = $ENV{WIZ_nameProduct};
|
||||||
$fileMainExe = $ENV{WIZ_fileMainExe};
|
$fileMainExe = $ENV{WIZ_fileMainExe};
|
||||||
$fileUninstall = $ENV{WIZ_fileUninstall};
|
$fileUninstall = $ENV{WIZ_fileUninstall};
|
||||||
|
$fileUninstallZip = $ENV{WIZ_fileUninstallZip};
|
||||||
|
|
||||||
$inDomain;
|
$inDomain;
|
||||||
$inRedirDomain;
|
$inRedirDomain;
|
||||||
|
@ -129,9 +130,9 @@ while($line = <fpInIt>)
|
||||||
$componentName = $colonSplit[1];
|
$componentName = $colonSplit[1];
|
||||||
chop($componentName);
|
chop($componentName);
|
||||||
|
|
||||||
if($componentName =~ /\$UninstallFile\$/i)
|
if($componentName =~ /\$UninstallFileZip\$/i)
|
||||||
{
|
{
|
||||||
$installSize = OutputInstallSizeArchive("$inXpiPath\\$fileUninstall");
|
$installSize = OutputInstallSizeArchive("$inXpiPath\\$fileUninstallZip") * 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -170,7 +171,7 @@ while($line = <fpInIt>)
|
||||||
{
|
{
|
||||||
$componentName = $colonSplit[1];
|
$componentName = $colonSplit[1];
|
||||||
chop($componentName);
|
chop($componentName);
|
||||||
$componentName =~ s/\$UninstallFile\$/$fileUninstall/gi;
|
$componentName =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
|
||||||
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath\\$componentName");
|
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath\\$componentName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +195,7 @@ while($line = <fpInIt>)
|
||||||
$line =~ s/\$ProductName\$/$nameProduct/gi;
|
$line =~ s/\$ProductName\$/$nameProduct/gi;
|
||||||
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
|
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
|
||||||
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
|
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
|
||||||
|
$line =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
|
||||||
print fpOutIni $line;
|
print fpOutIni $line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1906,7 +1906,6 @@ HRESULT LaunchApps()
|
||||||
BOOL bArchiveFound;
|
BOOL bArchiveFound;
|
||||||
siC *siCObject = NULL;
|
siC *siCObject = NULL;
|
||||||
char szArchive[MAX_BUF];
|
char szArchive[MAX_BUF];
|
||||||
char szBuf[MAX_BUF];
|
|
||||||
char szMsg[MAX_BUF];
|
char szMsg[MAX_BUF];
|
||||||
|
|
||||||
LogISLaunchApps(W_START);
|
LogISLaunchApps(W_START);
|
||||||
|
@ -1944,13 +1943,39 @@ HRESULT LaunchApps()
|
||||||
if(bArchiveFound)
|
if(bArchiveFound)
|
||||||
{
|
{
|
||||||
char szParameterBuf[MAX_BUF];
|
char szParameterBuf[MAX_BUF];
|
||||||
|
char szSpawnFile[MAX_BUF];
|
||||||
|
char szMessageString[MAX_BUF];
|
||||||
|
DWORD dwErr = FO_SUCCESS;
|
||||||
|
|
||||||
|
wsprintf(szMessageString, szMsg, siCObject->szDescriptionShort);
|
||||||
|
ShowMessage(szMessageString, TRUE);
|
||||||
|
DecryptString(szParameterBuf, siCObject->szParameter);
|
||||||
|
|
||||||
|
lstrcpy(szSpawnFile, szArchive);
|
||||||
|
if(siCObject->dwAttributes & SIC_UNCOMPRESS)
|
||||||
|
{
|
||||||
|
if((dwErr = FileUncompress(szArchive, szTempDir)) == FO_SUCCESS)
|
||||||
|
{
|
||||||
|
lstrcpy(szSpawnFile, szTempDir);
|
||||||
|
AppendBackSlash(szSpawnFile, sizeof(szSpawnFile));
|
||||||
|
lstrcat(szSpawnFile, siCObject->szArchiveNameUncompressed);
|
||||||
|
}
|
||||||
|
|
||||||
|
LogISLaunchAppsComponentUncompress(siCObject->szDescriptionShort, dwErr);
|
||||||
|
if(dwErr != FO_SUCCESS)
|
||||||
|
{
|
||||||
|
ShowMessage(szMessageString, FALSE);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LogISLaunchAppsComponent(siCObject->szDescriptionShort);
|
LogISLaunchAppsComponent(siCObject->szDescriptionShort);
|
||||||
wsprintf(szBuf, szMsg, siCObject->szDescriptionShort);
|
WinSpawn(szSpawnFile, szParameterBuf, szTempDir, SW_SHOWNORMAL, TRUE);
|
||||||
ShowMessage(szBuf, TRUE);
|
|
||||||
DecryptString(szParameterBuf, siCObject->szParameter);
|
if(siCObject->dwAttributes & SIC_UNCOMPRESS)
|
||||||
WinSpawn(szArchive, szParameterBuf, szTempDir, SW_SHOWNORMAL, TRUE);
|
FileDelete(szSpawnFile);
|
||||||
ShowMessage(szBuf, FALSE);
|
|
||||||
|
ShowMessage(szMessageString, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++dwIndex0;
|
++dwIndex0;
|
||||||
|
@ -2577,6 +2602,8 @@ siC *CreateSiCNode()
|
||||||
|
|
||||||
if((siCNode->szArchiveName = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
if((siCNode->szArchiveName = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
if((siCNode->szArchiveNameUncompressed = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
|
exit(1);
|
||||||
if((siCNode->szArchivePath = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
if((siCNode->szArchivePath = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
exit(1);
|
exit(1);
|
||||||
if((siCNode->szDestinationPath = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
if((siCNode->szDestinationPath = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||||
|
@ -2633,6 +2660,7 @@ void SiCNodeDelete(siC *siCTemp)
|
||||||
FreeMemory(&(siCTemp->szDestinationPath));
|
FreeMemory(&(siCTemp->szDestinationPath));
|
||||||
FreeMemory(&(siCTemp->szArchivePath));
|
FreeMemory(&(siCTemp->szArchivePath));
|
||||||
FreeMemory(&(siCTemp->szArchiveName));
|
FreeMemory(&(siCTemp->szArchiveName));
|
||||||
|
FreeMemory(&(siCTemp->szArchiveNameUncompressed));
|
||||||
FreeMemory(&(siCTemp->szParameter));
|
FreeMemory(&(siCTemp->szParameter));
|
||||||
FreeMemory(&(siCTemp->szReferenceName));
|
FreeMemory(&(siCTemp->szReferenceName));
|
||||||
FreeMemory(&(siCTemp->szDescriptionLong));
|
FreeMemory(&(siCTemp->szDescriptionLong));
|
||||||
|
@ -3822,6 +3850,8 @@ HRESULT ParseComponentAttributes(char *szAttribute)
|
||||||
dwAttributes |= SIC_IGNORE_DOWNLOAD_ERROR;
|
dwAttributes |= SIC_IGNORE_DOWNLOAD_ERROR;
|
||||||
if(strstr(szBuf, "IGNORE_XPINSTALL_ERROR"))
|
if(strstr(szBuf, "IGNORE_XPINSTALL_ERROR"))
|
||||||
dwAttributes |= SIC_IGNORE_XPINSTALL_ERROR;
|
dwAttributes |= SIC_IGNORE_XPINSTALL_ERROR;
|
||||||
|
if(strstr(szBuf, "UNCOMPRESS"))
|
||||||
|
dwAttributes |= SIC_UNCOMPRESS;
|
||||||
|
|
||||||
return(dwAttributes);
|
return(dwAttributes);
|
||||||
}
|
}
|
||||||
|
@ -3946,6 +3976,14 @@ void InitSiComponents(char *szFileIni)
|
||||||
|
|
||||||
/* store name of archive for component */
|
/* store name of archive for component */
|
||||||
lstrcpy(siCTemp->szArchiveName, szBuf);
|
lstrcpy(siCTemp->szArchiveName, szBuf);
|
||||||
|
|
||||||
|
/* store name of the uncompressed archive for the component */
|
||||||
|
GetPrivateProfileString(szComponentSection,
|
||||||
|
"Archive Uncompressed",
|
||||||
|
"",
|
||||||
|
siCTemp->szArchiveNameUncompressed,
|
||||||
|
sizeof(szBuf),
|
||||||
|
szFileIni);
|
||||||
|
|
||||||
/* get short description of component */
|
/* get short description of component */
|
||||||
GetPrivateProfileString(szComponentSection, "Description Short", "", szBuf, sizeof(szBuf), szFileIni);
|
GetPrivateProfileString(szComponentSection, "Description Short", "", szBuf, sizeof(szBuf), szFileIni);
|
||||||
|
|
|
@ -382,7 +382,15 @@ void LogISLaunchAppsComponent(char *szComponentName)
|
||||||
{
|
{
|
||||||
char szBuf[MAX_BUF];
|
char szBuf[MAX_BUF];
|
||||||
|
|
||||||
wsprintf(szBuf, " %s\n", szComponentName);
|
wsprintf(szBuf, " launching %s\n", szComponentName);
|
||||||
|
UpdateInstallStatusLog(szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LogISLaunchAppsComponentUncompress(char *szComponentName, DWORD dwErr)
|
||||||
|
{
|
||||||
|
char szBuf[MAX_BUF];
|
||||||
|
|
||||||
|
wsprintf(szBuf, " uncompressing %s: %d\n", szComponentName, dwErr);
|
||||||
UpdateInstallStatusLog(szBuf);
|
UpdateInstallStatusLog(szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ void LogISXPInstallComponent(char *szComponentName);
|
||||||
void LogISXPInstallComponentResult(DWORD dwErrorNumber);
|
void LogISXPInstallComponentResult(DWORD dwErrorNumber);
|
||||||
void LogISLaunchApps(int iWhen);
|
void LogISLaunchApps(int iWhen);
|
||||||
void LogISLaunchAppsComponent(char *szComponentName);
|
void LogISLaunchAppsComponent(char *szComponentName);
|
||||||
|
void LogISLaunchAppsComponentUncompress(char *szComponentName,
|
||||||
|
DWORD dwErr);
|
||||||
void LogISProcessXpcomFile(int iStatus, int iResult);
|
void LogISProcessXpcomFile(int iStatus, int iResult);
|
||||||
void LogISDiskSpace(dsN *dsnComponentDSRequirement);
|
void LogISDiskSpace(dsN *dsnComponentDSRequirement);
|
||||||
void LogISTurboMode(BOOL bTurboMode);
|
void LogISTurboMode(BOOL bTurboMode);
|
||||||
|
|
|
@ -195,6 +195,7 @@ typedef int PRInt32;
|
||||||
#define SIC_FORCE_UPGRADE 0x00000080
|
#define SIC_FORCE_UPGRADE 0x00000080
|
||||||
#define SIC_IGNORE_DOWNLOAD_ERROR 0x00000100
|
#define SIC_IGNORE_DOWNLOAD_ERROR 0x00000100
|
||||||
#define SIC_IGNORE_XPINSTALL_ERROR 0x00000200
|
#define SIC_IGNORE_XPINSTALL_ERROR 0x00000200
|
||||||
|
#define SIC_UNCOMPRESS 0x00000400
|
||||||
|
|
||||||
/* AC: Additional Components */
|
/* AC: Additional Components */
|
||||||
#define AC_NONE 0
|
#define AC_NONE 0
|
||||||
|
@ -414,6 +415,7 @@ struct sinfoComponent
|
||||||
long lRandomInstallValue;
|
long lRandomInstallValue;
|
||||||
DWORD dwAttributes;
|
DWORD dwAttributes;
|
||||||
LPSTR szArchiveName;
|
LPSTR szArchiveName;
|
||||||
|
LPSTR szArchiveNameUncompressed;
|
||||||
LPSTR szArchivePath;
|
LPSTR szArchivePath;
|
||||||
LPSTR szDestinationPath;
|
LPSTR szDestinationPath;
|
||||||
LPSTR szDescriptionShort;
|
LPSTR szDescriptionShort;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче