mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 21:22:18 +00:00
improved the installation process
svn path=/trunk/; revision=10474
This commit is contained in:
parent
e9533d09c4
commit
e1c935fafd
8 changed files with 404 additions and 154 deletions
|
@ -1,8 +1,3 @@
|
|||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
#include "vmwinst.h"
|
||||
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -54,6 +49,15 @@ BEGIN
|
|||
LTEXT "Das ReactOS Setup kommt nicht mit dem VMware(r) SVGA Treiber.\n\nGehen Sie also zu 'VM' in der Menüleiste von VMware(r) Workstation und wählen Sie 'VMware Tools installieren...'\n\n\nKlicken Sie auf 'Weiter' um fortzufahren, ansonsten auf 'Abbrechen'",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8
|
||||
CONTROL "", IDC_INSTALLINGPROGRESS, "msctls_progress32", PBS_MARQUEE | WS_CHILD | WS_VISIBLE | WS_BORDER, 25, 80, 225, 8
|
||||
END
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
CAPTION "Grafikreiberinstallation"
|
||||
|
@ -131,3 +135,11 @@ BEGIN
|
|||
10002 "Mittelere (16BPP)"
|
||||
10003 "Höchste (32BPP)"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEARCHINGFORCDROM "Suche die VMware(r) Tools CD-ROM..."
|
||||
IDS_COPYINGFILES "Kopiere Dateien..."
|
||||
IDS_ENABLINGDRIVER "Aktiviere den VMware(r) SVGA driver..."
|
||||
END
|
||||
|
||||
|
|
112
reactos/subsys/system/vmwinst/En.rc
Normal file
112
reactos/subsys/system/vmwinst/En.rc
Normal file
|
@ -0,0 +1,112 @@
|
|||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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).\n\n\nIf you like to install the VMware(r) SVGA driver click 'Next', otherwise click 'Cancel'.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 doesn't come with the VMware(r) SVGA driver.\n\nTherefore go to 'VM' in your VMware(r) workstation menu bar and select 'Install VMware tools...'\n\n\nClick 'Next' to continue or 'Cancel' to skip the SVGA driver installation.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8
|
||||
CONTROL "", IDC_INSTALLINGPROGRESS, "msctls_progress32", PBS_MARQUEE | WS_CHILD | WS_VISIBLE | WS_BORDER, 25, 80, 225, 8
|
||||
END
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 VMware(r) SVGA driver has been successfully installed. Please choose your favorite screen resolution:",-1,25,5,225,20
|
||||
PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1280x960", 2240, 110, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1280x1024", 2304, 110, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1400x1050", 2450, 110, 60, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1600x1200", 2800, 110, 75, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Please select your favorite color quality:", -1, 25, 93, 225, 12
|
||||
COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 was unable to install the VMware(r) SVGA driver.\n\n\nClick 'Finish' to continue the installation process.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 VMware(r) SVGA driver is already installed.\n\nPlease choose what you like to do:",-1,25,5,225,30
|
||||
PUSHBUTTON "Configure the screen settings", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "Use a different graphics driver", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "Uninstall the VMware(r) SVGA driver", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Click 'Next' to continue or 'Cancel' to exit the wizard.", -1, 25, 93, 225, 12
|
||||
END
|
||||
|
||||
IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 "Please select the graphics driver you would like to use:",-1,25,25,225,15
|
||||
PUSHBUTTON "ReactOS VGA Driver", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "ReactOS VBE Driver (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Click 'Finish' to complete the operation or 'Cancel' to exit the setup without changes.", -1, 25, 93, 225, 20
|
||||
END
|
||||
|
||||
IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 is about to uninstall your VMware(r) SVGA driver!!!\n\n\nClick 'Finish' to uninstall the driver or 'Cancel' to leave it as it is.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_WIZARD_NAME "VMware(r) detected"
|
||||
IDS_FAILEDTOLOCATEDRIVERS "The ReactOS Setup couldn't find the required files.\nPlease make sure the VMware(r) tools CD-ROM is inserted."
|
||||
IDS_FAILEDTOCOPYFILES "The ReactOS Setup failed to copy the required files.\nPlease make sure the VMware(r) tools CD-ROM is inserted.\n"
|
||||
IDS_FAILEDTOACTIVATEDRIVER "Failed to activate the VMware(r) SVGA driver!"
|
||||
IDS_FAILEDTOSELVGADRIVER "Failed to activate the ReactOS VGA driver!"
|
||||
IDS_FAILEDTOSELVBEDRIVER "Failed to activate the ReactOS VBE driver!"
|
||||
IDS_UNINSTNOTICE "The VMware(r) SVGA driver files have not yet been deleted.\nPlease delete them manually after a system reboot."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
10001 "Lowest (8BPP)"
|
||||
10002 "Medium (16BPP)"
|
||||
10003 "Highest (32BPP)"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEARCHINGFORCDROM "Searching for VMware(r) Tools CD-ROM..."
|
||||
IDS_COPYINGFILES "Copying files..."
|
||||
IDS_ENABLINGDRIVER "Enabling VMware(r) SVGA driver..."
|
||||
END
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
#include "vmwinst.h"
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -53,6 +49,15 @@ BEGIN
|
|||
LTEXT "El Instalador de ReactOS no viene con el controlador SVGA VMware(r).\n\nPor lo tanto vaya a 'VM' en la barra de menú de VMware(r) workstation y seleccione 'Install VMware(r) tools...'\n\nhaga click en 'Siguiente' para continuar o en 'Cancelar' para saltar la instalación del controlador SVGA.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8
|
||||
CONTROL "", IDC_INSTALLINGPROGRESS, "msctls_progress32", PBS_MARQUEE | WS_CHILD | WS_VISIBLE | WS_BORDER, 25, 80, 225, 8
|
||||
END
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
|
||||
CAPTION "Instalación del Controlador de Video"
|
||||
|
@ -131,3 +136,10 @@ BEGIN
|
|||
10003 "Alta (32BPP)"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEARCHINGFORCDROM "Searching for VMware(r) Tools CD-ROM..."
|
||||
IDS_COPYINGFILES "Copying files..."
|
||||
IDS_ENABLINGDRIVER "Enabling VMware(r) SVGA driver..."
|
||||
END
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.1 2004/04/09 18:27:11 weiden Exp $
|
||||
# $Id: Makefile,v 1.2 2004/08/10 15:00:22 weiden Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
|
@ -10,7 +10,7 @@ TARGET_NAME = vmwinst
|
|||
|
||||
TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API -DUNICODE -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||
TARGET_CFLAGS = -D__USE_W32API -DUNICODE -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a ntdll.a
|
||||
|
||||
|
|
24
reactos/subsys/system/vmwinst/manifest.xml
Normal file
24
reactos/subsys/system/vmwinst/manifest.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="ReactOS.VMware.SVGA.Installer"
|
||||
type="win32"
|
||||
/>
|
||||
<description>ReactOS VMware(r) SVGA driver Installer</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
|
||||
<!-- EOF -->
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: vmwinst.c,v 1.5 2004/06/01 19:08:53 sedwards Exp $
|
||||
/* $Id: vmwinst.c,v 1.6 2004/08/10 15:00:22 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS VMware(r) driver installation utility
|
||||
|
@ -43,6 +43,13 @@ static WCHAR *vmx_svga = L"vmx_svga.sys";
|
|||
|
||||
static WCHAR *SrcPath = PathToVideoDrivers45;
|
||||
|
||||
static HANDLE hInstallationThread = NULL;
|
||||
static HWND hInstallationNotifyWnd = NULL;
|
||||
static LONG AbortInstall = 0;
|
||||
#define WM_INSTABORT (WM_USER + 2)
|
||||
#define WM_INSTCOMPLETE (WM_USER + 3)
|
||||
#define WM_INSTSTATUSUPDATE (WM_USER + 4)
|
||||
|
||||
/* Helper functions */
|
||||
|
||||
LONG WINAPI ExceptionHandler(LPEXCEPTION_POINTERS ExceptionInfo)
|
||||
|
@ -424,40 +431,7 @@ PageInsertDiscProc(
|
|||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
break;
|
||||
case PSN_WIZNEXT:
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
|
||||
ProcessMessages();
|
||||
if(!IsVMwareCDInDrive(&CDDrive))
|
||||
{
|
||||
WCHAR Msg[1024];
|
||||
LoadString(hAppInstance, IDS_FAILEDTOLOCATEDRIVERS, Msg, sizeof(Msg) / sizeof(WCHAR));
|
||||
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(!InstallFile(DestinationPath, vmx_fb) ||
|
||||
!InstallFile(DestinationPath, vmx_mode) ||
|
||||
!InstallFile(DestinationDriversPath, vmx_svga))
|
||||
{
|
||||
WCHAR Msg[1024];
|
||||
LoadString(hAppInstance, IDS_FAILEDTOCOPYFILES, Msg, sizeof(Msg) / sizeof(WCHAR));
|
||||
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(!EnableVmwareDriver(FALSE, FALSE, TRUE))
|
||||
{
|
||||
WCHAR Msg[1024];
|
||||
LoadString(hAppInstance, IDS_FAILEDTOACTIVATEDRIVER, Msg, sizeof(Msg) / sizeof(WCHAR));
|
||||
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSTALLATION_FAILED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSTALLING_VMWARE_TOOLS);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -466,6 +440,200 @@ PageInsertDiscProc(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
VOID
|
||||
InstTerminateInstaller(BOOL Wait)
|
||||
{
|
||||
if(hInstallationThread != NULL)
|
||||
{
|
||||
if(Wait)
|
||||
{
|
||||
InterlockedExchange((LONG*)&AbortInstall, 2);
|
||||
WaitForSingleObject(hInstallationThread, INFINITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
InterlockedExchange((LONG*)&AbortInstall, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DWORD STDCALL
|
||||
InstInstallationThread(LPVOID lpParameter)
|
||||
{
|
||||
HANDLE hThread;
|
||||
BOOL DriveAvailable;
|
||||
int DrivesTested = 0;
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTSTATUSUPDATE, IDS_SEARCHINGFORCDROM, 0);
|
||||
|
||||
while(AbortInstall == 0)
|
||||
{
|
||||
Sleep(500);
|
||||
DriveAvailable = IsVMwareCDInDrive(&CDDrive);
|
||||
if(DriveAvailable)
|
||||
break;
|
||||
if(DrivesTested++ > 20)
|
||||
{
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOLOCATEDRIVERS, 0);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTSTATUSUPDATE, IDS_COPYINGFILES, 0);
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
if(!InstallFile(DestinationPath, vmx_fb))
|
||||
{
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Sleep(250);
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
if(!InstallFile(DestinationPath, vmx_mode))
|
||||
{
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Sleep(250);
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
if(!InstallFile(DestinationDriversPath, vmx_svga))
|
||||
{
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Sleep(250);
|
||||
|
||||
if(AbortInstall != 0) goto done;
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTSTATUSUPDATE, IDS_ENABLINGDRIVER, 0);
|
||||
if(!EnableVmwareDriver(FALSE, FALSE, TRUE))
|
||||
{
|
||||
PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOACTIVATEDRIVER, 0);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Sleep(500);
|
||||
|
||||
done:
|
||||
switch(AbortInstall)
|
||||
{
|
||||
case 0:
|
||||
SendMessage(hInstallationNotifyWnd, WM_INSTCOMPLETE, 0, 0);
|
||||
break;
|
||||
case 1:
|
||||
SendMessage(hInstallationNotifyWnd, WM_INSTABORT, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
hThread = (HANDLE)InterlockedExchange((LONG*)&hInstallationThread, 0);
|
||||
if(hThread != NULL)
|
||||
{
|
||||
CloseHandle(hThread);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
InstStartInstallationThread(HWND hwndNotify)
|
||||
{
|
||||
if(hInstallationThread == NULL)
|
||||
{
|
||||
DWORD ThreadId;
|
||||
hInstallationNotifyWnd = hwndNotify;
|
||||
AbortInstall = 0;
|
||||
hInstallationThread = CreateThread(NULL,
|
||||
0,
|
||||
InstInstallationThread,
|
||||
NULL,
|
||||
CREATE_SUSPENDED,
|
||||
&ThreadId);
|
||||
if(hInstallationThread == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ResumeThread(hInstallationThread);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Property page dialog callback */
|
||||
int CALLBACK
|
||||
PageInstallingProc(
|
||||
HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
switch(pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
SetDlgItemText(hwndDlg, IDC_INSTALLINGSTATUS, NULL);
|
||||
SendDlgItemMessage(hwndDlg, IDC_INSTALLINGPROGRESS, PBM_SETMARQUEE, TRUE, 50);
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK);
|
||||
InstStartInstallationThread(hwndDlg);
|
||||
break;
|
||||
case PSN_RESET:
|
||||
InstTerminateInstaller(TRUE);
|
||||
break;
|
||||
case PSN_WIZBACK:
|
||||
if(hInstallationThread != NULL)
|
||||
{
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
|
||||
InstTerminateInstaller(FALSE);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SendDlgItemMessage(hwndDlg, IDC_INSTALLINGPROGRESS, PBM_SETMARQUEE, FALSE, 0);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_INSERT_VMWARE_TOOLS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_INSTABORT:
|
||||
/* go back in case we aborted the installation thread */
|
||||
SendDlgItemMessage(hwndDlg, IDC_INSTALLINGPROGRESS, PBM_SETMARQUEE, FALSE, 0);
|
||||
PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSERT_VMWARE_TOOLS);
|
||||
if(wParam != 0)
|
||||
{
|
||||
WCHAR Msg[1024];
|
||||
LoadString(hAppInstance, wParam, Msg, sizeof(Msg) / sizeof(WCHAR));
|
||||
MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING);
|
||||
}
|
||||
break;
|
||||
case WM_INSTCOMPLETE:
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_CONFIG);
|
||||
break;
|
||||
case WM_INSTSTATUSUPDATE:
|
||||
{
|
||||
WCHAR Msg[1024];
|
||||
LoadString(hAppInstance, wParam, Msg, sizeof(Msg) / sizeof(WCHAR));
|
||||
SetDlgItemText(hwndDlg, IDC_INSTALLINGSTATUS, Msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Property page dialog callback */
|
||||
BOOL CALLBACK
|
||||
PageInstallFailedProc(
|
||||
|
@ -796,7 +964,7 @@ PageDoUninstallProc(
|
|||
static LONG
|
||||
CreateWizard(VOID)
|
||||
{
|
||||
PROPSHEETPAGE psp[7];
|
||||
PROPSHEETPAGE psp[8];
|
||||
PROPSHEETHEADER psh;
|
||||
WCHAR Caption[1024];
|
||||
|
||||
|
@ -815,11 +983,12 @@ CreateWizard(VOID)
|
|||
|
||||
InitPropSheetPage(&psp[0], IDD_WELCOMEPAGE, PageWelcomeProc);
|
||||
InitPropSheetPage(&psp[1], IDD_INSERT_VMWARE_TOOLS, PageInsertDiscProc);
|
||||
InitPropSheetPage(&psp[2], IDD_CONFIG, PageConfigProc);
|
||||
InitPropSheetPage(&psp[3], IDD_INSTALLATION_FAILED, PageInstallFailedProc);
|
||||
InitPropSheetPage(&psp[4], IDD_CHOOSEACTION, PageChooseActionProc);
|
||||
InitPropSheetPage(&psp[5], IDD_SELECTDRIVER, PageSelectDriverProc);
|
||||
InitPropSheetPage(&psp[6], IDD_DOUNINSTALL, PageDoUninstallProc);
|
||||
InitPropSheetPage(&psp[2], IDD_INSTALLING_VMWARE_TOOLS, PageInstallingProc);
|
||||
InitPropSheetPage(&psp[3], IDD_CONFIG, PageConfigProc);
|
||||
InitPropSheetPage(&psp[4], IDD_INSTALLATION_FAILED, PageInstallFailedProc);
|
||||
InitPropSheetPage(&psp[5], IDD_CHOOSEACTION, PageChooseActionProc);
|
||||
InitPropSheetPage(&psp[6], IDD_SELECTDRIVER, PageSelectDriverProc);
|
||||
InitPropSheetPage(&psp[7], IDD_DOUNINSTALL, PageDoUninstallProc);
|
||||
|
||||
return (LONG)(PropertySheet(&psh) != -1);
|
||||
}
|
||||
|
@ -835,7 +1004,7 @@ WinMain(HINSTANCE hInstance,
|
|||
WCHAR *lc;
|
||||
|
||||
hAppInstance = hInstance;
|
||||
|
||||
|
||||
/* Setup our exception "handler" ;-) */
|
||||
OldHandler = SetUnhandledExceptionFilter(ExceptionHandler);
|
||||
|
||||
|
@ -844,7 +1013,7 @@ WinMain(HINSTANCE hInstance,
|
|||
ExitProcess(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* restore the exception handler */
|
||||
SetUnhandledExceptionFilter(OldHandler);
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#define PSCB_BUTTONPRESSED (3)
|
||||
#endif
|
||||
|
||||
#ifndef PBS_MARQUEE
|
||||
#define PBS_MARQUEE (8)
|
||||
#endif
|
||||
|
||||
/* metrics */
|
||||
#define PROPSHEETWIDTH 250
|
||||
#define PROPSHEETHEIGHT 120
|
||||
|
@ -23,13 +27,18 @@
|
|||
#define IDS_FAILEDTOSELVBEDRIVER 105
|
||||
#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_CONFIG 102
|
||||
#define IDD_CHOOSEACTION 103
|
||||
#define IDD_SELECTDRIVER 104
|
||||
#define IDD_INSTALLATION_FAILED 105
|
||||
#define IDD_DOUNINSTALL 106
|
||||
#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 IDC_COLORQUALITY 200
|
||||
#define IDC_CONFIGSETTINGS 201
|
||||
|
@ -37,5 +46,7 @@
|
|||
#define IDC_UNINSTALL 203
|
||||
#define IDC_VGA 204
|
||||
#define IDC_VBE 205
|
||||
#define IDC_INSTALLINGSTATUS 206
|
||||
#define IDC_INSTALLINGPROGRESS 207
|
||||
|
||||
#endif /* __VMWINST_H */
|
||||
|
|
|
@ -2,14 +2,11 @@
|
|||
#include <reactos/resource.h>
|
||||
#include "vmwinst.h"
|
||||
|
||||
#include "Es.rc"
|
||||
#include "De.rc"
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
|
||||
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
||||
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -40,96 +37,9 @@ BEGIN
|
|||
END
|
||||
END
|
||||
|
||||
IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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).\n\n\nIf you like to install the VMware(r) SVGA driver, click 'Next', otherwise click 'Cancel'.",-1,25,25,225,85
|
||||
END
|
||||
1 24 DISCARDABLE "manifest.xml"
|
||||
|
||||
IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 doesn't come with the VMware(r) SVGA driver.\n\nTherefore go to 'VM' in your VMware(r) workstation menu bar and select 'Install VMware tools...'\n\n\nClick 'Next' to continue or 'Cancel' to skip the SVGA driver installation.",-1,25,25,225,85
|
||||
END
|
||||
#include "En.rc"
|
||||
#include "Es.rc"
|
||||
#include "De.rc"
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 VMware(r) SVGA driver has been successfully installed. Please choose your favorite screen resolution:",-1,25,5,225,20
|
||||
PUSHBUTTON "640x480", 540, 25, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1280x960", 2240, 110, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1280x1024", 2304, 110, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1400x1050", 2450, 110, 60, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1600x1200", 2800, 110, 75, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Please select your favorite color quality:", -1, 25, 93, 225, 12
|
||||
COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 was unable to install the VMware(r) SVGA driver.\n\n\nClick 'Finish' to continue the installation process.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 VMware(r) SVGA driver is already installed.\n\nPlease choose what you like to do:",-1,25,5,225,30
|
||||
PUSHBUTTON "Configure the screen settings", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "Use a different graphics driver", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "Uninstall the VMware(r) SVGA driver", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Click 'Next' to continue or 'Cancel' to exit the wizard.", -1, 25, 93, 225, 12
|
||||
END
|
||||
|
||||
IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 "Please select the graphics driver you would like to use:",-1,25,25,225,15
|
||||
PUSHBUTTON "ReactOS VGA Driver", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON
|
||||
PUSHBUTTON "ReactOS VBE Driver (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON
|
||||
LTEXT "Click 'Finish' to complete the operation or 'Cancel' to exit the setup without changes.", -1, 25, 93, 225, 20
|
||||
END
|
||||
|
||||
IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
|
||||
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 is about to uninstall your VMware(r) SVGA driver!!!\n\n\nClick 'Finish' to uninstall the driver or 'Cancel' to leave it as it is.",-1,25,25,225,85
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_WIZARD_NAME "VMware(r) detected"
|
||||
IDS_FAILEDTOLOCATEDRIVERS "The ReactOS Setup couldn't find the required files.\nPlease make sure the VMware(r) tools CD-ROM is inserted."
|
||||
IDS_FAILEDTOCOPYFILES "The ReactOS Setup failed to copy the required files.\nPlease make sure the VMware(r) tools CD-ROM is inserted.\n"
|
||||
IDS_FAILEDTOACTIVATEDRIVER "Failed to activate the VMware(r) SVGA driver!"
|
||||
IDS_FAILEDTOSELVGADRIVER "Failed to activate the ReactOS VGA driver!"
|
||||
IDS_FAILEDTOSELVBEDRIVER "Failed to activate the ReactOS VBE driver!"
|
||||
IDS_UNINSTNOTICE "The VMware(r) SVGA driver files have not yet been deleted.\nPlease delete them manually after a system reboot."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
10001 "Lowest (8BPP)"
|
||||
10002 "Medium (16BPP)"
|
||||
10003 "Highest (32BPP)"
|
||||
END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue