fixing bugs 7874 (on going) and 30909.

Affects only windows platforms.
This commit is contained in:
ssu%netscape.com 2000-04-19 00:51:00 +00:00
Родитель 19bc3835ff
Коммит fbd8039811
24 изменённых файлов: 260 добавлений и 147 удалений

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

@ -2,13 +2,13 @@
;
; File format:
;
; [] designates a toplevel component. Example: [core]
; [] designates a toplevel component. Example: [xpcom]
; - in front of a file specifies it to be removed from the destination
; * wildcard support to recursively copy the entire directory
; ; file comment
;
[core]
[xpcom]
; files required to initialize xpinstall for Install Wizard
bin\js3250.dll
bin\mozreg.dll
@ -22,7 +22,7 @@ bin\components\jar50.dll
bin\components\xpinstal.dll
[browser]
; files listed in core (missing in this section) will be installed as part of the browser
; files listed in xpcom (missing in this section) will be installed as part of the browser
bin\gkgfxwin.dll
bin\gkplugin.dll
bin\gkweb.dll

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

@ -48,6 +48,8 @@ Path=[PROGRAMFILESDIR]\$CompanyName$\Seamonkey
Program Folder Name=$ProductName$
Program Folder Path=[COMMON_PROGRAMS]
Uninstall Filename=$UninstallFile$
; Default Setup Type values:
; Setup Type 0 - first radio button (default)
; Setup Type 1 - second radio button
@ -126,6 +128,7 @@ Description Long=Program will be installed with the minimal options.
; this Setup Type is selected.
C0=Component0
C1=Component1
C2=Component3
[Setup Type1]
Description Short=C&omplete
@ -137,6 +140,7 @@ Description Long=Program will be installed with the most common options.
C0=Component0
C1=Component1
C2=Component2
C3=Component3
[Setup Type2]
Description Short=C&ustom
@ -150,6 +154,7 @@ Description Long=You may choose the options you want to install. Recommended fo
C0=Component0
C1=Component1
C2=Component2
C3=Component3
;[Setup Type3]
;Description Short=C&ustom
@ -249,10 +254,10 @@ Message=Setup has detected that an instance of Personal Security Manager is curr
[Component0]
Description Short=Mozilla Xpinstall Engine
Description Long=Install Engine
Archive=core.xpi
$InstallSize$:core
Archive=xpcom.xpi
$InstallSize$:xpcom
$InstallSizeSystem$
$InstallSizeArchive$:core.xpi
$InstallSizeArchive$:xpcom.xpi
;Dependency0=
Dependee0=Mozilla Seamonkey
; Attributes can be the following values:
@ -305,10 +310,29 @@ Parameter=
Domain0=$Domain$
Server Path0=$ServerPath$
[Component3]
Description Short=$CompanyName$ Uninstaller
Description Long=Uninstaller for $ProductName$
Archive=$UninstallFile$
Install Size=0
$InstallSizeArchive$:$UninstallFile$
;Dependency0=
; Attributes can be the following values:
; SELECTED - the component is selected to be installed by default.
; INVISIBLE - the component is not shown in the Select Components dialog.
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
Parameter=
; url keys can be as many as needed. url0 is attempted first. if it fails,
; the next url key is tried in sequential order.
; The url should not contain the filename. Setup will assemble the complete url
; using the url keys and the Archive key.
Domain0=$Domain$
Server Path0=$ServerPath$
[Core]
Source=[XPI PATH]\core.xpi
Destination=[WIZTEMP]\core.ns
$InstallSize$:core
Source=[XPI PATH]\xpcom.xpi
Destination=[WIZTEMP]\xpcom.ns
$InstallSize$:xpcom
Cleanup=TRUE
Message=Preparing Install, please wait...
@ -321,8 +345,8 @@ Message=
; The Timing key needs to be one of the following values:
; pre download - process before any files have been downloaded.
; post download - process after all files have been downloaded.
; pre core - process before the core file has been uncompressed.
; post core - process after the core file has been uncompressed.
; pre xpcom - process before the xpcom file has been uncompressed.
; post xpcom - process after the xpcom file has been uncompressed.
; pre smartupdate - process before the smartupdate engine has been launched.
; post smartupdate - process after the smartupdate engine has been launched.
; pre launchapp - process before the launching of executables.
@ -334,7 +358,7 @@ Message=
;Uncompress FileX sections
;[Uncompress File0]
;Timing=post download
;Source=[XPI PATH]\core.xpi
;Source=[XPI PATH]\xpcom.xpi
;Destination=[SETUP PATH]
;Message=Configuring Seamonkey, please wait...

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

@ -72,12 +72,12 @@ if(!(-e "$inDistPath"))
}
# Make .js files
MakeJsFile("core");
MakeJsFile("xpcom");
MakeJsFile("browser");
MakeJsFile("mail");
# Make .xpi files
MakeXpiFile("core");
MakeXpiFile("xpcom");
MakeXpiFile("browser");
MakeXpiFile("mail");
@ -117,7 +117,7 @@ system("xcopy /f $inDistPath\\setuprsc.dll $inDistPath\\setup\\");
print "\nbuilding self-extracting uninstaller ($seuFileNameSpecific)...\n";
system("copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seuFileNameSpecific");
system("$inDistPath\\nszip.exe $inDistPath\\$seuFileNameSpecific $inDistPath\\uninstall\\*.*");
system("xcopy /f $inDistPath\\$seuFileNameSpecific $inDistPath\\setup\\");
system("xcopy /f $inDistPath\\$seuFileNameSpecific $inDistPath\\xpi\\");
# build the self-extracting .exe (installer) file.
print "\nbuilding self-extracting installer ($seiFileNameSpecific)...\n";

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

@ -33,7 +33,7 @@
# ie: 5.0.0.99256
# component staging path - path to where the components are staged at
#
# ie: perl makejs.pl core.jst 5.0.0.99256
# ie: perl makejs.pl xpcom.jst 5.0.0.99256
#
# Make sure there are at least two arguments
@ -46,7 +46,7 @@ if($#ARGV < 2)
form of: major.minor.release.yydoy
ie: 5.0.0.99256
component staging path : path to where this component is staged at
ie: z:\\stage\\windows\\32bit\\en\\5.0\\core
ie: z:\\stage\\windows\\32bit\\en\\5.0\\xpcom
\n";
}

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

@ -33,7 +33,7 @@
# - path to where the .xpi files are are to be created at.
# ** MUST BE AN ABSOLUTE PATH, NOT A RELATIVE PATH **
#
# ie: perl makexpi.pl core z:\exposed\windows\32bit\en\5.0 d:\build\mozilla\dist\win32_o.obj\install\working
# ie: perl makexpi.pl xpcom z:\exposed\windows\32bit\en\5.0 d:\build\mozilla\dist\win32_o.obj\install\working
#
use File::Copy;

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

@ -53,6 +53,8 @@ Root Key=HKEY_LOCAL_MACHINE
Key=[Mozilla Seamonkey CurrentVersion]\Uninstall
Decrypt Key=TRUE
Uninstall Filename=$UninstallFile$
[Dialog Uninstall]
Show Dialog=FALSE
@ -74,8 +76,8 @@ Message0=This will uninstall %s from your system. Click Uninstall to begin unin
; The Timing key needs to be one of the following values:
; pre download - process before any files have been downloaded.
; post download - process after all files have been downloaded.
; pre core - process before the core file has been uncompressed.
; post core - process after the core file has been uncompressed.
; pre xpcom - process before the xpcom file has been uncompressed.
; post xpcom - process after the xpcom file has been uncompressed.
; pre smartupdate - process before the smartupdate engine has been launched.
; post smartupdate - process after the smartupdate engine has been launched.
; pre launchapp - process before the launching of executables.
@ -87,7 +89,7 @@ Message0=This will uninstall %s from your system. Click Uninstall to begin unin
;Uncompress FileX sections
;[Uncompress File0]
;Timing=post download
;Source=[XPI PATH]\core.xpi
;Source=[XPI PATH]\xpcom.xpi
;Destination=[SETUP PATH]
;Message=Configuring Seamonkey, please wait...

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

@ -415,7 +415,6 @@ UpdateProgressBar(unsigned value)
// Only invalidate the part that needs updating
GetClientRect(hWndGauge, &rect);
rect.left = BAR_MARGIN + (nBars - 1) * (BAR_WIDTH + BAR_SPACING);
InvalidateRect(hWndGauge, &rect, FALSE);
// Update the whole extracting dialog. We do this because we don't
@ -739,7 +738,7 @@ RunInstaller()
GetFullTempPathName("SETUP.EXE", sizeof(szSetupFile), szSetupFile);
GetFullTempPathName("uninstall.exe", sizeof(szUninstallFile), szUninstallFile);
GetPrivateProfileString("Archives", "uninstall.exe", "", szBuf, (MAX_BUF * 2), szArcLstFile);
GetPrivateProfileString("Archives", "uninstall.exe", "", szBuf, sizeof(szBuf), szArcLstFile);
if((FileExists(szUninstallFile) != FALSE) && (*szBuf != '\0'))
{
lstrcpy(szCmdLine, szUninstallFile);
@ -802,7 +801,7 @@ RunInstaller()
// delete archive.lst file in the temp directory
GetFullTempPathName("Archive.lst", sizeof(szTmp), szTmp);
DeleteFile(szTmp);
GetFullTempPathName("core.ns", sizeof(szTmp), szTmp);
GetFullTempPathName("xpcom.ns", sizeof(szTmp), szTmp);
DirectoryRemove(szTmp, TRUE);
DirectoryRemove(szTempPath, FALSE);
return TRUE;

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

@ -1970,13 +1970,13 @@ void DlgSequenceNext()
{
/* POST_DOWNLOAD process file manipulation functions */
ProcessFileOps(T_POST_DOWNLOAD);
/* PRE_CORE process file manipulation functions */
ProcessFileOps(T_PRE_CORE);
/* PRE_XPCOM process file manipulation functions */
ProcessFileOps(T_PRE_XPCOM);
ProcessCoreFile();
ProcessXpcomFile();
/* POST_CORE process file manipulation functions */
ProcessFileOps(T_POST_CORE);
/* POST_XPCOM process file manipulation functions */
ProcessFileOps(T_POST_XPCOM);
/* PRE_SMARTUPDATE process file manipulation functions */
ProcessFileOps(T_PRE_SMARTUPDATE);
@ -1998,25 +1998,25 @@ void DlgSequenceNext()
if(NeedReboot())
{
CleanupCoreFile();
CleanupXpcomFile();
InstantiateDialog(DLG_RESTART, diReboot.szTitle, DlgProcReboot);
}
else
{
CleanupCoreFile();
CleanupXpcomFile();
PostQuitMessage(0);
}
}
else
{
CleanupCoreFile();
CleanupXpcomFile();
PostQuitMessage(0);
}
}
else
{
bSDUserCanceled = TRUE;
CleanupCoreFile();
CleanupXpcomFile();
PostQuitMessage(0);
}
gbProcessingXpnstallFiles = FALSE;

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

@ -61,10 +61,11 @@ extern LPSTR szSiteSelectorDescription;
extern DWORD dwWizardState;
extern DWORD dwSetupType;
extern DWORD dwOSType;
extern DWORD dwScreenX;
extern DWORD dwScreenY;
extern ULONG ulOSType;
extern DWORD dwTempSetupType;
extern BOOL bSDUserCanceled;
@ -85,7 +86,7 @@ extern diSS diSiteSelector;
extern diSI diStartInstall;
extern diR diReboot;
extern siSD siSDObject;
extern siCF siCFCoreFile;
extern siCF siCFXpcomFile;
extern siC *siComponents;
extern ssi *ssiSiteSelector;

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

@ -62,6 +62,24 @@ DWORD GetPerfData (HKEY hPerfKey,
PPERF_DATA *ppData,
DWORD *pDataSize);
BOOL InitDialogClass(HINSTANCE hInstance)
{
WNDCLASS wc;
wc.style = CS_DBLCLKS | CS_SAVEBITS | CS_BYTEALIGNWINDOW;
wc.lpfnWndProc = DefDlgProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = DLGWINDOWEXTRA;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SETUP));
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wc.lpszMenuName = NULL;
wc.lpszClassName = szClassName;
return(RegisterClass(&wc));
}
BOOL InitApplication(HINSTANCE hInstance, HINSTANCE hSetupRscInst)
{
WNDCLASS wc;
@ -77,6 +95,7 @@ BOOL InitApplication(HINSTANCE hInstance, HINSTANCE hSetupRscInst)
wc.lpszMenuName = NULL;
wc.lpszClassName = szClassName;
// InitDialogClass(HINSTANCE hInstance);
return(RegisterClass(&wc));
}
@ -1029,11 +1048,11 @@ long RetrieveRedirectFile()
any jar files needed to be downloaded */
if(FileExists(szFileIdiGetRedirect))
{
DecryptString(szBuf, siSDObject.szCoreDir);
lstrcpy(siSDObject.szCoreDir, szBuf);
DecryptString(szBuf, siSDObject.szXpcomDir);
lstrcpy(siSDObject.szXpcomDir, szBuf);
WritePrivateProfileString("Netscape Install", "core_file", siSDObject.szCoreFile, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "core_dir", siSDObject.szCoreDir, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "core_file", siSDObject.szXpcomFile, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "core_dir", siSDObject.szXpcomDir, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "no_ads", siSDObject.szNoAds, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "silent", siSDObject.szSilent, szFileIdiGetRedirect);
WritePrivateProfileString("Netscape Install", "execution", siSDObject.szExecution, szFileIdiGetRedirect);
@ -1105,11 +1124,11 @@ long RetrieveArchives()
any jar files needed to be downloaded */
if(FileExists(szFileIdiGetArchives))
{
DecryptString(szBuf, siSDObject.szCoreDir);
lstrcpy(siSDObject.szCoreDir, szBuf);
DecryptString(szBuf, siSDObject.szXpcomDir);
lstrcpy(siSDObject.szXpcomDir, szBuf);
WritePrivateProfileString("Netscape Install", "core_file", siSDObject.szCoreFile, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "core_dir", siSDObject.szCoreDir, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "core_file", siSDObject.szXpcomFile, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "core_dir", siSDObject.szXpcomDir, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "no_ads", siSDObject.szNoAds, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "silent", siSDObject.szSilent, szFileIdiGetArchives);
WritePrivateProfileString("Netscape Install", "execution", siSDObject.szExecution, szFileIdiGetArchives);
@ -1347,6 +1366,7 @@ void DetermineOSVersion()
BOOL bIsWin95Debute;
char szESetupRequirement[MAX_BUF];
ulOSType = 0;
dwVersion = GetVersion();
bIsWin95Debute = IsWin95Debute();
@ -1358,22 +1378,26 @@ void DetermineOSVersion()
// Get build numbers for Windows NT or Win95/Win98
if(dwVersion < 0x80000000) // Windows NT
{
ulOSType |= OS_NT;
if(dwWindowsMajorVersion == 3)
dwOSType = OS_NT3;
ulOSType |= OS_NT3;
else if(dwWindowsMajorVersion == 4)
ulOSType |= OS_NT4;
else
dwOSType = OS_NT4;
ulOSType |= OS_NT5;
}
else if(dwWindowsMajorVersion == 4)
{
ulOSType |= OS_WIN9x;
if(dwWindowsMinorVersion == 0)
{
dwOSType |= OS_WIN95;
ulOSType |= OS_WIN95;
if(bIsWin95Debute)
dwOSType |= OS_WIN95_DEBUTE;
ulOSType |= OS_WIN95_DEBUTE;
}
else
dwOSType = OS_WIN98;
ulOSType |= OS_WIN98;
}
else
{
@ -1722,9 +1746,9 @@ void DeInitSetupGeneral()
HRESULT InitSDObject()
{
if((siSDObject.szCoreFile = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siSDObject.szXpcomFile = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((siSDObject.szCoreDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siSDObject.szXpcomDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((siSDObject.szNoAds = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
@ -1740,7 +1764,7 @@ HRESULT InitSDObject()
return(1);
if((siSDObject.szExeParam = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((siSDObject.szCoreFilePath = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siSDObject.szXpcomFilePath = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
return(0);
@ -1748,8 +1772,8 @@ HRESULT InitSDObject()
void DeInitSDObject()
{
FreeMemory(&(siSDObject.szCoreFile));
FreeMemory(&(siSDObject.szCoreDir));
FreeMemory(&(siSDObject.szXpcomFile));
FreeMemory(&(siSDObject.szXpcomDir));
FreeMemory(&(siSDObject.szNoAds));
FreeMemory(&(siSDObject.szSilent));
FreeMemory(&(siSDObject.szExecution));
@ -1757,28 +1781,28 @@ void DeInitSDObject()
FreeMemory(&(siSDObject.szExtractMsg));
FreeMemory(&(siSDObject.szExe));
FreeMemory(&(siSDObject.szExeParam));
FreeMemory(&(siSDObject.szCoreFilePath));
FreeMemory(&(siSDObject.szXpcomFilePath));
}
HRESULT InitSCoreFile()
HRESULT InitSXpcomFile()
{
if((siCFCoreFile.szSource = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siCFXpcomFile.szSource = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((siCFCoreFile.szDestination = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siCFXpcomFile.szDestination = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((siCFCoreFile.szMessage = NS_GlobalAlloc(MAX_BUF)) == NULL)
if((siCFXpcomFile.szMessage = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
siCFCoreFile.bCleanup = TRUE;
siCFCoreFile.ullInstallSize = 0;
siCFXpcomFile.bCleanup = TRUE;
siCFXpcomFile.ullInstallSize = 0;
return(0);
}
void DeInitSCoreFile()
void DeInitSXpcomFile()
{
FreeMemory(&(siCFCoreFile.szSource));
FreeMemory(&(siCFCoreFile.szDestination));
FreeMemory(&(siCFCoreFile.szMessage));
FreeMemory(&(siCFXpcomFile.szSource));
FreeMemory(&(siCFXpcomFile.szDestination));
FreeMemory(&(siCFXpcomFile.szMessage));
}
siC *CreateSiCNode()
@ -2509,7 +2533,7 @@ ULONGLONG GetDiskSpaceRequired(DWORD dwType)
/* add the amount of disk space it will take for the
xpinstall engine in the TEMP area */
if(dwType == DSR_TEMP)
ullTotalSize += siCFCoreFile.ullInstallSize;
ullTotalSize += siCFXpcomFile.ullInstallSize;
return(ullTotalSize);
}
@ -2529,7 +2553,7 @@ ULONGLONG GetDiskSpaceAvailable(LPSTR szPath)
DWORD dwNumberOfFreeClusters;
DWORD dwTotalNumberOfClusters;
if((dwOSType & OS_WIN95_DEBUTE) && (NS_GetDiskFreeSpace != NULL))
if((ulOSType & OS_WIN95_DEBUTE) && (NS_GetDiskFreeSpace != NULL))
{
ParsePath(szPath, szTempPath, MAX_BUF, PP_ROOT_ONLY);
NS_GetDiskFreeSpace(szTempPath,
@ -2716,9 +2740,9 @@ HRESULT InitComponentDiskSpaceInfo(dsN **dsnComponentDSRequirement)
siCObject = SiCNodeGetObject(dwIndex0, TRUE, AC_ALL);
}
/* take the uncompressed size of core into account */
/* take the uncompressed size of Xpcom into account */
if(*szBufTempPath != '\0')
UpdatePathDiskSpaceRequired(szBufTempPath, siCFCoreFile.ullInstallSize, dsnComponentDSRequirement);
UpdatePathDiskSpaceRequired(szBufTempPath, siCFXpcomFile.ullInstallSize, dsnComponentDSRequirement);
return(hResult);
}
@ -3930,7 +3954,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
return(1);
if(InitSDObject())
return(1);
if(InitSCoreFile())
if(InitSXpcomFile())
return(1);
/* get install Mode information */
@ -4223,16 +4247,16 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
}
}
/* get install size required in temp for component core. Sould be in Kilobytes */
GetPrivateProfileString("Core", "Install Size", "", szBuf, MAX_BUF, szFileIniConfig);
/* get install size required in temp for component Xpcom. Sould be in Kilobytes */
GetPrivateProfileString("Xpcom", "Install Size", "", szBuf, MAX_BUF, szFileIniConfig);
if(*szBuf != '\0')
siCFCoreFile.ullInstallSize = _atoi64(szBuf);
siCFXpcomFile.ullInstallSize = _atoi64(szBuf);
else
siCFCoreFile.ullInstallSize = 0;
siCFXpcomFile.ullInstallSize = 0;
GetPrivateProfileString("SmartDownload-Netscape Install", "core_file", "", siSDObject.szCoreFile, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "core_file_path", "", siSDObject.szCoreFilePath, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "core_dir", "", siSDObject.szCoreDir, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "core_file", "", siSDObject.szXpcomFile, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "core_file_path", "", siSDObject.szXpcomFilePath, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "xpcom_dir", "", siSDObject.szXpcomDir, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "no_ads", "", siSDObject.szNoAds, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "silent", "", siSDObject.szSilent, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("SmartDownload-Netscape Install", "execution", "", siSDObject.szExecution, MAX_BUF, szFileIniConfig);
@ -4242,18 +4266,18 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
GetPrivateProfileString("SmartDownload-Execution", "exe_param", "", siSDObject.szExeParam, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Core", "Source", "", szBuf, MAX_BUF, szFileIniConfig);
DecryptString(siCFCoreFile.szSource, szBuf);
DecryptString(siCFXpcomFile.szSource, szBuf);
GetPrivateProfileString("Core", "Destination", "", szBuf, MAX_BUF, szFileIniConfig);
DecryptString(siCFCoreFile.szDestination, szBuf);
GetPrivateProfileString("Core", "Message", "", siCFCoreFile.szMessage, MAX_BUF, szFileIniConfig);
DecryptString(siCFXpcomFile.szDestination, szBuf);
GetPrivateProfileString("Core", "Message", "", siCFXpcomFile.szMessage, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Core", "Cleanup", "", szBuf, MAX_BUF, szFileIniConfig);
if(lstrcmpi(szBuf, "FALSE") == 0)
{
siCFCoreFile.bCleanup = FALSE;
siCFXpcomFile.bCleanup = FALSE;
}
else
{
siCFCoreFile.bCleanup = TRUE;
siCFXpcomFile.bCleanup = TRUE;
}
hdc = GetDC(hWndMain);
@ -4554,7 +4578,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "CONFIGPATH") == 0)
{
/* parse for the "c:\Windows\Config" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", "ConfigPath", szVariable, dwVariableSize);
}
@ -4567,7 +4591,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_STARTUP") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu\\Programs\\Startup" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Startup", szVariable, dwVariableSize);
}
@ -4579,7 +4603,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_PROGRAMS") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu\\Programs" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Programs", szVariable, dwVariableSize);
}
@ -4591,7 +4615,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_STARTMENU") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Start Menu", szVariable, dwVariableSize);
}
@ -4603,7 +4627,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_DESKTOP") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Desktop" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Desktop", szVariable, dwVariableSize);
}
@ -4675,7 +4699,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "PERSONAL_PRINTHOOD") == 0)
{
/* parse for the "C:\WINNT40\Profiles\%USERNAME%\PrintHood" directory */
if((dwOSType & OS_NT3) || (dwOSType & OS_NT4))
if(ulOSType & OS_NT)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "PrintHood", szVariable, dwVariableSize);
}
@ -5243,7 +5267,7 @@ void DeInitialize()
CleanTempFiles();
DeInitSiComponents();
DeInitSCoreFile();
DeInitSXpcomFile();
DeInitSDObject();
DeInitDlgReboot(&diReboot);
DeInitDlgStartInstall(&diStartInstall);

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

@ -90,8 +90,8 @@ BOOL ResolveComponentDependency(siCD *siCDInDependency);
void ResolveDependees(LPSTR szToggledDescriptionShort);
BOOL ResolveComponentDependee(siCD *siCDInDependee);
void STGetComponents(LPSTR szSection, st *stSetupType, LPSTR szFileIni);
HRESULT InitSCoreFile(void);
void DeInitSCoreFile(void);
HRESULT InitSXpcomFile(void);
void DeInitSXpcomFile(void);
void DeInitialize(void);
void DeInitDlgWelcome(diW *diDialog);
void DeInitDlgLicense(diL *diDialog);
@ -172,6 +172,8 @@ LPSTR GetArgV(LPSTR lpszCommandLine, int iIndex, LPSTR lpszDest, int
void ParseCommandLine(LPSTR lpszCmdLine);
void SetSetupRunMode(LPSTR szMode);
void Delay(DWORD dwSeconds);
siCD *InitWinInitNodes(char *szInFile);
void UpdateWininit(LPSTR szUninstallFilename);
BOOL bSDInit;

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

@ -47,13 +47,13 @@ HRESULT TimingCheck(DWORD dwTiming, LPSTR szSection, LPSTR szFile)
return(TRUE);
break;
case T_PRE_CORE:
if(lstrcmpi(szBuf, "pre core") == 0)
case T_PRE_XPCOM:
if(lstrcmpi(szBuf, "pre xpcom") == 0)
return(TRUE);
break;
case T_POST_CORE:
if(lstrcmpi(szBuf, "post core") == 0)
case T_POST_XPCOM:
if(lstrcmpi(szBuf, "post xpcom") == 0)
return(TRUE);
break;
@ -140,39 +140,39 @@ HRESULT FileUncompress(LPSTR szFrom, LPSTR szTo)
return(FO_SUCCESS);
}
HRESULT ProcessCoreFile()
HRESULT ProcessXpcomFile()
{
char szSource[MAX_BUF];
char szDestination[MAX_BUF];
if(*siCFCoreFile.szMessage != '\0')
ShowMessage(siCFCoreFile.szMessage, TRUE);
if(*siCFXpcomFile.szMessage != '\0')
ShowMessage(siCFXpcomFile.szMessage, TRUE);
FileUncompress(siCFCoreFile.szSource, siCFCoreFile.szDestination);
FileUncompress(siCFXpcomFile.szSource, siCFXpcomFile.szDestination);
/* copy msvcrt.dll and msvcirt.dll to the bin of the core temp dir:
* (c:\temp\core.ns\bin)
/* copy msvcrt.dll and msvcirt.dll to the bin of the Xpcom temp dir:
* (c:\temp\Xpcom.ns\bin)
* This is incase these files do not exist on the system */
lstrcpy(szSource, siCFCoreFile.szDestination);
lstrcpy(szSource, siCFXpcomFile.szDestination);
AppendBackSlash(szSource, sizeof(szSource));
lstrcat(szSource, "ms*.dll");
lstrcpy(szDestination, siCFCoreFile.szDestination);
lstrcpy(szDestination, siCFXpcomFile.szDestination);
AppendBackSlash(szDestination, sizeof(szDestination));
lstrcat(szDestination, "bin");
FileCopy(szSource, szDestination, TRUE);
if(*siCFCoreFile.szMessage != '\0')
ShowMessage(siCFCoreFile.szMessage, FALSE);
if(*siCFXpcomFile.szMessage != '\0')
ShowMessage(siCFXpcomFile.szMessage, FALSE);
return(FO_SUCCESS);
}
HRESULT CleanupCoreFile()
HRESULT CleanupXpcomFile()
{
if(siCFCoreFile.bCleanup == TRUE)
DirectoryRemove(siCFCoreFile.szDestination, TRUE);
if(siCFXpcomFile.bCleanup == TRUE)
DirectoryRemove(siCFXpcomFile.szDestination, TRUE);
return(FO_SUCCESS);
}

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

@ -27,8 +27,8 @@
HRESULT TimingCheck(DWORD dwTiming, LPSTR szSection, LPSTR szFile);
HRESULT FileUncompress(LPSTR szFrom, LPSTR szTo);
HRESULT ProcessCoreFile(void);
HRESULT CleanupCoreFile(void);
HRESULT ProcessXpcomFile(void);
HRESULT CleanupXpcomFile(void);
HRESULT ProcessUncompressFile(DWORD dwTiming);
HRESULT FileMove(LPSTR szFrom, LPSTR szTo);
HRESULT ProcessMoveFile(DWORD dwTiming);

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

@ -61,10 +61,11 @@ LPSTR szSiteSelectorDescription;
DWORD dwWizardState;
DWORD dwSetupType;
DWORD dwOSType;
DWORD dwScreenX;
DWORD dwScreenY;
ULONG ulOSType;
DWORD dwTempSetupType;
BOOL bSDUserCanceled;
@ -85,7 +86,7 @@ diSS diSiteSelector;
diSI diStartInstall;
diR diReboot;
siSD siSDObject;
siCF siCFCoreFile;
siCF siCFXpcomFile;
siC *siComponents;
ssi *ssiSiteSelector;

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

@ -72,8 +72,8 @@ typedef int PRInt32;
/* T: Timing */
#define T_PRE_DOWNLOAD 1
#define T_POST_DOWNLOAD 2
#define T_PRE_CORE 3
#define T_POST_CORE 4
#define T_PRE_XPCOM 3
#define T_POST_XPCOM 4
#define T_PRE_SMARTUPDATE 5
#define T_POST_SMARTUPDATE 6
#define T_PRE_LAUNCHAPP 7
@ -129,11 +129,14 @@ typedef int PRInt32;
#define AC_ALL 3
/* OS: Operating System */
#define OS_WIN95_DEBUTE 1
#define OS_WIN95 2
#define OS_WIN98 4
#define OS_NT3 8
#define OS_NT4 16
#define OS_WIN9x 1
#define OS_WIN95_DEBUTE 2
#define OS_WIN95 4
#define OS_WIN98 8
#define OS_NT 16
#define OS_NT3 32
#define OS_NT4 64
#define OS_NT5 128
/* DSR: Disk Space Required */
#define DSR_DESTINATION 0
@ -272,8 +275,8 @@ typedef struct setupStruct
typedef struct sinfoSmartDownload
{
LPSTR szCoreFile;
LPSTR szCoreDir;
LPSTR szXpcomFile;
LPSTR szXpcomDir;
LPSTR szNoAds;
LPSTR szSilent;
LPSTR szExecution;
@ -281,10 +284,10 @@ typedef struct sinfoSmartDownload
LPSTR szExtractMsg;
LPSTR szExe;
LPSTR szExeParam;
LPSTR szCoreFilePath;
LPSTR szXpcomFilePath;
} siSD;
typedef struct sinfoCoreFile
typedef struct sinfoXpcomFile
{
LPSTR szSource;
LPSTR szDestination;

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

@ -70,7 +70,7 @@ HRESULT InitializeXPIStub()
return(1);
/* change current directory to where xpistub.dll */
lstrcpy(szBuf, siCFCoreFile.szDestination);
lstrcpy(szBuf, siCFXpcomFile.szDestination);
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, "bin");
chdir(szBuf);

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

@ -84,6 +84,9 @@ LRESULT CALLBACK DlgProcUninstall(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara
lstrcat(szKey, ugUninstall.szUninstallKeyDescription);
RegDeleteKey(HKEY_LOCAL_MACHINE, szKey);
/* update Wininit.ini to remove itself at reboot */
RemoveUninstaller(ugUninstall.szUninstallFilename);
DestroyWindow(hDlg);
PostQuitMessage(0);
break;

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

@ -47,7 +47,7 @@ extern LPSTR szTempDir;
extern LPSTR szOSTempDir;
extern LPSTR szFileIniUninstall;
extern DWORD dwOSType;
extern ULONG ulOSType;
extern DWORD dwScreenX;
extern DWORD dwScreenY;

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

@ -24,13 +24,10 @@
#include "extern.h"
#include "extra.h"
#include "parser.h"
#include "dialogs.h"
#include "ifuncns.h"
//#include "time.h"
//#include <winnls.h>
#include <winver.h>
//#include <tlhelp32.h>
//#include <winperf.h>
#define HIDWORD(l) ((DWORD) (((ULONG) (l) >> 32) & 0xFFFF))
#define LODWORD(l) ((DWORD) (l))
@ -158,7 +155,7 @@ HRESULT Initialize(HINSTANCE hInstance)
char szBuf[MAX_BUF];
HWND hwndFW;
hDlgMessage = NULL;
hDlgMessage = NULL;
DetermineOSVersion();
/* load strings from setup.exe */
@ -593,6 +590,7 @@ void DetermineOSVersion()
BOOL bIsWin95Debute;
char szESetupRequirement[MAX_BUF];
ulOSType = 0;
dwVersion = GetVersion();
bIsWin95Debute = IsWin95Debute();
@ -604,22 +602,26 @@ void DetermineOSVersion()
// Get build numbers for Windows NT or Win95/Win98
if(dwVersion < 0x80000000) // Windows NT
{
ulOSType |= OS_NT;
if(dwWindowsMajorVersion == 3)
dwOSType = OS_NT3;
ulOSType |= OS_NT3;
else if(dwWindowsMajorVersion == 4)
ulOSType |= OS_NT4;
else
dwOSType = OS_NT4;
ulOSType |= OS_NT5;
}
else if(dwWindowsMajorVersion == 4)
{
ulOSType |= OS_WIN9x;
if(dwWindowsMinorVersion == 0)
{
dwOSType |= OS_WIN95;
ulOSType |= OS_WIN95;
if(bIsWin95Debute)
dwOSType |= OS_WIN95_DEBUTE;
ulOSType |= OS_WIN95_DEBUTE;
}
else
dwOSType = OS_WIN98;
ulOSType |= OS_WIN98;
}
else
{
@ -704,6 +706,8 @@ HRESULT InitUninstallGeneral()
return(1);
if((ugUninstall.szUninstallKeyDescription = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((ugUninstall.szUninstallFilename = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
return(0);
}
@ -714,6 +718,7 @@ void DeInitUninstallGeneral()
FreeMemory(&(ugUninstall.szLogFilename));
FreeMemory(&(ugUninstall.szDescription));
FreeMemory(&(ugUninstall.szUninstallKeyDescription));
FreeMemory(&(ugUninstall.szUninstallFilename));
FreeMemory(&(ugUninstall.szUserAgent));
FreeMemory(&(ugUninstall.szWrKey));
FreeMemory(&(ugUninstall.szProductName));
@ -1059,7 +1064,6 @@ BOOL CheckLegacy(HWND hDlg)
HRESULT GetUninstallLogPath()
{
char szBuf[MAX_BUF];
char szTempDescription[MAX_BUF];
char szLogFolder[MAX_BUF];
char szKey[MAX_BUF];
char szWindowsUninstallKey[MAX_BUF];
@ -1149,6 +1153,8 @@ HRESULT ParseUninstallIni(LPSTR lpszCmdLine)
}
RemoveBackSlash(ugUninstall.szWrMainKey);
GetPrivateProfileString("General", "Uninstall Filename", "", ugUninstall.szUninstallFilename, MAX_BUF, szFileIniUninstall);
/* Uninstall dialog */
GetPrivateProfileString("Dialog Uninstall", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniUninstall);
@ -1244,7 +1250,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "CONFIGPATH") == 0)
{
/* parse for the "c:\Windows\Config" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", "ConfigPath", szVariable, dwVariableSize);
}
@ -1257,7 +1263,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_STARTUP") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu\\Programs\\Startup" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Startup", szVariable, dwVariableSize);
}
@ -1269,7 +1275,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_PROGRAMS") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu\\Programs" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Programs", szVariable, dwVariableSize);
}
@ -1281,7 +1287,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_STARTMENU") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Start Menu" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Start Menu", szVariable, dwVariableSize);
}
@ -1293,7 +1299,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "COMMON_DESKTOP") == 0)
{
/* parse for the "C:\WINNT40\Profiles\All Users\Desktop" directory */
if((dwOSType & OS_WIN95) || (dwOSType & OS_WIN98))
if(ulOSType & OS_WIN9x)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Desktop", szVariable, dwVariableSize);
}
@ -1365,7 +1371,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
else if(lstrcmpi(szVariable, "PERSONAL_PRINTHOOD") == 0)
{
/* parse for the "C:\WINNT40\Profiles\%USERNAME%\PrintHood" directory */
if((dwOSType & OS_NT3) || (dwOSType & OS_NT4))
if(ulOSType & OS_NT)
{
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "PrintHood", szVariable, dwVariableSize);
}

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

@ -28,6 +28,49 @@
#include "ifuncns.h"
#include "dialogs.h"
void RemoveUninstaller(LPSTR szUninstallFilename)
{
FILE *ofp;
char szBuf[MAX_BUF];
char szWinDir[MAX_BUF];
char szUninstallFile[MAX_BUF];
char szWininitFile[MAX_BUF];
BOOL bWriteRenameSection;
if(GetWindowsDirectory(szWinDir, sizeof(szWinDir)) == 0)
return;
lstrcpy(szBuf, szWinDir);
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, szUninstallFilename);
GetShortPathName(szBuf, szUninstallFile, sizeof(szUninstallFile));
if(ulOSType & OS_NT)
{
MoveFileEx(szUninstallFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
}
else
{
lstrcpy(szWininitFile, szWinDir);
AppendBackSlash(szWininitFile, sizeof(szUninstallFile));
lstrcat(szWininitFile, "wininit.ini");
if(FileExists(szWininitFile) == FALSE)
bWriteRenameSection = TRUE;
else
bWriteRenameSection = FALSE;
if((ofp = fopen(szWininitFile, "a+")) == NULL)
return;
if(bWriteRenameSection == TRUE)
fprintf(ofp, "[RENAME]\n");
fprintf(ofp, "NUL=%s\n", szUninstallFile);
fclose(ofp);
}
}
sil *InitSilNodes(char *szInFile)
{
FILE *ifp;

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

@ -47,6 +47,7 @@ void ParseForWinRegInfo(LPSTR szString, LPSTR szKeyStr, LPSTR szRootKey,
void DeleteWinRegKey(HKEY hkRootKey, LPSTR szKey);
void DeleteWinRegValue(HKEY hkRootKey, LPSTR szKey, LPSTR szName);
DWORD GetLogFile(LPSTR szTargetPath, LPSTR szInFilename, LPSTR szOutBuf, DWORD dwOutBufSize);
void RemoveUninstaller(LPSTR szUninstallFilename);
#endif

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

@ -48,7 +48,7 @@ LPSTR szTempDir;
LPSTR szOSTempDir;
LPSTR szFileIniUninstall;
DWORD dwOSType;
ULONG ulOSType;
DWORD dwScreenX;
DWORD dwScreenY;

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

@ -81,11 +81,14 @@ typedef int PRInt32;
#define AUTO 2
/* OS: Operating System */
#define OS_WIN95_DEBUTE 1
#define OS_WIN95 2
#define OS_WIN98 4
#define OS_NT3 8
#define OS_NT4 16
#define OS_WIN9x 1
#define OS_WIN95_DEBUTE 2
#define OS_WIN95 4
#define OS_WIN98 8
#define OS_NT 16
#define OS_NT3 32
#define OS_NT4 64
#define OS_NT5 128
typedef struct dlgUninstall
{
@ -102,6 +105,7 @@ typedef struct uninstallStruct
LPSTR szProductName;
LPSTR szDescription;
LPSTR szUninstallKeyDescription;
LPSTR szUninstallFilename;
HKEY hWrMainRoot;
LPSTR szWrMainKey;
HKEY hWrRoot;