bug 68110 - installer fails on proxy support.
bug 64433 - setup.exe contains "netscape.exe" string.
bug 67259 - xpi error should indicate which package failed.
bug 52597 - show license file under mozilla installer.
bug 40707 - create mozilla mail shortcut.
bug 70892 - uninstall not possible after uninstall, install, then reboot.

bug 68053 contains patch for all of above.

r=dveditz,sgehani
sr=mscott

affects only windows platforms.
This commit is contained in:
ssu%netscape.com 2001-03-14 00:24:23 +00:00
Родитель d07f0ac0cc
Коммит 6ec993d8fc
25 изменённых файлов: 1488 добавлений и 411 удалений

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

@ -18,3 +18,5 @@ xpcom.template
psm.js
psm.template
redirect.ini
talkback.js
talkback.template

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

@ -130,7 +130,7 @@ Message1=It is strongly recommended that you exit all Windows programs before ru
Message2=Click Cancel to quit Setup and then close any programs you have running. Click Next to continue the Setup program.
[Dialog License]
Show Dialog=FALSE
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ Setup - Software License Agreement
License File=license.txt
@ -166,6 +166,11 @@ C3=Component Uninstaller
C4=Component US English Profile Defaults
C5=Component En US lang pack
C6=Component US region pack
; Make sure Component QFA is LAST because it is a place holder until
; mozilla.org release team switches to the real .xpi file. Also
; because not every 3rd party developer might want this component, so
; having this LAST will be easier to remove from the list.
C7=Component QFA
[Setup Type1]
;*** LOCALIZE ME BABY ***
@ -185,6 +190,11 @@ C5=Component Chatzilla
C6=Component US English Profile Defaults
C7=Component En US lang pack
C8=Component US region pack
; Make sure Component QFA is LAST because it is a place holder until
; mozilla.org release team switches to the real .xpi file. Also
; because not every 3rd party developer might want this component, so
; having this LAST will be easier to remove from the list.
C9=Component QFA
[Setup Type2]
;*** LOCALIZE ME BABY ***
@ -206,6 +216,11 @@ C5=Component Chatzilla
C6=Component US English Profile Defaults
C7=Component En US lang pack
C8=Component US region pack
; Make sure Component QFA is LAST because it is a place holder until
; mozilla.org release team switches to the real .xpi file. Also
; because not every 3rd party developer might want this component, so
; having this LAST will be easier to remove from the list.
C9=Component QFA
@ -216,6 +231,13 @@ Title=$ProductName$ Setup - Select Components
;*** LOCALIZE ME BABY ***
Message0=The browser is always installed. Select or clear the additional components you want to install.
[Dialog Select Additional Components]
Show Dialog=FALSE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ Setup - Select Additional Components
;*** LOCALIZE ME BABY ***
Message0=Select or clear the additional components you want to install.
;*** DO NOT LOCALIZE - BEGIN ***
; do not localize this part because it is not currently being used
[Dialog Windows Integration]
@ -258,6 +280,15 @@ Message0=Select the region you wish to download from, or leave on Default to dow
;*** LOCALIZE ME BABY ***
Message1=Select the following option if you wish to save downloaded Setup files on your own computer. This allows you to re-run Setup without downloading the files again. The Setup files will be saved to the path below.
Save Installer=
; Use Protocol accepts only two options:
; FTP
; HTTP
; Default is FTP if key is not set.
Use Protocol=FTP
; Use Protocol Settings key shows or hides the
; Use FTP/Use HTTP radio buttons in the Download Dialog.
; Default value is ENABLED unless DISABLED is specified.
Use Protocol Settings=ENABLED
[Dialog Advanced Settings]
Show Dialog=TRUE
@ -411,6 +442,23 @@ Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
[Component Uninstaller-Destination Path0]
Path=[WINDIR]
;Create an uninstaller shortcut for $ProductName$
[Component Uninstaller-Program Folder0]
Timing=post archive
Show Folder=HIDE
Program Folder=[Default Folder]
[Component Uninstaller-Program Folder0-Shortcut0]
File=[WINDIR]\$UninstallFile$
;*** LOCALIZE ME BABY ***
Arguments=/ua "$UserAgent$"
Working Dir=[WINDIR]
;*** LOCALIZE ME BABY ***
Description=$ProductName$ Uninstaller
Icon Path=[WINDIR]\$UninstallFile$
Icon Id=0
[Component Chatzilla]
Description Short=Chatzilla
;*** LOCALIZE ME BABY ***
@ -437,7 +485,7 @@ Force Upgrade File0=[SETUP PATH]\defaults\profile\bookmarks.html
;*** LOCALIZE ME BABY ***
Description Short=English (US) language pack
;*** LOCALIZE ME BABY ***
Description Long=English (US)language pack
Description Long=English (US) language pack
Archive=langenus.xpi
$InstallSize$:langenus
$InstallSizeSystem$
@ -457,6 +505,23 @@ $InstallSizeArchive$:regus.xpi
Attributes=SELECTED|INVISIBLE|FORCE_UPGRADE
Force Upgrade File0=[SETUP PATH]\Chrome\US.jar
[Component QFA]
Description Short=Quality Feedback Agent
;*** LOCALIZE ME BABY ***
Description Long=Tool for reporting software crashes
Archive=talkback.xpi
$InstallSize$:talkback
$InstallSizeSystem$
$InstallSizeArchive$:talkback.xpi
Attributes=SELECTED|FORCE_UPGRADE
Force Upgrade File0=[SETUP PATH]\Components\fullsoft.dll
; This is to randomly set the default checkbox for this component.
; This particular value will set the checkbox checked [number]% of the time.
; This logic is done only during the initialization of setup, not in any
; particular dialog.
Random Install Percentage=100
[Component PSM]
Description Short=Personal Security Manager
;*** LOCALIZE ME BABY ***
@ -480,7 +545,7 @@ Cleanup=TRUE
Message=Preparing Install, please wait...
[Redirect]
Status=Enabled
Status=Disabled
; This is used in conjunction with the Site Selector info to build a
; url to where to download the needed redirect.ini file from.
; If there's more than one server path, they will be used as fail
@ -547,9 +612,10 @@ Fail If Exists=FALSE
[Copy File1]
Timing=post smartupdate
Source=[SETUP STARTUP PATH]\$UninstallFile$
Source=[XPI PATH]\$UninstallFile$
Destination=[WINDIR]
Fail If Exists=FALSE
Do Not Uninstall=TRUE
;Copy File SequentialX sections
@ -722,7 +788,7 @@ Error Corrupted Archives Detected AUTO mode=Setup has detected that at least one
;*** LOCALIZE ME BABY ***
Error Too Many CRC Failures=Too many download failures. Setup will cancel. You can restart Setup to continue where it left off.
;*** LOCALIZE ME BABY ***
Error Too Many Network Errors=Too many network errors. Please retry again later. You can restart Setup to continue where it left off.
Error Too Many Network Errors=Too many network errors trying to download %s. Please retry again later. You can restart Setup to continue where it left off.
;*** LOCALIZE ME BABY ***
Message Verifying Archives=Verifying integrity of archives, please wait...
;*** LOCALIZE ME BABY ***
@ -739,6 +805,16 @@ Dialog Download Title Minimized=%d%% for all files
STR Force Upgrade Required=(Required)
;*** LOCALIZE ME BABY ***
Message Cancel Setup AUTO mode=Canceling Setup, please wait...
;*** LOCALIZE ME BABY ***
Error File Uncompress=Error uncompressing file %s: %d
;*** LOCALIZE ME BABY ***
UsageMsg Usage=Usage: %s [options]%s [options] can be any of the following combination:%s -h: This help.%s -a [path]: Alternate archive search path.%s -n [filename]: Setup's parent's process filename.%s -ma: Run setup in Auto mode.%s -ms: Run setup in Silent mode.%s -ira: Ignore the [RunAppX] sections%s -ispf: Ignore the [Program FolderX] sections that show%s the Start Menu shortcut folder at the end of installation.
;*** LOCALIZE ME BABY ***
IDC Use FTP=Use &FTP
;*** LOCALIZE ME BABY ***
IDC Use HTTP=Use &HTTP
;*** LOCALIZE ME BABY ***
IDC Save Installer Files=&Save installer files locally
[Site Selector]

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

@ -1,3 +1,152 @@
function createShortcuts()
{
var subkey;
var valname;
var szStartMenuPrograms;
var szStartMenu;
var szFolderDesktop;
var szFolderQuickLaunch;
var szFolderSendTo;
var winreg;
var fWindows;
var fTemp;
var fProgram;
var fileExe;
var scExeDesc;
var scProfileDesc;
var scProfileDescParam;
var scFolderName;
var fFolderDesktop;
var fFolderPath;
var fFolderPathStr;
var is_winnt;
var szCurrentVersion;
winreg = getWinRegistry();
fWindows = getFolder("Windows");
fProgram = getFolder("Program");
fTemp = fProgram + "$MainExeFile$";
fileExe = getFolder("file:///", fTemp);
scExeDesc = "Mail";
scParam = "-mail";
scFolderName = "$ProductName$";
if(winreg != null)
{
/* determine if the script is running under NT or not */
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
valname = "CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, valname);
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
is_winnt = false;
}
else
{
is_winnt = true;
}
if(is_winnt == false)
{
logComment("is_winnt is false: " + is_winnt);
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
valname = "Programs";
szStartMenuPrograms = winreg.getValueString(subkey, valname);
valname = "Start Menu";
szStartMenu = winreg.getValueString(subkey, valname);
valname = "Desktop";
szFolderDesktop = winreg.getValueString(subkey, valname);
}
else
{
logComment("is_winnt is true: " + is_winnt);
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
valname = "Common Programs";
szStartMenuPrograms = winreg.getValueString(subkey, valname);
valname = "Common Start Menu";
szStartMenu = winreg.getValueString(subkey, valname);
valname = "Common Desktop";
szFolderDesktop = winreg.getValueString(subkey, valname);
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
valname = "SendTo";
szFolderSendTo = winreg.getValueString(subkey, valname);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
valname = "Quick Launch";
szFolderQuickLaunch = winreg.getValueString(subkey, valname);
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
valname = "Program Folder Path";
fFolderPathStr = winreg.getValueString(subkey, valname);
if((fFolderPathStr == "") || (fFolderPathStr == null))
{
fTemp = szStartMenuPrograms + "\\" + scFolderName;
fFolderPath = getFolder("file:///", fTemp);
}
else
{
/* convert the path string to a path folder object */
fFolderPath = getFolder("file:///", fFolderPathStr);
}
/* convert the path string to a path folder object */
fFolderDesktop = getFolder("file:///", szFolderDesktop);
logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
logComment("Folder StartMenu : " + szStartMenu);
logComment("Folder FolderDesktop : " + szFolderDesktop);
logComment("Folder FolderSendTo : " + szFolderSendTo);
logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
logComment("fileExe : " + fileExe);
logComment("fFolderPath : " + fFolderPath);
logComment("scExeDesc : " + scExeDesc);
logComment("fProgram : " + fProgram);
/* explicitly create the fFolderPath even though the windowsShortcut function creates the folder.
* This is so that the folder creation gets logged for uninstall to remove it. */
File.dirCreate(fFolderPath);
/* create the shortcuts */
File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, scParam, fileExe, 0);
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\$CompanyName$";
winreg.createKey(subkey,"");
valname = "CurrentVersion";
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
winreg.createKey(subkey,"");
valname = "CurrentVersion";
value = "$UserAgent$";
err = winreg.setValueString(subkey, valname, value);
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
valname = "Program Folder Path";
value = fFolderPath;
err = winreg.setValueString(subkey, valname, value);
}
else
{
logComment("winreg is null");
}
}
// main
var srDest;
var err;
@ -26,20 +175,30 @@ if(verifyDiskSpace(fProgram, srDest))
true); // Force Flag
logComment("addDirectory() returned: " + err);
// register chrome
err = registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger/");
err = registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-region/");
logComment("registerChrome() returned: "+err);
// check return value
if(err == SUCCESS)
if( err == SUCCESS )
{
err = performInstall();
logComment("performInstall() returned: " + err);
createShortcuts();
// we don't want to fail on errors for the above
resetError();
// register chrome
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger/");
registerChrome(CONTENT | DELAYED_CHROME,
getFolder("Chrome","messenger.jar"),
"content/messenger-region/");
// check return value
err = getLastError();
if(err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(err);

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

@ -88,6 +88,7 @@ if(!(-d "$inStagePath"))
"browser",
"mail",
"psm",
"talkback",
"chatzilla",
"deflenus",
"langenus",
@ -174,6 +175,16 @@ if(system("copy $inDistPath\\setuprsc.dll $inDistPath\\setup"))
die "\n Error: copy $inDistPath\\setuprsc.dll $inDistPath\\setup\n";
}
# copy license file for the installer
if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt"))
{
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\license.txt\n";
}
if(system("copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt"))
{
die "\n Error: copy $ENV{MOZ_SRC}\\mozilla\\LICENSE $inDistPath\\setup\\license.txt\n";
}
# build the self-extracting .exe (installer) file.
print "\nbuilding self-extracting stub installer ($seiFileNameSpecificStub)...\n";
if(system("copy $inDistPath\\$seiFileNameGeneric $inDistPath\\$seiFileNameSpecificStub"))
@ -481,10 +492,19 @@ sub CreateTmpStage()
print " From: $inStagePath\\$mComponent\n";
print " To: $gLocalTmpStage\\$mComponent\n\n";
mkdir("$gLocalTmpStage\\$mComponent", 775);
if(system("xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\"))
# If it's not talkback then copy the component over to the local tmp stage.
# If it is, then skip the copy because there will be nothing at the source.
# Talkback is a dummy place holder .xpi right now. Mozilla release team
# replaces this place holder .xpi with a real talkback when delivering the
# build to mozilla.org.
if(!($mComponent =~ /talkback/i))
{
print "\n Error: xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\\n";
return(1);
if(system("xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\"))
{
print "\n Error: xcopy /s/e $inStagePath\\$mComponent $gLocalTmpStage\\$mComponent\\\n";
return(1);
}
}
if(-d "$gLocalTmpStage\\$mComponent\\bin\\chrome")
@ -516,13 +536,17 @@ sub VerifyComponents()
print "\n Verifying existence of required components...\n";
foreach $mComponent (@gComponentList)
{
if(-d "$inStagePath\\$mComponent")
if($mComponent =~ /talkback/i)
{
print " ok: $inStagePath\\$mComponent\n";
print " place holder: $inStagePath\\$mComponent\n";
}
elsif(-d "$inStagePath\\$mComponent")
{
print " ok: $inStagePath\\$mComponent\n";
}
else
{
print " Error: $inStagePath\\$mComponent does not exist!\n";
print " Error: $inStagePath\\$mComponent does not exist!\n";
$mError = 1;
}
}

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

@ -110,6 +110,8 @@ print "\n Making $inComponentName.xpi...\n";
$saveCwdir = cwd();
copy("$inComponentName.js", "$inStagePath\\$inComponentName\\install.js");
# change directory to where the files are, else zip will store
# unwanted path information.
chdir("$inStagePath\\$inComponentName");
@ -120,12 +122,6 @@ if(system("zip -r $inDestPath\\$inComponentName.xpi *"))
}
chdir("$saveCwdir");
copy("$inComponentName.js", "install.js");
if(system("zip -g $inDestPath\\$inComponentName.xpi install.js"))
{
die "\n Error: zip -g $inDestPath\\$inComponentName.xpi install.js\n";
}
# delete install.js
if(-e "install.js")
{

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

@ -0,0 +1,9 @@
// main
var err;
err = initInstall("Quality Feedback Agent", "Quality Feedback Agent", "6.5.0.2001012623");
logComment("Talkback place holder .xpi for the real thing.");
cancelInstall(err);
// end main

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

@ -107,7 +107,7 @@ BEGIN
IDS_STATUS_EXTRACTING "Extracting %s"
IDS_STATUS_LAUNCHING_SETUP "Launching Setup..."
IDS_ERROR_FILE_WRITE "Unable to write file %s"
IDS_TITLE "Netscape Communicator Installation"
IDS_TITLE "Installation"
IDS_ERROR_OUT_OF_MEMORY "Out of memory!"
END

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

@ -454,7 +454,7 @@ LRESULT CALLBACK BrowseHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
lstrcpy(szBuf2, szBuf);
AppendBackSlash(szBuf2, sizeof(szBuf2));
lstrcat(szBuf2, sgProduct.szSubPath);
UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2);
UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2, FALSE);
}
bCreateDestinationDir = TRUE;
@ -540,59 +540,57 @@ BOOL BrowseForDirectory(HWND hDlg, char *szCurrDir)
return(bRet);
}
void TruncateString(HWND hWnd, LPSTR szInPath, DWORD dwInPathBufSize, LPSTR szOutPath, DWORD dwOutPathBufSize)
void TruncateString(HWND hWnd, LPSTR szInURL, LPSTR szOutString, DWORD dwOutStringBufSize)
{
HDC hdcWnd;
LOGFONT logFont;
HFONT hfontTmp;
HFONT hfontNew;
HFONT hfontOld;
RECT rWndRect;
SIZE sizeString;
BOOL bChopped;
char *ptr = NULL;
int iHalfLen;
int iOutStringLen;
ZeroMemory(szOutPath, dwOutPathBufSize);
if(dwInPathBufSize > dwOutPathBufSize)
if((DWORD)lstrlen(szInURL) > dwOutStringBufSize)
return;
if(lstrlen(szInPath) == 0)
return;
lstrcpy(szOutPath, szInPath);
hdcWnd = GetWindowDC(hWnd);
ZeroMemory(szOutString, dwOutStringBufSize);
lstrcpy(szOutString, szInURL);
iOutStringLen = lstrlen(szOutString);
hdcWnd = GetWindowDC(hWnd);
GetClientRect(hWnd, &rWndRect);
SystemParametersInfo(SPI_GETICONTITLELOGFONT,
sizeof(logFont),
(PVOID)&logFont,
0);
hfontTmp = CreateFontIndirect(&logFont);
if(hfontTmp)
hfontOld = SelectObject(hdcWnd, hfontTmp);
bChopped = FALSE;
GetTextExtentPoint32(hdcWnd, szOutPath, lstrlen(szOutPath), &sizeString);
while(sizeString.cx > rWndRect.right)
hfontNew = CreateFontIndirect(&logFont);
if(hfontNew)
{
szOutPath[lstrlen(szOutPath) - 1] = '\0';
GetTextExtentPoint32(hdcWnd, szOutPath, lstrlen(szOutPath), &sizeString);
bChopped = TRUE;
}
hfontOld = (HFONT)SelectObject(hdcWnd, hfontNew);
if(bChopped)
{
DWORD dwLen = lstrlen(szOutPath);
GetTextExtentPoint32(hdcWnd, szOutString, iOutStringLen, &sizeString);
while(sizeString.cx > rWndRect.right)
{
iHalfLen = iOutStringLen / 2;
if(iHalfLen == 2)
break;
szOutPath[dwLen - 1] = '.';
szOutPath[dwLen - 2] = '.';
szOutPath[dwLen - 3] = '.';
ptr = szOutString + iHalfLen;
memmove(ptr - 1, ptr, lstrlen(ptr) + 1);
szOutString[iHalfLen - 2] = '.';
szOutString[iHalfLen - 1] = '.';
szOutString[iHalfLen] = '.';
iOutStringLen = lstrlen(szOutString);
GetTextExtentPoint32(hdcWnd, szOutString, iOutStringLen, &sizeString);
}
}
SelectObject(hdcWnd, hfontOld);
DeleteObject(hfontTmp);
DeleteObject(hfontNew);
ReleaseDC(hWnd, hdcWnd);
}
LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
{
HWND hRadioSt0;
@ -627,7 +625,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara
SetWindowText(hDlg, diSetupType.szTitle);
hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */
TruncateString(hDestinationPath, szTempSetupPath, MAX_BUF, szBuf, sizeof(szBuf));
TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf));
SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf);
SetDlgItemText(hDlg, IDC_STATIC_MSG0, diSetupType.szMessage0);
@ -734,7 +732,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara
BrowseForDirectory(hDlg, szTempSetupPath);
hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */
TruncateString(hDestinationPath, szTempSetupPath, MAX_BUF, szBuf, sizeof(szBuf));
TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf));
SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf);
break;
@ -805,7 +803,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara
lstrcpy(szBuf2, szBuf);
AppendBackSlash(szBuf2, sizeof(szBuf2));
lstrcat(szBuf2, sgProduct.szSubPath);
UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2);
UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2, FALSE);
}
bCreateDestinationDir = TRUE;
@ -1672,6 +1670,12 @@ void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector)
diDownloadOptions.bSaveInstaller = TRUE;
else
diDownloadOptions.bSaveInstaller = FALSE;
if(IsDlgButtonChecked(hDlg, IDC_USE_FTP) == BST_CHECKED)
diDownloadOptions.dwUseProtocol = UP_FTP;
else if(IsDlgButtonChecked(hDlg, IDC_USE_HTTP) == BST_CHECKED)
diDownloadOptions.dwUseProtocol = UP_HTTP;
}
LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
@ -1693,6 +1697,13 @@ LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG
SetDlgItemText(hDlg, IDC_MESSAGE0, diDownloadOptions.szMessage0);
SetDlgItemText(hDlg, IDC_MESSAGE1, diDownloadOptions.szMessage1);
GetPrivateProfileString("Strings", "IDC Use Ftp", "", szBuf, sizeof(szBuf), szFileIniConfig);
SetDlgItemText(hDlg, IDC_USE_FTP, szBuf);
GetPrivateProfileString("Strings", "IDC Use Http", "", szBuf, sizeof(szBuf), szFileIniConfig);
SetDlgItemText(hDlg, IDC_USE_HTTP, szBuf);
GetPrivateProfileString("Strings", "IDC Save Installer Files", "", szBuf, sizeof(szBuf), szFileIniConfig);
SetDlgItemText(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, szBuf);
GetSaveInstallerPath(szBuf, sizeof(szBuf));
SetDlgItemText(hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH, szBuf);
@ -1726,6 +1737,33 @@ LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG
CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_CHECKED);
else
CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_UNCHECKED);
switch(diDownloadOptions.dwUseProtocol)
{
case UP_HTTP:
CheckDlgButton(hDlg, IDC_USE_FTP, BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_USE_HTTP, BST_CHECKED);
break;
case UP_FTP:
default:
CheckDlgButton(hDlg, IDC_USE_FTP, BST_CHECKED);
CheckDlgButton(hDlg, IDC_USE_HTTP, BST_UNCHECKED);
break;
}
if(diDownloadOptions.bUseProtocolSettings)
{
ShowWindow(GetDlgItem(hDlg, IDC_USE_FTP), SW_SHOW);
ShowWindow(GetDlgItem(hDlg, IDC_USE_HTTP), SW_SHOW);
}
else
{
ShowWindow(GetDlgItem(hDlg, IDC_USE_FTP), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_USE_HTTP), SW_HIDE);
}
break;
case WM_COMMAND:
@ -2299,7 +2337,9 @@ void DlgSequenceNext()
{
HRESULT hrValue;
HRESULT hrErr;
char szBuf[MAX_PATH];
char szDestPath[MAX_PATH];
char szInstallLogFile[MAX_BUF];
BOOL bDone = FALSE;
do
@ -2452,31 +2492,61 @@ void DlgSequenceNext()
dwWizardState = DLG_START_INSTALL;
gbProcessingXpnstallFiles = TRUE;
LogISDestinationPath();
LogISSetupType();
LogISComponentsSelected();
LogISComponentsToDownload();
LogISDiskSpace();
lstrcpy(szDestPath, sgProduct.szPath);
if(*sgProduct.szSubPath != '\0')
{
AppendBackSlash(szDestPath, sizeof(szDestPath));
lstrcat(szDestPath, sgProduct.szSubPath);
}
AppendBackSlash(szDestPath, sizeof(szDestPath));
/* Set global var, that determines where the log file is to update, to
* not use the TEMP dir *before* the FileCopy() calls because we want
* to log the FileCopy() calls to where the log files were copied to.
* This is possible because the logging, that is done within the
* FileCopy() function, is done after the actual copy
*/
gbILUseTemp = 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, szDestPath, FALSE, FALSE);
DeleteFile(szInstallLogFile);
/* copy the install_status.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_STATUS_LOG);
FileCopy(szInstallLogFile, szDestPath, FALSE, FALSE);
DeleteFile(szInstallLogFile);
/* PRE_DOWNLOAD process file manipulation functions */
ProcessFileOps(T_PRE_DOWNLOAD, NULL);
if(RetrieveArchives() == WIZ_OK)
{
char szInstallLogFile[MAX_BUF];
/* POST_DOWNLOAD process file manipulation functions */
ProcessFileOps(T_POST_DOWNLOAD, NULL);
/* PRE_XPCOM process file manipulation functions */
ProcessFileOps(T_PRE_XPCOM, NULL);
ProcessXpcomFile();
/* POST_XPCOM process file manipulation functions */
ProcessFileOps(T_POST_XPCOM, NULL);
/* PRE_SMARTUPDATE process file manipulation functions */
ProcessFileOps(T_PRE_SMARTUPDATE, NULL);
if(CheckInstances())
if(ProcessXpcomFile() != FO_SUCCESS)
{
/* save the installer files in the local machine */
if(diDownloadOptions.bSaveInstaller)
SaveInstallerFiles();
bSDUserCanceled = TRUE;
CleanupXpcomFile();
PostQuitMessage(0);
@ -2485,13 +2555,25 @@ void DlgSequenceNext()
break;
}
lstrcpy(szBuf, sgProduct.szPath);
if(*sgProduct.szSubPath != '\0')
/* POST_XPCOM process file manipulation functions */
ProcessFileOps(T_POST_XPCOM, NULL);
/* PRE_SMARTUPDATE process file manipulation functions */
ProcessFileOps(T_PRE_SMARTUPDATE, NULL);
/* save the installer files in the local machine */
if(diDownloadOptions.bSaveInstaller)
SaveInstallerFiles();
if(CheckInstances())
{
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, sgProduct.szSubPath);
bSDUserCanceled = TRUE;
CleanupXpcomFile();
PostQuitMessage(0);
/* break out of switch statment */
bDone = TRUE;
break;
}
AppendBackSlash(szBuf, sizeof(szBuf));
#ifdef NUKE_FROM_ORBIT
if(gdwUpgradeValue == UG_DELETE)
@ -2500,25 +2582,14 @@ void DlgSequenceNext()
NS_LoadString(hSetupRscInst, IDS_STR_DELETING_DESTINATION_DIR, szMessage, sizeof(szMessage));
ShowMessage(szMessage, TRUE);
DirectoryRemove(szBuf, TRUE);
CreateDirectoriesAll(szBuf, TRUE);
DirectoryRemove(szDestPath, TRUE);
CreateDirectoriesAll(szDestPath, TRUE);
ShowMessage(szMessage, FALSE);
}
#endif /* NUKE_FROM_ORBIT */
/* 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);
lstrcat(szDestPath, "uninstall\\");
CreateDirectoriesAll(szDestPath, TRUE);
/* save the installer files in the local machine */
if(diDownloadOptions.bSaveInstaller)
@ -2540,7 +2611,9 @@ void DlgSequenceNext()
ProcessFileOps(T_POST_LAUNCHAPP, NULL);
/* DEPEND_REBOOT process file manipulation functions */
ProcessFileOps(T_DEPEND_REBOOT, NULL);
ProcessProgramFolderShowCmd();
ClearWinRegUninstallFileDeletion();
if(!gbIgnoreProgramFolderX)
ProcessProgramFolderShowCmd();
CleanupPreviousVersionRegKeys();
if(NeedReboot())

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

@ -58,7 +58,7 @@ void ProcessWindowsMessages(void);
BOOL CheckWizardStateCustom(DWORD dwDefault);
LPSTR GetStartInstallMessage(void);
void AppendStringWOAmpersand(LPSTR szInputString, DWORD dwInputStringSize, LPSTR szString);
void TruncateString(HWND hWnd, LPSTR szInPath, DWORD dwInPathBufSize, LPSTR szOutPath, DWORD dwOutPathBufSize);
void TruncateString(HWND hWnd, LPSTR szInPath, LPSTR szOutPath, DWORD dwOutPathBufSize);
void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector);
WNDPROC SubclassWindow( HWND hWnd, WNDPROC NewWndProc);
LRESULT CALLBACK ListBoxBrowseWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

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

@ -72,6 +72,8 @@ extern BOOL bCreateDestinationDir;
extern BOOL bReboot;
extern BOOL gbILUseTemp;
extern BOOL gbPreviousUnfinishedDownload;
extern BOOL gbIgnoreRunAppX;
extern BOOL gbIgnoreProgramFolderX;
extern setupGen sgProduct;
extern diS diSetup;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -105,7 +105,7 @@ void DeInitDlgWindowsIntegration(diWI *diDialog);
void DeInitDlgProgramFolder(diPF *diDialog);
void DeInitDlgStartInstall(diSI *diDialog);
void DeInitDlgSiteSelector(diAS *diDialog);
void DetermineOSVersion(void);
void DetermineOSVersionEx(void);
void DeInitSiComponents(siC **siComponents);
void DeInitSetupGeneral(void);
HRESULT ParseSetupIni(void);
@ -172,7 +172,7 @@ void RemoveQuotes(LPSTR lpszSrc, LPSTR lpszDest, int iDestSize);
LPSTR GetFirstNonSpace(LPSTR lpszString);
int GetArgC(LPSTR lpszCommandLine);
LPSTR GetArgV(LPSTR lpszCommandLine, int iIndex, LPSTR lpszDest, int iDestSize);
void ParseCommandLine(LPSTR lpszCmdLine);
DWORD ParseCommandLine(LPSTR lpszCmdLine);
void SetSetupRunMode(LPSTR szMode);
void Delay(DWORD dwSeconds);
siCD *InitWinInitNodes(char *szInFile);
@ -183,10 +183,27 @@ 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();
int CRCCheckDownloadedArchives(char *szFileIdiGetArchives);
BOOL DeleteInstallLogFile(char *szFile);
int CRCCheckDownloadedArchives(char *szCorruptedArchiveList, DWORD dwCorruptedArchivelistSize, char *szFileIdiGetArchives);
int CRCCheckArchivesStartup(char *szCorruptedArchiveList, DWORD dwCorruptedArchiveListSize, BOOL bIncludeTempPath);
BOOL ResolveForceUpgrade(siC *siCObject);
void LogISTime(int iType);
void LogISProductInfo(void);
void LogISDestinationPath(void);
void LogISSetupType(void);
void LogISComponentsSelected(void);
void LogISComponentsToDownload(void);
void LogISComponentsFailedCRC(char *szList, int iWhen);
void LogISDownloadStatus(char *szStatus, char *szFailedFile);
void LogISXPInstall(int iWhen);
void LogISXPInstallComponent(char *szComponentName);
void LogISXPInstallComponentResult(DWORD dwErrorNumber);
void LogISLaunchApps(int iWhen);
void LogISLaunchAppsComponent(char *szComponentName);
void LogISProcessXpcomFile(int iStatus, int iResult);
void LogISDiskSpace(void);
void SwapFTPAndHTTP(char *szInUrl, DWORD dwInUrlSize);
void ClearWinRegUninstallFileDeletion(void);
BOOL bSDInit;

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

@ -255,7 +255,8 @@ void ProcessFileOps(DWORD dwTiming, char *szSectionPrefix)
ProcessSelfRegisterFile(dwTiming, szSectionPrefix);
ProcessDeleteFile(dwTiming, szSectionPrefix);
ProcessRemoveDirectory(dwTiming, szSectionPrefix);
ProcessRunApp(dwTiming, szSectionPrefix);
if(!gbIgnoreRunAppX)
ProcessRunApp(dwTiming, szSectionPrefix);
ProcessWinReg(dwTiming, szSectionPrefix);
ProcessProgramFolder(dwTiming, szSectionPrefix);
ProcessSetVersionRegistry(dwTiming, szSectionPrefix);
@ -330,6 +331,7 @@ HRESULT FileUncompress(LPSTR szFrom, LPSTR szTo)
DWORD dwReturn;
void *vZip;
dwReturn = FO_SUCCESS;
/* Check for the existance of the from (source) file */
if(!FileExists(szFrom))
return(FO_ERROR_FILE_NOT_FOUND);
@ -352,27 +354,44 @@ HRESULT FileUncompress(LPSTR szFrom, LPSTR szTo)
if(SetCurrentDirectory(szTo) == FALSE)
return(FO_ERROR_CHANGE_DIR);
ZIP_OpenArchive(szFrom, &vZip);
if((dwReturn = ZIP_OpenArchive(szFrom, &vZip)) != ZIP_OK)
return(dwReturn);
/* 1st parameter should be NULL or it will fail */
/* It indicates extract the entire archive */
ExtractDirEntries(NULL, vZip);
dwReturn = ExtractDirEntries(NULL, vZip);
ZIP_CloseArchive(&vZip);
if(SetCurrentDirectory(szBuf) == FALSE)
return(FO_ERROR_CHANGE_DIR);
return(FO_SUCCESS);
return(dwReturn);
}
HRESULT ProcessXpcomFile()
{
char szSource[MAX_BUF];
char szDestination[MAX_BUF];
DWORD dwErr;
if(*siCFXpcomFile.szMessage != '\0')
ShowMessage(siCFXpcomFile.szMessage, TRUE);
FileUncompress(siCFXpcomFile.szSource, siCFXpcomFile.szDestination);
if((dwErr = FileUncompress(siCFXpcomFile.szSource, siCFXpcomFile.szDestination)) != FO_SUCCESS)
{
char szMsg[MAX_BUF];
char szErrorString[MAX_BUF];
if(*siCFXpcomFile.szMessage != '\0')
ShowMessage(siCFXpcomFile.szMessage, FALSE);
LogISProcessXpcomFile(LIS_FAILURE, dwErr);
GetPrivateProfileString("Strings", "Error File Uncompress", "", szErrorString, sizeof(szErrorString), szFileIniConfig);
wsprintf(szMsg, szErrorString, siCFXpcomFile.szSource, dwErr);
PrintError(szMsg, ERROR_CODE_HIDE);
return(dwErr);
}
LogISProcessXpcomFile(LIS_SUCCESS, dwErr);
/* copy msvcrt.dll and msvcirt.dll to the bin of the Xpcom temp dir:
* (c:\temp\Xpcom.ns\bin)
@ -385,7 +404,7 @@ HRESULT ProcessXpcomFile()
AppendBackSlash(szDestination, sizeof(szDestination));
lstrcat(szDestination, "bin");
FileCopy(szSource, szDestination, TRUE);
FileCopy(szSource, szDestination, TRUE, FALSE);
if(*siCFXpcomFile.szMessage != '\0')
ShowMessage(siCFXpcomFile.szMessage, FALSE);
@ -428,9 +447,22 @@ HRESULT ProcessUncompressFile(DWORD dwTiming, char *szSectionPrefix)
if((!bOnlyIfExists) || (bOnlyIfExists && FileExists(szDestination)))
{
DWORD dwErr;
GetPrivateProfileString(szSection, "Message", "", szBuf, sizeof(szBuf), szFileIniConfig);
ShowMessage(szBuf, TRUE);
FileUncompress(szSource, szDestination);
if((dwErr = FileUncompress(szSource, szDestination)) != FO_SUCCESS)
{
char szMsg[MAX_BUF];
char szErrorString[MAX_BUF];
ShowMessage(szBuf, FALSE);
GetPrivateProfileString("Strings", "Error File Uncompress", "", szErrorString, sizeof(szErrorString), szFileIniConfig);
wsprintf(szMsg, szErrorString, szSource, dwErr);
PrintError(szMsg, ERROR_CODE_HIDE);
return(dwErr);
}
ShowMessage(szBuf, FALSE);
}
}
@ -458,10 +490,8 @@ HRESULT FileMove(LPSTR szFrom, LPSTR szTo)
MoveFile(szFrom, szTo);
/* log the file move command */
lstrcpy(szBuf, szFrom);
lstrcat(szBuf, " to ");
lstrcat(szBuf, szTo);
UpdateInstallLog(KEY_MOVE_FILE, szBuf);
wsprintf(szBuf, "%s to %s", szFrom, szTo);
UpdateInstallLog(KEY_MOVE_FILE, szBuf, FALSE);
return(FO_SUCCESS);
}
@ -478,10 +508,8 @@ HRESULT FileMove(LPSTR szFrom, LPSTR szTo)
MoveFile(szFrom, szToTemp);
/* log the file move command */
lstrcpy(szBuf, szFrom);
lstrcat(szBuf, " to ");
lstrcat(szBuf, szToTemp);
UpdateInstallLog(KEY_MOVE_FILE, szBuf);
wsprintf(szBuf, "%s to %s", szFrom, szToTemp);
UpdateInstallLog(KEY_MOVE_FILE, szBuf, FALSE);
return(FO_SUCCESS);
}
@ -510,10 +538,8 @@ HRESULT FileMove(LPSTR szFrom, LPSTR szTo)
MoveFile(szFromTemp, szToTemp);
/* log the file move command */
lstrcpy(szBuf, szFromTemp);
lstrcat(szBuf, " to ");
lstrcat(szBuf, szToTemp);
UpdateInstallLog(KEY_MOVE_FILE, szBuf);
wsprintf(szBuf, "%s to %s", szFromTemp, szToTemp);
UpdateInstallLog(KEY_MOVE_FILE, szBuf, FALSE);
}
bFound = FindNextFile(hFile, &fdFile);
@ -551,7 +577,7 @@ HRESULT ProcessMoveFile(DWORD dwTiming, char *szSectionPrefix)
return(FO_SUCCESS);
}
HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists)
HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists, BOOL bDnu)
{
HANDLE hFile;
WIN32_FIND_DATA fdFile;
@ -569,12 +595,8 @@ HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists)
AppendBackSlash(szToTemp, sizeof(szToTemp));
lstrcat(szToTemp, szBuf);
CopyFile(szFrom, szToTemp, bFailIfExists);
/* log the file copy command */
lstrcpy(szBuf, szFrom);
lstrcat(szBuf, " to ");
lstrcat(szBuf, szToTemp);
UpdateInstallLog(KEY_COPY_FILE, szBuf);
wsprintf(szBuf, "%s to %s", szFrom, szToTemp);
UpdateInstallLog(KEY_COPY_FILE, szBuf, bDnu);
return(FO_SUCCESS);
}
@ -605,10 +627,8 @@ HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists)
CopyFile(szFromTemp, szToTemp, bFailIfExists);
/* log the file copy command */
lstrcpy(szBuf, szFromTemp);
lstrcat(szBuf, " to ");
lstrcat(szBuf, szToTemp);
UpdateInstallLog(KEY_COPY_FILE, szBuf);
wsprintf(szBuf, "%s to %s", szFromTemp, szToTemp);
UpdateInstallLog(KEY_COPY_FILE, szBuf, bDnu);
}
bFound = FindNextFile(hFile, &fdFile);
@ -719,6 +739,7 @@ HRESULT ProcessCopyFile(DWORD dwTiming, char *szSectionPrefix)
char szSource[MAX_BUF];
char szDestination[MAX_BUF];
BOOL bFailIfExists;
BOOL bDnu;
dwIndex = 0;
BuildNumberedString(dwIndex, szSectionPrefix, "Copy File", szSection, sizeof(szSection));
@ -731,13 +752,19 @@ HRESULT ProcessCopyFile(DWORD dwTiming, char *szSectionPrefix)
GetPrivateProfileString(szSection, "Destination", "", szBuf, sizeof(szBuf), szFileIniConfig);
DecryptString(szDestination, szBuf);
GetPrivateProfileString(szSection, "Do Not Uninstall", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "TRUE") == 0)
bDnu = TRUE;
else
bDnu = FALSE;
GetPrivateProfileString(szSection, "Fail If Exists", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "TRUE") == 0)
bFailIfExists = TRUE;
else
bFailIfExists = FALSE;
FileCopy(szSource, szDestination, bFailIfExists);
FileCopy(szSource, szDestination, bFailIfExists, bDnu);
}
++dwIndex;
@ -872,7 +899,7 @@ HRESULT ProcessSelfRegisterFile(DWORD dwTiming, char *szSectionPrefix)
return(FO_SUCCESS);
}
void UpdateInstallLog(LPSTR szKey, LPSTR szDir)
void UpdateInstallLog(LPSTR szKey, LPSTR szString, BOOL bDnu)
{
FILE *fInstallLog;
char szBuf[MAX_BUF];
@ -896,15 +923,44 @@ void UpdateInstallLog(LPSTR szKey, LPSTR szDir)
if((fInstallLog = fopen(szFileInstallLog, "a+t")) != NULL)
{
lstrcpy(szBuf, " ** ");
lstrcat(szBuf, szKey);
lstrcat(szBuf, szDir);
lstrcat(szBuf, "\n");
if(bDnu)
wsprintf(szBuf, " ** (*dnu*) %s%s\n", szKey, szString);
else
wsprintf(szBuf, " ** %s%s\n", szKey, szString);
fwrite(szBuf, sizeof(char), lstrlen(szBuf), fInstallLog);
fclose(fInstallLog);
}
}
void UpdateInstallStatusLog(LPSTR szString)
{
FILE *fInstallLog;
char szFileInstallStatusLog[MAX_BUF];
if(gbILUseTemp)
{
lstrcpy(szFileInstallStatusLog, szTempDir);
AppendBackSlash(szFileInstallStatusLog, sizeof(szFileInstallStatusLog));
}
else
{
lstrcpy(szFileInstallStatusLog, sgProduct.szPath);
AppendBackSlash(szFileInstallStatusLog, sizeof(szFileInstallStatusLog));
lstrcat(szFileInstallStatusLog, sgProduct.szSubPath);
AppendBackSlash(szFileInstallStatusLog, sizeof(szFileInstallStatusLog));
}
CreateDirectoriesAll(szFileInstallStatusLog, FALSE);
lstrcat(szFileInstallStatusLog, FILE_INSTALL_STATUS_LOG);
if((fInstallLog = fopen(szFileInstallStatusLog, "a+t")) != NULL)
{
fwrite(szString, sizeof(char), lstrlen(szString), fInstallLog);
fclose(fInstallLog);
}
}
void UpdateJSProxyInfo()
{
FILE *fJSFile;
@ -969,7 +1025,7 @@ HRESULT CreateDirectoriesAll(char* szPath, BOOL bLogForUninstall)
hrResult = CreateDirectory(szCreatePath, NULL);
if(bLogForUninstall)
UpdateInstallLog(KEY_CREATE_FOLDER, szCreatePath);
UpdateInstallLog(KEY_CREATE_FOLDER, szCreatePath, FALSE);
}
szCreatePath[i] = szPath[i];
}
@ -1384,11 +1440,12 @@ void DeleteWinRegValue(HKEY hkRootKey, LPSTR szKey, LPSTR szName)
}
}
void GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, DWORD dwReturnValueSize)
DWORD GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, DWORD dwReturnValueSize)
{
HKEY hkResult;
DWORD dwErr;
DWORD dwSize;
DWORD dwType;
char szBuf[MAX_BUF];
ZeroMemory(szBuf, sizeof(szBuf));
@ -1397,15 +1454,24 @@ void GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, D
if((dwErr = RegOpenKeyEx(hkRootKey, szKey, 0, KEY_READ, &hkResult)) == ERROR_SUCCESS)
{
dwSize = sizeof(szBuf);
dwErr = RegQueryValueEx(hkResult, szName, 0, NULL, szBuf, &dwSize);
dwErr = RegQueryValueEx(hkResult, szName, 0, &dwType, szBuf, &dwSize);
if((*szBuf != '\0') && (dwErr == ERROR_SUCCESS))
if((dwType == REG_MULTI_SZ) && (*szBuf != '\0'))
{
DWORD dwCpSize;
dwCpSize = dwReturnValueSize < dwSize ? (dwReturnValueSize - 1) : dwSize;
memcpy(szReturnValue, szBuf, dwCpSize);
}
else if((*szBuf != '\0') && (dwErr == ERROR_SUCCESS))
ExpandEnvironmentStrings(szBuf, szReturnValue, dwReturnValueSize);
else
*szReturnValue = '\0';
RegCloseKey(hkResult);
}
return(dwType);
}
void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPBYTE lpbData, DWORD dwSize)
@ -1571,6 +1637,10 @@ HRESULT ProcessProgramFolder(DWORD dwTiming, char *szSectionPrefix)
dwIconId = 0;
CreateALink(szFile, szProgramFolder, szDescription, szWorkingDir, szArguments, szIconPath, dwIconId);
lstrcpy(szBuf, szProgramFolder);
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, szDescription);
UpdateInstallLog(KEY_WINDOWS_SHORTCUT, szBuf, FALSE);
++dwIndex1;
itoa(dwIndex1, szIndex1, 10);

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

@ -32,7 +32,7 @@ HRESULT CleanupXpcomFile(void);
HRESULT ProcessUncompressFile(DWORD dwTiming, char *szSectionPrefix);
HRESULT FileMove(LPSTR szFrom, LPSTR szTo);
HRESULT ProcessMoveFile(DWORD dwTiming, char *szSectionPrefix);
HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists);
HRESULT FileCopy(LPSTR szFrom, LPSTR szTo, BOOL bFailIfExists, BOOL bDnu);
HRESULT ProcessCopyFile(DWORD dwTiming, char *szSectionPrefix);
HRESULT ProcessCreateDirectory(DWORD dwTiming, char *szSectionPrefix);
HRESULT FileDelete(LPSTR szDestination);
@ -54,7 +54,7 @@ HRESULT CreateDirectoriesAll(char* szPath, BOOL bLogForUninstall);
void ProcessFileOps(DWORD dwTiming, char *szSectionPrefix);
void DeleteWinRegValue(HKEY hkRootKey, LPSTR szKey, LPSTR szName);
void DeleteWinRegKey(HKEY hkRootKey, LPSTR szKey, BOOL bAbsoluteDelete);
void GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, DWORD dwSize);
DWORD GetWinReg(HKEY hkRootKey, LPSTR szKey, LPSTR szName, LPSTR szReturnValue, DWORD dwSize);
void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPBYTE lpbData, DWORD dwSize);
HKEY ParseRootKey(LPSTR szRootKey);
BOOL ParseRegType(LPSTR szType, DWORD *dwType);
@ -62,7 +62,8 @@ BOOL WinRegKeyExists(HKEY hkRootKey, LPSTR szKey);
BOOL WinRegNameExists(HKEY hkRootKey, LPSTR szKey, LPSTR szName);
HRESULT FileCopySequential(LPSTR szSourcePath, LPSTR szDestPath, LPSTR szFilename);
HRESULT ProcessCopyFileSequential(DWORD dwTiming, char *szSectionPrefix);
void UpdateInstallLog(LPSTR szKey, LPSTR szDir);
void UpdateInstallLog(LPSTR szKey, LPSTR szString, BOOL bDnu);
void UpdateInstallStatusLog(LPSTR szString);
int RegisterDll32(char *File);
HRESULT FileSelfRegister(LPSTR szFilename, LPSTR szDestination);
HRESULT ProcessSelfRegisterFile(DWORD dwTiming, char *szSectionPrefix);

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

@ -72,6 +72,8 @@ BOOL bCreateDestinationDir;
BOOL bReboot;
BOOL gbILUseTemp;
BOOL gbPreviousUnfinishedDownload;
BOOL gbIgnoreRunAppX;
BOOL gbIgnoreProgramFolderX;
setupGen sgProduct;
diS diSetup;
@ -97,7 +99,6 @@ ssi *ssiSiteSelector;
char *SetupFileList[] = {"setuprsc.dll",
"config.ini",
"setup.ini",
"sdinst.dll",
""};
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)

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

@ -60,6 +60,7 @@ typedef int PRInt32;
#define FILE_INI_REDIRECT "redirect.ini"
#define WIZ_TEMP_DIR "ns_temp"
#define FILE_INSTALL_LOG "install_wizard.log"
#define FILE_INSTALL_STATUS_LOG "install_status.log"
#define FILE_ALL_JS "all-proxy.js"
#define VR_DEFAULT_PRODUCT_NAME "Mozilla"
@ -73,6 +74,22 @@ typedef int PRInt32;
#define BAR_LIBXPNET_SPACING 0
#define BAR_LIBXPNET_WIDTH 1
/* W: When for install status logging */
#define W_START 0
#define W_END 1
/* W: When for crc check failed logging */
#define W_STARTUP 0
#define W_DOWNLOAD 1
/* UP: Use Protocol */
#define UP_FTP 0
#define UP_HTTP 1
/* LIS: Log Install Status */
#define LIS_SUCCESS 0
#define LIS_FAILURE 1
/* UG: Upgrade */
#define UG_NONE 0
#define UG_DELETE 1
@ -278,6 +295,8 @@ typedef struct dlgDownloadOptions
LPSTR szMessage0;
LPSTR szMessage1;
BOOL bSaveInstaller;
DWORD dwUseProtocol;
BOOL bUseProtocolSettings;
} diDO;
typedef struct dlgAdvancedSettings
@ -323,6 +342,7 @@ typedef struct setupStruct
LPSTR szProgramName;
LPSTR szCompanyName;
LPSTR szProductName;
LPSTR szUninstallFilename;
LPSTR szUserAgent;
LPSTR szProgramFolderName;
LPSTR szProgramFolderPath;

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

@ -78,8 +78,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEVERSION 1,0,0,2
PRODUCTVERSION 1,0,0,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -95,16 +95,16 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Netscape Communications\0"
VALUE "CompanyName", "mozilla.org\0"
VALUE "FileDescription", "setup\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "FileVersion", "1, 0, 0, 2\0"
VALUE "InternalName", "setup\0"
VALUE "LegalCopyright", "Copyright © 1999\0"
VALUE "LegalCopyright", "Copyright © 2001\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "setup.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Netscape Communications setup\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "ProductName", "Mozilla Setup\0"
VALUE "ProductVersion", "1, 0, 0, 2\0"
VALUE "SpecialBuild", "\0"
END
END

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

@ -25,7 +25,8 @@
#ifndef _XPERR_H_
#define _XPERR_H_
char *XpErrorList[] = {"-200", "BAD_PACKAGE_NAME",
char *XpErrorList[] = {"0" , "OK",
"-200", "BAD_PACKAGE_NAME",
"-201", "UNEXPECTED_ERROR",
"-202", "ACCESS_DENIED",
"-203", "TOO_MANY_CERTIFICATES",

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

@ -33,6 +33,10 @@
#define BDIR_RIGHT 1
#define BDIR_LEFT 2
typedef HRESULT (_cdecl *XpiInit)(const char *, const char *aLogName, pfnXPIProgress);
typedef HRESULT (_cdecl *XpiInstall)(const char *, const char *, long);
typedef void (_cdecl *XpiExit)(void);
static XpiInit pfnXpiInit;
static XpiInstall pfnXpiInstall;
static XpiExit pfnXpiExit;
@ -145,6 +149,34 @@ void GetTotalArchivesToInstall(void)
}
}
char *GetErrorString(DWORD dwError, char *szErrorString, DWORD dwErrorStringSize)
{
int i = 0;
char szErrorNumber[MAX_BUF];
ZeroMemory(szErrorString, dwErrorStringSize);
itoa(dwError, szErrorNumber, 10);
/* map the error value to a string */
while(TRUE)
{
if(*XpErrorList[i] == '\0')
break;
if(lstrcmpi(szErrorNumber, XpErrorList[i]) == 0)
{
if(*XpErrorList[i + 1] != '\0')
lstrcpy(szErrorString, XpErrorList[i + 1]);
break;
}
++i;
}
return(szErrorString);
}
HRESULT SmartUpdateJars()
{
DWORD dwIndex0;
@ -170,6 +202,7 @@ HRESULT SmartUpdateJars()
ShowMessage(szMsgSmartUpdateStart, TRUE);
if(InitializeXPIStub() == WIZ_OK)
{
LogISXPInstall(W_START);
lstrcpy(szBuf, sgProduct.szPath);
if(*sgProduct.szSubPath != '\0')
{
@ -240,39 +273,20 @@ HRESULT SmartUpdateJars()
wsprintf(szBuf, szStrInstalling, siCObject->szDescriptionShort);
SetDlgItemText(dlgInfo.hWndDlg, IDC_STATUS0, szBuf);
LogISXPInstallComponent(siCObject->szDescriptionShort);
hrResult = pfnXpiInstall(szArchive, "", 0xFFFF);
if(hrResult == 999)
bReboot = TRUE;
else if(hrResult != WIZ_OK)
{
LogISXPInstallComponentResult(hrResult);
if(NS_LoadString(hSetupRscInst, IDS_ERROR_XPI_INSTALL, szEXpiInstall, MAX_BUF) == WIZ_OK)
{
int i = 0;
char szErrorString[MAX_BUF];
char szErrorNumber[MAX_BUF];
ZeroMemory(szErrorString, MAX_BUF);
itoa(hrResult, szErrorNumber, 10);
/* map the error value to a string */
while(TRUE)
{
if(*XpErrorList[i] == '\0')
break;
if(lstrcmpi(szErrorNumber, XpErrorList[i]) == 0)
{
if(*XpErrorList[i + 1] != '\0')
lstrcpy(szErrorString, XpErrorList[i + 1]);
break;
}
++i;
}
wsprintf(szBuf, "%s: %d %s", szEXpiInstall, hrResult, szErrorString);
GetErrorString(hrResult, szErrorString, sizeof(szErrorString));
wsprintf(szBuf, "%s - %s: %d %s", szEXpiInstall, siCObject->szDescriptionShort, hrResult, szErrorString);
PrintError(szBuf, ERROR_CODE_HIDE);
}
@ -283,6 +297,7 @@ HRESULT SmartUpdateJars()
++dwCurrentArchive;
UpdateGaugeArchiveProgressBar((unsigned)(((double)(dwCurrentArchive)/(double)dwTotalArchives)*(double)100));
ProcessWindowsMessages();
LogISXPInstallComponentResult(hrResult);
}
if(siCObject->dwAttributes & SIC_SELECTED)
@ -302,6 +317,7 @@ HRESULT SmartUpdateJars()
}
DeInitializeXPIStub();
LogISXPInstall(W_END);
return(hrResult);
}

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

@ -25,10 +25,6 @@
#ifndef _XPI_H_
#define _XPI_H_
typedef HRESULT (_cdecl *XpiInit)(const char *, const char *aLogName, pfnXPIProgress);
typedef HRESULT (_cdecl *XpiInstall)(const char *, const char *, long);
typedef void (_cdecl *XpiExit)(void);
HRESULT InitializeXPIStub(void);
HRESULT DeInitializeXPIStub(void);
HRESULT SmartUpdateJars(void);
@ -38,6 +34,7 @@ void cbXPIFinal(const char *, PRInt32 finalStatus);
void InitProgressDlg(void);
void DeInitProgressDlg(void);
void GetTotalArchivesToInstall(void);
char *GetErrorString(DWORD dwError, char *szErrorString, DWORD dwErrorStringSize);
#endif /* _XPI_H_ */

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

@ -85,8 +85,7 @@ struct ExtractFilesDlgInfo
} dlgInfo;
#ifdef SSU_TEST
#if 0
void ParseURLServerAndPath(char *szInURL, char *szOutServer, DWORD dwOutServerBufSize, char *szOutPath, DWORD dwOutPathBufSize)
{
DWORD dwOutServerLen;
@ -119,91 +118,6 @@ void ParseURLServerAndPath(char *szInURL, char *szOutServer, DWORD dwOutServerBu
ptrChar = CharNext(ptrChar);
}
}
void TruncateURLString(HWND hWnd, LPSTR szInURL, DWORD dwInURLBufSize, LPSTR szOutString, DWORD dwOutStringBufSize)
{
HDC hdcWnd;
LOGFONT logFont;
HFONT hfontTmp;
HFONT hfontOld;
RECT rWndRect;
SIZE sizeString;
BOOL bDone;
char szFilename[MAX_BUF];
char szURLServerPart[MAX_BUF];
char szURLPath[MAX_BUF];
char *ptrCharPrev1;
char *ptrCharPrev2;
char *ptrCharPrev3;
char *ptrCharPrev4;
char cCharPrev2;
char cCharPrev3;
char cCharPrev4;
ZeroMemory(szOutString, dwOutStringBufSize);
if(dwInURLBufSize > dwOutStringBufSize)
return;
if(lstrlen(szInURL) == 0)
return;
ParsePath(szInURL, szFilename, sizeof(szFilename), TRUE, PP_FILENAME_ONLY);
ParsePath(szInURL, szURLwithoutFilename, sizeof(szURLwithoutFilename), TRUE, PP_PATH_ONLY);
ParseURLServerAndPath(szURLwithoutFilename, szURLServerPart, sizeof(szURLServerPart), szURLPath, sizeof(szURLPath));
lstrcpy(szOutString, szInURL);
hdcWnd = GetWindowDC(hWnd);
GetClientRect(hWnd, &rWndRect);
SystemParametersInfo(SPI_GETICONTITLELOGFONT,
sizeof(logFont),
(PVOID)&logFont,
0);
hfontTmp = CreateFontIndirect(&logFont);
if(hfontTmp)
hfontOld = (HFONT)SelectObject(hdcWnd, hfontTmp);
/* make this its own function so that we can call it for szURLServerPath, szURLPath, and szFilename */
/** From here **/
GetTextExtentPoint32(hdcWnd, szOutString, lstrlen(szOutString), &sizeString);
if(sizeString.cx > rWndRect.right)
{
bDone = FALSE;
while(!bDone)
{
ptrCharPrev1 = CharPrev(szOutString, &szOutString[lstrlen(szOutString)]);
ptrCharPrev2 = CharPrev(szOutString, ptrCharPrev1);
ptrCharPrev3 = CharPrev(szOutString, ptrCharPrev2);
ptrCharPrev4 = CharPrev(szOutString, ptrCharPrev3);
cCharPrev2 = *ptrCharPrev2;
cCharPrev3 = *ptrCharPrev3;
cCharPrev4 = *ptrCharPrev4;
*ptrCharPrev1 = '\0';
*ptrCharPrev2 = '.';
*ptrCharPrev3 = '.';
*ptrCharPrev4 = '.';
GetTextExtentPoint32(hdcWnd, szOutString, lstrlen(szOutString), &sizeString);
if(sizeString.cx > rWndRect.right)
{
*ptrCharPrev2 = cCharPrev2;
*ptrCharPrev3 = cCharPrev3;
*ptrCharPrev4 = cCharPrev4;
}
else
bDone = TRUE;
}
}
/** To here **/
SelectObject(hdcWnd, hfontOld);
DeleteObject(hfontTmp);
ReleaseDC(hWnd, hdcWnd);
}
#endif
void SetStatusStatus(void)
@ -249,7 +163,7 @@ void SetStatusUrl(void)
hStatusUrl = GetDlgItem(dlgInfo.hWndDlg, IDC_STATUS_URL);
if(hStatusUrl)
TruncateString(hStatusUrl, gszUrl, sizeof(gszUrl), szUrlPathBuf, sizeof(szUrlPathBuf));
TruncateString(hStatusUrl, gszUrl, szUrlPathBuf, sizeof(szUrlPathBuf));
else
lstrcpy(szUrlPathBuf, gszUrl);
@ -435,8 +349,9 @@ int DownloadViaFTP(char *szUrl)
return(rv);
}
int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer, char *szProxyPort, char *szProxyUser, char *szProxyPasswd, BOOL bShowRetryMsg, BOOL bIgnoreNetworkError)
int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer, char *szProxyPort, char *szProxyUser, char *szProxyPasswd, BOOL bShowRetryMsg, BOOL bIgnoreNetworkError, char *szFailedFile, DWORD dwFailedFileSize)
{
char szCurrentFile[MAX_BUF];
char szIndex[MAX_ITOA];
char szSection[MAX_INI_SK];
char szSavedCwd[MAX_BUF_MEDIUM];
@ -447,6 +362,9 @@ int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer
if(szInputIniFile == NULL)
return(WIZ_ERROR_UNDEFINED);
if(szFailedFile)
ZeroMemory(szFailedFile, dwFailedFileSize);
GetCurrentDirectory(sizeof(szSavedCwd), szSavedCwd);
SetCurrentDirectory(szDownloadDir);
@ -490,6 +408,9 @@ int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer
iFileDownloadRetries = 0;
do
{
/* save the file name to be downloaded */
ParsePath(gszUrl, szCurrentFile, sizeof(szCurrentFile), TRUE, PP_FILENAME_ONLY);
/* Download starts here */
if((szProxyServer != NULL) && (szProxyPort != NULL) &&
(*szProxyServer != '\0') && (*szProxyPort != '\0'))
@ -507,17 +428,16 @@ int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer
if(rv == nsFTPConn::E_USER_CANCEL)
{
char szBuf[MAX_BUF_MEDIUM];
char szFilename[MAX_BUF_TINY];
char szFile[MAX_BUF];
ParsePath(gszUrl, szFilename, sizeof(szFilename), TRUE, PP_FILENAME_ONLY);
lstrcpy(szBuf, szDownloadDir);
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, szFilename);
lstrcpy(szFile, szDownloadDir);
AppendBackSlash(szFile, sizeof(szFile));
lstrcat(szFile, szCurrentFile);
if(FileExists(szBuf))
DeleteFile(szBuf);
if(FileExists(szFile))
DeleteFile(szFile);
/* break out of the do loop */
break;
}
} while((rv != nsFTPConn::E_USER_CANCEL) && (rv != nsFTPConn::OK) && (iFileDownloadRetries++ < MAX_FILE_DOWNLOAD_RETRIES));
@ -531,9 +451,17 @@ int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer
/* too many retries from failed downloads */
char szMsg[MAX_BUF];
if(szFailedFile && ((DWORD)lstrlen(szCurrentFile) <= dwFailedFileSize))
lstrcpy(szFailedFile, szCurrentFile);
GetPrivateProfileString("Strings", "Error Too Many Network Errors", "", szMsg, sizeof(szMsg), szFileIniConfig);
if(*szMsg != '\0')
PrintError(szMsg, ERROR_CODE_HIDE);
{
char szBuf[MAX_BUF];
wsprintf(szBuf, szMsg, szCurrentFile);
PrintError(szBuf, ERROR_CODE_HIDE);
}
/* Set return value and break out of for() loop.
* We don't want to continue if there were too

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

@ -23,7 +23,7 @@
#ifndef _XPNETHOOK_H_
#define _XPNETHOOK_H_
int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer, char *szProxyPort, char *szProxyUser, char *szProxyPasswd, BOOL bShowRetryMsg, BOOL bIgnoreNetworkError);
int DownloadFiles(char *szInputIniFile, char *szDownloadDir, char *szProxyServer, char *szProxyPort, char *szProxyUser, char *szProxyPasswd, BOOL bShowRetryMsg, BOOL bIgnoreNetworkError, char *szFailedFile, DWORD dwFailedFileSize);
#endif /* _XPNETHOOK_H_ */

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

@ -111,6 +111,8 @@
#define IDC_BUTTON_PROXY_SETTINGS 1067
#define IDC_STATUS_FILE 1070
#define IDC_STATUS_STATUS 1071
#define IDC_USE_HTTP 1073
#define IDC_USE_FTP 1074
#define DLG_WELCOME 2001
#define DLG_LICENSE 2002
#define DLG_SETUP_TYPE 2003
@ -158,6 +160,7 @@
#define IDS_STR_SAVE_INSTALLER_FILES 11027
#define IDS_MSG_INIT_SETUP 11028
#define IDS_STR_MESSAGEBOX_TITLE 11029
#define IDS_ERROR_GETVERSION 11030
#define IDC_STATIC -1
// Next default values for new objects
@ -167,7 +170,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 113
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1072
#define _APS_NEXT_CONTROL_VALUE 1074
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

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

@ -72,6 +72,7 @@ END
DLG_SETUP_TYPE DIALOG DISCARDABLE 51, 56, 315, 205
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION ":"
CLASS "MozillaSetupDlg"
FONT 8, "MS Sans Serif"
BEGIN
@ -97,7 +98,7 @@ BEGIN
WS_EX_CLIENTEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,11,179,295,1,
WS_EX_STATICEDGE
PUSHBUTTON "Read Me",IDC_README,11,186,53,14
PUSHBUTTON "Re&ad Me",IDC_README,11,186,53,14
CONTROL "",IDC_EDIT_DESTINATION,"Static",SS_LEFTNOWORDWRAP |
WS_GROUP,107,160,143,9
END
@ -277,6 +278,9 @@ FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_EDIT_PROXY_SERVER,147,57,152,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_PROXY_PORT,147,74,152,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_PROXY_USER,147,101,152,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_PROXY_PASSWD,147,118,152,12,ES_PASSWORD |
ES_AUTOHSCROLL
DEFPUSHBUTTON "&Ok",IDWIZNEXT,188,186,53,14
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
CONTROL 108,IDC_STATIC,"Static",SS_BITMAP,11,11,83,162,
@ -287,9 +291,6 @@ BEGIN
RTEXT "Port:",IDC_STATIC,108,75,35,9
GROUPBOX "Proxy Settings:",IDC_STATIC,101,44,206,94
LTEXT "",IDC_MESSAGE0,101,11,204,29,NOT WS_GROUP
EDITTEXT IDC_EDIT_PROXY_USER,147,101,152,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_PROXY_PASSWD,147,118,152,12,ES_PASSWORD |
ES_AUTOHSCROLL
RTEXT "User id:",IDC_STATIC,108,102,35,9
RTEXT "Password:",IDC_STATIC,108,120,35,9
END
@ -341,23 +342,26 @@ STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
CLASS "MozillaSetupDlg"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "",IDC_MESSAGE1,101,90,204,33,NOT WS_GROUP
CONTROL "Save installer files locally",
IDC_CHECK_SAVE_INSTALLER_FILES,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,101,127,204,9
EDITTEXT IDC_EDIT_LOCAL_INSTALLER_PATH,101,140,204,12,
COMBOBOX IDC_LIST_SITE_SELECTOR,101,45,206,124,CBS_DROPDOWNLIST |
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_MESSAGE1,101,72,204,33,NOT WS_GROUP
CONTROL "",IDC_CHECK_SAVE_INSTALLER_FILES,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,101,109,204,9
EDITTEXT IDC_EDIT_LOCAL_INSTALLER_PATH,101,122,204,12,
ES_AUTOHSCROLL | ES_READONLY
CONTROL "",IDC_USE_FTP,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,
101,148,112,9
CONTROL "",IDC_USE_HTTP,"Button",BS_AUTORADIOBUTTON,101,161,112,
9
PUSHBUTTON "&Proxy Settings",IDC_BUTTON_PROXY_SETTINGS,221,159,84,
14
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
DEFPUSHBUTTON "&Next >",IDWIZNEXT,188,186,53,14
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
CONTROL 108,-1,"Static",SS_BITMAP,11,11,80,160,WS_EX_CLIENTEDGE
LTEXT "",IDC_MESSAGE0,101,15,204,25,NOT WS_GROUP
CONTROL 108,-1,"Static",SS_BITMAP,11,11,83,162,WS_EX_CLIENTEDGE
CONTROL "",-1,"Static",SS_ETCHEDHORZ,11,179,295,1,
WS_EX_STATICEDGE
COMBOBOX IDC_LIST_SITE_SELECTOR,101,45,206,124,CBS_DROPDOWNLIST |
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_MESSAGE0,101,15,204,25,NOT WS_GROUP
END
DLG_DOWNLOADING DIALOG DISCARDABLE 0, 0, 311, 114
@ -495,6 +499,7 @@ BEGIN
IDS_STR_SAVE_INSTALLER_FILES "Save downloaded and Setup program files to:"
IDS_MSG_INIT_SETUP "Initializing Setup, please wait..."
IDS_STR_MESSAGEBOX_TITLE "%s Setup"
IDS_ERROR_GETVERSION "GetVersionEx() failed!"
END
#endif // English (U.S.) resources

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

@ -43,15 +43,13 @@ BOOL DeleteOrDelayUntilReboot(LPSTR szFile)
if(FileExists(szFile))
{
bDelayDelete = TRUE;
if(GetWindowsDirectory(szWinDir, sizeof(szWinDir)) == 0)
return(FALSE);
if(ulOSType & OS_NT)
{
MoveFileEx(szFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
}
else
{
if(GetWindowsDirectory(szWinDir, sizeof(szWinDir)) == 0)
return(FALSE);
lstrcpy(szWininitFile, szWinDir);
AppendBackSlash(szWininitFile, sizeof(szWininitFile));
lstrcat(szWininitFile, "wininit.ini");