зеркало из https://github.com/mozilla/gecko-dev.git
fixed bugs:
#24297 - added code to randomly install talkback 2o% of the time. #27298 - fixed the underline under the N on the Mail&News string #27184 - removed all references to "SmartUpdate" strings
This commit is contained in:
Родитель
d018fa4b19
Коммит
8e14066abd
|
@ -253,8 +253,8 @@ Attributes=SELECTED
|
|||
url0=$URLPath$
|
||||
|
||||
[Component2]
|
||||
Description Short=Mail&News
|
||||
Description Long=Seamonkey Mail&News
|
||||
Description Short=Mail & News
|
||||
Description Long=Seamonkey Mail & News
|
||||
Archive=mail.xpi
|
||||
$InstallSize$:mail
|
||||
$InstallSizeSystem$
|
||||
|
@ -276,7 +276,7 @@ Source=[XPI PATH]\core.xpi
|
|||
Destination=[TEMP]\core.ns
|
||||
$InstallSize$:core
|
||||
Cleanup=TRUE
|
||||
Message=Preparing SmartUpdate, please wait...
|
||||
Message=Preparing Install, please wait...
|
||||
|
||||
; The Timing key needs to be one of the following values:
|
||||
; pre download - process before any files have been downloaded.
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "extra.h"
|
||||
#include "dialogs.h"
|
||||
#include "ifuncns.h"
|
||||
#include "time.h"
|
||||
|
||||
ULONG (PASCAL *NS_GetDiskFreeSpace)(LPCTSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
|
||||
ULONG (PASCAL *NS_GetDiskFreeSpaceEx)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
|
||||
|
@ -1223,10 +1224,12 @@ siC *CreateSiCNode()
|
|||
if((siCNode = NS_GlobalAlloc(sizeof(struct sinfoComponent))) == NULL)
|
||||
exit(1);
|
||||
|
||||
siCNode->dwAttributes = 0;
|
||||
siCNode->ullInstallSize = 0;
|
||||
siCNode->ullInstallSizeSystem = 0;
|
||||
siCNode->ullInstallSizeArchive = 0;
|
||||
siCNode->dwAttributes = 0;
|
||||
siCNode->ullInstallSize = 0;
|
||||
siCNode->ullInstallSizeSystem = 0;
|
||||
siCNode->ullInstallSizeArchive = 0;
|
||||
siCNode->lRandomInstallPercentage = 0;
|
||||
siCNode->lRandomInstallValue = 0;
|
||||
|
||||
if((siCNode->szArchiveName = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
exit(1);
|
||||
|
@ -1419,7 +1422,11 @@ void SiCNodeSetItemsSelected(DWORD dwItems, DWORD *dwItemsSelected)
|
|||
{
|
||||
/* Found the item that was selected, set the */
|
||||
/* SIC_SELECTED attribute and break*/
|
||||
siCTemp->dwAttributes |= SIC_SELECTED;
|
||||
if((siCTemp->lRandomInstallPercentage == 0) ||
|
||||
(siCTemp->lRandomInstallPercentage > siCTemp->lRandomInstallValue))
|
||||
siCTemp->dwAttributes |= SIC_SELECTED;
|
||||
else
|
||||
siCTemp->dwAttributes &= ~SIC_SELECTED;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1438,7 +1445,11 @@ void SiCNodeSetItemsSelected(DWORD dwItems, DWORD *dwItemsSelected)
|
|||
{
|
||||
/* Found the item that was selected, set the */
|
||||
/* SIC_SELECTED attribute and break*/
|
||||
siCTemp->dwAttributes |= SIC_SELECTED;
|
||||
if((siCTemp->lRandomInstallPercentage == 0) ||
|
||||
(siCTemp->lRandomInstallPercentage > siCTemp->lRandomInstallValue))
|
||||
siCTemp->dwAttributes |= SIC_SELECTED;
|
||||
else
|
||||
siCTemp->dwAttributes &= ~SIC_SELECTED;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -2145,6 +2156,15 @@ HRESULT ParseComponentAttributes(char *szAttribute)
|
|||
return(dwAttributes);
|
||||
}
|
||||
|
||||
long RandomSelect()
|
||||
{
|
||||
long lArbitrary = 0;
|
||||
|
||||
srand((unsigned)time(NULL));
|
||||
lArbitrary = rand() % 100;
|
||||
return(lArbitrary);
|
||||
}
|
||||
|
||||
void InitSiComponents(char *szFileIni)
|
||||
{
|
||||
DWORD dwIndex0;
|
||||
|
@ -2208,6 +2228,16 @@ void InitSiComponents(char *szFileIni)
|
|||
GetPrivateProfileString(szComponentItem, "Attributes", "", szBuf, MAX_BUF, szFileIni);
|
||||
siCTemp->dwAttributes = ParseComponentAttributes(szBuf);
|
||||
|
||||
/* get the random percentage value and select or deselect the component (by default) for
|
||||
* installation */
|
||||
GetPrivateProfileString(szComponentItem, "Random Install Percentage", "", szBuf, MAX_BUF, szFileIni);
|
||||
if(*szBuf != '\0')
|
||||
{
|
||||
siCTemp->lRandomInstallPercentage = atol(szBuf);
|
||||
if(siCTemp->lRandomInstallPercentage != 0)
|
||||
siCTemp->lRandomInstallValue = RandomSelect();
|
||||
}
|
||||
|
||||
/* get all dependencies for this component */
|
||||
dwIndex1 = 0;
|
||||
itoa(dwIndex1, szIndex1, 10);
|
||||
|
|
|
@ -135,6 +135,7 @@ void DeInitDSNode(dsN **dsnComponentDSRequirement);
|
|||
void UpdatePathDiskSpaceRequired(LPSTR szPath, ULONGLONG ullInstallSize, dsN **dsnComponentDSRequirement);
|
||||
HRESULT InitComponentDiskSpaceInfo(dsN **dsnComponentDSRequirement);
|
||||
HRESULT CheckInstances();
|
||||
long RandomSelect(void);
|
||||
|
||||
BOOL bSDInit;
|
||||
|
||||
|
|
|
@ -159,9 +159,9 @@ typedef struct stStruct
|
|||
{
|
||||
BOOL bVisible;
|
||||
DWORD dwCItems;
|
||||
DWORD dwCItemsSelected[MAX_BUF];
|
||||
DWORD dwCItemsSelected[MAX_BUF]; /* components */
|
||||
DWORD dwAItems;
|
||||
DWORD dwAItemsSelected[MAX_BUF];
|
||||
DWORD dwAItemsSelected[MAX_BUF]; /* additions */
|
||||
LPSTR szDescriptionShort;
|
||||
LPSTR szDescriptionLong;
|
||||
} st;
|
||||
|
@ -278,6 +278,8 @@ struct sinfoComponent
|
|||
ULONGLONG ullInstallSize;
|
||||
ULONGLONG ullInstallSizeSystem;
|
||||
ULONGLONG ullInstallSizeArchive;
|
||||
long lRandomInstallPercentage;
|
||||
long lRandomInstallValue;
|
||||
DWORD dwAttributes;
|
||||
LPSTR szArchiveName;
|
||||
LPSTR szArchivePath;
|
||||
|
|
|
@ -325,7 +325,7 @@ BEGIN
|
|||
"Could not create folder: %sMake sure you have access to create the folder."
|
||||
IDS_STR_FILE_NUMBER "File count:"
|
||||
IDS_STR_FILENAME "Filename:"
|
||||
IDS_MSG_SMARTUPDATE_START "Initializing SmartUpdate, please wait..."
|
||||
IDS_MSG_SMARTUPDATE_START "Preparing Install, please wait..."
|
||||
IDS_MSG_CONFIGURING "Configuring %s, please wait..."
|
||||
IDS_ERROR_XPI_INSTALL "Error ocurred during installation"
|
||||
IDS_ERROR_SETUP_REQUIREMENT
|
||||
|
|
Загрузка…
Ссылка в новой задаче