diff --git a/toolkit/mozapps/installer/windows/wizard/installer.dsp b/toolkit/mozapps/installer/windows/wizard/installer.dsp new file mode 100644 index 00000000000..ba2a6e2ae77 --- /dev/null +++ b/toolkit/mozapps/installer/windows/wizard/installer.dsp @@ -0,0 +1,824 @@ +# Microsoft Developer Studio Project File - Name="installer" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=installer - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "installer.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "installer.mak" CFG="installer - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "installer - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "installer - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "installer - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "installer - Win32 Release" +# Name "installer - Win32 Debug" +# Begin Group "setup" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\dialogs.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\dialogs.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\extern.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\extra.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\extra.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\ifuncns.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\ifuncns.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\logging.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\logging.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\nsEscape.cpp + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\nsEscape.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\process.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\process.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\resource.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\setup.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\setup.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\setup.rc + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\shortcut.cpp + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\shortcut.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\supersede.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\supersede.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\version.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\version.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\wizverreg.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xperr.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xpi.c + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xpi.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xpistub.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xpnetHook.cpp + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\xpnetHook.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setup\zipfile.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Ignore_Default_Tool 1 + +!ENDIF + +# End Source File +# End Group +# Begin Group "setuprsc" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\windows\wizard\setuprsc\setuprsc.cpp + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setuprsc\setuprsc.h + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\wizard\setuprsc\setuprsc.rc +# PROP Exclude_From_Build 1 +# End Source File +# End Group +# Begin Group "xappscripts" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\windows\build_static.pl + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\windows\makeall.pl + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Group +# Begin Group "browserscripts" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\abe.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\adt.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\browser.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\chatzilla.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\config.it + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\deflenus.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\editor.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\..\..\..\browser\installer\windows\firebird-win32-stub-installer.jst" + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\inspector.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\install.it + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\installer.cfg + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\langenus.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\psm.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\redirect.it + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\regus.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\talkback.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\uninstall.it + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\venkman.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\..\..\browser\installer\windows\xpcom.jst + +!IF "$(CFG)" == "installer - Win32 Release" + +!ELSEIF "$(CFG)" == "installer - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\setuprsc\Header.bmp +# End Source File +# Begin Source File + +SOURCE=.\setuprsc\setup.ico +# End Source File +# Begin Source File + +SOURCE=.\setuprsc\Watermrk.bmp +# End Source File +# End Target +# End Project diff --git a/toolkit/mozapps/installer/windows/wizard/installer.dsw b/toolkit/mozapps/installer/windows/wizard/installer.dsw new file mode 100644 index 00000000000..e69de29bb2d diff --git a/toolkit/mozapps/installer/windows/wizard/setup/dialogs.c b/toolkit/mozapps/installer/windows/wizard/setup/dialogs.c index 1cac3fda166..4f8c20db45c 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/dialogs.c +++ b/toolkit/mozapps/installer/windows/wizard/setup/dialogs.c @@ -31,6 +31,8 @@ #include "xpi.h" #include "logging.h" #include +#include +#include #include // commdlg.h is needed to build with WIN32_LEAN_AND_MEAN @@ -245,69 +247,54 @@ void SaveWindowPosition(HWND aDlg) } } +/////////////////////////////////////////////////////////////////////////////// +// DIALOG: WELCOME +// + LRESULT CALLBACK DlgProcWelcome(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { char szBuf[MAX_BUF]; LPNMHDR notifyMessage; + HWND hControl; + + switch(msg) { + case WM_INITDIALOG: + // The header on the welcome page uses a larger font. + hControl = GetDlgItem(hDlg, IDC_STATIC_TITLE); + SendMessage(hControl, WM_SETFONT, (WPARAM)sgInstallGui.welcomeTitleFont, (LPARAM)TRUE); - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); - SetWindowText(hDlg, diWelcome.szTitle); + // UI Text, from localized config files + wsprintf(szBuf, diWelcome.szMessageWelcome, sgProduct.szProductName); + SetDlgItemText(hDlg, IDC_STATIC_TITLE, szBuf); + wsprintf(szBuf, diWelcome.szMessage0, sgProduct.szProductName); + SetDlgItemText(hDlg, IDC_STATIC0, szBuf); + SetDlgItemText(hDlg, IDC_STATIC1, diWelcome.szMessage1); + SetDlgItemText(hDlg, IDC_STATIC2, diWelcome.szMessage2); + wsprintf(szBuf, diWelcome.szMessage3, sgProduct.szProductName); + SetDlgItemText(hDlg, IDC_STATIC3, szBuf); - wsprintf(szBuf, diWelcome.szMessage0, sgProduct.szProductName, sgProduct.szProductName); - SetDlgItemText(hDlg, IDC_STATIC0, szBuf); - SetDlgItemText(hDlg, IDC_STATIC1, diWelcome.szMessage1); - SetDlgItemText(hDlg, IDC_STATIC2, diWelcome.szMessage2); - SetDlgItemText(hDlg, IDC_STATIC3, diWelcome.szMessage3); + break; - SetDlgItemText(hDlg, IDWIZNEXT, sgInstallGui.szNext_); - SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szCancel_); - SendDlgItemMessage (hDlg, IDC_STATIC0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC2, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - break; - - case WM_NOTIFY: - notifyMessage = (LPNMHDR)lParam; - switch (notifyMessage->code) - { - case PSN_SETACTIVE: - PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT); - break; - case PSN_WIZNEXT: - break; - case PSN_RESET: - break; - default: - break; - } - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDWIZNEXT: - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(NEXT_DLG); - break; - - case IDCANCEL: - AskCancelDlg(hDlg); - break; - - default: - break; - } + case WM_NOTIFY: + notifyMessage = (LPNMHDR)lParam; + switch (notifyMessage->code) { + case PSN_SETACTIVE: + // Wizard dialog title + PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diWelcome.szTitle); + + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT); break; + } + break; } - return(0); + + return 0; } +/////////////////////////////////////////////////////////////////////////////// +// DIALOG: LICENSE +// + LRESULT CALLBACK DlgProcLicense(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { char szBuf[MAX_BUF]; @@ -318,638 +305,322 @@ LRESULT CALLBACK DlgProcLicense(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) HANDLE hFLicense; FILE *fLicense; LPNMHDR notifyMessage; + + switch(msg) { + case WM_INITDIALOG: + SetDlgItemText(hDlg, IDC_MESSAGE0, diLicense.szMessage0); + SetDlgItemText(hDlg, IDC_RADIO_ACCEPT, diLicense.szRadioAccept); + SetDlgItemText(hDlg, IDC_RADIO_DECLINE, diLicense.szRadioDecline); - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); - SetWindowText(hDlg, diLicense.szTitle); - SetDlgItemText(hDlg, IDC_MESSAGE0, diLicense.szMessage0); - SetDlgItemText(hDlg, IDC_MESSAGE1, diLicense.szMessage1); + // Check the "Accept" Radio button by default. + CheckDlgButton(hDlg, IDC_RADIO_ACCEPT, BST_CHECKED); + SendMessage(GetDlgItem(hDlg, IDC_RADIO_ACCEPT), BM_SETCHECK, BST_CHECKED, 0); - lstrcpy(szBuf, szSetupDir); - AppendBackSlash(szBuf, sizeof(szBuf)); - lstrcat(szBuf, diLicense.szLicenseFilename); + // License Text + lstrcpy(szBuf, szSetupDir); + AppendBackSlash(szBuf, sizeof(szBuf)); + lstrcat(szBuf, diLicense.szLicenseFilename); - if((hFLicense = FindFirstFile(szBuf, &wfdFindFileData)) != INVALID_HANDLE_VALUE) + if((hFLicense = FindFirstFile(szBuf, &wfdFindFileData)) != INVALID_HANDLE_VALUE) + { + dwFileSize = (wfdFindFileData.nFileSizeHigh * MAXDWORD) + wfdFindFileData.nFileSizeLow + 1; + FindClose(hFLicense); + if((szLicenseFilenameBuf = NS_GlobalAlloc(dwFileSize)) != NULL) { - dwFileSize = (wfdFindFileData.nFileSizeHigh * MAXDWORD) + wfdFindFileData.nFileSizeLow + 1; - FindClose(hFLicense); - if((szLicenseFilenameBuf = NS_GlobalAlloc(dwFileSize)) != NULL) + if((fLicense = fopen(szBuf, "rb")) != NULL) { - if((fLicense = fopen(szBuf, "rb")) != NULL) - { - dwBytesRead = fread(szLicenseFilenameBuf, sizeof(char), dwFileSize, fLicense); - fclose(fLicense); - SetDlgItemText(hDlg, IDC_EDIT_LICENSE, szLicenseFilenameBuf); - } - - FreeMemory(&szLicenseFilenameBuf); + dwBytesRead = fread(szLicenseFilenameBuf, sizeof(char), dwFileSize, fLicense); + fclose(fLicense); + SetDlgItemText(hDlg, IDC_EDIT_LICENSE, szLicenseFilenameBuf); } + + FreeMemory(&szLicenseFilenameBuf); } - - RepositionWindow(hDlg, NO_BANNER_IMAGE); - - SetDlgItemText(hDlg, IDWIZBACK, sgInstallGui.szBack_); - SetDlgItemText(hDlg, IDWIZNEXT, sgInstallGui.szAccept_); - SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szDecline_); - SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_MESSAGE1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_EDIT_LICENSE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - break; - - case WM_NOTIFY: - notifyMessage = (LPNMHDR)lParam; - switch (notifyMessage->code) - { - case PSN_SETACTIVE: - PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); - break; - case PSN_WIZNEXT: - break; - case PSN_RESET: - break; - default: - break; - } - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDWIZNEXT: - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(NEXT_DLG); - break; - - case IDWIZBACK: - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(PREV_DLG); - break; - - case IDCANCEL: - AskCancelDlg(hDlg); - break; - - default: - break; - } - break; - } - return(0); -} - -LRESULT CALLBACK ListBoxBrowseWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch(uMsg) - { - case LB_SETCURSEL: - gdwIndexLastSelected = (DWORD)wParam; - break; - } - - return(CallWindowProc(OldListBoxWndProc, hWnd, uMsg, wParam, lParam)); -} - -LRESULT CALLBACK BrowseHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - DWORD dwIndex; - DWORD dwLoop; - char szBuf[MAX_BUF]; - char szBufIndex[MAX_BUF]; - char szPath[MAX_BUF]; - HWND hwndLBFolders; - - switch(message) - { - case WM_INITDIALOG: - hwndLBFolders = GetDlgItem(hDlg, 1121); - SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szTempSetupPath); - - RepositionWindow(hDlg, NO_BANNER_IMAGE); - - OldListBoxWndProc = SubclassWindow(hwndLBFolders, (WNDPROC)ListBoxBrowseWndProc); - gdwIndexLastSelected = SendDlgItemMessage(hDlg, 1121, LB_GETCURSEL, 0, (LPARAM)0); - - SetWindowText(hDlg, sgInstallGui.szSelectDirectory); - SetDlgItemText(hDlg, 1092, sgInstallGui.szDirectories_); - SetDlgItemText(hDlg, 1091, sgInstallGui.szDrives_); - SetDlgItemText(hDlg, 1, sgInstallGui.szOk); - SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szCancel); - SendDlgItemMessage (hDlg, DLG_BROWSE_DIR, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, 1092, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, 1091, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, 1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_EDIT_DESTINATION, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L); - SendDlgItemMessage (hDlg, 1121, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L); - SendDlgItemMessage (hDlg, 1137, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L); - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case 1121: - if(HIWORD(wParam) == LBN_DBLCLK) - { - dwIndex = SendDlgItemMessage(hDlg, 1121, LB_GETCURSEL, 0, (LPARAM)0); - SendDlgItemMessage(hDlg, 1121, LB_GETTEXT, 0, (LPARAM)szPath); - - if(gdwIndexLastSelected < dwIndex) - { - for(dwLoop = 1; dwLoop <= gdwIndexLastSelected; dwLoop++) - { - SendDlgItemMessage(hDlg, 1121, LB_GETTEXT, dwLoop, (LPARAM)szBufIndex); - AppendBackSlash(szPath, sizeof(szPath)); - lstrcat(szPath, szBufIndex); - } - - SendDlgItemMessage(hDlg, 1121, LB_GETTEXT, dwIndex, (LPARAM)szBufIndex); - AppendBackSlash(szPath, sizeof(szPath)); - lstrcat(szPath, szBufIndex); - } - else - { - for(dwLoop = 1; dwLoop <= dwIndex; dwLoop++) - { - SendDlgItemMessage(hDlg, 1121, LB_GETTEXT, dwLoop, (LPARAM)szBufIndex); - AppendBackSlash(szPath, sizeof(szPath)); - lstrcat(szPath, szBufIndex); - } - } - SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szPath); - } - break; - - case IDOK: - SaveWindowPosition(hDlg); - GetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf, MAX_BUF); - if(*szBuf == '\0') - { - char szEDestinationPath[MAX_BUF]; - - GetPrivateProfileString("Messages", "ERROR_DESTINATION_PATH", "", szEDestinationPath, sizeof(szEDestinationPath), szFileIniInstall); - MessageBox(hDlg, szEDestinationPath, NULL, MB_OK | MB_ICONEXCLAMATION); - break; - } - - AppendBackSlash(szBuf, sizeof(szBuf)); - - /* Make sure that the path is not within the windows dir */ - if(IsPathWithinWindir(szBuf)) - { - char errorMsg[MAX_BUF]; - char errorMsgTitle[MAX_BUF]; - - GetPrivateProfileString("Messages", "ERROR_PATH_WITHIN_WINDIR", - "", errorMsg, sizeof(errorMsg), szFileIniInstall); - GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", - errorMsgTitle, sizeof(errorMsgTitle), szFileIniInstall); - MessageBox(hDlg, errorMsg, errorMsgTitle, MB_OK | MB_ICONERROR); - break; - } - - /* Create the path if it does not exist */ - if(FileExists(szBuf) == FALSE) - { - char szBufTemp[MAX_BUF]; - char szBuf2[MAX_PATH]; - - if(CreateDirectoriesAll(szBuf, ADD_TO_UNINSTALL_LOG) != WIZ_OK) - { - char szECreateDirectory[MAX_BUF]; - char szEMessageTitle[MAX_BUF]; - - lstrcpy(szBufTemp, "\n\n"); - lstrcat(szBufTemp, sgProduct.szPath); - RemoveBackSlash(szBufTemp); - lstrcat(szBufTemp, "\n\n"); - - if(GetPrivateProfileString("Messages", "ERROR_CREATE_DIRECTORY", "", szECreateDirectory, sizeof(szECreateDirectory), szFileIniInstall)) - wsprintf(szBuf, szECreateDirectory, szBufTemp); - - GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", szEMessageTitle, sizeof(szEMessageTitle), szFileIniInstall); - - MessageBox(hDlg, szBuf, szEMessageTitle, MB_OK | MB_ICONERROR); - break; - } - - if(*sgProduct.szSubPath != '\0') - { - /* log the subpath for uninstallation. This subpath does not normally get logged - * for uninstallation due to a chicken and egg problem with creating the log file - * and the directory its in */ - lstrcpy(szBuf2, szBuf); - AppendBackSlash(szBuf2, sizeof(szBuf2)); - lstrcat(szBuf2, sgProduct.szSubPath); - UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2, FALSE); - } - - bCreateDestinationDir = TRUE; - } - - lstrcpy(szTempSetupPath, szBuf); - RemoveBackSlash(szTempSetupPath); - EndDialog(hDlg, 0); - break; - } - break; - } - return(0); -} - -BOOL BrowseForDirectory(HWND hDlg, char *szCurrDir) -{ - OPENFILENAME of; - char ftitle[MAX_PATH]; - char fname[MAX_PATH]; - char szCDir[MAX_BUF]; - char szBuf[MAX_BUF]; - char szSearchPathBuf[MAX_BUF]; - char szDlgBrowseTitle[MAX_BUF]; - BOOL bRet; - - /* save the current directory */ - GetCurrentDirectory(MAX_BUF, szCDir); - - ZeroMemory(szDlgBrowseTitle, sizeof(szDlgBrowseTitle)); - GetPrivateProfileString("Messages", "DLGBROWSETITLE", "", szDlgBrowseTitle, sizeof(szDlgBrowseTitle), szFileIniInstall); - - lstrcpy(szSearchPathBuf, szCurrDir); - if((*szSearchPathBuf != '\0') && ((lstrlen(szSearchPathBuf) != 1) || (*szSearchPathBuf != '\\'))) - { - RemoveBackSlash(szSearchPathBuf); - while(FileExists(szSearchPathBuf) == FALSE) - { - RemoveBackSlash(szSearchPathBuf); - ParsePath(szSearchPathBuf, szBuf, sizeof(szBuf), FALSE, PP_PATH_ONLY); - lstrcpy(szSearchPathBuf, szBuf); } - } + break; - ZeroMemory(ftitle, sizeof(ftitle)); - strcpy(fname, "*.*"); - of.lStructSize = sizeof(OPENFILENAME); - of.hwndOwner = hDlg; - of.hInstance = hSetupRscInst; - of.lpstrFilter = NULL; - of.lpstrCustomFilter = NULL; - of.nMaxCustFilter = 0; - of.nFilterIndex = 0; - of.lpstrFile = fname; - of.nMaxFile = MAX_PATH; - of.lpstrFileTitle = ftitle; - of.nMaxFileTitle = MAX_PATH; - of.lpstrInitialDir = szSearchPathBuf; - of.lpstrTitle = szDlgBrowseTitle; - of.Flags = OFN_NONETWORKBUTTON | - OFN_ENABLEHOOK | - OFN_NOCHANGEDIR | - OFN_ENABLETEMPLATE; - of.nFileOffset = 0; - of.nFileExtension = 0; - of.lpstrDefExt = NULL; - of.lCustData = 0; - of.lpfnHook = BrowseHookProc; - of.lpTemplateName = MAKEINTRESOURCE(DLG_BROWSE_DIR); - - if(GetOpenFileName(&of)) - bRet = TRUE; - else - bRet = FALSE; - - /* restore the current directory */ - SetCurrentDirectory(szCDir); - return(bRet); -} - -void TruncateString(HWND hWnd, LPSTR szInURL, LPSTR szOutString, DWORD dwOutStringBufSize) -{ - HDC hdcWnd; - LOGFONT logFont; - HFONT hfontNew; - HFONT hfontOld; - RECT rWndRect; - SIZE sizeString; - char *ptr = NULL; - int iHalfLen; - int iOutStringLen; - - if((DWORD)lstrlen(szInURL) > dwOutStringBufSize) - return; - - ZeroMemory(szOutString, dwOutStringBufSize); - lstrcpy(szOutString, szInURL); - iOutStringLen = lstrlen(szOutString); - hdcWnd = GetWindowDC(hWnd); - GetClientRect(hWnd, &rWndRect); - SystemParametersInfo(SPI_GETICONTITLELOGFONT, - sizeof(logFont), - (PVOID)&logFont, - 0); - - hfontNew = CreateFontIndirect(&logFont); - if(hfontNew) - { - hfontOld = (HFONT)SelectObject(hdcWnd, hfontNew); - - GetTextExtentPoint32(hdcWnd, szOutString, iOutStringLen, &sizeString); - while(sizeString.cx > rWndRect.right) - { - iHalfLen = iOutStringLen / 2; - if(iHalfLen == 2) - break; - - 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); + case WM_COMMAND: + switch (wParam) { + case IDC_RADIO_ACCEPT: + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); + break; + case IDC_RADIO_DECLINE: + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_BACK); + break; } + break; + + case WM_NOTIFY: + notifyMessage = (LPNMHDR)lParam; + switch (notifyMessage->code) { + case PSN_SETACTIVE: + // Wizard dialog title + PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diLicense.szTitle); + + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); + break; + } + break; } - SelectObject(hdcWnd, hfontOld); - DeleteObject(hfontNew); - ReleaseDC(hWnd, hdcWnd); + return 0; } + +/////////////////////////////////////////////////////////////////////////////// +// DIALOG: SETUP TYPE +// + LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { - HWND hRadioSt0; - HWND hStaticSt0; - HWND hRadioSt1; - HWND hStaticSt1; - HWND hReadme; - char szBuf[MAX_BUF]; - char szBufTemp[MAX_BUF]; + HWND hRadioSt0, hStaticSt0, hRadioSt1, hStaticSt1; + LPNMHDR notifyMessage; hRadioSt0 = GetDlgItem(hDlg, IDC_RADIO_ST0); hStaticSt0 = GetDlgItem(hDlg, IDC_STATIC_ST0_DESCRIPTION); hRadioSt1 = GetDlgItem(hDlg, IDC_RADIO_ST1); hStaticSt1 = GetDlgItem(hDlg, IDC_STATIC_ST1_DESCRIPTION); - hReadme = GetDlgItem(hDlg, IDC_README); - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); - SetWindowText(hDlg, diSetupType.szTitle); + switch(msg) { + case WM_INITDIALOG: + SetDlgItemText(hDlg, IDC_STATIC_MSG0, diSetupType.szMessage0); - SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf); - SetDlgItemText(hDlg, IDC_STATIC_MSG0, diSetupType.szMessage0); + if(diSetupType.stSetupType0.bVisible) { + SetDlgItemText(hDlg, IDC_RADIO_ST0, diSetupType.stSetupType0.szDescriptionShort); + SetDlgItemText(hDlg, IDC_STATIC_ST0_DESCRIPTION, diSetupType.stSetupType0.szDescriptionLong); + ShowWindow(hRadioSt0, SW_SHOW); + ShowWindow(hStaticSt0, SW_SHOW); + } + else { + ShowWindow(hRadioSt0, SW_HIDE); + ShowWindow(hStaticSt0, SW_HIDE); + } - if(diSetupType.stSetupType0.bVisible) - { - SetDlgItemText(hDlg, IDC_RADIO_ST0, diSetupType.stSetupType0.szDescriptionShort); - SetDlgItemText(hDlg, IDC_STATIC_ST0_DESCRIPTION, diSetupType.stSetupType0.szDescriptionLong); - ShowWindow(hRadioSt0, SW_SHOW); - ShowWindow(hStaticSt0, SW_SHOW); - } - else - { - ShowWindow(hRadioSt0, SW_HIDE); - ShowWindow(hStaticSt0, SW_HIDE); - } + if(diSetupType.stSetupType1.bVisible) { + SetDlgItemText(hDlg, IDC_RADIO_ST1, diSetupType.stSetupType1.szDescriptionShort); + SetDlgItemText(hDlg, IDC_STATIC_ST1_DESCRIPTION, diSetupType.stSetupType1.szDescriptionLong); + ShowWindow(hRadioSt1, SW_SHOW); + ShowWindow(hStaticSt1, SW_SHOW); + } + else { + ShowWindow(hRadioSt1, SW_HIDE); + ShowWindow(hStaticSt1, SW_HIDE); + } - if(diSetupType.stSetupType1.bVisible) - { - SetDlgItemText(hDlg, IDC_RADIO_ST1, diSetupType.stSetupType1.szDescriptionShort); - SetDlgItemText(hDlg, IDC_STATIC_ST1_DESCRIPTION, diSetupType.stSetupType1.szDescriptionLong); - ShowWindow(hRadioSt1, SW_SHOW); - ShowWindow(hStaticSt1, SW_SHOW); - } - else - { - ShowWindow(hRadioSt1, SW_HIDE); - ShowWindow(hStaticSt1, SW_HIDE); - } + break; - /* enable the appropriate radio button */ - switch(dwTempSetupType) - { - case ST_RADIO0: - CheckDlgButton(hDlg, IDC_RADIO_ST0, BST_CHECKED); - SetFocus(hRadioSt0); - break; + case WM_NOTIFY: + notifyMessage = (LPNMHDR)lParam; - case ST_RADIO1: - CheckDlgButton(hDlg, IDC_RADIO_ST1, BST_CHECKED); - SetFocus(hRadioSt1); - break; - } + switch (notifyMessage->code) { + case PSN_SETACTIVE: + // Wizard dialog title + PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diSetupType.szTitle); - RepositionWindow(hDlg, NO_BANNER_IMAGE); + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); - SetDlgItemText(hDlg, IDWIZBACK, sgInstallGui.szBack_); - SetDlgItemText(hDlg, IDWIZNEXT, sgInstallGui.szNext_); - SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szCancel_); - SendDlgItemMessage (hDlg, IDC_STATIC_MSG0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_RADIO_ST0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_RADIO_ST1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC_ST0_DESCRIPTION, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC_ST1_DESCRIPTION, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_EDIT_DESTINATION, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L); - SendDlgItemMessage (hDlg, IDC_BUTTON_BROWSE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_README, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + switch(dwTempSetupType) { + case ST_RADIO0: + CheckDlgButton(hDlg, IDC_RADIO_ST0, BST_CHECKED); + SetFocus(hRadioSt0); + break; - if(sgProduct.bLockPath) - EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_BROWSE), FALSE); - else - EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_BROWSE), TRUE); - - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDWIZNEXT: - SaveWindowPosition(hDlg); - lstrcpy(sgProduct.szPath, szTempSetupPath); - - /* append a backslash to the path because CreateDirectoriesAll() - uses a backslash to determine directories */ - lstrcpy(szBuf, sgProduct.szPath); - AppendBackSlash(szBuf, sizeof(szBuf)); - - /* Make sure that the path is not within the windows dir */ - if(IsPathWithinWindir(szBuf)) - { - char errorMsg[MAX_BUF]; - char errorMsgTitle[MAX_BUF]; - - GetPrivateProfileString("Messages", "ERROR_PATH_WITHIN_WINDIR", - "", errorMsg, sizeof(errorMsg), szFileIniInstall); - GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", - errorMsgTitle, sizeof(errorMsgTitle), szFileIniInstall); - MessageBox(hDlg, errorMsg, errorMsgTitle, MB_OK | MB_ICONERROR); - break; - } - - /* Create the path if it does not exist */ - if(FileExists(szBuf) == FALSE) - { - char szBuf2[MAX_PATH]; - - if(CreateDirectoriesAll(szBuf, ADD_TO_UNINSTALL_LOG) != WIZ_OK) - { - char szECreateDirectory[MAX_BUF]; - char szEMessageTitle[MAX_BUF]; - - lstrcpy(szBufTemp, "\n\n"); - lstrcat(szBufTemp, sgProduct.szPath); - RemoveBackSlash(szBufTemp); - lstrcat(szBufTemp, "\n\n"); - - if(GetPrivateProfileString("Messages", "ERROR_CREATE_DIRECTORY", "", szECreateDirectory, sizeof(szECreateDirectory), szFileIniInstall)) - wsprintf(szBuf, szECreateDirectory, szBufTemp); - - GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", szEMessageTitle, sizeof(szEMessageTitle), szFileIniInstall); - - MessageBox(hDlg, szBuf, szEMessageTitle, MB_OK | MB_ICONERROR); - break; - } - - if(*sgProduct.szSubPath != '\0') - { - /* log the subpath for uninstallation. This subpath does not normally get logged - * for uninstallation due to a chicken and egg problem with creating the log file - * and the directory its in */ - lstrcpy(szBuf2, szBuf); - AppendBackSlash(szBuf2, sizeof(szBuf2)); - lstrcat(szBuf2, sgProduct.szSubPath); - UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2, FALSE); - } - - bCreateDestinationDir = TRUE; - } - - /* retrieve and save the state of the selected radio button */ - if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST0) == BST_CHECKED) - dwSetupType = ST_RADIO0; - else if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST1) == BST_CHECKED) - dwSetupType = ST_RADIO1; - - dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType); - DestroyWindow(hDlg); - DlgSequence(NEXT_DLG); - break; - - case IDWIZBACK: - SaveWindowPosition(hDlg); - dwTempSetupType = dwSetupType; - lstrcpy(szTempSetupPath, sgProduct.szPath); - DestroyWindow(hDlg); - DlgSequence(PREV_DLG); - break; - - case IDCANCEL: - lstrcpy(sgProduct.szPath, szTempSetupPath); - AskCancelDlg(hDlg); - break; - - default: - break; + case ST_RADIO1: + CheckDlgButton(hDlg, IDC_RADIO_ST1, BST_CHECKED); + SetFocus(hRadioSt1); + break; } break; + + case PSN_WIZNEXT: + case PSN_WIZBACK: + // retrieve and save the state of the selected radio button + if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST0) == BST_CHECKED) + dwSetupType = ST_RADIO0; + else if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST1) == BST_CHECKED) + dwSetupType = ST_RADIO1; + SiCNodeSetItemsSelected(dwSetupType); + + dwTempSetupType = dwSetupType; + break; + } + + break; } - return(0); + + return 0; } -LRESULT CALLBACK DlgProcUpgrade(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) +/////////////////////////////////////////////////////////////////////////////// +// DIALOG: SELECT INSTALL PATH +// + +#ifndef BIF_USENEWUI +// BIF_USENEWUI isn't defined in the platform SDK that comes with +// MSVC6.0. +#define BIF_USENEWUI 0x50 +#endif + +void BrowseForDirectory(HWND hParent) +{ + LPITEMIDLIST itemIDList; + BROWSEINFO browseInfo; + HWND hDestinationPath; + char currDir[MAX_PATH]; + char szBuf[MAX_PATH]; + + GetCurrentDirectory(MAX_PATH, currDir); + + browseInfo.hwndOwner = hParent; + browseInfo.pidlRoot = NULL; + browseInfo.pszDisplayName = currDir; + browseInfo.lpszTitle = sgInstallGui.szBrowseInfo; + browseInfo.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS; + browseInfo.lpfn = NULL; + browseInfo.lParam = 0; + + // Show the dialog + itemIDList = SHBrowseForFolder(&browseInfo); + + if (itemIDList) { + if (SHGetPathFromIDList(itemIDList, currDir)) { + // Update the displayed path + hDestinationPath = GetDlgItem(hParent, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */ + TruncateString(hDestinationPath, currDir, szBuf, sizeof(szBuf)); + SetDlgItemText(hParent, IDC_EDIT_DESTINATION, szBuf); + + SetCurrentDirectory(currDir); + } + +#if 0 + // XXXben LEAK!!!! but this code won't compile for some unknown reason- + // "Free is not a member of IMalloc, see objidl.h for details" + // but that's a bald-faced lie! + // The shell allocated an ITEMIDLIST, we need to free it. + LPMALLOC shellMalloc; + if (SUCCEEDED(SHGetMalloc(&shellMalloc))) { + shellMalloc->Free(itemIDList); + shellMalloc->Release(); + } +#endif + } +} + +LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { - char buf[MAX_BUF]; + HWND hDestinationPath; + char szBuf[MAX_BUF]; + char szBufTemp[MAX_BUF]; + LPNMHDR notifyMessage; + HICON hSmallFolderIcon, hLargeFolderIcon; - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); + switch(msg) { + case WM_INITDIALOG: + SetDlgItemText(hDlg, IDC_STATIC_MSG0, diSelectInstallPath.szMessage0); - GetPrivateProfileString("Messages", "MB_WARNING_STR", "", - buf, sizeof(buf), szFileIniInstall); - SetWindowText(hDlg, buf); + EnableWindow(GetDlgItem(hDlg, IDC_BUTTON_BROWSE), !sgProduct.bLockPath); - GetPrivateProfileString("Strings", "Message Cleanup On Upgrade", "", - buf, sizeof(buf), szFileIniConfig); - ReplacePrivateProfileStrCR(buf); - SetDlgItemText(hDlg, IDC_MESSAGE0, buf); + // Folder Icon + ExtractIconEx("shell32.dll", 3, &hLargeFolderIcon, &hSmallFolderIcon, 1); + SendMessage(GetDlgItem(hDlg, IDC_FOLDER_ICON), STM_SETICON, (LPARAM)hSmallFolderIcon, 0); + + SetCurrentDirectory(szTempSetupPath); - GetPrivateProfileString("Strings", "Cleanup On Upgrade Path Box String", "", - buf, sizeof(buf), szFileIniConfig); - SetDlgItemText(hDlg, IDC_STATIC, buf); + hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */ + TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf)); + SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf); - MozCopyStr(sgProduct.szPath, buf, sizeof(buf)); - RemoveBackSlash(buf); - SetDlgItemText(hDlg, IDC_DELETE_PATH, buf); + SetDlgItemText(hDlg, IDC_BUTTON_BROWSE, sgInstallGui.szBrowse_); + break; - RepositionWindow(hDlg, NO_BANNER_IMAGE); + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_BUTTON_BROWSE: + BrowseForDirectory(hDlg); + break; + } + break; + + case WM_NOTIFY: + notifyMessage = (LPNMHDR)lParam; + + switch (notifyMessage->code) { + case PSN_SETACTIVE: + // Wizard dialog title + PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diSelectInstallPath.szTitle); + + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); - SetDlgItemText(hDlg, IDCONTINUE, sgInstallGui.szContinue_); - SetDlgItemText(hDlg, IDSKIP, sgInstallGui.szSkip_); - SetDlgItemText(hDlg, IDWIZBACK, sgInstallGui.szBack_); - SendDlgItemMessage (hDlg, IDC_STATIC, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_DELETE_PATH, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCONTINUE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDSKIP, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); break; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDCONTINUE: - /* If the installation path happens to be within the %windir%, then - * show error message and continue without removing the previous - * installation path. */ - if(IsPathWithinWindir(sgProduct.szPath)) - { - GetPrivateProfileString("Strings", "Message Cleanup On Upgrade Windir", "", - buf, sizeof(buf), szFileIniConfig); - MessageBox(hWndMain, buf, NULL, MB_ICONEXCLAMATION); - } - else - /* set the var to delete target path here */ - sgProduct.doCleanupOnUpgrade = TRUE; + case PSN_WIZNEXT: + lstrcpy(sgProduct.szPath, szTempSetupPath); - SiCNodeSetItemsSelected(dwSetupType); - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(NEXT_DLG); - break; + /* append a backslash to the path because CreateDirectoriesAll() + uses a backslash to determine directories */ + lstrcpy(szBuf, sgProduct.szPath); + AppendBackSlash(szBuf, sizeof(szBuf)); - case IDSKIP: - sgProduct.doCleanupOnUpgrade = FALSE; - SiCNodeSetItemsSelected(dwSetupType); - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(NEXT_DLG); - break; + /* Make sure that the path is not within the windows dir */ + if(IsPathWithinWindir(szBuf)) { + char errorMsg[MAX_BUF]; + char errorMsgTitle[MAX_BUF]; - case IDWIZBACK: - SaveWindowPosition(hDlg); - DestroyWindow(hDlg); - DlgSequence(PREV_DLG); - break; - - default: - break; + GetPrivateProfileString("Messages", "ERROR_PATH_WITHIN_WINDIR", + "", errorMsg, sizeof(errorMsg), szFileIniInstall); + GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", + errorMsgTitle, sizeof(errorMsgTitle), szFileIniInstall); + MessageBox(hDlg, errorMsg, errorMsgTitle, MB_OK | MB_ICONERROR); + break; } + + /* Create the path if it does not exist */ + if(FileExists(szBuf) == FALSE) { + char szBuf2[MAX_PATH]; + + if(CreateDirectoriesAll(szBuf, ADD_TO_UNINSTALL_LOG) != WIZ_OK) { + char szECreateDirectory[MAX_BUF]; + char szEMessageTitle[MAX_BUF]; + + lstrcpy(szBufTemp, "\n\n"); + lstrcat(szBufTemp, sgProduct.szPath); + RemoveBackSlash(szBufTemp); + lstrcat(szBufTemp, "\n\n"); + + if(GetPrivateProfileString("Messages", "ERROR_CREATE_DIRECTORY", "", szECreateDirectory, sizeof(szECreateDirectory), szFileIniInstall)) + wsprintf(szBuf, szECreateDirectory, szBufTemp); + + GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", szEMessageTitle, sizeof(szEMessageTitle), szFileIniInstall); + + MessageBox(hDlg, szBuf, szEMessageTitle, MB_OK | MB_ICONERROR); + break; + } + + if(*sgProduct.szSubPath != '\0') { + /* log the subpath for uninstallation. This subpath does not normally get logged + * for uninstallation due to a chicken and egg problem with creating the log file + * and the directory its in */ + lstrcpy(szBuf2, szBuf); + AppendBackSlash(szBuf2, sizeof(szBuf2)); + lstrcat(szBuf2, sgProduct.szSubPath); + UpdateInstallLog(KEY_CREATE_FOLDER, szBuf2, FALSE); + } + + bCreateDestinationDir = TRUE; + } + break; + } + + break; } - return(0); + + return 0; } +/////////////////////////////////////////////////////////////////////////////// +// DIALOG: SELECT COMPONENTS +// + void DrawLBText(LPDRAWITEMSTRUCT lpdis, DWORD dwACFlag) { siC *siCTemp = NULL; @@ -1209,7 +880,6 @@ LRESULT CALLBACK NewListBoxWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { - BOOL bReturn = FALSE; siC *siCTemp; DWORD dwIndex; DWORD dwItems = MAX_BUF; @@ -1219,110 +889,217 @@ LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LON ULONGLONG ullDSBuf; char szBuf[MAX_BUF]; + LPNMHDR notifyMessage; + hwndLBComponents = GetDlgItem(hDlg, IDC_LIST_COMPONENTS); - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); - SetWindowText(hDlg, diSelectComponents.szTitle); - SetDlgItemText(hDlg, IDC_MESSAGE0, diSelectComponents.szMessage0); + switch(msg) { + case WM_INITDIALOG: + SetDlgItemText(hDlg, IDC_MESSAGE0, diSelectComponents.szMessage0); - siCTemp = siComponents; - if(siCTemp != NULL) + siCTemp = siComponents; + if(siCTemp != NULL) + { + if((!(siCTemp->dwAttributes & SIC_INVISIBLE)) && (!(siCTemp->dwAttributes & SIC_ADDITIONAL))) + lbAddItem(hwndLBComponents, siCTemp); + + siCTemp = siCTemp->Next; + while((siCTemp != siComponents) && (siCTemp != NULL)) { if((!(siCTemp->dwAttributes & SIC_INVISIBLE)) && (!(siCTemp->dwAttributes & SIC_ADDITIONAL))) lbAddItem(hwndLBComponents, siCTemp); siCTemp = siCTemp->Next; - while((siCTemp != siComponents) && (siCTemp != NULL)) - { - if((!(siCTemp->dwAttributes & SIC_INVISIBLE)) && (!(siCTemp->dwAttributes & SIC_ADDITIONAL))) - lbAddItem(hwndLBComponents, siCTemp); - - siCTemp = siCTemp->Next; - } - SetFocus(hwndLBComponents); - SendMessage(hwndLBComponents, LB_SETCURSEL, 0, 0); - SetDlgItemText(hDlg, IDC_STATIC_DESCRIPTION, SiCNodeGetDescriptionLong(0, FALSE, AC_COMPONENTS)); } + SetFocus(hwndLBComponents); + SendMessage(hwndLBComponents, LB_SETCURSEL, 0, 0); + SetDlgItemText(hDlg, IDC_STATIC_DESCRIPTION, SiCNodeGetDescriptionLong(0, FALSE, AC_COMPONENTS)); + } + + SetDlgItemText(hDlg, IDC_STATIC1, sgInstallGui.szComponents_); + SetDlgItemText(hDlg, IDC_STATIC2, sgInstallGui.szDescription); + SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, sgInstallGui.szTotalDownloadSize); + + gdwACFlag = AC_COMPONENTS; + OldListBoxWndProc = SubclassWindow(hwndLBComponents, (WNDPROC)NewListBoxWndProc); + break; + + case WM_DRAWITEM: + lpdis = (LPDRAWITEMSTRUCT)lParam; + + // If there are no list box items, skip this message. + if(lpdis->itemID == -1) + break; + + DrawLBText(lpdis, AC_COMPONENTS); + DrawCheck(lpdis, AC_COMPONENTS); + + // draw the focus rect on the selected item + if((lpdis->itemAction & ODA_FOCUS) && + (lpdis->itemState & ODS_FOCUS)) + DrawFocusRect(lpdis->hDC, &(lpdis->rcItem)); + + break; + + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_LIST_COMPONENTS: + /* to update the long description for each component the user selected */ + if((dwIndex = SendMessage(hwndLBComponents, LB_GETCURSEL, 0, 0)) != LB_ERR) { + SetDlgItemText(hDlg, IDC_STATIC_DESCRIPTION, SiCNodeGetDescriptionLong(dwIndex, FALSE, AC_COMPONENTS)); + + // update the disk space required info in the dialog. It is already + // in Kilobytes + ullDSBuf = GetDiskSpaceRequired(DSR_DOWNLOAD_SIZE); + _ui64toa(ullDSBuf, tchBuffer, 10); + wsprintf(szBuf, sgInstallGui.szDownloadSize, tchBuffer); + + SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, szBuf); + } + + break; + } + break; + + case WM_NOTIFY: + notifyMessage = (LPNMHDR)lParam; + + switch (notifyMessage->code) { + case PSN_SETACTIVE: + // Wizard dialog title + PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diSelectComponents.szTitle); + + PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK); + + break; + } + + break; + } + + return 0; +} + + + + +void TruncateString(HWND hWnd, LPSTR szInURL, LPSTR szOutString, DWORD dwOutStringBufSize) +{ + HDC hdcWnd; + LOGFONT logFont; + HFONT hfontNew; + HFONT hfontOld; + RECT rWndRect; + SIZE sizeString; + char *ptr = NULL; + int iHalfLen; + int iOutStringLen; + + if((DWORD)lstrlen(szInURL) > dwOutStringBufSize) + return; + + ZeroMemory(szOutString, dwOutStringBufSize); + lstrcpy(szOutString, szInURL); + iOutStringLen = lstrlen(szOutString); + hdcWnd = GetWindowDC(hWnd); + GetClientRect(hWnd, &rWndRect); + SystemParametersInfo(SPI_GETICONTITLELOGFONT, + sizeof(logFont), + (PVOID)&logFont, + 0); + + hfontNew = CreateFontIndirect(&logFont); + if(hfontNew) + { + hfontOld = (HFONT)SelectObject(hdcWnd, hfontNew); + + GetTextExtentPoint32(hdcWnd, szOutString, iOutStringLen, &sizeString); + while(sizeString.cx > rWndRect.right) + { + iHalfLen = iOutStringLen / 2; + if(iHalfLen == 2) + break; + + 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(hfontNew); + ReleaseDC(hWnd, hdcWnd); +} + +LRESULT CALLBACK DlgProcUpgrade(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) +{ + char buf[MAX_BUF]; + + switch(msg) + { + case WM_INITDIALOG: + DisableSystemMenuItems(hDlg, FALSE); + + GetPrivateProfileString("Messages", "MB_WARNING_STR", "", + buf, sizeof(buf), szFileIniInstall); + SetWindowText(hDlg, buf); + + GetPrivateProfileString("Strings", "Message Cleanup On Upgrade", "", + buf, sizeof(buf), szFileIniConfig); + ReplacePrivateProfileStrCR(buf); + SetDlgItemText(hDlg, IDC_MESSAGE0, buf); + + GetPrivateProfileString("Strings", "Cleanup On Upgrade Path Box String", "", + buf, sizeof(buf), szFileIniConfig); + SetDlgItemText(hDlg, IDC_STATIC, buf); + + MozCopyStr(sgProduct.szPath, buf, sizeof(buf)); + RemoveBackSlash(buf); + SetDlgItemText(hDlg, IDC_DELETE_PATH, buf); RepositionWindow(hDlg, NO_BANNER_IMAGE); - /* update the disk space available info in the dialog. GetDiskSpaceAvailable() - returns value in kbytes */ - ullDSBuf = GetDiskSpaceAvailable(sgProduct.szPath); - _ui64toa(ullDSBuf, tchBuffer, 10); - ParsePath(sgProduct.szPath, szBuf, sizeof(szBuf), FALSE, PP_ROOT_ONLY); - RemoveBackSlash(szBuf); - lstrcat(szBuf, " "); - lstrcat(szBuf, tchBuffer); - lstrcat(szBuf, " KB"); - SetDlgItemText(hDlg, IDC_SPACE_AVAILABLE, szBuf); - - SetDlgItemText(hDlg, IDC_STATIC1, sgInstallGui.szComponents_); - SetDlgItemText(hDlg, IDC_STATIC2, sgInstallGui.szDescription); - SetDlgItemText(hDlg, IDC_STATIC3, sgInstallGui.szTotalDownloadSize); - SetDlgItemText(hDlg, IDC_STATIC4, sgInstallGui.szSpaceAvailable); + SetDlgItemText(hDlg, IDCONTINUE, sgInstallGui.szContinue_); + SetDlgItemText(hDlg, IDSKIP, sgInstallGui.szSkip_); SetDlgItemText(hDlg, IDWIZBACK, sgInstallGui.szBack_); - SetDlgItemText(hDlg, IDWIZNEXT, sgInstallGui.szNext_); - SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szCancel_); - SendDlgItemMessage (hDlg, IDC_STATIC1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC2, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC3, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC4, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_LIST_COMPONENTS, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L); - SendDlgItemMessage (hDlg, IDC_STATIC_DESCRIPTION, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_DOWNLOAD_SIZE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - SendDlgItemMessage (hDlg, IDC_SPACE_AVAILABLE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); - - gdwACFlag = AC_COMPONENTS; - OldListBoxWndProc = SubclassWindow(hwndLBComponents, (WNDPROC)NewListBoxWndProc); - break; - - case WM_DRAWITEM: - lpdis = (LPDRAWITEMSTRUCT)lParam; - - // If there are no list box items, skip this message. - if(lpdis->itemID == -1) - break; - - DrawLBText(lpdis, AC_COMPONENTS); - DrawCheck(lpdis, AC_COMPONENTS); - - // draw the focus rect on the selected item - if((lpdis->itemAction & ODA_FOCUS) && - (lpdis->itemState & ODS_FOCUS)) - { - DrawFocusRect(lpdis->hDC, &(lpdis->rcItem)); - } - - bReturn = TRUE; - - /* update the disk space required info in the dialog. It is already - in Kilobytes */ - ullDSBuf = GetDiskSpaceRequired(DSR_DOWNLOAD_SIZE); - _ui64toa(ullDSBuf, tchBuffer, 10); - lstrcpy(szBuf, tchBuffer); - lstrcat(szBuf, " KB"); - - SetDlgItemText(hDlg, IDC_DOWNLOAD_SIZE, szBuf); + SendDlgItemMessage (hDlg, IDC_STATIC, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + SendDlgItemMessage (hDlg, IDC_DELETE_PATH, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + SendDlgItemMessage (hDlg, IDCONTINUE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + SendDlgItemMessage (hDlg, IDSKIP, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); + SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L); break; case WM_COMMAND: switch(LOWORD(wParam)) { - case IDC_LIST_COMPONENTS: - /* to update the long description for each component the user selected */ - if((dwIndex = SendMessage(hwndLBComponents, LB_GETCURSEL, 0, 0)) != LB_ERR) - SetDlgItemText(hDlg, IDC_STATIC_DESCRIPTION, SiCNodeGetDescriptionLong(dwIndex, FALSE, AC_COMPONENTS)); + case IDCONTINUE: + /* If the installation path happens to be within the %windir%, then + * show error message and continue without removing the previous + * installation path. */ + if(IsPathWithinWindir(sgProduct.szPath)) + { + GetPrivateProfileString("Strings", "Message Cleanup On Upgrade Windir", "", + buf, sizeof(buf), szFileIniConfig); + MessageBox(hWndMain, buf, NULL, MB_ICONEXCLAMATION); + } + else + /* set the var to delete target path here */ + sgProduct.doCleanupOnUpgrade = TRUE; + + SiCNodeSetItemsSelected(dwSetupType); + SaveWindowPosition(hDlg); + DestroyWindow(hDlg); + DlgSequence(NEXT_DLG); break; - case IDWIZNEXT: + case IDSKIP: + sgProduct.doCleanupOnUpgrade = FALSE; + SiCNodeSetItemsSelected(dwSetupType); SaveWindowPosition(hDlg); DestroyWindow(hDlg); DlgSequence(NEXT_DLG); @@ -1334,60 +1111,14 @@ LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LON DlgSequence(PREV_DLG); break; - case IDCANCEL: - AskCancelDlg(hDlg); - break; - default: break; } break; } - - return(bReturn); + return(0); } -LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) -{ - BOOL bReturn = FALSE; - HWND hDestinationPath; - char szBuf[MAX_BUF]; - - switch(msg) - { - case WM_INITDIALOG: - DisableSystemMenuItems(hDlg, FALSE); - SetWindowText(hDlg, diSelectInstallPath.szTitle); - SetDlgItemText(hDlg, IDC_STATIC_MSG0, diSelectInstallPath.szMessage0); - - hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */ - TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf)); - - SetDlgItemText(hDlg, IDC_DESTINATION, sgInstallGui.szDestinationDirectory); - SetDlgItemText(hDlg, IDC_BUTTON_BROWSE, sgInstallGui.szBrowse_); - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDC_BUTTON_BROWSE: - BrowseForDirectory(hDlg, szTempSetupPath); - - hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */ - TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf)); - SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf); - break; - - default: - break; - } - break; - } - - return(bReturn); -} - - LRESULT CALLBACK DlgProcSelectAdditionalComponents(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam) { BOOL bReturn = FALSE; @@ -2724,11 +2455,21 @@ void SetTurboArgs(void) void InitSequence(HINSTANCE hInstance) { + // Wizard data structures PROPSHEETPAGE psp; HPROPSHEETPAGE pages[11] = {0}; PROPSHEETHEADER psh; int count = 0; + // Welcome Page Header font data + NONCLIENTMETRICS ncm = {0}; + LOGFONT titleLogFont; + HDC hDC; + int fontSize; + + ///////////////////////////////////////////////////////////////////////////// + // Create the Wizard Sequence + // psp.dwSize = sizeof(psp); psp.hInstance = hSetupRscInst; psp.lParam = NULL; @@ -2825,8 +2566,25 @@ void InitSequence(HINSTANCE hInstance) psh.nStartPage = 0; psh.nPages = count; + + // Create the Font for Intro/End page headers. + ncm.cbSize = sizeof(ncm); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); + + titleLogFont = ncm.lfMessageFont; + titleLogFont.lfWeight = FW_BOLD; + lstrcpy(titleLogFont.lfFaceName, TEXT("Trebuchet MS Bold")); + + hDC = GetDC(NULL); //gets the screen DC + fontSize = 14; + titleLogFont.lfHeight = 0 - GetDeviceCaps(hDC, LOGPIXELSY) * fontSize / 72; + sgInstallGui.welcomeTitleFont = CreateFontIndirect(&titleLogFont); + ReleaseDC(NULL, hDC); + // Start the Wizard. PropertySheet(&psh); + + // DeleteObject(sgInstallGui.welcomeTitleFont); } void DlgSequence(int iDirection) diff --git a/toolkit/mozapps/installer/windows/wizard/setup/dialogs.h b/toolkit/mozapps/installer/windows/wizard/setup/dialogs.h index 36e558f7945..5abe71cb802 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/dialogs.h +++ b/toolkit/mozapps/installer/windows/wizard/setup/dialogs.h @@ -53,7 +53,7 @@ HWND InstantiateDialog(HWND hParent, DWORD dwDlgID, LPSTR szTitle, void InitSequence(HINSTANCE hInstance); void DlgSequence(int iDirection); void PaintGradientShade(HWND hWnd, HDC hdc); -BOOL BrowseForDirectory(HWND hDlg, char *szCurrDir); +void BrowseForDirectory(HWND hDlg); LRESULT CALLBACK BrowseHookProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); void ShowMessage(LPSTR szMessage, BOOL bShow); void DrawLBText(LPDRAWITEMSTRUCT lpdis, DWORD dwACFlag); diff --git a/toolkit/mozapps/installer/windows/wizard/setup/extern.h b/toolkit/mozapps/installer/windows/wizard/setup/extern.h index 9b9d483dea5..9a17cd7ee6b 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/extern.h +++ b/toolkit/mozapps/installer/windows/wizard/setup/extern.h @@ -42,6 +42,7 @@ extern HANDLE hAccelTable; extern HWND hDlgCurrent; extern HWND hDlgMessage; extern HWND hWndMain; +extern HWND hWizardWnd; extern LPSTR szEGlobalAlloc; extern LPSTR szEStringLoad; diff --git a/toolkit/mozapps/installer/windows/wizard/setup/extra.c b/toolkit/mozapps/installer/windows/wizard/setup/extra.c index bb39cc92c1c..6833fba6ed4 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/extra.c +++ b/toolkit/mozapps/installer/windows/wizard/setup/extra.c @@ -3335,6 +3335,8 @@ HRESULT InitDlgWelcome(diW *diDialog) diDialog->bShowDialog = FALSE; if((diDialog->szTitle = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); + if((diDialog->szMessageWelcome = NS_GlobalAlloc(MAX_BUF)) == NULL) + return(1); if((diDialog->szMessage0 = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); if((diDialog->szMessage1 = NS_GlobalAlloc(MAX_BUF)) == NULL) @@ -3350,6 +3352,7 @@ HRESULT InitDlgWelcome(diW *diDialog) void DeInitDlgWelcome(diW *diDialog) { FreeMemory(&(diDialog->szTitle)); + FreeMemory(&(diDialog->szMessageWelcome)); FreeMemory(&(diDialog->szMessage0)); FreeMemory(&(diDialog->szMessage1)); FreeMemory(&(diDialog->szMessage2)); @@ -3367,11 +3370,9 @@ HRESULT InitDlgLicense(diL *diDialog) return(1); if((diDialog->szMessage0 = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); - if((diDialog->szMessage1 = NS_GlobalAlloc(MAX_BUF)) == NULL) + if((diDialog->szRadioAccept = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); - if((diDialog->szMessage2 = NS_GlobalAlloc(MAX_BUF)) == NULL) - return(1); - if((diDialog->szMessage3 = NS_GlobalAlloc(MAX_BUF)) == NULL) + if((diDialog->szRadioDecline = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); return(0); @@ -3383,9 +3384,8 @@ void DeInitDlgLicense(diL *diDialog) FreeMemory(&(diDialog->szSubTitle)); FreeMemory(&(diDialog->szLicenseFilename)); FreeMemory(&(diDialog->szMessage0)); - FreeMemory(&(diDialog->szMessage1)); - FreeMemory(&(diDialog->szMessage2)); - FreeMemory(&(diDialog->szMessage3)); + FreeMemory(&(diDialog->szRadioAccept)); + FreeMemory(&(diDialog->szRadioDecline)); } HRESULT InitDlgQuickLaunch(diQL *diDialog) @@ -7301,6 +7301,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) /* Welcome dialog */ GetPrivateProfileString("Dialog Welcome", "Show Dialog", "", szShowDialog, sizeof(szShowDialog), szFileIniConfig); GetPrivateProfileString("Dialog Welcome", "Title", "", diWelcome.szTitle, MAX_BUF, szFileIniConfig); + GetPrivateProfileString("Dialog Welcome", "MessageWelcome", "", diWelcome.szMessageWelcome, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Dialog Welcome", "Message0", "", diWelcome.szMessage0, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Dialog Welcome", "Message1", "", diWelcome.szMessage1, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Dialog Welcome", "Message2", "", diWelcome.szMessage2, MAX_BUF, szFileIniConfig); @@ -7314,9 +7315,8 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) GetPrivateProfileString("Dialog License", "Sub Title", "", diLicense.szSubTitle, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Dialog License", "License File", "", diLicense.szLicenseFilename, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Dialog License", "Message0", "", diLicense.szMessage0, MAX_BUF, szFileIniConfig); - GetPrivateProfileString("Dialog License", "Message1", "", diLicense.szMessage1, MAX_BUF, szFileIniConfig); - GetPrivateProfileString("Dialog License", "Message2", "", diLicense.szMessage2, MAX_BUF, szFileIniConfig); - GetPrivateProfileString("Dialog License", "Message3", "", diLicense.szMessage3, MAX_BUF, szFileIniConfig); + GetPrivateProfileString("Dialog License", "RadioAccept", "", diLicense.szRadioAccept, MAX_BUF, szFileIniConfig); + GetPrivateProfileString("Dialog License", "RadioDecline", "", diLicense.szRadioDecline, MAX_BUF, szFileIniConfig); if(lstrcmpi(szShowDialog, "TRUE") == 0) diLicense.bShowDialog = TRUE; @@ -7751,8 +7751,10 @@ HRESULT ParseInstallIni() GetPrivateProfileString("General", "TOTALDOWNLOADSIZE", "", sgInstallGui.szTotalDownloadSize, sizeof(sgInstallGui.szTotalDownloadSize), szFileIniInstall); GetPrivateProfileString("General", "SPACEAVAILABLE", "", sgInstallGui.szSpaceAvailable, sizeof(sgInstallGui.szSpaceAvailable), szFileIniInstall); GetPrivateProfileString("General", "COMPONENTS_", "", sgInstallGui.szComponents_, sizeof(sgInstallGui.szComponents_), szFileIniInstall); + GetPrivateProfileString("General", "BROWSEINFO", "", sgInstallGui.szBrowseInfo, sizeof(sgInstallGui.szBrowseInfo), szFileIniInstall); GetPrivateProfileString("General", "DESTINATIONDIRECTORY", "", sgInstallGui.szDestinationDirectory, sizeof(sgInstallGui.szDestinationDirectory), szFileIniInstall); GetPrivateProfileString("General", "BROWSE_", "", sgInstallGui.szBrowse_, sizeof(sgInstallGui.szBrowse_), szFileIniInstall); + GetPrivateProfileString("General", "DOWNLOADSIZE", "", sgInstallGui.szDownloadSize, sizeof(sgInstallGui.szDownloadSize), szFileIniInstall); GetPrivateProfileString("General", "CURRENTSETTINGS", "", sgInstallGui.szCurrentSettings, sizeof(sgInstallGui.szCurrentSettings), szFileIniInstall); GetPrivateProfileString("General", "INSTALL_", "", sgInstallGui.szInstall_, sizeof(sgInstallGui.szInstall_), szFileIniInstall); GetPrivateProfileString("General", "DELETE_", "", sgInstallGui.szDelete_, sizeof(sgInstallGui.szDelete_), szFileIniInstall); diff --git a/toolkit/mozapps/installer/windows/wizard/setup/setup.c b/toolkit/mozapps/installer/windows/wizard/setup/setup.c index 7a1cfcea351..6bdbd0009f6 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/setup.c +++ b/toolkit/mozapps/installer/windows/wizard/setup/setup.c @@ -42,6 +42,7 @@ HANDLE hAccelTable; HWND hDlgCurrent; HWND hDlgMessage; HWND hWndMain; +HWND hWizardWnd; LPSTR szEGlobalAlloc; LPSTR szEStringLoad; diff --git a/toolkit/mozapps/installer/windows/wizard/setup/setup.h b/toolkit/mozapps/installer/windows/wizard/setup/setup.h index ed3489abeed..901f6d3cb16 100644 --- a/toolkit/mozapps/installer/windows/wizard/setup/setup.h +++ b/toolkit/mozapps/installer/windows/wizard/setup/setup.h @@ -320,6 +320,7 @@ typedef struct dlgWelcome { BOOL bShowDialog; LPSTR szTitle; + LPSTR szMessageWelcome; LPSTR szMessage0; LPSTR szMessage1; LPSTR szMessage2; @@ -333,9 +334,8 @@ typedef struct dlgLicense LPSTR szSubTitle; LPSTR szLicenseFilename; LPSTR szMessage0; - LPSTR szMessage1; - LPSTR szMessage2; - LPSTR szMessage3; + LPSTR szRadioAccept; + LPSTR szRadioDecline; } diL; typedef struct dlgQuickLaunch @@ -590,57 +590,60 @@ typedef struct dlgInstall { HFONT systemFont; HFONT definedFont; - char szFontName[MAX_BUF]; - char szFontSize[MAX_BUF]; - char szCharSet[MAX_BUF]; - char szOk_[MAX_BUF]; - char szOk[MAX_BUF]; - char szCancel_[MAX_BUF]; - char szCancel[MAX_BUF]; - char szNext_[MAX_BUF]; - char szBack_[MAX_BUF]; - char szIgnore_[MAX_BUF]; - char szProxyMessage[MAX_BUF]; - char szProxyButton[MAX_BUF]; - char szProxySettings_[MAX_BUF]; - char szProxySettings[MAX_BUF]; - char szServer[MAX_BUF]; - char szPort[MAX_BUF]; - char szUserId[MAX_BUF]; - char szPassword[MAX_BUF]; - char szSelectDirectory[MAX_BUF]; - char szDirectories_[MAX_BUF]; - char szDrives_[MAX_BUF]; - char szStatus[MAX_BUF]; - char szFile[MAX_BUF]; - char szUrl[MAX_BUF]; - char szTo[MAX_BUF]; - char szAccept_[MAX_BUF]; - char szDecline_[MAX_BUF]; - char szProgramFolder_[MAX_BUF]; - char szExistingFolder_[MAX_BUF]; - char szSetupMessage[MAX_BUF]; - char szRestart[MAX_BUF]; - char szYesRestart[MAX_BUF]; - char szNoRestart[MAX_BUF]; - char szAdditionalComponents_[MAX_BUF]; - char szDescription[MAX_BUF]; - char szTotalDownloadSize[MAX_BUF]; - char szSpaceAvailable[MAX_BUF]; - char szComponents_[MAX_BUF]; - char szDestinationDirectory[MAX_BUF]; - char szBrowse_[MAX_BUF]; - char szCurrentSettings[MAX_BUF]; - char szInstall_[MAX_BUF]; - char szDelete_[MAX_BUF]; - char szContinue_[MAX_BUF]; - char szSkip_[MAX_BUF]; - char szExtracting[MAX_BUF]; - char szReadme_[MAX_BUF]; - char szPause_[MAX_BUF]; - char szResume_[MAX_BUF]; - char szChecked[MAX_BUF]; - char szUnchecked[MAX_BUF]; + HFONT welcomeTitleFont; + char szFontName[MAX_BUF]; + char szFontSize[MAX_BUF]; + char szCharSet[MAX_BUF]; + char szOk_[MAX_BUF]; + char szOk[MAX_BUF]; + char szCancel_[MAX_BUF]; + char szCancel[MAX_BUF]; + char szNext_[MAX_BUF]; + char szBack_[MAX_BUF]; + char szIgnore_[MAX_BUF]; + char szProxyMessage[MAX_BUF]; + char szProxyButton[MAX_BUF]; + char szProxySettings_[MAX_BUF]; + char szProxySettings[MAX_BUF]; + char szServer[MAX_BUF]; + char szPort[MAX_BUF]; + char szUserId[MAX_BUF]; + char szPassword[MAX_BUF]; + char szSelectDirectory[MAX_BUF]; + char szDirectories_[MAX_BUF]; + char szDrives_[MAX_BUF]; + char szStatus[MAX_BUF]; + char szFile[MAX_BUF]; + char szUrl[MAX_BUF]; + char szTo[MAX_BUF]; + char szAccept_[MAX_BUF]; + char szDecline_[MAX_BUF]; + char szProgramFolder_[MAX_BUF]; + char szExistingFolder_[MAX_BUF]; + char szSetupMessage[MAX_BUF]; + char szRestart[MAX_BUF]; + char szYesRestart[MAX_BUF]; + char szNoRestart[MAX_BUF]; + char szAdditionalComponents_[MAX_BUF]; + char szDescription[MAX_BUF]; + char szTotalDownloadSize[MAX_BUF]; + char szSpaceAvailable[MAX_BUF]; + char szComponents_[MAX_BUF]; + char szBrowseInfo[MAX_BUF]; + char szDestinationDirectory[MAX_BUF]; + char szBrowse_[MAX_BUF]; + char szDownloadSize[MAX_BUF]; + char szCurrentSettings[MAX_BUF]; + char szInstall_[MAX_BUF]; + char szDelete_[MAX_BUF]; + char szContinue_[MAX_BUF]; + char szSkip_[MAX_BUF]; + char szExtracting[MAX_BUF]; + char szReadme_[MAX_BUF]; + char szPause_[MAX_BUF]; + char szResume_[MAX_BUF]; + char szChecked[MAX_BUF]; + char szUnchecked[MAX_BUF]; } installGui; /* structure message stream */ diff --git a/toolkit/mozapps/installer/windows/wizard/setuprsc/Header.bmp b/toolkit/mozapps/installer/windows/wizard/setuprsc/Header.bmp index 72c9ab64da8..8c59063fff6 100644 Binary files a/toolkit/mozapps/installer/windows/wizard/setuprsc/Header.bmp and b/toolkit/mozapps/installer/windows/wizard/setuprsc/Header.bmp differ diff --git a/toolkit/mozapps/installer/windows/wizard/setuprsc/Watermrk.bmp b/toolkit/mozapps/installer/windows/wizard/setuprsc/Watermrk.bmp index 004473cd728..aafac3d886a 100644 Binary files a/toolkit/mozapps/installer/windows/wizard/setuprsc/Watermrk.bmp and b/toolkit/mozapps/installer/windows/wizard/setuprsc/Watermrk.bmp differ diff --git a/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.h b/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.h index eef8857d344..6c98c15fbd8 100644 --- a/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.h +++ b/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.h @@ -104,6 +104,15 @@ #define IDC_CHECK_TURBO_MODE 1075 #define IDC_CHECK_RECAPTURE_HOMEPAGE 1076 #define IDC_STATIC_MSG1 1079 +#define IDC_STATIC_TITLE 1080 +#define IDC_RADIO_ACCEPT 1081 +#define IDC_RADIO_DECLINE 1082 +#define IDC_FOLDER_ICON 1083 +#define IDC_PRIMARY_COMPONENT 1084 +#define IDC_OPTIONAL_COMPONENTS 1085 +#define IDC_INSTALL_FOLDER 1086 +#define IDC_INSTALL_FOLDER_LABEL 1087 +#define IDC_STATIC_DOWNLOAD_SIZE 1088 #define DLG_WELCOME 2001 #define DLG_LICENSE 2002 #define DLG_SETUP_TYPE 2003 diff --git a/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.rc b/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.rc index 997b360b1fe..de7f5ef7aef 100644 --- a/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.rc +++ b/toolkit/mozapps/installer/windows/wizard/setuprsc/setuprsc.rc @@ -58,10 +58,11 @@ STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | CLASS "MozillaSetupDlg" FONT 8, "MS Sans Serif" BEGIN - LTEXT "",IDC_STATIC0,115,11,195,37,NOT WS_GROUP - LTEXT "",IDC_STATIC1,115,53,195,37,NOT WS_GROUP - LTEXT "",IDC_STATIC2,115,96,195,37,NOT WS_GROUP - LTEXT "",IDC_STATIC3,115,169,195,15 + LTEXT "",IDC_STATIC_TITLE,130,8,180,18,NOT WS_GROUP + LTEXT "",IDC_STATIC1,130,58,180,24,NOT WS_GROUP + LTEXT "",IDC_STATIC2,130,90,180,37,NOT WS_GROUP + LTEXT "",IDC_STATIC3,130,169,180,15 + LTEXT "",IDC_STATIC0,130,34,180,16,NOT WS_GROUP END DLG_SETUP_TYPE DIALOG DISCARDABLE 51, 56, 315, 143 @@ -90,6 +91,7 @@ BEGIN LTEXT "",IDC_MESSAGE0,11,1,295,19,NOT WS_GROUP GROUPBOX "",IDC_STATIC2,11,75,295,37 LTEXT "",IDC_STATIC_DESCRIPTION,18,87,282,16,SS_NOPREFIX + RTEXT "",IDC_STATIC_DOWNLOAD_SIZE,140,120,164,8 END DLG_WINDOWS_INTEGRATION DIALOG DISCARDABLE 51, 56, 315, 205 @@ -144,10 +146,13 @@ STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | CLASS "MozillaSetupDlg" FONT 8, "MS Sans Serif" BEGIN - EDITTEXT IDC_EDIT_LICENSE,11,29,295,83,ES_MULTILINE | + EDITTEXT IDC_EDIT_LICENSE,11,29,295,72,ES_MULTILINE | ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_GROUP LTEXT "",IDC_MESSAGE0,11,8,295,17,NOT WS_GROUP - LTEXT "",IDC_MESSAGE1,11,119,295,15,NOT WS_GROUP + CONTROL "",IDC_RADIO_ACCEPT,"Button",BS_AUTORADIOBUTTON | + WS_GROUP,11,109,295,9 + CONTROL "",IDC_RADIO_DECLINE,"Button",BS_AUTORADIOBUTTON,11,122, + 295,9 END DLG_QUICK_LAUNCH DIALOG DISCARDABLE 51, 56, 315, 205 @@ -334,8 +339,8 @@ BEGIN CONTROL "",IDC_STATUS_FILE,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,51,72,254,8 LTEXT "",IDC_PERCENTAGE,283,115,20,8,SS_NOPREFIX - CONTROL "",IDC_GAUGE_FILE,"msctls_progress32",WS_BORDER, - 11,85,295,11 + CONTROL "",IDC_GAUGE_FILE,"msctls_progress32",WS_BORDER,11,85, + 295,11 END DLG_START_INSTALL DIALOG DISCARDABLE 51, 56, 315, 143 @@ -344,12 +349,14 @@ STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | CLASS "MozillaSetupDlg" FONT 8, "MS Sans Serif" BEGIN - EDITTEXT IDC_CURRENT_SETTINGS,11,16,295,79,ES_MULTILINE | - ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_HSCROLL LTEXT "",IDC_MESSAGE0,11,1,295,8,NOT WS_GROUP LTEXT "",IDC_MESSAGE1,11,130,295,8 PUSHBUTTON "",IDC_CONNECTION_SETTINGS,250,103,56,14 LTEXT "",IDC_MESSAGE2,11,103,232,19 + LTEXT "",IDC_PRIMARY_COMPONENT,11,16,295,8,NOT WS_GROUP + LTEXT "",IDC_OPTIONAL_COMPONENTS,21,31,285,28,NOT WS_GROUP + LTEXT "",IDC_INSTALL_FOLDER,21,81,285,8,NOT WS_GROUP + LTEXT "",IDC_INSTALL_FOLDER_LABEL,11,66,295,8,NOT WS_GROUP END DLG_SELECT_INSTALL_PATH DIALOG DISCARDABLE 0, 0, 315, 143 @@ -357,9 +364,10 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif" BEGIN CONTROL "",IDC_EDIT_DESTINATION,"Static",SS_LEFTNOWORDWRAP | - WS_GROUP,19,23,219,9 + WS_GROUP,43,24,205,9 PUSHBUTTON "",IDC_BUTTON_BROWSE,260,22,46,14 LTEXT "",IDC_STATIC_MSG0,11,1,295,9 + ICON "",IDC_FOLDER_ICON,28,22,20,20 END @@ -415,6 +423,11 @@ BEGIN RIGHTMARGIN, 310 END + DLG_START_INSTALL, DIALOG + BEGIN + BOTTOMMARGIN, 138 + END + DLG_SELECT_INSTALL_PATH, DIALOG BEGIN LEFTMARGIN, 7