fixing bug 2808 - Allow MS Windows Shell to recognize N6Mail in Start Menu. r=syd, sr=mscott

This commit is contained in:
ssu%netscape.com 2001-07-24 23:15:58 +00:00
Родитель 802efac9d2
Коммит 545487b6d1
5 изменённых файлов: 237 добавлений и 3 удалений

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

@ -448,6 +448,78 @@ $InstallSizeArchive$:browser.xpi
Attributes=SELECTED|DISABLED|FORCE_UPGRADE
Force Upgrade File0=[SETUP PATH]\$MainExeFile$
[Component Navigator-Windows Registry0]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\StartMenuInternet\$MainExeFile$
Name=
Name Value=$ProductName$
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=FALSE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component Navigator-Windows Registry1]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\StartMenuInternet\$MainExeFile$\DefaultIcon
Name=
Name Value=[SETUP PATH]\$MainExeFile$,0
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component Navigator-Windows Registry2]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\StartMenuInternet\$MainExeFile$\shell
Name=
Name Value=
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component Navigator-Windows Registry3]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\StartMenuInternet\$MainExeFile$\shell\open
Name=
Name Value=
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component Navigator-Windows Registry4]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\StartMenuInternet\$MainExeFile$\shell\open\command
Name=
Name Value="[SETUP PATH]\$MainExeFile$"
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component MailNews]
Description Short=Mail & News
;*** LOCALIZE ME BABY ***
@ -459,6 +531,78 @@ $InstallSizeArchive$:mail.xpi
Attributes=SELECTED|FORCE_UPGRADE
Force Upgrade File0=[SETUP PATH]\msgbsutl.dll
[Component MailNews-Windows Registry0]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\Mail\$ProductName$ Mail
Name=
Name Value=$ProductName$ Mail
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component MailNews-Windows Registry1]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\Mail\$ProductName$ Mail\DefaultIcon
Name=
Name Value=[SETUP PATH]\$MainExeFile$,0
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component MailNews-Windows Registry2]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\Mail\$ProductName$ Mail\shell
Name=
Name Value=
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component MailNews-Windows Registry3]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\Mail\$ProductName$ Mail\shell\open
Name=
Name Value=
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component MailNews-Windows Registry4]
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Clients\Mail\$ProductName$ Mail\shell\open\command
Name=
Name Value="[SETUP PATH]\$MainExeFile$" -mail
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
Decrypt Name Value=TRUE
Overwrite Key=TRUE
Overwrite Name=TRUE
Timing=post archive
OS=NT51
[Component Uninstaller]
Description Short=$CompanyName$ Uninstaller
;*** LOCALIZE ME BABY ***

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

@ -1975,6 +1975,10 @@ char *GetOSTypeString(char *szOSType, DWORD dwOSTypeBufSize)
lstrcpy(szOSType, "NT3");
else if(gSystemInfo.dwOSType & OS_NT4)
lstrcpy(szOSType, "NT4");
else if(gSystemInfo.dwOSType & OS_NT50)
lstrcpy(szOSType, "NT50");
else if(gSystemInfo.dwOSType & OS_NT51)
lstrcpy(szOSType, "NT51");
else
lstrcpy(szOSType, "NT5");
@ -2032,6 +2036,18 @@ void DetermineOSVersionEx()
default:
gSystemInfo.dwOSType |= OS_NT5;
switch(osVersionInfo.dwMinorVersion)
{
case 0:
/* a minor version of 0 (major.minor.build) indicates Win2000 */
gSystemInfo.dwOSType |= OS_NT50;
break;
case 1:
/* a minor version of 1 (major.minor.build) indicates WinXP */
gSystemInfo.dwOSType |= OS_NT51;
break;
}
break;
}
break;
@ -3727,6 +3743,50 @@ HRESULT VerifyDiskSpace()
return(hRetValue);
}
/* Function: ParseOSType
*
* Input: char *
*
* Return: DWORD
*
* Description: This function parses an input string (szOSType) for specific
* string keys:
* WIN95_DEBUTE, WIN95, WIN98, NT3, NT4, NT5, NT50, NT51
*
* It then stores the information in a DWORD, each bit corresponding to a
* particular OS type.
*/
DWORD ParseOSType(char *szOSType)
{
char szBuf[MAX_BUF];
DWORD dwOSType = 0;
lstrcpy(szBuf, szOSType);
strupr(szBuf);
if(strstr(szBuf, "WIN95 DEBUTE"))
dwOSType |= OS_WIN95_DEBUTE;
if(strstr(szBuf, "WIN95") &&
!strstr(szBuf, "WIN95 DEBUTE"))
dwOSType |= OS_WIN95;
if(strstr(szBuf, "WIN98"))
dwOSType |= OS_WIN98;
if(strstr(szBuf, "NT3"))
dwOSType |= OS_NT3;
if(strstr(szBuf, "NT4"))
dwOSType |= OS_NT4;
if(strstr(szBuf, "NT50"))
dwOSType |= OS_NT50;
if(strstr(szBuf, "NT51"))
dwOSType |= OS_NT51;
if(strstr(szBuf, "NT5") &&
!strstr(szBuf, "NT50") &&
!strstr(szBuf, "NT51"))
dwOSType |= OS_NT5;
return(dwOSType);
}
HRESULT ParseComponentAttributes(char *szAttribute)
{
char szBuf[MAX_BUF];

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

@ -203,6 +203,7 @@ void SetSetupCurrentDownloadFile(char *szCurrentFilename);
char *GetSetupCurrentDownloadFile(char *szCurrentDownloadFile,
DWORD dwCurrentDownloadFileBufSize);
BOOL DeleteWGetLog(void);
DWORD ParseOSType(char *szOSType);
#endif /* _EXTRA_H_ */

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

@ -1736,6 +1736,7 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
BOOL bDnu;
BOOL bOverwriteKey;
BOOL bOverwriteName;
BOOL bOSDetected;
DWORD dwIndex;
DWORD dwType;
DWORD dwSize;
@ -1753,7 +1754,7 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
GetPrivateProfileString(szSection, "Key", "", szBuf, sizeof(szBuf), szFileIniConfig);
GetPrivateProfileString(szSection, "Decrypt Key", "", szDecrypt, sizeof(szDecrypt), szFileIniConfig);
GetPrivateProfileString(szSection, "Overwrite Key", "", szOverwriteKey, sizeof(szOverwriteKey), szFileIniConfig);
ZeroMemory(szKey, sizeof(szKey));
if(lstrcmpi(szDecrypt, "TRUE") == 0)
DecryptString(szKey, szBuf);
else
@ -1767,7 +1768,7 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
GetPrivateProfileString(szSection, "Name", "", szBuf, sizeof(szBuf), szFileIniConfig);
GetPrivateProfileString(szSection, "Decrypt Name", "", szDecrypt, sizeof(szDecrypt), szFileIniConfig);
GetPrivateProfileString(szSection, "Overwrite Name", "", szOverwriteName, sizeof(szOverwriteName), szFileIniConfig);
ZeroMemory(szName, sizeof(szName));
if(lstrcmpi(szDecrypt, "TRUE") == 0)
DecryptString(szName, szBuf);
else
@ -1780,6 +1781,7 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
GetPrivateProfileString(szSection, "Name Value", "", szBuf, sizeof(szBuf), szFileIniConfig);
GetPrivateProfileString(szSection, "Decrypt Name Value", "", szDecrypt, sizeof(szDecrypt), szFileIniConfig);
ZeroMemory(szValue, sizeof(szValue));
if(lstrcmpi(szDecrypt, "TRUE") == 0)
DecryptString(szValue, szBuf);
else
@ -1802,7 +1804,31 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
else
bDnu = FALSE;
GetPrivateProfileString(szSection, "Type", "", szBuf, sizeof(szBuf), szFileIniConfig);
/* Read the OS key to see if there are restrictions on which OS to
* the Windows registry key for */
GetPrivateProfileString(szSection,
"OS",
"",
szBuf,
sizeof(szBuf),
szFileIniConfig);
/* If there is no OS key value set, then assume all OS is valid.
* If there are any, then compare against the global OS value to
* make sure there's a match. */
bOSDetected = TRUE;
if((*szBuf != '\0') &&
((gSystemInfo.dwOSType & ParseOSType(szBuf)) == 0))
bOSDetected = FALSE;
if(bOSDetected)
{
ZeroMemory(szBuf, sizeof(szBuf));
GetPrivateProfileString(szSection,
"Type",
"",
szBuf,
sizeof(szBuf),
szFileIniConfig);
if(ParseRegType(szBuf, &dwType))
{
/* create/set windows registry key here (string value)! */
@ -1817,6 +1843,7 @@ HRESULT ProcessWinReg(DWORD dwTiming, char *szSectionPrefix)
dwType, (CONST LPBYTE)&iiNum, dwSize, TRUE, bDnu);
}
}
}
++dwIndex;
BuildNumberedString(dwIndex, szSectionPrefix, "Windows Registry", szSection, sizeof(szSection));

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

@ -211,6 +211,8 @@ typedef int PRInt32;
#define OS_NT3 0x00000020
#define OS_NT4 0x00000040
#define OS_NT5 0x00000080
#define OS_NT50 0x00000100
#define OS_NT51 0x00000200
/* DSR: Disk Space Required */
#define DSR_DESTINATION 0