From 5c1d53b4ebe61ed91b9302592187981092dfd48d Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 8 Sep 2002 18:29:56 +0000 Subject: [PATCH] Added initial console setup code. svn path=/trunk/; revision=3476 --- reactos/Makefile | 2 +- reactos/bootcd.bat | 24 + reactos/subsys/system/usetup/console.c | 883 +++++++++++++++++++++++++ reactos/subsys/system/usetup/makefile | 21 + reactos/subsys/system/usetup/usetup.c | 390 +++++++++++ reactos/subsys/system/usetup/usetup.h | 95 +++ reactos/subsys/system/usetup/usetup.rc | 38 ++ 7 files changed, 1452 insertions(+), 1 deletion(-) create mode 100755 reactos/bootcd.bat create mode 100644 reactos/subsys/system/usetup/console.c create mode 100644 reactos/subsys/system/usetup/makefile create mode 100644 reactos/subsys/system/usetup/usetup.c create mode 100644 reactos/subsys/system/usetup/usetup.h create mode 100644 reactos/subsys/system/usetup/usetup.rc diff --git a/reactos/Makefile b/reactos/Makefile index 4ec0ca00069..b4804f0a4ee 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -74,7 +74,7 @@ STORAGE_DRIVERS = atapi cdrom class2 disk scsiport # System applications # autochk lsass services shell winlogon -SYS_APPS = autochk services shell winlogon gstart +SYS_APPS = autochk services shell winlogon gstart usetup # System services # rpcss eventlog diff --git a/reactos/bootcd.bat b/reactos/bootcd.bat new file mode 100755 index 00000000000..f1e1c30e109 --- /dev/null +++ b/reactos/bootcd.bat @@ -0,0 +1,24 @@ +@echo off +set BOOTCD_DIR=..\bootcd + +md %BOOTCD_DIR% +md %BOOTCD_DIR%\disk +md %BOOTCD_DIR%\disk\bootdisk +md %BOOTCD_DIR%\disk\install +md %BOOTCD_DIR%\disk\reactos +md %BOOTCD_DIR%\disk\reactos\system32 +copy /Y ntoskrnl\ntoskrnl.exe %BOOTCD_DIR%\disk\reactos +copy /Y hal\halx86\hal.dll %BOOTCD_DIR%\disk\reactos +copy /Y drivers\fs\vfat\vfatfs.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\fs\cdfs\cdfs.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\fs\ntfs\ntfs.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\dd\floppy\floppy.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\dd\blue\blue.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\input\keyboard\keyboard.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\storage\atapi\atapi.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\storage\scsiport\scsiport.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\storage\cdrom\cdrom.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\storage\disk\disk.sys %BOOTCD_DIR%\disk\reactos +copy /Y drivers\storage\class2\class2.sys %BOOTCD_DIR%\disk\reactos +copy /Y lib\ntdll\ntdll.dll %BOOTCD_DIR%\disk\reactos\system32 +copy /Y subsys\system\usetup\usetup.exe %BOOTCD_DIR%\disk\reactos\system32\smss.exe diff --git a/reactos/subsys/system/usetup/console.c b/reactos/subsys/system/usetup/console.c new file mode 100644 index 00000000000..bb5ca48e3f2 --- /dev/null +++ b/reactos/subsys/system/usetup/console.c @@ -0,0 +1,883 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/kernel32/misc/console.c + * PURPOSE: Win32 server console functions + * PROGRAMMER: ??? + * UPDATE HISTORY: + * 199901?? ?? Created + * 19990204 EA SetConsoleTitleA + * 19990306 EA Stubs + */ + +/* INCLUDES ******************************************************************/ + +#include +#include + +#include + +#include "usetup.h" +//#include +//#include +//#include + + +/* GLOBALS ******************************************************************/ + +static HANDLE StdInput = INVALID_HANDLE_VALUE; +static HANDLE StdOutput = INVALID_HANDLE_VALUE; + +static SHORT xScreen = 0; +static SHORT yScreen = 0; + + +NTSTATUS +GetConsoleScreenBufferInfo(PCONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo); + + +/* FUNCTIONS *****************************************************************/ + + + +NTSTATUS +AllocConsole(VOID) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING Name; + NTSTATUS Status; + CONSOLE_SCREEN_BUFFER_INFO csbi; + + /* Open the screen */ + RtlInitUnicodeString(&Name, + L"\\??\\BlueScreen"); + InitializeObjectAttributes(&ObjectAttributes, + &Name, + 0, + NULL, + NULL); + Status = NtCreateFile(&StdOutput, + FILE_ALL_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + 0, + FILE_OPEN, + 0, + NULL, + 0); + if (!NT_SUCCESS(Status)) + return(Status); + + /* Open the keyboard */ + RtlInitUnicodeString(&Name, + L"\\??\\Keyboard"); + InitializeObjectAttributes(&ObjectAttributes, + &Name, + 0, + NULL, + NULL); + Status = NtCreateFile(&StdInput, + FILE_ALL_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + 0, + FILE_OPEN, + 0, + NULL, + 0); + + GetConsoleScreenBufferInfo(&csbi); + + xScreen = csbi.dwSize.X; + yScreen = csbi.dwSize.Y; + + return(Status); +} + + +VOID +FreeConsole(VOID) +{ + if (StdInput != INVALID_HANDLE_VALUE) + NtClose(StdInput); + + if (StdOutput != INVALID_HANDLE_VALUE) + NtClose(StdOutput); +} + + + + +NTSTATUS +WriteConsole(PCHAR Buffer, + ULONG NumberOfCharsToWrite, + PULONG NumberOfCharsWritten) +{ + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS Status = STATUS_SUCCESS; + ULONG i; + + Status = NtWriteFile(StdOutput, + NULL, + NULL, + NULL, + &IoStatusBlock, + Buffer, + NumberOfCharsToWrite, + NULL, + NULL); + if (Status == STATUS_PENDING) + { + NtWaitForSingleObject(StdOutput, + FALSE, + NULL); + Status = IoStatusBlock.Status; + } + + if (NumberOfCharsWritten != NULL) + { + *NumberOfCharsWritten = IoStatusBlock.Information; + } + + return(Status); +} + + +#if 0 +/*-------------------------------------------------------------- + * ReadConsoleA + */ +WINBOOL +STDCALL +ReadConsoleA(HANDLE hConsoleInput, + LPVOID lpBuffer, + DWORD nNumberOfCharsToRead, + LPDWORD lpNumberOfCharsRead, + LPVOID lpReserved) +{ + KEY_EVENT_RECORD KeyEventRecord; + BOOL stat = TRUE; + PCHAR Buffer = (PCHAR)lpBuffer; + DWORD Result; + int i; + + for (i=0; (stat && iEventType == KEY_EVENT) && + (Buffer->Event.KeyEvent.bKeyDown == TRUE)) + break; + } +} + + +VOID +ConOutChar(CHAR c) +{ + ULONG Written; + + WriteConsole(&c, + 1, + &Written); +} + + +VOID +ConOutPuts(LPSTR szText) +{ + ULONG Written; + + WriteConsole(szText, + strlen(szText), + &Written); + WriteConsole("\n", + 1, + &Written); +} + + +VOID +ConOutPrintf(LPSTR szFormat, ...) +{ + CHAR szOut[256]; + DWORD dwWritten; + va_list arg_ptr; + + va_start(arg_ptr, szFormat); + vsprintf(szOut, szFormat, arg_ptr); + va_end(arg_ptr); + + WriteConsole(szOut, + strlen(szOut), + &dwWritten); +} + + + + + +SHORT +GetCursorX(VOID) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + + GetConsoleScreenBufferInfo(&csbi); + + return(csbi.dwCursorPosition.X); +} + + +SHORT +GetCursorY(VOID) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + + GetConsoleScreenBufferInfo(&csbi); + + return(csbi.dwCursorPosition.Y); +} + + +VOID +GetScreenSize(SHORT *maxx, + SHORT *maxy) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + + GetConsoleScreenBufferInfo(&csbi); + + if (maxx) + *maxx = csbi.dwSize.X; + + if (maxy) + *maxy = csbi.dwSize.Y; +} + + +VOID +SetCursorType(BOOL bInsert, + BOOL bVisible) +{ + CONSOLE_CURSOR_INFO cci; + + cci.dwSize = bInsert ? 10 : 99; + cci.bVisible = bVisible; + + SetConsoleCursorInfo(&cci); +} + + +VOID +SetCursorXY(SHORT x, + SHORT y) +{ + COORD coPos; + + coPos.X = x; + coPos.Y = y; + SetConsoleCursorPosition(coPos); +} + + +VOID +ClearScreen(VOID) +{ + COORD coPos; + ULONG Written; + + coPos.X = 0; + coPos.Y = 0; + + FillConsoleOutputCharacter(' ', + xScreen * yScreen, + coPos, + &Written); +} + + +VOID +SetStatusText(PCHAR Text) +{ + COORD coPos; + ULONG Written; + + coPos.X = 0; + coPos.Y = yScreen - 1; + + FillConsoleOutputAttribute(0x70, + xScreen, + coPos, + &Written); + + FillConsoleOutputCharacter(' ', + xScreen, + coPos, + &Written); + + WriteConsoleOutputCharacters(Text, + strlen(Text), + coPos); +} + + +VOID +SetTextXY(SHORT x, SHORT y, PCHAR Text) +{ + COORD coPos; + + coPos.X = x; + coPos.Y = y; + + WriteConsoleOutputCharacters(Text, + strlen(Text), + coPos); +} + +/* EOF */ diff --git a/reactos/subsys/system/usetup/makefile b/reactos/subsys/system/usetup/makefile new file mode 100644 index 00000000000..6b16ce7e0e6 --- /dev/null +++ b/reactos/subsys/system/usetup/makefile @@ -0,0 +1,21 @@ +# $Id: makefile,v 1.1 2002/09/08 18:28:43 ekohl Exp $ + +PATH_TO_TOP = ../../.. + +TARGET_TYPE = program + +TARGET_APPTYPE = native + +TARGET_NAME = usetup + +TARGET_INSTALLDIR = system32 + +TARGET_CFLAGS = -D__NTAPP__ + +TARGET_OBJECTS = $(TARGET_NAME).o console.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF \ No newline at end of file diff --git a/reactos/subsys/system/usetup/usetup.c b/reactos/subsys/system/usetup/usetup.c new file mode 100644 index 00000000000..a2b9133befd --- /dev/null +++ b/reactos/subsys/system/usetup/usetup.c @@ -0,0 +1,390 @@ +/* $Id: usetup.c,v 1.1 2002/09/08 18:28:43 ekohl Exp $ + * + * smss.c - Session Manager + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + * + * 19990529 (Emanuele Aliberti) + * Compiled successfully with egcs 1.1.2 + */ +#include +#include + +#include + +#include + +#include "usetup.h" + + +HANDLE ProcessHeap; + +/* FUNCTIONS ****************************************************************/ + +void +DisplayString(LPCWSTR lpwString) +{ + UNICODE_STRING us; + + RtlInitUnicodeString(&us, lpwString); + NtDisplayString(&us); +} + + +void +PrintString(char* fmt,...) +{ + char buffer[512]; + va_list ap; + UNICODE_STRING UnicodeString; + ANSI_STRING AnsiString; + + va_start(ap, fmt); + vsprintf(buffer, fmt, ap); + va_end(ap); + + RtlInitAnsiString(&AnsiString, buffer); + RtlAnsiStringToUnicodeString(&UnicodeString, + &AnsiString, + TRUE); + NtDisplayString(&UnicodeString); + RtlFreeUnicodeString(&UnicodeString); +} + + +/* + * Confirm quit setup + * RETURNS + * TRUE: Quit setup. + * FALSE: Don't quit setup. + */ +static BOOL +ConfirmQuit(PINPUT_RECORD Ir) +{ + SHORT xScreen; + SHORT yScreen; + SHORT yTop; + SHORT xLeft; + BOOL Result = FALSE; + PUSHORT pAttributes = NULL; + PUCHAR pCharacters = NULL; + COORD Pos; + + GetScreenSize(&xScreen, &yScreen); + yTop = (yScreen - 10) / 2; + xLeft = (xScreen - 52) / 2; + + /* Save screen */ + Pos.X = 0; + Pos.Y = 0; + pAttributes = (PUSHORT)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + xScreen * yScreen * sizeof(USHORT)); + ReadConsoleOutputAttributes(pAttributes, + xScreen * yScreen, + Pos, + NULL); + pCharacters = (PUCHAR)RtlAllocateHeap(RtlGetProcessHeap(), + 0, + xScreen * yScreen * sizeof(UCHAR)); + ReadConsoleOutputCharacters(pCharacters, + xScreen * yScreen, + Pos, + NULL); + + /* Draw popup window */ + SetTextXY(xLeft, yTop, + "+----------------------------------------------------+"); + SetTextXY(xLeft, yTop + 1, + "| ReactOS 0.0.20 is not completely installed on your |"); + SetTextXY(xLeft, yTop + 2, + "| computer. If you quit Setup now, you will need to |"); + SetTextXY(xLeft, yTop + 3, + "| run Setup again to install ReactOS. |"); + SetTextXY(xLeft, yTop + 4, + "| |"); + SetTextXY(xLeft, yTop + 5, + "| * Press ENTER to continue Setup. |"); + SetTextXY(xLeft, yTop + 6, + "| * Press F3 to quit Setup. |"); + SetTextXY(xLeft, yTop + 7, + "+----------------------------------------------------+"); + SetTextXY(xLeft, yTop + 8, + "| F3= Quit ENTER = Continue |"); + SetTextXY(xLeft, yTop + 9, + "+----------------------------------------------------+"); + + while(TRUE) + { + ConInKey(Ir); + + if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && + (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) + { + Result = TRUE; + break; + } + else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) + { + Result = FALSE; + break; + } + } + + /* Restore screen */ + WriteConsoleOutputAttributes(pAttributes, + xScreen * yScreen, + Pos, + NULL); + + WriteConsoleOutputCharacters(pCharacters, + xScreen * yScreen, + Pos); + RtlFreeHeap(RtlGetProcessHeap(), + 0, + pAttributes); + RtlFreeHeap(RtlGetProcessHeap(), + 0, + pCharacters); + + return(Result); +} + + + +static BOOL +InstallIntroPage(PINPUT_RECORD Ir) +{ + ClearScreen(); + + SetTextXY(4, 3, " ReactOS 0.0.20 Setup "); + SetTextXY(4, 4, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"); + + SetTextXY(6, 8, "Install intro page"); + +#if 0 + SetTextXY(6, 10, "This part of the setup copies the ReactOS Operating System to your"); + SetTextXY(6, 11, "computer and prepairs the second part of the setup."); + + SetTextXY(8, 14, "\xf9 Press ENTER to start the ReactOS setup."); + + SetTextXY(8, 17, "\xf9 Press F3 to quit without installing ReactOS."); +#endif + + SetStatusText(" ENTER = Continue F3 = Quit"); + + while(TRUE) + { + ConInKey(Ir); + + if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && + (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) + { + if (ConfirmQuit(Ir) == TRUE) + return(FALSE); + } + else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) + break; + } + + return(TRUE); +} + + +#if 0 +static BOOL +RepairIntroPage(PINPUT_RECORD Ir) +{ + ClearScreen(); + +} +#endif + + +/* + * First setup page + * RETURNS + * TRUE: setup/repair completed successfully + * FALSE: setup/repair terminated by user + */ +static BOOL +IntroPage(PINPUT_RECORD Ir) +{ +CHECKPOINT1; + ClearScreen(); + + SetTextXY(4, 3, " ReactOS 0.0.20 Setup "); + SetTextXY(4, 4, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"); + + SetTextXY(6, 8, "Welcome to the ReactOS Setup"); + + SetTextXY(6, 10, "This part of the setup copies the ReactOS Operating System to your"); + SetTextXY(6, 11, "computer and prepares the second part of the setup."); + + SetTextXY(8, 14, "\xf9 Press ENTER to install ReactOS."); + +#if 0 + SetTextXY(8, 16, "\xf9 Press R to repair ReactOS."); +#endif + + SetTextXY(8, 17, "\xf9 Press F3 to quit without installing ReactOS."); + + SetStatusText(" ENTER = Continue F3 = Quit"); +CHECKPOINT1; + + while(TRUE) + { +CHECKPOINT1; + ConInKey(Ir); +CHECKPOINT1; + + if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && + (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) + { + if (ConfirmQuit(Ir) == TRUE) + return(FALSE); + } + else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) + { + return(InstallIntroPage(Ir)); + } +#if 0 + else if (toupper(Ir->Event.KeyEvent.uChar.AsciiChar) == 'R') + { + return(RepairIntroPage(Ir)); + } +#endif + } + + return(FALSE); +} + + +static VOID +QuitPage(PINPUT_RECORD Ir) +{ + ClearScreen(); + + SetTextXY(4, 3, " ReactOS 0.0.20 Setup "); + SetTextXY(4, 4, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"); + + + SetTextXY(6, 10, "ReactOS is not completely installed"); + + SetTextXY(8, 10, "Remove floppy disk from drive A:."); + SetTextXY(9, 10, "Remove cdrom from cdrom drive."); + + SetTextXY(11, 10, "Press ENTER to reboot your computer."); + + SetStatusText(" ENTER = Reboot computer"); + + while(TRUE) + { + ConInKey(Ir); + + if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) + { + return; + } + } +} + + +static VOID +SuccessPage(PINPUT_RECORD Ir) +{ + ClearScreen(); + + SetTextXY(4, 3, " ReactOS 0.0.20 Setup "); + SetTextXY(4, 4, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"); + + + SetTextXY(6, 10, "The basic components of ReactOS have been installed successfully."); + + SetTextXY(8, 10, "Remove floppy disk from drive A:."); + SetTextXY(9, 10, "Remove cdrom from cdrom drive."); + + SetTextXY(11, 10, "Press ENTER to reboot your computer."); + + SetStatusText(" ENTER = Reboot computer"); + + while(TRUE) + { + ConInKey(Ir); + + if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) + { + return; + } + } +} + + +VOID +NtProcessStartup(PPEB Peb) +{ + NTSTATUS Status; + INPUT_RECORD Ir; + + RtlNormalizeProcessParams(Peb->ProcessParameters); + + ProcessHeap = Peb->ProcessHeap; + + Status = AllocConsole(); + if (!NT_SUCCESS(Status)) + { + PrintString("Console initialization failed! (Status %lx)\n", Status); + goto ByeBye; + } + +CHECKPOINT1; + if (IntroPage(&Ir) == TRUE) + { + /* Display success message */ + SetCursorXY(5, 49); + ConOutPrintf("Press any key to continue\n"); + ConInKey(&Ir); +// SuccessPage(&Ir) + } + else + { + /* Display termination message */ + QuitPage(&Ir); + } + + /* Reboot */ + +ConsoleExit: + FreeConsole(); + + PrintString("*** System halted ***\n", Status); + for(;;); + +ByeBye: + /* Raise a hard error (crash the system/BSOD) */ + NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, + 0,0,0,0,0); + +// NtTerminateProcess(NtCurrentProcess(), 0); +} + +/* EOF */ diff --git a/reactos/subsys/system/usetup/usetup.h b/reactos/subsys/system/usetup/usetup.h new file mode 100644 index 00000000000..e75fd423c30 --- /dev/null +++ b/reactos/subsys/system/usetup/usetup.h @@ -0,0 +1,95 @@ +/* +*/ + +#ifndef __CONSOLE_H__ +#define __CONSOLE_H__ + + +#define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0); +#define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); + +#define DPRINT(args...) +#define CHECKPOINT + + +extern HANDLE ProcessHeap; + + +/* console.c */ + +NTSTATUS +AllocConsole(VOID); + +VOID +FreeConsole(VOID); + + +NTSTATUS +ReadConsoleOutputCharacters(LPSTR lpCharacter, + ULONG nLength, + COORD dwReadCoord, + PULONG lpNumberOfCharsRead); + +NTSTATUS +ReadConsoleOutputAttributes(PUSHORT lpAttribute, + ULONG nLength, + COORD dwReadCoord, + PULONG lpNumberOfAttrsRead); + +NTSTATUS +WriteConsoleOutputCharacters(LPCSTR lpCharacter, + ULONG nLength, + COORD dwWriteCoord); + +NTSTATUS +WriteConsoleOutputAttributes(CONST USHORT *lpAttribute, + ULONG nLength, + COORD dwWriteCoord, + PULONG lpNumberOfAttrsWritten); + + +VOID +ConInKey(PINPUT_RECORD Buffer); + +VOID +ConOutChar(CHAR c); + +VOID +ConOutPuts(LPSTR szText); + +VOID +ConOutPrintf(LPSTR szFormat, ...); + +SHORT +GetCursorX(VOID); + +SHORT +GetCursorY(VOID); + +VOID +GetScreenSize(SHORT *maxx, + SHORT *maxy); + + +VOID +SetCursorType(BOOL bInsert, + BOOL bVisible); + +VOID +SetCursorXY(SHORT x, + SHORT y); + + +VOID +ClearScreen(VOID); + +VOID +SetStatusText(PCHAR Text); + +VOID +SetTextXY(SHORT x, SHORT y, PCHAR Text); + + +#endif /* __CONSOLE_H__*/ + +/* EOF */ \ No newline at end of file diff --git a/reactos/subsys/system/usetup/usetup.rc b/reactos/subsys/system/usetup/usetup.rc new file mode 100644 index 00000000000..0ff6817aa2f --- /dev/null +++ b/reactos/subsys/system/usetup/usetup.rc @@ -0,0 +1,38 @@ +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD + PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", RES_STR_COMPANY_NAME + VALUE "FileDescription", "ReactOS Setup\0" + VALUE "FileVersion", RES_STR_FILE_VERSION + VALUE "InternalName", "usetup\0" + VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "usetup.exe\0" + VALUE "ProductName", RES_STR_PRODUCT_NAME + VALUE "ProductVersion", RES_STR_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END +