fixing bug #54372 - installer creates C:\program files\Netscape\Netscape 6\install_wizard.log even if I point it to install somewhere else. sr=mscott, r=dveditz. affects only windows platforms

This commit is contained in:
ssu%netscape.com 2000-10-07 03:05:42 +00:00
Родитель 26d247d3ba
Коммит d0f77e5c23
6 изменённых файлов: 51 добавлений и 4 удалений

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

@ -2460,6 +2460,8 @@ void DlgSequenceNext()
if(RetrieveArchives() == WIZ_OK)
{
char szInstallLogFile[MAX_BUF];
/* POST_DOWNLOAD process file manipulation functions */
ProcessFileOps(T_POST_DOWNLOAD);
/* PRE_XPCOM process file manipulation functions */
@ -2504,6 +2506,17 @@ void DlgSequenceNext()
ShowMessage(szMessage, FALSE);
}
/* copy the install_wizard.log file from the temp\ns_temp dir to
* the destination dir and use the new destination file to continue
* logging.
*/
lstrcpy(szInstallLogFile, szTempDir);
AppendBackSlash(szInstallLogFile, sizeof(szInstallLogFile));
lstrcat(szInstallLogFile, FILE_INSTALL_LOG);
FileCopy(szInstallLogFile, szBuf, FALSE);
DeleteFile(szInstallLogFile);
gbILUseTemp = FALSE;
lstrcat(szBuf, "Uninstall\\");
CreateDirectoriesAll(szBuf, TRUE);

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

@ -72,6 +72,7 @@ extern BOOL bSDUserCanceled;
extern BOOL bIdiArchivesExists;
extern BOOL bCreateDestinationDir;
extern BOOL bReboot;
extern BOOL gbILUseTemp;
extern setupGen sgProduct;
extern diS diSetup;

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

@ -271,6 +271,7 @@ HRESULT Initialize(HINSTANCE hInstance)
bCreateDestinationDir = FALSE;
bReboot = FALSE;
gdwUpgradeValue = UG_NONE;
gbILUseTemp = TRUE;
if((szSetupDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
@ -330,6 +331,7 @@ HRESULT Initialize(HINSTANCE hInstance)
DeleteIdiGetConfigIni();
bIdiArchivesExists = DeleteIdiGetArchives();
DeleteIdiGetRedirect();
DeleteInstallLogFile();
return(0);
}
@ -5448,6 +5450,24 @@ BOOL DeleteIdiGetConfigIni()
return(bFileExists);
}
BOOL DeleteInstallLogFile()
{
char szInstallLogFile[MAX_BUF];
BOOL bFileExists = FALSE;
lstrcpy(szInstallLogFile, szTempDir);
AppendBackSlash(szInstallLogFile, sizeof(szInstallLogFile));
lstrcat(szInstallLogFile, FILE_INSTALL_LOG);
if(FileExists(szInstallLogFile))
{
bFileExists = TRUE;
DeleteFile(szInstallLogFile);
}
return(bFileExists);
}
BOOL DeleteIniRedirect()
{
char szFileIniRedirect[MAX_BUF];
@ -5562,6 +5582,7 @@ void CleanTempFiles()
*/
DeleteIdiFileIniConfig();
DeleteArchives();
DeleteInstallLogFile();
}
void DeInitialize()
@ -5583,6 +5604,7 @@ void DeInitialize()
DeleteObject(hbmpBoxUnChecked);
CleanTempFiles();
DirectoryRemove(szTempDir, FALSE);
DeInitSiComponents();
DeInitSXpcomFile();

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

@ -181,6 +181,7 @@ void ResetComponentAttributes(char *szFileIni);
BOOL IsInList(DWORD dwCurrentItem, DWORD dwItems, DWORD *dwItemsSelected);
int LocateExistingPath(char *szPath, char *szExistingPath, DWORD dwExistingPathSize);
BOOL ContainsReparseTag(char *szPath, char *szReparsePath, DWORD dwReparsePathSize);
BOOL DeleteInstallLogFile();
BOOL bSDInit;

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

@ -681,10 +681,19 @@ void UpdateInstallLog(LPSTR szKey, LPSTR szDir)
char szBuf[MAX_BUF];
char szFileInstallLog[MAX_BUF];
lstrcpy(szFileInstallLog, sgProduct.szPath);
AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog));
lstrcat(szFileInstallLog, sgProduct.szSubPath);
AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog));
if(gbILUseTemp)
{
lstrcpy(szFileInstallLog, szTempDir);
AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog));
}
else
{
lstrcpy(szFileInstallLog, sgProduct.szPath);
AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog));
lstrcat(szFileInstallLog, sgProduct.szSubPath);
AppendBackSlash(szFileInstallLog, sizeof(szFileInstallLog));
}
CreateDirectoriesAll(szFileInstallLog, FALSE);
lstrcat(szFileInstallLog, FILE_INSTALL_LOG);

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

@ -72,6 +72,7 @@ BOOL bSDUserCanceled;
BOOL bIdiArchivesExists;
BOOL bCreateDestinationDir;
BOOL bReboot;
BOOL gbILUseTemp;
setupGen sgProduct;
diS diSetup;