VMware SVGA Wizard:

* add title and subtitle (wizard window)
* center the wizard window
* update english and german language files

svn path=/trunk/; revision=13525
This commit is contained in:
Klemens Friedl 2005-02-13 13:49:55 +00:00
parent ecc1462959
commit b331ffc1b7
6 changed files with 219 additions and 48 deletions

View file

@ -5,8 +5,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Grafikreiberinstallation"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Das ReactOS Setup hat festgestellt, das Sie ReactOS in VMware(r) installieren.", -1, 115, 8, 160, 24
LTEXT "Wenn Sie den VMware(r) SVGA Treiber installieren möchten, klicken Sie auf 'Weiter', ansonsten auf 'Abbrechen'.", -1, 115, 140, 160, 17
LTEXT "Das ReactOS Setup hat festgestellt, das Sie ReactOS in VMware(r) installieren.", -1, 100, 8, 160, 24
LTEXT "Wenn Sie den VMware(r) SVGA Treiber installieren möchten, klicken Sie auf 'Weiter', ansonsten auf 'Abbrechen'.", -1, 100, 140, 160, 17
END
IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@ -111,3 +111,20 @@ BEGIN
IDS_ENABLINGDRIVER "Aktiviere den VMware(r) SVGA driver..."
END
STRINGTABLE
BEGIN
IDD_INSERT_VMWARE_TOOLSTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_INSERT_VMWARE_TOOLSSUBTITLE "Bitte legen Sie die VMware-Tool CD-Rom ein."
IDD_INSTALLING_VMWARE_TOOLSTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Suchen und kopieren des VMware (r) SVGA Treibers."
IDD_CONFIGTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_CONFIGSUBTITLE "Wählen Sie die Bildschrimauflösung aus."
IDD_INSTALLATION_FAILEDTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_INSTALLATION_FAILEDSUBTITLE "Die VMware (r) SVGA Treiber installation ist fehlgeschlagen."
IDD_CHOOSEACTIONTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_CHOOSEACTIONSUBTITLE "Wählen Sie eine Option aus."
IDD_SELECTDRIVERTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_SELECTDRIVERSUBTITLE "Wählen Sie einen Treiber aus."
IDD_DOUNINSTALLTITLE "VMware (r) SVGA Treiber Installationsassistent"
IDD_DOUNINSTALLSUBTITLE "De-Installieren des Treibers."
END

View file

@ -5,8 +5,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Video Driver Installation"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "The ReactOS setup detected that you run ReactOS inside of VMware(r).", -1, 115, 8, 160, 24
LTEXT "If you like to install the VMware(r) SVGA driver click 'Next', otherwise click 'Cancel'.", -1, 115, 140, 160, 17
LTEXT "The ReactOS setup detected that you run ReactOS inside of VMware(r).", -1, 100, 8, 160, 24
LTEXT "If you like to install the VMware(r) SVGA driver click 'Next', otherwise click 'Cancel'.", -1, 100, 140, 160, 17
END
IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@ -111,3 +111,20 @@ BEGIN
IDS_ENABLINGDRIVER "Enabling VMware(r) SVGA driver..."
END
STRINGTABLE
BEGIN
IDD_INSERT_VMWARE_TOOLSTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSERT_VMWARE_TOOLSSUBTITLE "Please insert the VMware tool CD-Rom."
IDD_INSTALLING_VMWARE_TOOLSTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Search and copy the VMware (r) SVGA driver."
IDD_CONFIGTITLE "VMware (r) SVGA driver installation wizard"
IDD_CONFIGSUBTITLE "Select your favorite screen resolution."
IDD_INSTALLATION_FAILEDTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSTALLATION_FAILEDSUBTITLE "The VMware (r) SVGA driver installation failed."
IDD_CHOOSEACTIONTITLE "VMware (r) SVGA driver installation wizard"
IDD_CHOOSEACTIONSUBTITLE "Choose what you like to do."
IDD_SELECTDRIVERTITLE "VMware (r) SVGA driver installation wizard"
IDD_SELECTDRIVERSUBTITLE "Select a driver."
IDD_DOUNINSTALLTITLE "VMware (r) SVGA driver installation wizard"
IDD_DOUNINSTALLSUBTITLE "Uninstall the driver."
END

View file

@ -5,8 +5,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Instalación del Controlador de Video"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "El instalador de ReactOS ha detectado que husted está ejecutando ReactOS sobre el emulador VMware(r).", -1, 115, 8, 160, 24
LTEXT "Si husted desea instalar el controlador SVGA VMware(r), haga click en 'Siguiente', de lo contrario haga click en 'Cancelar'.", -1, 115, 140, 160, 17
LTEXT "El instalador de ReactOS ha detectado que husted está ejecutando ReactOS sobre el emulador VMware(r).", -1, 100, 8, 160, 24
LTEXT "Si husted desea instalar el controlador SVGA VMware(r), haga click en 'Siguiente', de lo contrario haga click en 'Cancelar'.", -1, 100, 140, 160, 17
END
IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@ -111,3 +111,20 @@ BEGIN
IDS_ENABLINGDRIVER "Enabling VMware(r) SVGA driver..."
END
STRINGTABLE
BEGIN
IDD_INSERT_VMWARE_TOOLSTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSERT_VMWARE_TOOLSSUBTITLE "Please insert the VMware tool CD-Rom."
IDD_INSTALLING_VMWARE_TOOLSTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "Search and copy the VMware (r) SVGA driver."
IDD_CONFIGTITLE "VMware (r) SVGA driver installation wizard"
IDD_CONFIGSUBTITLE "Select your favorite screen resolution."
IDD_INSTALLATION_FAILEDTITLE "VMware (r) SVGA driver installation wizard"
IDD_INSTALLATION_FAILEDSUBTITLE "The VMware (r) SVGA driver installation failed."
IDD_CHOOSEACTIONTITLE "VMware (r) SVGA driver installation wizard"
IDD_CHOOSEACTIONSUBTITLE "Choose what you like to do."
IDD_SELECTDRIVERTITLE "VMware (r) SVGA driver installation wizard"
IDD_SELECTDRIVERSUBTITLE "Select a driver."
IDD_DOUNINSTALLTITLE "VMware (r) SVGA driver installation wizard"
IDD_DOUNINSTALLSUBTITLE "Uninstall the driver."
END

View file

@ -24,6 +24,7 @@
* PROJECT: ReactOS VMware(r) driver installation utility
* FILE: subsys/system/vmwinst/vmwinst.c
* PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net)
* Klemens Friedl (frik85@hotmail.com)
*/
#include <windows.h>
#include <commctrl.h>
@ -132,6 +133,30 @@ FileExists(WCHAR *Path, WCHAR *File)
return TRUE;
}
static VOID
CenterWindow(HWND hWnd)
{
HWND hWndParent;
RECT rcParent;
RECT rcWindow;
hWndParent = GetParent(hWnd);
if (hWndParent == NULL)
hWndParent = GetDesktopWindow();
GetWindowRect(hWndParent, &rcParent);
GetWindowRect(hWnd, &rcWindow);
SetWindowPos(hWnd,
HWND_TOP,
((rcParent.right - rcParent.left) - (rcWindow.right - rcWindow.left)) / 2,
((rcParent.bottom - rcParent.top) - (rcWindow.bottom - rcWindow.top)) / 2,
0,
0,
SWP_NOSIZE);
}
/* Copy file */
BOOL
InstallFile(WCHAR *Destination, WCHAR *File)
@ -383,6 +408,12 @@ PageWelcomeProc(
{
case WM_NOTIFY:
{
HWND hwndControl;
/* Center the wizard window */
hwndControl = GetParent(hwndDlg);
CenterWindow (hwndControl);
LPNMHDR pnmh = (LPNMHDR)lParam;
switch(pnmh->code)
{
@ -397,6 +428,7 @@ PageWelcomeProc(
{
if(!EnableVmwareDriver(FALSE, FALSE, TRUE))
{
WCHAR Msg[1024];
LoadString(hAppInstance, IDS_FAILEDTOACTIVATEDRIVER, Msg, sizeof(Msg) / sizeof(WCHAR));
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
@ -728,6 +760,12 @@ PageConfigProc(
}
case WM_NOTIFY:
{
HWND hwndControl;
/* Center the wizard window */
hwndControl = GetParent(hwndDlg);
CenterWindow (hwndControl);
LPNMHDR pnmh = (LPNMHDR)lParam;
switch(pnmh->code)
{
@ -969,33 +1007,92 @@ PageDoUninstallProc(
static LONG
CreateWizard(VOID)
{
PROPSHEETPAGE psp[8];
PROPSHEETHEADER psh;
HPROPSHEETPAGE ahpsp[8];
PROPSHEETPAGE psp;
WCHAR Caption[1024];
LoadString(hAppInstance, IDS_WIZARD_NAME, Caption, sizeof(Caption) / sizeof(TCHAR));
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
/* Create the Welcome page */
ZeroMemory (&psp, sizeof(PROPSHEETPAGE));
psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
psp.hInstance = hAppInstance;
psp.pfnDlgProc = PageWelcomeProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
ahpsp[0] = CreatePropertySheetPage(&psp);
/* Create the INSERT_VMWARE_TOOLS page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_INSERT_VMWARE_TOOLSTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_INSERT_VMWARE_TOOLSSUBTITLE);
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSERT_VMWARE_TOOLS);
psp.pfnDlgProc = PageInsertDiscProc;
ahpsp[1] = CreatePropertySheetPage(&psp);
/* Create the INSTALLING_VMWARE_TOOLS page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_INSTALLING_VMWARE_TOOLSTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_INSTALLING_VMWARE_TOOLSSUBTITLE);
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLING_VMWARE_TOOLS);
psp.pfnDlgProc = PageInstallingProc;
ahpsp[2] = CreatePropertySheetPage(&psp);
/* Create the CONFIG page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_CONFIGTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_CONFIGSUBTITLE);
psp.pfnDlgProc = PageConfigProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_CONFIG);
ahpsp[3] = CreatePropertySheetPage(&psp);
/* Create the INSTALLATION_FAILED page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_INSTALLATION_FAILEDTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_INSTALLATION_FAILEDSUBTITLE);
psp.pfnDlgProc = PageInstallFailedProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLATION_FAILED);
ahpsp[4] = CreatePropertySheetPage(&psp);
/* Create the CHOOSEACTION page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_CHOOSEACTIONTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_CHOOSEACTIONSUBTITLE);
psp.pfnDlgProc = PageChooseActionProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_CHOOSEACTION);
ahpsp[5] = CreatePropertySheetPage(&psp);
/* Create the SELECTDRIVER page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_SELECTDRIVERTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_SELECTDRIVERSUBTITLE);
psp.pfnDlgProc = PageSelectDriverProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_SELECTDRIVER);
ahpsp[6] = CreatePropertySheetPage(&psp);
/* Create the DOUNINSTALL page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
psp.pszHeaderTitle = MAKEINTRESOURCE(IDD_DOUNINSTALLTITLE);
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_DOUNINSTALLSUBTITLE);
psp.pfnDlgProc = PageDoUninstallProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_DOUNINSTALL);
ahpsp[7] = CreatePropertySheetPage(&psp);
/* Create the property sheet */
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
psh.hwndParent = NULL;
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
psh.hInstance = hAppInstance;
psh.hIcon = 0;
psh.pszCaption = Caption;
psh.hwndParent = NULL;
psh.nPages = 7;
psh.nStartPage = (StartVMwConfigWizard ? 5 : 0);
psh.ppsp = psp;
psh.phpage = ahpsp;
psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
InitPropSheetPage(&psp[0], IDD_WELCOMEPAGE, PSP_HIDEHEADER, PageWelcomeProc);
InitPropSheetPage(&psp[1], IDD_INSERT_VMWARE_TOOLS, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageInsertDiscProc);
InitPropSheetPage(&psp[2], IDD_INSTALLING_VMWARE_TOOLS, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageInstallingProc);
InitPropSheetPage(&psp[3], IDD_CONFIG, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageConfigProc);
InitPropSheetPage(&psp[4], IDD_INSTALLATION_FAILED, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageInstallFailedProc);
InitPropSheetPage(&psp[5], IDD_CHOOSEACTION, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageChooseActionProc);
InitPropSheetPage(&psp[6], IDD_SELECTDRIVER, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageSelectDriverProc);
InitPropSheetPage(&psp[7], IDD_DOUNINSTALL, PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE, PageDoUninstallProc);
/* Display the wizard */
PropertySheet(&psh);
return (LONG)(PropertySheet(&psh) != -1);
}
@ -1006,6 +1103,7 @@ WinMain(HINSTANCE hInstance,
LPSTR lpszCmdLine,
int nCmdShow)
{
LPTOP_LEVEL_EXCEPTION_FILTER OldHandler;
int Version;
WCHAR *lc;
@ -1014,7 +1112,7 @@ WinMain(HINSTANCE hInstance,
/* Setup our exception "handler" ;-) */
OldHandler = SetUnhandledExceptionFilter(ExceptionHandler);
if(!DetectVMware(&Version))
{
ExitProcess(1);
@ -1044,7 +1142,7 @@ WinMain(HINSTANCE hInstance,
/* Show the wizard */
CreateWizard();
return 2;
}

View file

@ -10,46 +10,61 @@
#endif
/* metrics */
#define PROPSHEETWIDTH 250
#define PROPSHEETHEIGHT 120
#define PROPSHEETWIDTH 250
#define PROPSHEETHEIGHT 120
#define PROPSHEETPADDING 6
#define SYSTEM_COLUMN (18 * PROPSHEETPADDING)
#define LABELLINE(x) (((PROPSHEETPADDING + 2) * x) + (x + 2))
#define ICONSIZE 16
#define SYSTEM_COLUMN (18 * PROPSHEETPADDING)
#define LABELLINE(x) (((PROPSHEETPADDING + 2) * x) + (x + 2))
#define ICONSIZE 16
/* Resource IDs */
#define IDS_WIZARD_NAME 100
#define IDS_WIZARD_NAME 100
#define IDS_FAILEDTOLOCATEDRIVERS 101
#define IDS_FAILEDTOCOPYFILES 102
#define IDS_FAILEDTOCOPYFILES 102
#define IDS_FAILEDTOACTIVATEDRIVER 103
#define IDS_FAILEDTOSELVGADRIVER 104
#define IDS_FAILEDTOSELVBEDRIVER 105
#define IDS_UNINSTNOTICE 106
#define IDS_UNINSTNOTICE 106
#define IDS_SEARCHINGFORCDROM 201
#define IDS_COPYINGFILES 202
#define IDS_ENABLINGDRIVER 203
#define IDD_WELCOMEPAGE 100
#define IDD_INSERT_VMWARE_TOOLS 101
#define IDD_WELCOMEPAGE 100
#define IDD_INSERT_VMWARE_TOOLS 101
#define IDD_INSTALLING_VMWARE_TOOLS 102
#define IDD_CONFIG 103
#define IDD_CHOOSEACTION 104
#define IDD_SELECTDRIVER 105
#define IDD_INSTALLATION_FAILED 106
#define IDD_DOUNINSTALL 107
#define IDD_CONFIG 103
#define IDD_CHOOSEACTION 104
#define IDD_SELECTDRIVER 105
#define IDD_INSTALLATION_FAILED 106
#define IDD_DOUNINSTALL 107
#define IDC_COLORQUALITY 200
#define IDC_CONFIGSETTINGS 201
#define IDC_USEOTHERDRIVER 202
#define IDC_UNINSTALL 203
#define IDC_VGA 204
#define IDC_VBE 205
#define IDC_UNINSTALL 203
#define IDC_VGA 204
#define IDC_VBE 205
#define IDC_INSTALLINGSTATUS 206
#define IDC_INSTALLINGPROGRESS 207
#define IDB_WATERMARK 100
#define IDB_HEADER 101
#define IDB_WATERMARK 100
#define IDB_HEADER 101
#define IDD_INSERT_VMWARE_TOOLSTITLE 301
#define IDD_INSERT_VMWARE_TOOLSSUBTITLE 302
#define IDD_INSTALLING_VMWARE_TOOLSTITLE 311
#define IDD_INSTALLING_VMWARE_TOOLSSUBTITLE 312
#define IDD_CONFIGTITLE 321
#define IDD_CONFIGSUBTITLE 322
#define IDD_INSTALLATION_FAILEDTITLE 331
#define IDD_INSTALLATION_FAILEDSUBTITLE 332
#define IDD_CHOOSEACTIONTITLE 341
#define IDD_CHOOSEACTIONSUBTITLE 342
#define IDD_SELECTDRIVERTITLE 351
#define IDD_SELECTDRIVERSUBTITLE 352
#define IDD_DOUNINSTALLTITLE 361
#define IDD_DOUNINSTALLSUBTITLE 362
#endif /* __VMWINST_H */

View file

@ -16,7 +16,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
IDB_WATERMARK BITMAP "resources/watermark.bmp"
IDB_HEADER BITMAP "resources/header.bmp"
#include "En.rc"
#include "Es.rc"
#include "De.rc"
/*
* Everything specific to any language goes in one of the specific
* files. Note that you can and may override resources which also have
* a neutral version. This is to get localized bitmaps for example.
*/
#include "En.rc"
#include "De.rc"
#include "Es.rc"