Author: mkupfer
Date: Fri Jul 18 04:07:54 2008
New Revision: 34572
URL:
http://svn.reactos.org/svn/reactos?rev=34572&view=rev
Log:
- gui template for 1st stage setup, english only
- implemented, but still disabled - it's work in progress
Modified:
trunk/reactos/base/setup/reactos/lang/en-US.rc
trunk/reactos/base/setup/reactos/reactos.c
trunk/reactos/base/setup/reactos/reactos.rbuild
trunk/reactos/base/setup/reactos/res/header.bmp
trunk/reactos/base/setup/reactos/resource.h
Modified: trunk/reactos/base/setup/reactos/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/en…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/en-US.rc [iso-8859-1] Fri Jul 18 04:07:54 2008
@@ -14,4 +14,109 @@
LTEXT "Click Finish to exit the Setup.", IDC_STATIC, 115, 169, 195, 17
END
+IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Please choose the language used for the installation process."
+ , IDC_STATIC, 10, 0, 297, 10
+ LTEXT "The selected language will be the default language for the final
system.", IDC_STATIC, 10, 13, 297, 10
+ LISTBOX IDC_LANGUAGES, 10,28,297,142,LBS_HASSTRINGS | WS_VSCROLL
+ LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10
+END
+
+IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Type of setup", IDC_STATIC, "Button", BS_GROUPBOX,
10,0,297,172
+ CONTROL "Install ReactOS", IDC_INSTALL, "Button",
BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10
+ CONTROL "Repair or update an installed ReactOS", IDC_SETUP,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10
+ LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10
+END
+
+IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Device settings", IDC_STATIC, "Button", BS_GROUPBOX,
10,0,297,172
+ LTEXT "Computer:", IDC_STATIC, 20,15, 80, 10
+ CONTROL "", IDC_COMPUTER, "ComboBox", WS_TABSTOP |
CBS_DROPDOWNLIST , 100, 15, 150, 80
+ LTEXT "Display:", IDC_STATIC, 20,35, 80, 10
+ CONTROL "", IDC_DISPLAY, "ComboBox", WS_TABSTOP |
CBS_DROPDOWNLIST , 100, 35, 150, 80
+ LTEXT "Keyboard:", IDC_STATIC, 20,55, 80, 10
+ CONTROL "", IDC_KEYBOARD, "ComboBox", WS_TABSTOP |
CBS_DROPDOWNLIST , 100, 55, 150, 80
+ LTEXT "Keyboard layout:", IDC_STATIC, 20,75, 80, 10
+ CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_TABSTOP |
CBS_DROPDOWNLIST , 100, 75, 150, 80
+ LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180
,277, 20
+END
+
+IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Partition for ReactOS installation", IDC_STATIC,
"Button", BS_GROUPBOX, 10,0,297,102
+ LISTBOX IDC_PARTITION, 20,13,277,70,LBS_HASSTRINGS | WS_VSCROLL
+ PUSHBUTTON "&Create" ,IDC_PARTCREATE, 20,83,50,15
+ PUSHBUTTON "&Delete" ,IDC_PARTDELETE, 75,83,50,15
+
+ CONTROL "Installation folder", IDC_STATIC, "Button", BS_GROUPBOX,
10,103,297,30
+ EDITTEXT IDC_PATH, 20,113,277,12, WS_VISIBLE
+
+ CONTROL "Boot loader installation", IDC_STATIC, "Button",
BS_GROUPBOX, 10,136,297,40
+
+ CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 147, 277, 10
+ CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP /* | WS_DISABLED*/ , 20, 159, 277, 10
+ LTEXT "Click Next to start the installation process.", IDC_STATIC, 10, 180
,277, 20
+END
+
+IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Setup action", IDC_ACTION, "Button", BS_GROUPBOX,
10,0,297,172
+ LTEXT "Install files...", IDC_ACTIVITY, 20, 50, 277, 10
+ LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10
+ CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32",
+ PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8
+END
+
+
+IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Completing ReactOS Setup"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Completing the first stage of ReactOS Setup", IDC_FINISHTITLE,
"Button", BS_GROUPBOX, 10,0,297,172
+ LTEXT "You have successfully completed the first stage of ReactOS Setup.",
IDC_STATIC, 20, 50, 277, 10
+
+ LTEXT "When you click Finish, your computer will restart.", IDC_STATIC, 20,
80, 277, 10
+ CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH
| WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8
+ LTEXT "If there is a CD in a drive, remove it. Then, to restart "\
+ "your computer, click Finish.", IDC_STATIC, 10, 180, 297, 20
+END
+
+
+STRINGTABLE
+BEGIN
+ IDS_LANGTITLE "Language Selection"
+ IDS_LANGSUBTITLE "Choose language for setup and final system."
+ IDS_TYPETITLE "Welcome to ReactOS Setup"
+ IDS_TYPESUBTITLE "Choose setup type."
+ IDS_DEVICETITLE "Setup the basic devices"
+ IDS_DEVICESUBTITLE "Set the settings of display and keyboard."
+ IDS_DRIVETITLE "Setup the installation partition and system folder"
+ IDS_DRIVESUBTITLE "Prepare installation partition, system folder and boot
loader."
+ IDS_PROCESSTITLE "Prepare partition, copy files and setup system"
+ IDS_PROCESSSUBTITLE "Create and format partition, copy files, install and setup
boot loader"
+ IDS_RESTARTTITLE "First stage of setup finished"
+ IDS_RESTARTSUBTITLE "The first stage of setup has been completed, restart to
continue with second stage"
+ IDS_ABORTSETUP "ReactOS is not completely installed on your computer. If you quit
Setup now, you will need to run Setup again to install Reactos. Really quit?"
+ IDS_ABORTSETUP2 "Abort installation?"
+END
/* EOF */
Modified: trunk/reactos/base/setup/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
==============================================================================
--- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Fri Jul 18 04:07:54 2008
@@ -21,18 +21,38 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS GUI first stage setup application
* FILE: subsys/system/reactos/reactos.c
- * PROGRAMMERS: Eric Kohl, Matthias Kupfer
+ * PROGRAMMERS: Eric Kohl
+ * Matthias Kupfer
*/
#include <windows.h>
#include <commctrl.h>
#include <tchar.h>
+#include <setupapi.h>
#include "resource.h"
/* GLOBALS ******************************************************************/
HFONT hTitleFont;
+
+struct
+{
+ LONG DestDiskNumber; // physical disk
+ LONG DestPartNumber; // partition on disk
+ LONG DestPartSize; // if partition doesn't exist, size of partition
+ LONG FSType; // file system type on partition
+ LONG MBRInstallType; // install bootloader
+ LONG FormatPart; // type of format the partition
+ WCHAR SelectedLangId[4]; // selected language
+ WCHAR InstallationDirectory[MAX_PATH]; // installation directory on hdd
+ WCHAR DefaultLang[20]; // default language
+ WCHAR DefaultKBLayout[20]; // default keyboard layout
+ BOOLEAN RepairUpdateFlag; // flag for update/repair an installed reactos
+} SetupData;
+
+TCHAR abort_msg[512],abort_title[64];
+BOOL isUnattend;
/* FUNCTIONS ****************************************************************/
@@ -106,7 +126,7 @@
SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
/* Hide and disable the 'Cancel' button at the moment,
- * later we use this button to cancel the setup process
+ * we use this button to cancel the setup process
* like F3 in usetup
*/
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
@@ -129,6 +149,7 @@
{
case PSN_SETACTIVE: // Only "Finish" for closing the App
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH);
+ //PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
break;
default:
break;
@@ -140,6 +161,384 @@
}
return FALSE;
+}
+
+static INT_PTR CALLBACK
+LangSelDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+ ShowWindow (hwndControl, SW_SHOW);
+ EnableWindow (hwndControl, TRUE);
+
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+}
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+ break;
+ case PSN_QUERYCANCEL:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg,
abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
+TypeDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ CheckDlgButton(hwndDlg, IDC_INSTALL, BST_CHECKED);
+
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+}
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+ break;
+ case PSN_QUERYCANCEL:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg,
abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
+DeviceDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+}
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+ break;
+ case PSN_QUERYCANCEL:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg,
abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
+DriveDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ CheckDlgButton(hwndDlg, IDC_INSTFREELDR, BST_CHECKED);
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+}
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+ break;
+ case PSN_QUERYCANCEL:
+ SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg,
abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
+ProcessDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+ ShowWindow (hwndControl, SW_HIDE);
+ EnableWindow (hwndControl, FALSE);
+
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+}
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT );
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
+RestartDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ /* Set title font */
+ /*SendDlgItemMessage(hwndDlg,
+ IDC_STARTTITLE,
+ WM_SETFONT,
+ (WPARAM)hTitleFont,
+ (LPARAM)TRUE);*/
+ }
+ break;
+ case WM_TIMER:
+ {
+ INT Position;
+ HWND hWndProgress;
+
+ hWndProgress = GetDlgItem(hwndDlg, IDC_RESTART_PROGRESS);
+ Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
+ if (Position == 300)
+ {
+ KillTimer(hwndDlg, 1);
+ PropSheet_PressButton(GetParent(hwndDlg), PSBTN_FINISH);
+ }
+ else
+ {
+ SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
+ }
+ return TRUE;
+ }
+ case WM_DESTROY:
+ return TRUE;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE: // Only "Finish" for closing the App
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH);
+ SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0,
MAKELPARAM(0, 300));
+ SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0);
+ SetTimer(hwndDlg, 1, 50, NULL);
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
+
+BOOL isUnattendSetup()
+{
+ WCHAR szPath[MAX_PATH];
+ HINF hUnattendedInf;
+ INFCONTEXT InfContext;
+ TCHAR szValue[MAX_PATH];
+ DWORD LineLength;
+ //HKEY hKey;
+ BOOL result = 0;
+
+ GetCurrentDirectoryW(MAX_PATH, szPath); // FIXME
+
+ wcscat(szPath, L"\\unattend.inf");
+ hUnattendedInf = SetupOpenInfFileW(szPath, NULL, INF_STYLE_OLDNT, NULL);
+ if (hUnattendedInf != INVALID_HANDLE_VALUE)
+ {
+ if (SetupFindFirstLine(hUnattendedInf, _T("Unattend"),
+ _T("UnattendSetupEnabled"),&InfContext))
+ {
+ if (SetupGetStringField(&InfContext, 1, szValue,
+ sizeof(szValue) / sizeof(TCHAR), &LineLength) &&
+ (_tcsicmp(szValue, _T("yes"))==0))
+ {
+ result = 1; // unattendSetup enabled
+ // read values and store in SetupData
+ }
+ }
+ SetupCloseInfFile(hUnattendedInf);
+ }
+ return result;
}
int WINAPI
@@ -149,11 +548,18 @@
int nCmdShow)
{
PROPSHEETHEADER psh;
- HPROPSHEETPAGE ahpsp[1];
+ HPROPSHEETPAGE ahpsp[7];
PROPSHEETPAGE psp = {0};
UINT nPages = 0;
-
- /* Create the Start page */
+ isUnattend = isUnattendSetup();
+
+ if (!isUnattend)
+ {
+
+ LoadString(hInst,IDS_ABORTSETUP, abort_msg, sizeof(abort_msg)/sizeof(TCHAR));
+ LoadString(hInst,IDS_ABORTSETUP2, abort_title,sizeof(abort_title)/sizeof(TCHAR));
+
+ /* Create the Start page, until setup is working */
psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
psp.hInstance = hInst;
@@ -162,7 +568,77 @@
psp.pszTemplate = MAKEINTRESOURCE(IDD_STARTPAGE);
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
- // Here we can add the next pages and switch on later
+ /* Create language selection page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LANGTITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LANGSUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = LangSelDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_LANGSELPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+ // Change language with "SetThreadLocale(langid)"
+
+ /* Create install type selection page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TYPETITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_TYPESUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = TypeDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_TYPEPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+ /* Create device settings page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DEVICETITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DEVICESUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = DeviceDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_DEVICEPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+ /* Create install device settings page / boot method / install directory*/
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DRIVETITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DRIVESUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = DriveDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_DRIVEPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+ }
+
+ /* Create installation progress page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PROCESSTITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PROCESSSUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = ProcessDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+ if (!isUnattend)
+ {
+ /* Create finish to reboot page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_RESTARTTITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_RESTARTSUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = RestartDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_RESTARTPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+ }
/* Create the property sheet */
psh.dwSize = sizeof(PROPSHEETHEADER);
Modified: trunk/reactos/base/setup/reactos/reactos.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
==============================================================================
--- trunk/reactos/base/setup/reactos/reactos.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/reactos.rbuild [iso-8859-1] Fri Jul 18 04:07:54 2008
@@ -9,6 +9,7 @@
<library>gdi32</library>
<library>user32</library>
<library>comctl32</library>
+ <library>setupapi</library>
<file>reactos.c</file>
<file>reactos.rc</file>
</module>
Modified: trunk/reactos/base/setup/reactos/res/header.bmp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/res/hea…
==============================================================================
Binary files - no diff available.
Modified: trunk/reactos/base/setup/reactos/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/resourc…
==============================================================================
--- trunk/reactos/base/setup/reactos/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/resource.h [iso-8859-1] Fri Jul 18 04:07:54 2008
@@ -7,8 +7,47 @@
#define IDC_STATIC -1
-#define IDD_STARTPAGE 2000
-#define IDC_STARTTITLE 2001
+#define IDD_STARTPAGE 2000
+#define IDC_STARTTITLE 2001
+#define IDD_LANGSELPAGE 2002
+#define IDS_LANGTITLE 2003
+#define IDS_LANGSUBTITLE 2004
+#define IDC_LANGUAGES 2005
+#define IDD_TYPEPAGE 2006
+#define IDS_TYPETITLE 2007
+#define IDS_TYPESUBTITLE 2008
+#define IDC_INSTALL 2009
+#define IDC_SETUP 2010
+#define IDD_DEVICEPAGE 2011
+#define IDS_DEVICETITLE 2012
+#define IDS_DEVICESUBTITLE 2013
+#define IDC_COMPUTER 2014
+#define IDC_DISPLAY 2015
+#define IDC_KEYBOARD 2016
+#define IDC_KEYLAYOUT 2017
+#define IDD_DRIVEPAGE 2018
+#define IDS_DRIVETITLE 2019
+#define IDS_DRIVESUBTITLE 2020
+#define IDC_PARTITION 2021
+#define IDC_PARTCREATE 2022
+#define IDC_PARTDELETE 2023
+#define IDC_INSTFREELDR 2024
+#define IDC_NOINSTFREELDR 2025
+#define IDC_PATH 2026
+#define IDD_PROCESSPAGE 2027
+#define IDS_PROCESSTITLE 2028
+#define IDS_PROCESSSUBTITLE 2029
+#define IDC_ACTIVITY 2030
+#define IDC_ITEM 2031
+#define IDC_PROCESSPROGRESS 2032
+#define IDD_RESTARTPAGE 2033
+#define IDS_RESTARTTITLE 2034
+#define IDS_RESTARTSUBTITLE 2035
+#define IDC_FINISHTITLE 2036
+#define IDC_RESTART_PROGRESS 2037
+#define IDS_ABORTSETUP 2038
+#define IDS_ABORTSETUP2 2039
+#define IDC_ACTION 2040
#define IDI_MAIN 3000