2002-10-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
[reactos.git] / reactos / subsys / system / usetup / usetup.c
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 /* $Id: usetup.c,v 1.5 2002/10/25 22:08:21 chorns Exp $
20 *
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS user-mode setup application
23 * FILE: subsys/system/usetup/usetup.c
24 * PURPOSE: setup application
25 * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de)
26 */
27
28 #include <ddk/ntddk.h>
29 #include <ddk/ntddblue.h>
30 #include <ddk/ntddscsi.h>
31
32 #include <ntdll/rtl.h>
33
34 #include <ntos/keyboard.h>
35
36 #include "usetup.h"
37 #include "partlist.h"
38
39
40 #define INTRO_PAGE 0
41 #define INSTALL_INTRO_PAGE 1
42
43 #define SELECT_PARTITION_PAGE 3
44 #define SELECT_FILE_SYSTEM_PAGE 4
45 #define CHECK_FILE_SYSTEM_PAGE 5
46 #define PREPARE_COPY_PAGE 6
47 #define INSTALL_DIRECTORY_PAGE 7
48 #define FILE_COPY_PAGE 8
49 #define INIT_SYSTEM_PAGE 9
50
51 #define SUCCESS_PAGE 100
52 #define QUIT_PAGE 101
53 #define REBOOT_PAGE 102
54
55
56 /* GLOBALS ******************************************************************/
57
58 HANDLE ProcessHeap;
59
60 BOOL PartDataValid = FALSE;
61 PARTDATA PartData;
62
63 CHAR InstallDir[51];
64
65
66 /* FUNCTIONS ****************************************************************/
67
68 void
69 DisplayString(LPCWSTR lpwString)
70 {
71 UNICODE_STRING us;
72
73 RtlInitUnicodeString(&us, lpwString);
74 NtDisplayString(&us);
75 }
76
77
78 void
79 PrintString(char* fmt,...)
80 {
81 char buffer[512];
82 va_list ap;
83 UNICODE_STRING UnicodeString;
84 ANSI_STRING AnsiString;
85
86 va_start(ap, fmt);
87 vsprintf(buffer, fmt, ap);
88 va_end(ap);
89
90 RtlInitAnsiString(&AnsiString, buffer);
91 RtlAnsiStringToUnicodeString(&UnicodeString,
92 &AnsiString,
93 TRUE);
94 NtDisplayString(&UnicodeString);
95 RtlFreeUnicodeString(&UnicodeString);
96 }
97
98
99 /*
100 * Confirm quit setup
101 * RETURNS
102 * TRUE: Quit setup.
103 * FALSE: Don't quit setup.
104 */
105 static BOOL
106 ConfirmQuit(PINPUT_RECORD Ir)
107 {
108 SHORT xScreen;
109 SHORT yScreen;
110 SHORT yTop;
111 SHORT xLeft;
112 BOOL Result = FALSE;
113 PUSHORT pAttributes = NULL;
114 PUCHAR pCharacters = NULL;
115 COORD Pos;
116
117 GetScreenSize(&xScreen, &yScreen);
118 yTop = (yScreen - 10) / 2;
119 xLeft = (xScreen - 52) / 2;
120
121 /* Save screen */
122 #if 0
123 Pos.X = 0;
124 Pos.Y = 0;
125 pAttributes = (PUSHORT)RtlAllocateHeap(ProcessHeap,
126 0,
127 xScreen * yScreen * sizeof(USHORT));
128 CHECKPOINT1;
129 DPRINT1("pAttributes %p\n", pAttributes);
130 ReadConsoleOutputAttributes(pAttributes,
131 xScreen * yScreen,
132 Pos,
133 NULL);
134 CHECKPOINT1;
135 pCharacters = (PUCHAR)RtlAllocateHeap(ProcessHeap,
136 0,
137 xScreen * yScreen * sizeof(UCHAR));
138 CHECKPOINT1;
139 ReadConsoleOutputCharacters(pCharacters,
140 xScreen * yScreen,
141 Pos,
142 NULL);
143 CHECKPOINT1;
144 #endif
145
146 /* Draw popup window */
147 SetTextXY(xLeft, yTop,
148 "+----------------------------------------------------+");
149 SetTextXY(xLeft, yTop + 1,
150 "| ReactOS 0.0.20 is not completely installed on your |");
151 SetTextXY(xLeft, yTop + 2,
152 "| computer. If you quit Setup now, you will need to |");
153 SetTextXY(xLeft, yTop + 3,
154 "| run Setup again to install ReactOS. |");
155 SetTextXY(xLeft, yTop + 4,
156 "| |");
157 SetTextXY(xLeft, yTop + 5,
158 "| * Press ENTER to continue Setup. |");
159 SetTextXY(xLeft, yTop + 6,
160 "| * Press F3 to quit Setup. |");
161 SetTextXY(xLeft, yTop + 7,
162 "+----------------------------------------------------+");
163 SetTextXY(xLeft, yTop + 8,
164 "| F3= Quit ENTER = Continue |");
165 SetTextXY(xLeft, yTop + 9,
166 "+----------------------------------------------------+");
167
168 while(TRUE)
169 {
170 ConInKey(Ir);
171
172 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
173 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
174 {
175 Result = TRUE;
176 break;
177 }
178 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
179 {
180 Result = FALSE;
181 break;
182 }
183 }
184
185 /* Restore screen */
186 #if 0
187 CHECKPOINT1;
188 WriteConsoleOutputAttributes(pAttributes,
189 xScreen * yScreen,
190 Pos,
191 NULL);
192 CHECKPOINT1;
193
194 WriteConsoleOutputCharacters(pCharacters,
195 xScreen * yScreen,
196 Pos);
197 CHECKPOINT1;
198
199 RtlFreeHeap(ProcessHeap,
200 0,
201 pAttributes);
202 RtlFreeHeap(ProcessHeap,
203 0,
204 pCharacters);
205 #endif
206
207 return(Result);
208 }
209
210
211
212
213
214
215
216 #if 0
217 static ULONG
218 RepairIntroPage(PINPUT_RECORD Ir)
219 {
220
221 }
222 #endif
223
224
225 /*
226 * First setup page
227 * RETURNS
228 * TRUE: setup/repair completed successfully
229 * FALSE: setup/repair terminated by user
230 */
231 static ULONG
232 IntroPage(PINPUT_RECORD Ir)
233 {
234 SetHighlightedTextXY(6, 8, "Welcome to the ReactOS Setup");
235
236 SetTextXY(6, 11, "This part of the setup copies the ReactOS Operating System to your");
237 SetTextXY(6, 12, "computer and prepares the second part of the setup.");
238
239 SetTextXY(8, 15, "\xf9 Press ENTER to install ReactOS.");
240
241 #if 0
242 SetTextXY(8, 17, "\xf9 Press R to repair ReactOS.");
243 SetTextXY(8, 19, "\xf9 Press F3 to quit without installing ReactOS.");
244 #endif
245
246 SetTextXY(8, 17, "\xf9 Press F3 to quit without installing ReactOS.");
247
248 SetStatusText(" ENTER = Continue F3 = Quit");
249
250 while(TRUE)
251 {
252 ConInKey(Ir);
253
254 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
255 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
256 {
257 if (ConfirmQuit(Ir) == TRUE)
258 return(QUIT_PAGE);
259 break;
260 }
261 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
262 {
263 return(INSTALL_INTRO_PAGE);
264 }
265 #if 0
266 else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'R')
267 {
268 return(REPAIR_INTRO_PAGE);
269 }
270 #endif
271 }
272
273 return(INTRO_PAGE);
274 }
275
276
277 static ULONG
278 InstallIntroPage(PINPUT_RECORD Ir)
279 {
280 SetTextXY(6, 8, "Install intro page");
281
282 #if 0
283 SetTextXY(6, 10, "This part of the setup copies the ReactOS Operating System to your");
284 SetTextXY(6, 11, "computer and prepairs the second part of the setup.");
285
286 SetTextXY(8, 14, "\xf9 Press ENTER to start the ReactOS setup.");
287
288 SetTextXY(8, 17, "\xf9 Press F3 to quit without installing ReactOS.");
289 #endif
290
291 SetStatusText(" ENTER = Continue F3 = Quit");
292
293 while(TRUE)
294 {
295 ConInKey(Ir);
296
297 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
298 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
299 {
300 if (ConfirmQuit(Ir) == TRUE)
301 return(QUIT_PAGE);
302 break;
303 }
304 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
305 {
306 return(SELECT_PARTITION_PAGE);
307 }
308 }
309
310 return(INSTALL_INTRO_PAGE);
311 }
312
313
314 static ULONG
315 SelectPartitionPage(PINPUT_RECORD Ir)
316 {
317 PPARTLIST PartList;
318 SHORT xScreen;
319 SHORT yScreen;
320
321 SetTextXY(6, 8, "The list below shows existing partitions and unused disk");
322 SetTextXY(6, 9, "space for new partitions.");
323
324 SetTextXY(8, 11, "\xf9 Press UP or DOWN to select a list entry.");
325 SetTextXY(8, 13, "\xf9 Press ENTER to install ReactOS onto the selected partition.");
326 SetTextXY(8, 15, "\xf9 Press C to create a new partition.");
327 SetTextXY(8, 17, "\xf9 Press D to delete an existing partition.");
328
329 SetStatusText(" Please wait...");
330
331 GetScreenSize(&xScreen, &yScreen);
332
333 PartList = CreatePartitionList(2, 19, xScreen - 3, yScreen - 3);
334 if (PartList == NULL)
335 {
336 /* FIXME: show an error dialog */
337 return(QUIT_PAGE);
338 }
339
340 SetStatusText(" ENTER = Continue F3 = Quit");
341
342 while(TRUE)
343 {
344 ConInKey(Ir);
345
346 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
347 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
348 {
349 if (ConfirmQuit(Ir) == TRUE)
350 {
351 DestroyPartitionList(PartList);
352 return(QUIT_PAGE);
353 }
354 break;
355 }
356 else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
357 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN))
358 {
359 ScrollDownPartitionList(PartList);
360 }
361 else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
362 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP))
363 {
364 ScrollUpPartitionList(PartList);
365 }
366 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
367 {
368 PartDataValid = GetPartitionData(PartList, &PartData);
369 DestroyPartitionList(PartList);
370 return(SELECT_FILE_SYSTEM_PAGE);
371 }
372
373 /* FIXME: Update status text */
374
375 }
376
377 DestroyPartitionList(PartList);
378
379 return(SELECT_PARTITION_PAGE);
380 }
381
382
383 static ULONG
384 SelectFileSystemPage(PINPUT_RECORD Ir)
385 {
386 ULONGLONG DiskSize;
387 ULONGLONG PartSize;
388 PCHAR DiskUnit;
389 PCHAR PartUnit;
390 PCHAR PartType;
391
392 if (PartDataValid == FALSE)
393 {
394 /* FIXME: show an error dialog */
395 return(QUIT_PAGE);
396 }
397
398 /* adjust disk size */
399 if (PartData.DiskSize >= 0x280000000ULL) /* 10 GB */
400 {
401 DiskSize = (PartData.DiskSize + (1 << 29)) >> 30;
402 DiskUnit = "GB";
403 }
404 else
405 {
406 DiskSize = (PartData.DiskSize + (1 << 19)) >> 20;
407 DiskUnit = "MB";
408 }
409
410 /* adjust partition size */
411 if (PartData.PartSize >= 0x280000000ULL) /* 10 GB */
412 {
413 PartSize = (PartData.PartSize + (1 << 29)) >> 30;
414 PartUnit = "GB";
415 }
416 else
417 {
418 PartSize = (PartData.PartSize + (1 << 19)) >> 20;
419 PartUnit = "MB";
420 }
421
422 /* adjust partition type */
423 if ((PartData.PartType == PARTITION_FAT_12) ||
424 (PartData.PartType == PARTITION_FAT_16) ||
425 (PartData.PartType == PARTITION_HUGE) ||
426 (PartData.PartType == PARTITION_XINT13))
427 {
428 PartType = "FAT";
429 }
430 else if ((PartData.PartType == PARTITION_FAT32) ||
431 (PartData.PartType == PARTITION_FAT32_XINT13))
432 {
433 PartType = "FAT32";
434 }
435 else if (PartData.PartType == PARTITION_IFS)
436 {
437 PartType = "NTFS"; /* FIXME: Not quite correct! */
438 }
439 else
440 {
441 PartType = "Unknown";
442 }
443
444 SetTextXY(6, 8, "ReactOS will be installed");
445
446 PrintTextXY(8, 9, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu.",
447 PartData.DiskNumber,
448 DiskSize,
449 DiskUnit,
450 PartData.Port,
451 PartData.Bus,
452 PartData.Id);
453
454 PrintTextXY(8, 10, "on Partition %lu (%I64u %s) %s",
455 PartData.PartNumber,
456 PartSize,
457 PartUnit,
458 PartType);
459
460 SetTextXY(6, 13, "Select a file system for the partition from the list below.");
461
462 SetTextXY(8, 15, "\xf9 Press UP or DOWN to select a file system.");
463 SetTextXY(8, 17, "\xf9 Press ENTER to format the partition.");
464 SetTextXY(8, 19, "\xf9 Press ESC to select another partition.");
465
466 /* FIXME: use a real list later */
467 SetInvertedTextXY(6, 22, " Keep current file system (no changes) ");
468
469
470 SetStatusText(" ENTER = Continue ESC = Cancel F3 = Quit");
471
472 while(TRUE)
473 {
474 ConInKey(Ir);
475
476 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
477 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
478 {
479 if (ConfirmQuit(Ir) == TRUE)
480 return(QUIT_PAGE);
481 break;
482 }
483 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x1B) /* ESC */
484 {
485 return(SELECT_PARTITION_PAGE);
486 }
487 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
488 {
489 return(CHECK_FILE_SYSTEM_PAGE);
490 }
491 }
492
493 return(SELECT_FILE_SYSTEM_PAGE);
494 }
495
496
497 static ULONG
498 CheckFileSystemPage(PINPUT_RECORD Ir)
499 {
500
501 SetTextXY(6, 8, "Check file system");
502
503 SetTextXY(6, 10, "At present, ReactOS can not check file systems.");
504
505
506 SetStatusText(" ENTER = Continue F3 = Quit");
507
508 while(TRUE)
509 {
510 ConInKey(Ir);
511
512 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
513 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
514 {
515 if (ConfirmQuit(Ir) == TRUE)
516 return(QUIT_PAGE);
517 break;
518 }
519 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
520 {
521 return(INSTALL_DIRECTORY_PAGE);
522 }
523 }
524
525 return(CHECK_FILE_SYSTEM_PAGE);
526 }
527
528
529 static ULONG
530 InstallDirectoryPage(PINPUT_RECORD Ir)
531 {
532 ULONG Length;
533
534 SetTextXY(6, 8, "Setup installs ReactOS files onto the selected partition. Choose a");
535 SetTextXY(6, 9, "directory where you want ReactOS to be installed:");
536
537 strcpy(InstallDir, "\\reactos");
538 Length = strlen(InstallDir);
539
540 SetInputTextXY(8, 11, 51, InstallDir);
541
542 SetTextXY(6, 14, "To change the suggested directory, press BACKSPACE to delete");
543 SetTextXY(6, 15, "characters and then type the directory where you want ReactOS to");
544 SetTextXY(6, 16, "be installed.");
545
546
547 SetStatusText(" ENTER = Continue F3 = Quit");
548
549 while(TRUE)
550 {
551 ConInKey(Ir);
552
553 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
554 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
555 {
556 if (ConfirmQuit(Ir) == TRUE)
557 return(QUIT_PAGE);
558 break;
559 }
560 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* Return */
561 {
562 return(PREPARE_COPY_PAGE);
563 }
564 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x08) /* Backspace */
565 {
566 if (Length > 0)
567 {
568 Length--;
569 InstallDir[Length] = 0;
570 SetInputTextXY(8, 11, 51, InstallDir);
571 }
572 }
573 else if (isprint(Ir->Event.KeyEvent.uChar.AsciiChar))
574 {
575 if (Length < 50)
576 {
577 InstallDir[Length] = Ir->Event.KeyEvent.uChar.AsciiChar;
578 Length++;
579 InstallDir[Length] = 0;
580 SetInputTextXY(8, 11, 51, InstallDir);
581 }
582 }
583 }
584
585 return(INSTALL_DIRECTORY_PAGE);
586 }
587
588
589 static ULONG
590 PrepareCopyPage(PINPUT_RECORD Ir)
591 {
592
593 SetTextXY(6, 8, "Preparing to copy files");
594
595
596 SetTextXY(6, 12, "Build file copy list");
597
598 SetTextXY(6, 14, "Create directories");
599
600 SetStatusText(" Please wait...");
601
602
603
604
605 SetStatusText(" ENTER = Continue F3 = Quit");
606
607 while(TRUE)
608 {
609 ConInKey(Ir);
610
611 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
612 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
613 {
614 if (ConfirmQuit(Ir) == TRUE)
615 return(QUIT_PAGE);
616 break;
617 }
618 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
619 {
620 return(FILE_COPY_PAGE);
621 }
622 }
623
624 return(PREPARE_COPY_PAGE);
625 }
626
627
628 static ULONG
629 FileCopyPage(PINPUT_RECORD Ir)
630 {
631
632 SetTextXY(6, 8, "Copying files");
633
634
635 SetStatusText(" ENTER = Continue F3 = Quit");
636
637 while(TRUE)
638 {
639 ConInKey(Ir);
640
641 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
642 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
643 {
644 if (ConfirmQuit(Ir) == TRUE)
645 return(QUIT_PAGE);
646 break;
647 }
648 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
649 {
650 return(INIT_SYSTEM_PAGE);
651 }
652 }
653
654 return(FILE_COPY_PAGE);
655 }
656
657
658 static ULONG
659 InitSystemPage(PINPUT_RECORD Ir)
660 {
661
662 SetTextXY(6, 8, "Initializing system settings");
663
664
665 SetTextXY(6, 12, "Create registry hives");
666
667 SetTextXY(6, 14, "Update registry hives");
668
669 SetTextXY(6, 16, "Install/update boot manager");
670
671
672 SetStatusText(" ENTER = Continue F3 = Quit");
673
674 while(TRUE)
675 {
676 ConInKey(Ir);
677
678 if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
679 (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3))
680 {
681 if (ConfirmQuit(Ir) == TRUE)
682 return(QUIT_PAGE);
683 break;
684 }
685 else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
686 {
687 return(SUCCESS_PAGE);
688 }
689 }
690
691 return(INIT_SYSTEM_PAGE);
692 }
693
694
695 static ULONG
696 QuitPage(PINPUT_RECORD Ir)
697 {
698 SetTextXY(10, 6, "ReactOS is not completely installed");
699
700 SetTextXY(10, 8, "Remove floppy disk from Drive A: and");
701 SetTextXY(10, 9, "all CD-ROMs from CD-Drive.");
702
703 SetTextXY(10, 11, "Press ENTER to reboot your computer.");
704
705 SetStatusText(" ENTER = Reboot computer");
706
707 while(TRUE)
708 {
709 ConInKey(Ir);
710
711 if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
712 {
713 return(REBOOT_PAGE);
714 }
715 }
716 }
717
718
719 static ULONG
720 SuccessPage(PINPUT_RECORD Ir)
721 {
722 SetTextXY(10, 6, "The basic components of ReactOS have been installed successfully.");
723
724 SetTextXY(10, 8, "Remove floppy disk from Drive A: and");
725 SetTextXY(10, 9, "all CD-ROMs from CD-Drive.");
726
727 SetTextXY(10, 11, "Press ENTER to reboot your computer.");
728
729 SetStatusText(" ENTER = Reboot computer");
730
731 while(TRUE)
732 {
733 ConInKey(Ir);
734
735 if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
736 {
737 return(REBOOT_PAGE);
738 }
739 }
740 }
741
742
743 VOID STDCALL
744 NtProcessStartup(PPEB Peb)
745 {
746 NTSTATUS Status;
747 INPUT_RECORD Ir;
748 ULONG Page;
749
750 RtlNormalizeProcessParams(Peb->ProcessParameters);
751
752 ProcessHeap = Peb->ProcessHeap;
753
754 Status = AllocConsole();
755 if (!NT_SUCCESS(Status))
756 {
757 PrintString("Console initialization failed! (Status %lx)\n", Status);
758
759 /* Raise a hard error (crash the system/BSOD) */
760 NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED,
761 0,0,0,0,0);
762 }
763
764 Page = INTRO_PAGE;
765 while (Page != REBOOT_PAGE)
766 {
767 ClearScreen();
768
769 SetUnderlinedTextXY(4, 3, " ReactOS 0.0.20 Setup ");
770
771 switch (Page)
772 {
773 case INTRO_PAGE:
774 Page = IntroPage(&Ir);
775 break;
776
777 case INSTALL_INTRO_PAGE:
778 Page = InstallIntroPage(&Ir);
779 break;
780
781 #if 0
782 case OEM_DRIVER_PAGE:
783 Page = OemDriverPage(&Ir);
784 break;
785 #endif
786
787 #if 0
788 case DEVICE_SETTINGS_PAGE:
789 #endif
790
791 case SELECT_PARTITION_PAGE:
792 Page = SelectPartitionPage(&Ir);
793 break;
794
795 case SELECT_FILE_SYSTEM_PAGE:
796 Page = SelectFileSystemPage(&Ir);
797 break;
798
799 case CHECK_FILE_SYSTEM_PAGE:
800 Page = CheckFileSystemPage(&Ir);
801 break;
802
803 case INSTALL_DIRECTORY_PAGE:
804 Page = InstallDirectoryPage(&Ir);
805 break;
806
807 case PREPARE_COPY_PAGE:
808 Page = PrepareCopyPage(&Ir);
809 break;
810
811 case FILE_COPY_PAGE:
812 Page = FileCopyPage(&Ir);
813 break;
814
815 case INIT_SYSTEM_PAGE:
816 Page = InitSystemPage(&Ir);
817 break;
818
819
820 case SUCCESS_PAGE:
821 Page = SuccessPage(&Ir);
822 break;
823
824 case QUIT_PAGE:
825 Page = QuitPage(&Ir);
826 break;
827 }
828 }
829
830 /* Reboot */
831 FreeConsole();
832 NtShutdownSystem(ShutdownReboot);
833 }
834
835 /* EOF */