Author: mkupfer
Date: Wed Nov 12 10:08:28 2008
New Revision: 37309
URL:
http://svn.reactos.org/svn/reactos?rev=37309&view=rev
Log:
- basic install drive listing code (due to lack of reactos functionality not working yet)
- add and enable advanced settings dialog
- get install directory from txtsetup.sif
- set changed install directory
- fix dialog resource for several languages
Modified:
trunk/reactos/base/setup/reactos/lang/bg-BG.rc
trunk/reactos/base/setup/reactos/lang/cs-CZ.rc
trunk/reactos/base/setup/reactos/lang/de-DE.rc
trunk/reactos/base/setup/reactos/lang/en-US.rc
trunk/reactos/base/setup/reactos/lang/es-ES.rc
trunk/reactos/base/setup/reactos/lang/fr-FR.rc
trunk/reactos/base/setup/reactos/lang/it-IT.rc
trunk/reactos/base/setup/reactos/lang/no-NO.rc
trunk/reactos/base/setup/reactos/lang/pl-PL.rc
trunk/reactos/base/setup/reactos/lang/ru-RU.rc
trunk/reactos/base/setup/reactos/lang/sk-SK.rc
trunk/reactos/base/setup/reactos/reactos.c
trunk/reactos/base/setup/reactos/reactos.rbuild
trunk/reactos/base/setup/reactos/resource.h
Modified: trunk/reactos/base/setup/reactos/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/bg…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/bg-BG.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Ñëàãàíå íà íà÷àëåí çàðåæäà÷ (MBR) íà òâúðäèÿ äèñê",
IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "Áåç ñëàãàíå íà íà÷àëåí çàðåæäà÷", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/cs…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/cs-CZ.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -78,6 +78,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/de…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/de-DE.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
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] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/es…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/es-ES.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -79,6 +79,8 @@
CONTROL "Instalar el cargador de arranque en el disco duro (MBR)",
IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No instalar el cargador de arranque", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/fr…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/fr-FR.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -74,6 +74,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/it…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/it-IT.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Installazione del Boot loader sul disco fisso (MBR)",
IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "Non installare il Boot loader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/no…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/no-NO.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Installer oppstartslaster på harddiskens (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "Ikke installer oppstartslaster", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/pl…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/pl-PL.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -82,6 +82,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/ru…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/ru-RU.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -76,6 +76,8 @@
CONTROL "Óñòàíîâèòü çàãðóç÷èê íà äèñê (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,49,278,11
CONTROL "Íå óñòàíàâëèâàòü çàãðóç÷èê", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,60,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
Modified: trunk/reactos/base/setup/reactos/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/sk…
==============================================================================
--- trunk/reactos/base/setup/reactos/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/lang/sk-SK.rc [iso-8859-1] Wed Nov 12 10:08:28 2008
@@ -81,6 +81,8 @@
CONTROL "Install boot loader on the hard disk (MBR)", IDC_INSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
CONTROL "No installation of bootloader", IDC_NOINSTFREELDR,
"Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+ PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+ PUSHBUTTON "&Cancel", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
END
IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
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] Wed Nov 12 10:08:28 2008
@@ -29,6 +29,8 @@
#include <commctrl.h>
#include <tchar.h>
#include <setupapi.h>
+#include <initguid.h>
+#include <devguid.h>
#include <wine/unicode.h>
#include "resource.h"
@@ -69,7 +71,7 @@
LONG FormatPart; // type of format the partition
LONG SelectedLangId; // selected language (table index)
LONG SelectedKBLayout; // selected keyboard layout (table index)
- WCHAR InstallationDirectory[MAX_PATH]; // installation directory on hdd
+ TCHAR InstallDir[MAX_PATH]; // installation directory on hdd
LONG SelectedComputer; // selected computer type (table index)
LONG SelectedDisplay; // selected display type (table index)
LONG SelectedKeyboard; // selected keyboard type (table index)
@@ -513,11 +515,46 @@
}
static INT_PTR CALLBACK
+MoreOptDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ CheckDlgButton(hwndDlg, IDC_INSTFREELDR, BST_CHECKED);
+ SendMessage(GetDlgItem(hwndDlg, IDC_PATH),WM_SETTEXT,
+ (WPARAM)0,(LPARAM)SetupData.InstallDir);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDOK:
+ SendMessage(GetDlgItem(hwndDlg, IDC_PATH),WM_GETTEXT,
+ (WPARAM)sizeof(SetupData.InstallDir)/sizeof(TCHAR),(LPARAM)SetupData.InstallDir);
+
+ EndDialog(hwndDlg, IDOK);
+ break;
+ case IDCANCEL:
+ EndDialog(hwndDlg, IDCANCEL);
+ break;
+ }
+ }
+ return FALSE;
+}
+
+
+static INT_PTR CALLBACK
DriveDlgProc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
+ HDEVINFO h;
+ HWND hList;
+ SP_DEVINFO_DATA DevInfoData;
+ DWORD i;
switch (uMsg)
{
case WM_INITDIALOG:
@@ -530,15 +567,55 @@
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;
+ h = SetupDiGetClassDevs(&GUID_DEVCLASS_DISKDRIVE, NULL, NULL,
+ DIGCF_PRESENT);
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ hList =GetDlgItem(hwndDlg, IDC_PARTITION);
+ DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+ for (i=0;SetupDiEnumDeviceInfo(h,i,&DevInfoData);i++)
+ {
+ DWORD DataT;
+ LPTSTR buffer = NULL;
+ DWORD buffersize = 0;
+ while (!SetupDiGetDeviceRegistryProperty(
+ h,&DevInfoData,
+ SPDRP_DEVICEDESC,&DataT,(PBYTE)buffer,
+ buffersize,&buffersize))
+ {
+ if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ {
+ if (buffer) LocalFree(buffer);
+ buffer = LocalAlloc(LPTR,buffersize * 2);
+ } else
+ break;
+ }
+ if (buffer)
+ {
+ SendMessage(hList,LB_ADDSTRING,(WPARAM)0,(LPARAM)buffer);
+ LocalFree(buffer);
+ }
+ }
+ SetupDiDestroyDeviceInfoList(h);
+ }
+ }
+ break;
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDC_PARTMOREOPTS:
+ DialogBox(hInstance,MAKEINTRESOURCE(IDD_BOOTOPTIONS),hwndDlg,MoreOptDlgProc);
+ break;
+ }
+
+ }
case WM_NOTIFY:
{
LPNMHDR lpnm = (LPNMHDR)lParam;
@@ -601,6 +678,8 @@
{
case PSN_SETACTIVE:
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT );
+ // disable all buttons during installation process
+ // PropSheet_SetWizButtons(GetParent(hwndDlg), 0 );
break;
default:
break;
@@ -827,6 +906,14 @@
while (SetupFindNextLine(&InfContext, &InfContext) && Count <
SetupData.KeybCount);
}
}
+ // get install directory
+ if (SetupFindFirstLine(hTxtsetupSif, _T("SetupData"),
+ _T("DefaultPath"),&InfContext))
+ {
+ SetupGetStringField(&InfContext, 1,
+ SetupData.InstallDir,
+ sizeof(SetupData.InstallDir) / sizeof(TCHAR), &LineLength);
+ }
SetupCloseInfFile(hTxtsetupSif);
}
}
@@ -859,6 +946,7 @@
(_tcsicmp(szValue, _T("yes"))==0))
{
result = 1; // unattendSetup enabled
+
// read values and store in SetupData
}
}
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] Wed Nov 12 10:08:28 2008
@@ -8,6 +8,7 @@
<library>user32</library>
<library>comctl32</library>
<library>setupapi</library>
+ <library>uuid</library>
<file>reactos.c</file>
<file>reactos.rc</file>
</module>
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] Wed Nov 12 10:08:28 2008
@@ -50,6 +50,7 @@
#define IDS_ABORTSETUP2 2039
#define IDC_ACTION 2040
#define IDC_PARTMOREOPTS 2041
+#define IDD_BOOTOPTIONS 2042
#define IDI_MAIN 3000