mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
don't copy files if already present
svn path=/trunk/; revision=9106
This commit is contained in:
parent
6a3ea3a956
commit
ba87b6d902
1 changed files with 35 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: vmwinst.c,v 1.1 2004/04/09 18:27:11 weiden Exp $
|
/* $Id: vmwinst.c,v 1.2 2004/04/12 16:09:45 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS VMware(r) driver installation utility
|
* PROJECT: ReactOS VMware(r) driver installation utility
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
#include "vmwinst.h"
|
#include "vmwinst.h"
|
||||||
|
|
||||||
HINSTANCE hAppInstance;
|
HINSTANCE hAppInstance;
|
||||||
BOOL StartVMwConfigWizard, ActivateVBE = FALSE, UninstallDriver = FALSE;
|
BOOL StartVMwConfigWizard, DriverFilesFound, ActivateVBE = FALSE, UninstallDriver = FALSE;
|
||||||
|
|
||||||
static WCHAR DestinationDriversPath[MAX_PATH+1];
|
static WCHAR DestinationDriversPath[MAX_PATH+1];
|
||||||
static WCHAR CDDrive = L'\0';
|
static WCHAR CDDrive = L'\0';
|
||||||
|
@ -376,8 +376,27 @@ PageWelcomeProc(
|
||||||
switch(pnmh->code)
|
switch(pnmh->code)
|
||||||
{
|
{
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
|
{
|
||||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
|
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case PSN_WIZNEXT:
|
||||||
|
{
|
||||||
|
if(DriverFilesFound)
|
||||||
|
{
|
||||||
|
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_WELCOMEPAGE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CONFIG);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -417,9 +436,6 @@ PageInsertDiscProc(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestinationDriversPath[0] = L'\0';
|
|
||||||
wcscat(DestinationDriversPath, DestinationPath);
|
|
||||||
wcscat(DestinationDriversPath, L"drivers\\");
|
|
||||||
if(!InstallFile(DestinationPath, vmx_fb) ||
|
if(!InstallFile(DestinationPath, vmx_fb) ||
|
||||||
!InstallFile(DestinationPath, vmx_mode) ||
|
!InstallFile(DestinationPath, vmx_mode) ||
|
||||||
!InstallFile(DestinationDriversPath, vmx_svga))
|
!InstallFile(DestinationDriversPath, vmx_svga))
|
||||||
|
@ -554,6 +570,11 @@ PageConfigProc(
|
||||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_CHOOSEACTION);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
if(DriverFilesFound)
|
||||||
|
{
|
||||||
|
SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PSN_WIZFINISH:
|
case PSN_WIZFINISH:
|
||||||
|
@ -833,9 +854,17 @@ WinMain(HINSTANCE hInstance,
|
||||||
{
|
{
|
||||||
wcscat(DestinationPath, L"\\");
|
wcscat(DestinationPath, L"\\");
|
||||||
}
|
}
|
||||||
|
DestinationDriversPath[0] = L'\0';
|
||||||
|
wcscat(DestinationDriversPath, DestinationPath);
|
||||||
|
wcscat(DestinationDriversPath, L"drivers\\");
|
||||||
|
|
||||||
SetCurrentDirectory(DestinationPath);
|
SetCurrentDirectory(DestinationPath);
|
||||||
|
|
||||||
StartVMwConfigWizard = IsVmwSVGAEnabled();
|
DriverFilesFound = FileExists(DestinationPath, vmx_fb) &&
|
||||||
|
FileExists(DestinationPath, vmx_mode) &&
|
||||||
|
FileExists(DestinationDriversPath, vmx_svga);
|
||||||
|
|
||||||
|
StartVMwConfigWizard = DriverFilesFound && IsVmwSVGAEnabled();
|
||||||
|
|
||||||
/* Show the wizard */
|
/* Show the wizard */
|
||||||
CreateWizard();
|
CreateWizard();
|
||||||
|
|
Loading…
Reference in a new issue