mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
- Use 'MS Shell Dlg' font in all dialogs.
- Fix some typos in german dialogs. - Add locale page dialog. - Store owner name, owner organization and computer name in the registry. svn path=/trunk/; revision=10366
This commit is contained in:
parent
62d46e8d85
commit
437de0500e
|
@ -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: install.c,v 1.14 2004/07/19 01:33:14 kuehng Exp $
|
||||
/* $Id: install.c,v 1.15 2004/08/03 13:43:00 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -41,9 +41,10 @@
|
|||
#include "globals.h"
|
||||
#include "resource.h"
|
||||
|
||||
// #define NO_GUI
|
||||
#define VMWINST
|
||||
|
||||
VOID WINAPI CreateCmdLink(VOID);
|
||||
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
@ -63,15 +64,11 @@ DebugPrint(char* fmt,...)
|
|||
vsprintf(buffer, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
#ifdef NO_GUI
|
||||
OutputDebugStringA(buffer);
|
||||
#else
|
||||
strcat (buffer, "\nRebooting now!");
|
||||
MessageBoxA (NULL,
|
||||
buffer,
|
||||
"ReactOS Setup",
|
||||
MB_OK);
|
||||
#endif
|
||||
strcat(buffer, "\nRebooting now!");
|
||||
MessageBoxA(NULL,
|
||||
buffer,
|
||||
"ReactOS Setup",
|
||||
MB_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,38 +247,48 @@ CreateTempDir(LPCWSTR VarName)
|
|||
RegCloseKey (hKey);
|
||||
}
|
||||
|
||||
BOOL ProcessSysSetupInf(void)
|
||||
{
|
||||
#define SECTIONBUF_SIZE 4096
|
||||
TCHAR *pBuf2;
|
||||
TCHAR pBuf[SECTIONBUF_SIZE];
|
||||
|
||||
SetLastError(0);
|
||||
|
||||
DWORD dwBufSize = GetPrivateProfileSection(_T("DeviceInfsToInstall"),pBuf,SECTIONBUF_SIZE,_T("Inf\\SYSSETUP.INF"));
|
||||
|
||||
// fix this first...
|
||||
if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||
return TRUE;
|
||||
BOOL
|
||||
ProcessSysSetupInf(VOID)
|
||||
{
|
||||
LPTSTR pBuf2;
|
||||
TCHAR szBuf[SECTIONBUF_SIZE];
|
||||
DWORD dwBufSize;
|
||||
|
||||
if(dwBufSize == SECTIONBUF_SIZE-2)
|
||||
return FALSE;
|
||||
if(!dwBufSize)
|
||||
return FALSE;
|
||||
pBuf2=pBuf;
|
||||
while(*pBuf2)
|
||||
{
|
||||
OutputDebugString(_T("Calling Class Installer for "));
|
||||
OutputDebugString(pBuf2);
|
||||
OutputDebugString(_T("\r\n"));
|
||||
SetLastError(0);
|
||||
|
||||
// Currently unsupported
|
||||
// if(!SetupDiInstallClass(NULL,pBuf2,DI_QUIETINSTALL,NULL))
|
||||
// return FALSE;
|
||||
pBuf2+=_tcslen(pBuf2)+1;
|
||||
}
|
||||
dwBufSize = GetPrivateProfileSection(_T("DeviceInfsToInstall"),
|
||||
szBuf,
|
||||
SECTIONBUF_SIZE,
|
||||
_T("Inf\\SYSSETUP.INF"));
|
||||
|
||||
return TRUE;
|
||||
/* fix this first... */
|
||||
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||
return TRUE;
|
||||
|
||||
if (dwBufSize == SECTIONBUF_SIZE-2)
|
||||
return FALSE;
|
||||
|
||||
if (!dwBufSize)
|
||||
return FALSE;
|
||||
|
||||
pBuf2 = szBuf;
|
||||
while (*pBuf2)
|
||||
{
|
||||
OutputDebugString(_T("Calling Class Installer for "));
|
||||
OutputDebugString(pBuf2);
|
||||
OutputDebugString(_T("\r\n"));
|
||||
|
||||
#if 0
|
||||
/* FIXME: Currently unsupported */
|
||||
if (!SetupDiInstallClass(NULL, pBuf2, DI_QUIETINSTALL, NULL))
|
||||
return FALSE;
|
||||
#endif
|
||||
pBuf2 += _tcslen(pBuf2) + 1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -385,9 +392,8 @@ InstallReactOS (HINSTANCE hInstance)
|
|||
DebugPrint("ProcessSysSetupInf() failed!\n");
|
||||
return 0;
|
||||
}
|
||||
#if 1
|
||||
InstallWizard ();
|
||||
#endif
|
||||
|
||||
InstallWizard();
|
||||
|
||||
#ifdef VMWINST
|
||||
RunVMWInstall ();
|
||||
|
@ -401,11 +407,13 @@ InstallReactOS (HINSTANCE hInstance)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
DWORD STDCALL SetupChangeFontSize(HANDLE HWindow,
|
||||
LPCWSTR lpszFontSize)
|
||||
DWORD STDCALL
|
||||
SetupChangeFontSize(HANDLE hWnd,
|
||||
LPCWSTR lpszFontSize)
|
||||
{
|
||||
return(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#ifndef RESOURCE_H
|
||||
#define RESOURCE_H
|
||||
|
||||
#define IDB_WATERMARK 100
|
||||
#define IDB_HEADER 101
|
||||
|
||||
#define IDC_STATIC -1
|
||||
|
||||
#define IDD_WELCOMEPAGE 1000
|
||||
|
@ -32,6 +35,11 @@
|
|||
#define IDC_ADMINPASSWORD1 1006
|
||||
#define IDC_ADMINPASSWORD2 1007
|
||||
|
||||
#define IDD_LOCALEPAGE 1008
|
||||
#define IDC_LOCALETEXT 1009
|
||||
#define IDC_CUSTOMLOCALE 1010
|
||||
#define IDC_LAYOUTTEXT 1011
|
||||
#define IDC_CUSTOMLAYOUT 1012
|
||||
|
||||
#define IDD_FINISHPAGE 1050
|
||||
|
||||
|
|
|
@ -37,6 +37,12 @@ BEGIN
|
|||
END
|
||||
END
|
||||
|
||||
|
||||
/* Bitmaps */
|
||||
IDB_WATERMARK BITMAP "res/watermark.bmp"
|
||||
IDB_HEADER BITMAP "res/header.bmp"
|
||||
|
||||
|
||||
/*
|
||||
* Everything specific to any language goes in one of the specific
|
||||
* files. Note that you can and may override resources which also have
|
||||
|
|
|
@ -21,7 +21,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
|||
IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_STATIC, 115, 9, 189, 31
|
||||
LTEXT "This wizard installs ReactOS on your computer. The wizard "\
|
||||
|
@ -34,7 +34,7 @@ END
|
|||
IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Type your full name and the name of your company or organization.",
|
||||
IDC_STATIC, 54, 7, 242, 21
|
||||
|
@ -48,7 +48,7 @@ END
|
|||
IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Type a name for your computer that is 63 characters or less. "\
|
||||
"If you are on a network, your computer name must be unique.",
|
||||
|
@ -67,10 +67,31 @@ BEGIN
|
|||
END
|
||||
|
||||
|
||||
IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "The system locale should match the language of the applications "\
|
||||
"you want to use. The user locale controls how numbers, "\
|
||||
"currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20
|
||||
LTEXT "<locale text>", IDC_LOCALETEXT, 53, 29, 250, 16
|
||||
LTEXT "To change system or user locale settings, click Customize.",
|
||||
IDC_STATIC, 53, 60, 184, 8
|
||||
PUSHBUTTON "&Customize...", IDC_CUSTOMLOCALE, 245, 57, 50, 14
|
||||
LTEXT "The keyboard layout controls the characters that appear when you type.",
|
||||
IDC_STATIC, 53, 86, 253, 8
|
||||
LTEXT "<layout text>", IDC_LAYOUTTEXT, 53, 100, 250, 16
|
||||
LTEXT "To change the keyboard layout, click Customize.",
|
||||
IDC_STATIC, 53, 126, 184, 8
|
||||
PUSHBUTTON "C&ustomize...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Completing ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Completing the ReactOS Setup Wizard",IDC_STATIC,115,9,195,37
|
||||
LTEXT "You have successfully completed ReactOS Setup.\n\n" \
|
||||
|
|
|
@ -23,20 +23,20 @@ LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
|||
IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Willkommen zu den Setup-Assistent von ReactOS.", IDC_STATIC, 115, 9, 189, 31
|
||||
LTEXT "Dieser Assistent wird ReactOS auf Ihren Computer installieren. "\
|
||||
"Der Assistent benötigt ein paar Informationenn um ReactOS "\
|
||||
LTEXT "Dieser Assistent wird ReactOS auf Ihrem Computer installieren. "\
|
||||
"Der Assistent benötigt ein paar Informationen um ReactOS "\
|
||||
"zu installieren.", IDC_STATIC, 115, 50, 189, 100
|
||||
LTEXT "Klicken Sie auf Weiter um forzufahren.", IDC_STATIC, 115, 160, 189, 31
|
||||
LTEXT "Klicken Sie auf Weiter um fortzufahren.", IDC_STATIC, 115, 160, 189, 31
|
||||
END
|
||||
|
||||
|
||||
IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Geben Sie ihren Namen und ihre Firma oder Organization ein.",
|
||||
IDC_STATIC, 54, 7, 242, 21
|
||||
|
@ -50,17 +50,17 @@ END
|
|||
IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Geben sie einen Computernamen ein, der höchstens 63 Zeichen lang ist. "\
|
||||
"Wenn Sie um Netzwerk sind muss dieser Name einmalig sein.",
|
||||
"Wenn Sie im Netzwerk sind muss dieser Name einmalig sein.",
|
||||
IDC_STATIC, 54, 7, 250, 24
|
||||
LTEXT "&Computername:", IDC_STATIC, 54, 38, 75, 8
|
||||
EDITTEXT IDC_COMPUTERNAME, 132, 35, 163, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL | ES_UPPERCASE
|
||||
LTEXT "Das Setup wird einen Administratorkonto erstellen. "\
|
||||
"Benutzen Sie ihn, wenn Sie vollen Zugriff auf Ihren Computer benötigen .",
|
||||
LTEXT "Das Setup wird ein Administratorkonto erstellen. "\
|
||||
"Benutzen Sie es, wenn Sie vollen Zugriff auf Ihren Computer benötigen.",
|
||||
IDC_STATIC, 54, 57, 250, 25
|
||||
LTEXT "Geben Sie ein Passwort für das Administratorkonto ein, das höchstens 14 Zeichen lang ist",
|
||||
LTEXT "Geben Sie ein Passwort für das Administratorkonto ein, das höchstens 14 Zeichen lang ist.",
|
||||
IDC_STATIC, 54, 87, 250, 8
|
||||
LTEXT "&Administrator Passwort:", IDC_STATIC, 54, 104, 75, 8
|
||||
EDITTEXT IDC_ADMINPASSWORD1, 132, 101, 172, 14, WS_VISIBLE | WS_TABSTOP | ES_PASSWORD
|
||||
|
@ -69,15 +69,36 @@ BEGIN
|
|||
END
|
||||
|
||||
|
||||
IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "The system locale should match the language of the applications "\
|
||||
"you want to use. The user locale controls how numbers, "\
|
||||
"currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20
|
||||
LTEXT "<locale text>", IDC_LOCALETEXT, 53, 29, 250, 16
|
||||
LTEXT "To change system or user locale settings, click Customize.",
|
||||
IDC_STATIC, 53, 60, 184, 8
|
||||
PUSHBUTTON "&Customize...", IDC_CUSTOMLOCALE, 245, 57, 50, 14
|
||||
LTEXT "The keyboard layout controls the characters that appear when you type.",
|
||||
IDC_STATIC, 53, 86, 253, 8
|
||||
LTEXT "<layout text>", IDC_LAYOUTTEXT, 53, 100, 250, 16
|
||||
LTEXT "To change the keyboard layout, click Customize.",
|
||||
IDC_STATIC, 53, 126, 184, 8
|
||||
PUSHBUTTON "C&ustomize...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Fertigstellung des ReactOS Setups"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Fertigstellung des ReactOS Setup Assistenten",IDC_STATIC,115,9,195,37
|
||||
LTEXT "Das ReactOS Setup wurde erfolgreich fertiggestellt.\n\n" \
|
||||
"Wenn Sie auf Fertig klicken, wird der Computer neu gestartet.", IDC_STATIC, 115, 58, 195, 100
|
||||
LTEXT "Entfernen Sie die CD wenn vorhanden. Danach klicken Sie "\
|
||||
LTEXT "Entfernen Sie die CD, wenn vorhanden. Danach klicken Sie "\
|
||||
"auf Fertig, um den Computer neu zu starten.", IDC_STATIC, 115, 160, 195, 31
|
||||
END
|
||||
|
||||
|
@ -89,8 +110,8 @@ FONT 8, "MS Shell Dlg"
|
|||
BEGIN
|
||||
LTEXT "Die Installation von ReactOS wurde erfolgreich fertiggestellt.", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "Um fortzufahren muss Ihr Computer neu gesratet werden. "\
|
||||
"Der Computer wird in 15 Minuten automatisch neu gestartet oder wenn Sie auch den "\
|
||||
"Neustart Button klicken.", IDC_STATIC, 13, 33, 212, 32
|
||||
"Der Computer wird in 15 Minuten automatisch neu gestartet oder wenn Sie auf "\
|
||||
"Neustart klicken.", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Neustart", IDOK, 98, 87, 50, 14
|
||||
|
|
|
@ -23,7 +23,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
|||
IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_STATIC, 115, 9, 189, 31
|
||||
LTEXT "This wizard installs ReactOS on your computer. The wizard "\
|
||||
|
@ -36,7 +36,7 @@ END
|
|||
IDD_OWNERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Type your full name and the name of your company or organization.",
|
||||
IDC_STATIC, 54, 7, 242, 21
|
||||
|
@ -50,7 +50,7 @@ END
|
|||
IDD_COMPUTERPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Type a name for your computer that is 63 characters or less. "\
|
||||
"If you are on a network, your computer name must be unique.",
|
||||
|
@ -69,10 +69,31 @@ BEGIN
|
|||
END
|
||||
|
||||
|
||||
IDD_LOCALEPAGE DIALOG DISCARDABLE 0, 0, 317, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ReactOS Setup"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "The system locale should match the language of the applications "\
|
||||
"you want to use. The user locale controls how numbers, "\
|
||||
"currencies, and dates appear.", IDC_STATIC, 53, 7, 253, 20
|
||||
LTEXT "<locale text>", IDC_LOCALETEXT, 53, 29, 250, 16
|
||||
LTEXT "To change system or user locale settings, click Customize.",
|
||||
IDC_STATIC, 53, 60, 184, 8
|
||||
PUSHBUTTON "&Customize...", IDC_CUSTOMLOCALE, 245, 57, 50, 14
|
||||
LTEXT "The keyboard layout controls the characters that appear when you type.",
|
||||
IDC_STATIC, 53, 86, 253, 8
|
||||
LTEXT "<layout text>", IDC_LAYOUTTEXT, 53, 100, 250, 16
|
||||
LTEXT "To change the keyboard layout, click Customize.",
|
||||
IDC_STATIC, 53, 126, 184, 8
|
||||
PUSHBUTTON "C&ustomize...", IDC_CUSTOMLAYOUT, 245, 122, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 193
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Completing ReactOS Setup"
|
||||
FONT 8, "MS Sans Serif"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Completing the ReactOS Setup Wizard",IDC_STATIC,115,9,195,37
|
||||
LTEXT "You have successfully completed ReactOS Setup.\n\n" \
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: wizard.c,v 1.4 2004/06/17 21:23:50 kuehng Exp $
|
||||
/* $Id: wizard.c,v 1.5 2004/08/03 13:43:00 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* PURPOSE: System setup
|
||||
* FILE: lib/syssetup/wizard.c
|
||||
* PROGRAMER: Eric Kohl (ekohl@rz-online.de)
|
||||
* PROGRAMER: Eric Kohl
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
@ -125,37 +125,33 @@ WelcomeDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
BOOL CALLBACK
|
||||
OwnerPageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PSETUPDATA SetupData;
|
||||
|
||||
/* Retrieve pointer to the global setup data */
|
||||
SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
TCHAR OwnerName[51];
|
||||
TCHAR OwnerOrganization[51];
|
||||
HKEY hKey;
|
||||
LPNMHDR lpnm;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
/* Save pointer to the global setup data */
|
||||
SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
|
||||
SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData);
|
||||
|
||||
SendDlgItemMessage(hwndDlg, IDC_OWNERNAME, EM_LIMITTEXT, 50, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_OWNERORGANIZATION, EM_LIMITTEXT, 50, 0);
|
||||
|
||||
/* set focus to owner name */
|
||||
SetFocus(GetDlgItem(hwndDlg,IDC_OWNERNAME));
|
||||
/* Set focus to owner name */
|
||||
SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
lpnm = (LPNMHDR)lParam;
|
||||
|
||||
switch (lpnm->code)
|
||||
{
|
||||
|
@ -165,16 +161,44 @@ OwnerPageDlgProc(HWND hwndDlg,
|
|||
break;
|
||||
|
||||
case PSN_WIZNEXT:
|
||||
if (GetDlgItemText(hwndDlg, IDC_OWNERNAME, SetupData->OwnerName, 50) == 0)
|
||||
OwnerName[0] = 0;
|
||||
if (GetDlgItemText(hwndDlg, IDC_OWNERNAME, OwnerName, 50) == 0)
|
||||
{
|
||||
MessageBox (hwndDlg,
|
||||
_T("Setup cannot continue until you enter your name."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
MessageBox(hwndDlg,
|
||||
_T("Setup cannot continue until you enter your name."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
GetDlgItemText(hwndDlg, IDC_OWNERORGANIZATION, SetupData->OwnerOrganization, 50);
|
||||
|
||||
OwnerOrganization[0] = 0;
|
||||
GetDlgItemText(hwndDlg, IDC_OWNERORGANIZATION, OwnerOrganization, 50);
|
||||
|
||||
RegOpenKeyEx(HKEY_LOCAL_MACHINE,
|
||||
_T("Software\\Microsoft\\Windows NT\\CurrentVersion"),
|
||||
0,
|
||||
KEY_ALL_ACCESS,
|
||||
&hKey);
|
||||
/* FIXME: check error code */
|
||||
|
||||
RegSetValueEx(hKey,
|
||||
_T("RegisteredOwner"),
|
||||
0,
|
||||
REG_SZ,
|
||||
OwnerName,
|
||||
(_tcslen(OwnerName) + 1) * sizeof(TCHAR));
|
||||
/* FIXME: check error code */
|
||||
|
||||
RegSetValueEx(hKey,
|
||||
_T("RegisteredOrganization"),
|
||||
0,
|
||||
REG_SZ,
|
||||
OwnerOrganization,
|
||||
(_tcslen(OwnerOrganization) + 1) * sizeof(TCHAR));
|
||||
/* FIXME: check error code */
|
||||
|
||||
RegCloseKey(hKey);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -197,9 +221,108 @@ ComputerPageDlgProc(HWND hwndDlg,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PSETUPDATA SetupData;
|
||||
TCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
|
||||
TCHAR Password1[15];
|
||||
TCHAR Password2[15];
|
||||
DWORD Length;
|
||||
LPNMHDR lpnm;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
/* Retrieve current computer name */
|
||||
Length = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
GetComputerName(ComputerName, &Length);
|
||||
|
||||
/* Display current computer name */
|
||||
SetDlgItemText(hwndDlg, IDC_COMPUTERNAME, ComputerName);
|
||||
|
||||
/* Set text limits */
|
||||
SendDlgItemMessage(hwndDlg, IDC_COMPUTERNAME, EM_LIMITTEXT, 64, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD1, EM_LIMITTEXT, 14, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD2, EM_LIMITTEXT, 14, 0);
|
||||
|
||||
/* Set focus to computer name */
|
||||
SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
lpnm = (LPNMHDR)lParam;
|
||||
|
||||
switch (lpnm->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
/* Enable the Back and Next buttons */
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
break;
|
||||
|
||||
case PSN_WIZNEXT:
|
||||
if (GetDlgItemText(hwndDlg, IDC_COMPUTERNAME, ComputerName, 64) == 0)
|
||||
{
|
||||
MessageBox(hwndDlg,
|
||||
_T("Setup cannot continue until you enter the name of your computer."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* FIXME: check computer name for invalid characters */
|
||||
|
||||
if (!SetComputerName(ComputerName))
|
||||
{
|
||||
MessageBox(hwndDlg,
|
||||
_T("Setup failed to set the computer name."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Check admin passwords */
|
||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD1, Password1, 15);
|
||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD2, Password2, 15);
|
||||
if (_tcscmp(Password1, Password2))
|
||||
{
|
||||
MessageBox(hwndDlg,
|
||||
_T("The passwords you entered do not match. Please enter "\
|
||||
"the desired password again."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* FIXME: check password for invalid characters */
|
||||
|
||||
/* FIXME: Set admin password */
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL CALLBACK
|
||||
LocalePageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
PSETUPDATA SetupData;
|
||||
|
||||
/* Retrieve pointer to the global setup data */
|
||||
SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA);
|
||||
|
@ -208,23 +331,10 @@ ComputerPageDlgProc(HWND hwndDlg,
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
DWORD Length;
|
||||
|
||||
/* Save pointer to the global setup data */
|
||||
SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
|
||||
SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData);
|
||||
|
||||
/* Retrieve current computer name */
|
||||
Length = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
GetComputerNameA(SetupData->ComputerName, &Length);
|
||||
|
||||
/* Display current computer name */
|
||||
SetDlgItemTextA(hwndDlg, IDC_COMPUTERNAME, SetupData->ComputerName);
|
||||
|
||||
/* Set text limits */
|
||||
SendDlgItemMessage(hwndDlg, IDC_COMPUTERNAME, EM_LIMITTEXT, 64, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD1, EM_LIMITTEXT, 14, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADMINPASSWORD2, EM_LIMITTEXT, 14, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -241,35 +351,6 @@ ComputerPageDlgProc(HWND hwndDlg,
|
|||
break;
|
||||
|
||||
case PSN_WIZNEXT:
|
||||
if (GetDlgItemText(hwndDlg, IDC_COMPUTERNAME, SetupData->ComputerName, 64) == 0)
|
||||
{
|
||||
MessageBox (hwndDlg,
|
||||
_T("Setup cannot continue until you enter the name of your computer."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* FIXME: check computer name for invalid characters */
|
||||
|
||||
/* Check admin passwords */
|
||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD1, Password1, 15);
|
||||
GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD2, Password2, 15);
|
||||
if (_tcscmp (Password1, Password2))
|
||||
{
|
||||
MessageBox (hwndDlg,
|
||||
_T("The passwords you entered do not match. Please enter "\
|
||||
"the desired password again."),
|
||||
_T("ReactOS Setup"),
|
||||
MB_ICONERROR | MB_OK);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* FIXME: check password for invalid characters */
|
||||
|
||||
_tcscpy (SetupData->AdminPassword, Password1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -332,20 +413,20 @@ FinishDlgProc(HWND hwndDlg,
|
|||
|
||||
|
||||
VOID
|
||||
InstallWizard (VOID)
|
||||
InstallWizard(VOID)
|
||||
{
|
||||
PROPSHEETHEADER psh;
|
||||
HPROPSHEETPAGE ahpsp[4];
|
||||
HPROPSHEETPAGE ahpsp[5];
|
||||
PROPSHEETPAGE psp;
|
||||
// SHAREDWIZDATA wizdata;
|
||||
|
||||
/* Clear setup data */
|
||||
ZeroMemory (&SetupData, sizeof(SETUPDATA));
|
||||
ZeroMemory(&SetupData, sizeof(SETUPDATA));
|
||||
|
||||
/* Create the Welcome page */
|
||||
ZeroMemory (&psp, sizeof(PROPSHEETPAGE));
|
||||
psp.dwSize = sizeof(PROPSHEETPAGE);
|
||||
psp.dwFlags = PSP_DEFAULT; // | PSP_HIDEHEADER;
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
|
||||
psp.hInstance = hDllInstance;
|
||||
psp.lParam = (LPARAM)&SetupData;
|
||||
psp.pfnDlgProc = WelcomeDlgProc;
|
||||
|
@ -354,38 +435,46 @@ InstallWizard (VOID)
|
|||
|
||||
/* Create the Owner page */
|
||||
psp.dwFlags = PSP_DEFAULT; // | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
// psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE2);
|
||||
// psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUBTITLE2);
|
||||
// psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE1);
|
||||
// psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUBTITLE1);
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_OWNERPAGE);
|
||||
psp.pfnDlgProc = OwnerPageDlgProc;
|
||||
ahpsp[1] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the Computer page */
|
||||
psp.dwFlags = PSP_DEFAULT; // | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
// psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE1);
|
||||
// psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUBTITLE1);
|
||||
// psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE2);
|
||||
// psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUBTITLE2);
|
||||
psp.pfnDlgProc = ComputerPageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_COMPUTERPAGE);
|
||||
ahpsp[2] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the Locale page */
|
||||
psp.dwFlags = PSP_DEFAULT; // | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
// psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE2);
|
||||
// psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUBTITLE2);
|
||||
psp.pfnDlgProc = LocalePageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE);
|
||||
ahpsp[3] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the Finish page */
|
||||
psp.dwFlags = PSP_DEFAULT; // | PSP_HIDEHEADER;
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
|
||||
psp.pfnDlgProc = FinishDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
|
||||
ahpsp[3] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[4] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the property sheet */
|
||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||
psh.dwFlags = PSH_WIZARD; //PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
|
||||
psh.dwFlags = PSH_WIZARD; //97 | PSH_WATERMARK | PSH_HEADER;
|
||||
psh.hInstance = hDllInstance;
|
||||
psh.hwndParent = NULL;
|
||||
psh.nPages = 4;
|
||||
psh.nPages = 5;
|
||||
psh.nStartPage = 0;
|
||||
psh.phpage = ahpsp;
|
||||
// psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
|
||||
// psh.pszbmHeader = MAKEINTRESOURCE(IDB_BANNER);
|
||||
// psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
|
||||
// psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
|
||||
|
||||
/* Display the wizard */
|
||||
PropertySheet(&psh);
|
||||
|
|
Loading…
Reference in a new issue