mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Started work on second stage setup.
svn path=/trunk/; revision=4636
This commit is contained in:
parent
ec67470a38
commit
98ed7cd2b1
18 changed files with 691 additions and 14 deletions
|
@ -34,8 +34,8 @@ LIB_FSLIB = vfatlib
|
||||||
# advapi32 crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll ole32
|
# advapi32 crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll ole32
|
||||||
# oleaut32 epsapi psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
|
# oleaut32 epsapi psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
|
||||||
DLLS = rosrtl advapi32 crtdll fmifs freetype gdi32 kernel32 packet msafd msvcrt ntdll \
|
DLLS = rosrtl advapi32 crtdll fmifs freetype gdi32 kernel32 packet msafd msvcrt ntdll \
|
||||||
epsapi psapi secur32 user32 version winedbgc winspool ws2help ws2_32 wsock32 \
|
epsapi psapi secur32 syssetup user32 version winedbgc winspool ws2help ws2_32 \
|
||||||
wshirda zlib #winmm
|
wsock32 wshirda zlib
|
||||||
|
|
||||||
SUBSYS = smss win32k csrss ntvdm
|
SUBSYS = smss win32k csrss ntvdm
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ NET_DEVICE_DRIVERS = ne2000
|
||||||
STORAGE_DRIVERS = atapi cdrom class2 disk scsiport
|
STORAGE_DRIVERS = atapi cdrom class2 disk scsiport
|
||||||
|
|
||||||
# System applications
|
# System applications
|
||||||
# autochk cmd services format gstart usetup winlogon
|
# autochk cmd format gstart services setup usetup winlogon
|
||||||
SYS_APPS = autochk cmd services format gstart usetup winlogon
|
SYS_APPS = autochk cmd format gstart services setup usetup winlogon
|
||||||
|
|
||||||
# System services
|
# System services
|
||||||
# rpcss eventlog
|
# rpcss eventlog
|
||||||
|
|
|
@ -15,6 +15,7 @@ lib/ole32 TARGET_BASE=0x77a50000
|
||||||
lib/oleaut32 TARGET_BASE=0x76260000
|
lib/oleaut32 TARGET_BASE=0x76260000
|
||||||
lib/secur32 TARGET_BASE=0x10000000
|
lib/secur32 TARGET_BASE=0x10000000
|
||||||
lib/shell32 TARGET_BASE=0x77260000
|
lib/shell32 TARGET_BASE=0x77260000
|
||||||
|
lib/syssetup TARGET_BASE=0x74A30000
|
||||||
lib/user32 TARGET_BASE=0x77e70000
|
lib/user32 TARGET_BASE=0x77e70000
|
||||||
lib/version TARGET_BASE=0x77a90000
|
lib/version TARGET_BASE=0x77a90000
|
||||||
lib/winspool TARGET_BASE=0x77800000
|
lib/winspool TARGET_BASE=0x77800000
|
||||||
|
|
|
@ -108,6 +108,7 @@ copy /Y lib\oleaut32\oleaut32.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\packet\packet.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\packet\packet.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\secur32\secur32.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\secur32\secur32.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\shell32\shell32.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\shell32\shell32.dll %BOOTCD_DIR%\disk\install
|
||||||
|
copy /Y lib\syssetup\syssetup.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\user32\user32.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\user32\user32.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\version\version.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\version\version.dll %BOOTCD_DIR%\disk\install
|
||||||
copy /Y lib\winedbgc\winedbgc.dll %BOOTCD_DIR%\disk\install
|
copy /Y lib\winedbgc\winedbgc.dll %BOOTCD_DIR%\disk\install
|
||||||
|
@ -123,9 +124,10 @@ copy /Y subsys\csrss\csrss.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\ntvdm\ntvdm.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\ntvdm\ntvdm.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\smss\smss.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\smss\smss.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\system\autochk\autochk.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\system\autochk\autochk.exe %BOOTCD_DIR%\disk\install
|
||||||
|
copy /Y subsys\system\cmd\cmd.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\system\lsass\lsass.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\system\lsass\lsass.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\system\services\services.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\system\services\services.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\system\cmd\cmd.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\system\setup\setup.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\system\winlogon\winlogon.exe %BOOTCD_DIR%\disk\install
|
copy /Y subsys\system\winlogon\winlogon.exe %BOOTCD_DIR%\disk\install
|
||||||
copy /Y subsys\win32k\win32k.sys %BOOTCD_DIR%\disk\install
|
copy /Y subsys\win32k\win32k.sys %BOOTCD_DIR%\disk\install
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ ntdll.dll = 2
|
||||||
packet.dll = 2
|
packet.dll = 2
|
||||||
secur32.dll = 2
|
secur32.dll = 2
|
||||||
;shell32.dll = 2
|
;shell32.dll = 2
|
||||||
|
syssetup.dll = 2
|
||||||
user32.dll = 2
|
user32.dll = 2
|
||||||
version.dll = 2
|
version.dll = 2
|
||||||
winedbgc.dll = 2
|
winedbgc.dll = 2
|
||||||
|
@ -77,15 +78,16 @@ ws2_32.dll = 2
|
||||||
ws2help.dll = 2
|
ws2help.dll = 2
|
||||||
wshirda.dll = 2
|
wshirda.dll = 2
|
||||||
|
|
||||||
eventlog.exe = 2
|
|
||||||
rpcss.exe = 2
|
|
||||||
csrss.exe = 2
|
|
||||||
ntvdm.exe = 2
|
|
||||||
smss.exe = 2
|
|
||||||
autochk.exe = 2
|
autochk.exe = 2
|
||||||
;lsass.exe = 2
|
|
||||||
services.exe = 2
|
|
||||||
cmd.exe = 2
|
cmd.exe = 2
|
||||||
|
csrss.exe = 2
|
||||||
|
eventlog.exe = 2
|
||||||
|
;lsass.exe = 2
|
||||||
|
ntvdm.exe = 2
|
||||||
|
rpcss.exe = 2
|
||||||
|
setup.exe = 2
|
||||||
|
smss.exe = 2
|
||||||
|
services.exe = 2
|
||||||
winlogon.exe = 2
|
winlogon.exe = 2
|
||||||
|
|
||||||
win32k.sys = 2
|
win32k.sys = 2
|
||||||
|
|
55
reactos/include/syssetup.h
Normal file
55
reactos/include/syssetup.h
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/* $Id: syssetup.h,v 1.1 2003/05/02 18:07:10 ekohl Exp $
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* syssetup.h
|
||||||
|
*
|
||||||
|
* System setup API, native interface
|
||||||
|
*
|
||||||
|
* This file is part of the ReactOS Operating System.
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Created by Eric Kohl <ekohl@rz-online.de>
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||||||
|
*
|
||||||
|
* This source code is offered for use in the public domain. You may
|
||||||
|
* use, modify or distribute it freely.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful but
|
||||||
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||||
|
* DISCLAMED. This includes but is not limited to warranties of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SYSSETUP_H_INCLUDED__
|
||||||
|
#define __SYSSETUP_H_INCLUDED__
|
||||||
|
|
||||||
|
/* System setup APIs */
|
||||||
|
|
||||||
|
DWORD STDCALL
|
||||||
|
InstallReactOS (HINSTANCE hInstance);
|
||||||
|
|
||||||
|
|
||||||
|
/* Log File APIs */
|
||||||
|
|
||||||
|
#define SEVERITY_INFORMATION 0
|
||||||
|
#define SEVERITY_WARNING 1
|
||||||
|
#define SEVERITY_ERROR 2
|
||||||
|
#define SEVERITY_FATAL_ERROR 3
|
||||||
|
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
InitializeSetupActionLog (BOOL bDeleteOldLogFile);
|
||||||
|
|
||||||
|
VOID STDCALL
|
||||||
|
TerminateSetupActionLog (VOID);
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
LogItem (DWORD dwSeverity,
|
||||||
|
LPWSTR lpMessageText);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __SYSSETUP_H_INCLUDED__ */
|
||||||
|
|
||||||
|
/* EOF */
|
|
@ -66,8 +66,9 @@ copy drivers\storage\disk\disk.sys %ROS_INSTALL%\system32\drivers
|
||||||
copy drivers\storage\class2\class2.sys %ROS_INSTALL%\system32\drivers
|
copy drivers\storage\class2\class2.sys %ROS_INSTALL%\system32\drivers
|
||||||
copy subsys\system\autochk\autochk.exe %ROS_INSTALL%\system32
|
copy subsys\system\autochk\autochk.exe %ROS_INSTALL%\system32
|
||||||
copy subsys\system\cmd\cmd.exe %ROS_INSTALL%\system32
|
copy subsys\system\cmd\cmd.exe %ROS_INSTALL%\system32
|
||||||
copy subsys\system\winlogon\winlogon.exe %ROS_INSTALL%\system32
|
|
||||||
copy subsys\system\services\services.exe %ROS_INSTALL%\system32
|
copy subsys\system\services\services.exe %ROS_INSTALL%\system32
|
||||||
|
copy subsys\system\setup\setup.exe %ROS_INSTALL%\system32
|
||||||
|
copy subsys\system\winlogon\winlogon.exe %ROS_INSTALL%\system32
|
||||||
copy services\eventlog\eventlog.exe %ROS_INSTALL%\system32
|
copy services\eventlog\eventlog.exe %ROS_INSTALL%\system32
|
||||||
copy services\rpcss\rpcss.exe %ROS_INSTALL%\system32
|
copy services\rpcss\rpcss.exe %ROS_INSTALL%\system32
|
||||||
copy lib\advapi32\advapi32.dll %ROS_INSTALL%\system32
|
copy lib\advapi32\advapi32.dll %ROS_INSTALL%\system32
|
||||||
|
@ -85,6 +86,7 @@ copy lib\packet\packet.dll %ROS_INSTALL%\system32
|
||||||
copy lib\secur32\secur32.dll %ROS_INSTALL%\system32
|
copy lib\secur32\secur32.dll %ROS_INSTALL%\system32
|
||||||
copy lib\shell32\roshel32.dll %ROS_INSTALL%\system32
|
copy lib\shell32\roshel32.dll %ROS_INSTALL%\system32
|
||||||
copy lib\snmpapi\snmpapi.dll %ROS_INSTALL%\system32
|
copy lib\snmpapi\snmpapi.dll %ROS_INSTALL%\system32
|
||||||
|
copy lib\syssetup\syssetup.dll %ROS_INSTALL%\system32
|
||||||
copy lib\user32\user32.dll %ROS_INSTALL%\system32
|
copy lib\user32\user32.dll %ROS_INSTALL%\system32
|
||||||
copy lib\version\version.dll %ROS_INSTALL%\system32
|
copy lib\version\version.dll %ROS_INSTALL%\system32
|
||||||
copy lib\winedbgc\winedbgc.dll %ROS_INSTALL%\system32
|
copy lib\winedbgc\winedbgc.dll %ROS_INSTALL%\system32
|
||||||
|
|
4
reactos/lib/syssetup/.cvsignore
Normal file
4
reactos/lib/syssetup/.cvsignore
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
*.dll
|
||||||
|
*.coff
|
||||||
|
*.sym
|
||||||
|
*.o
|
23
reactos/lib/syssetup/Makefile
Normal file
23
reactos/lib/syssetup/Makefile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# $Id: Makefile,v 1.1 2003/05/02 18:07:55 ekohl Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
TARGET_TYPE = dynlink
|
||||||
|
|
||||||
|
TARGET_NAME = syssetup
|
||||||
|
|
||||||
|
TARGET_BASE = 0x74A30000
|
||||||
|
|
||||||
|
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||||
|
|
||||||
|
TARGET_CFLAGS = -Wall -Werror -fno-builtin
|
||||||
|
|
||||||
|
TARGET_LFLAGS = -nostartfiles -nostdlib
|
||||||
|
|
||||||
|
TARGET_OBJECTS = dllmain.o install.o logfile.o
|
||||||
|
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
# EOF
|
47
reactos/lib/syssetup/dllmain.c
Normal file
47
reactos/lib/syssetup/dllmain.c
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2003 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program 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 program 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 program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: dllmain.c,v 1.1 2003/05/02 18:07:55 ekohl Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS system libraries
|
||||||
|
* PURPOSE: Main file
|
||||||
|
* FILE: lib/syssetup/dllmain.c
|
||||||
|
* PROGRAMER: Eric Kohl (ekohl@rz-online.de)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
DllMain (HINSTANCE hInstance,
|
||||||
|
DWORD dwReason,
|
||||||
|
LPVOID lpReserved)
|
||||||
|
{
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
60
reactos/lib/syssetup/install.c
Normal file
60
reactos/lib/syssetup/install.c
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2003 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program 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 program 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 program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: install.c,v 1.1 2003/05/02 18:07:55 ekohl Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS system libraries
|
||||||
|
* PURPOSE: System setup
|
||||||
|
* FILE: lib/syssetup/install.c
|
||||||
|
* PROGRAMER: Eric Kohl (ekohl@rz-online.de)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#include <syssetup.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
DWORD STDCALL
|
||||||
|
InstallReactOS (HINSTANCE hInstance)
|
||||||
|
{
|
||||||
|
OutputDebugString ("InstallReactOS() called\n");
|
||||||
|
|
||||||
|
if (!InitializeSetupActionLog (FALSE))
|
||||||
|
{
|
||||||
|
OutputDebugString ("InitializeSetupActionLog() failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
LogItem (SEVERITY_INFORMATION,
|
||||||
|
L"ReactOS Setup starting");
|
||||||
|
|
||||||
|
LogItem (SEVERITY_FATAL_ERROR,
|
||||||
|
L"Buuuuuuaaaah!");
|
||||||
|
|
||||||
|
LogItem (SEVERITY_INFORMATION,
|
||||||
|
L"ReactOS Setup finished");
|
||||||
|
|
||||||
|
TerminateSetupActionLog ();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
189
reactos/lib/syssetup/logfile.c
Normal file
189
reactos/lib/syssetup/logfile.c
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2003 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program 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 program 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 program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/* $Id: logfile.c,v 1.1 2003/05/02 18:07:55 ekohl Exp $
|
||||||
|
*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS system libraries
|
||||||
|
* PURPOSE: Log file functions
|
||||||
|
* FILE: lib/syssetup/logfile.c
|
||||||
|
* PROGRAMER: Eric Kohl (ekohl@rz-online.de)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <ntos.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#include <syssetup.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
HANDLE hLogFile = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
InitializeSetupActionLog (BOOL bDeleteOldLogFile)
|
||||||
|
{
|
||||||
|
WCHAR szFileName[MAX_PATH];
|
||||||
|
|
||||||
|
GetWindowsDirectoryW (szFileName,
|
||||||
|
MAX_PATH);
|
||||||
|
|
||||||
|
if (szFileName[wcslen (szFileName)] != L'\\')
|
||||||
|
{
|
||||||
|
wcsncat (szFileName,
|
||||||
|
L"\\",
|
||||||
|
MAX_PATH);
|
||||||
|
}
|
||||||
|
wcsncat (szFileName,
|
||||||
|
L"setuplog.txt",
|
||||||
|
MAX_PATH);
|
||||||
|
|
||||||
|
if (bDeleteOldLogFile != FALSE)
|
||||||
|
{
|
||||||
|
SetFileAttributesW (szFileName,
|
||||||
|
FILE_ATTRIBUTE_NORMAL);
|
||||||
|
DeleteFileW (szFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
hLogFile = CreateFileW (szFileName,
|
||||||
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
|
NULL,
|
||||||
|
OPEN_ALWAYS,
|
||||||
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
|
NULL);
|
||||||
|
if (hLogFile == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
hLogFile = NULL;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID STDCALL
|
||||||
|
TerminateSetupActionLog (VOID)
|
||||||
|
{
|
||||||
|
if (hLogFile != NULL)
|
||||||
|
{
|
||||||
|
CloseHandle (hLogFile);
|
||||||
|
hLogFile = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
LogItem (DWORD dwSeverity,
|
||||||
|
LPWSTR lpMessageText)
|
||||||
|
{
|
||||||
|
LPSTR lpNewLine = "\r\n";
|
||||||
|
LPSTR lpSeverityString;
|
||||||
|
LPSTR lpMessageString;
|
||||||
|
DWORD dwMessageLength;
|
||||||
|
DWORD dwMessageSize;
|
||||||
|
DWORD dwWritten;
|
||||||
|
|
||||||
|
/* Get the severity code string */
|
||||||
|
switch (dwSeverity)
|
||||||
|
{
|
||||||
|
case SEVERITY_INFORMATION:
|
||||||
|
lpSeverityString = "Information : ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SEVERITY_WARNING:
|
||||||
|
lpSeverityString = "Warning : ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SEVERITY_ERROR:
|
||||||
|
lpSeverityString = "Error : ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SEVERITY_FATAL_ERROR:
|
||||||
|
lpSeverityString = "Fatal error : ";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
lpSeverityString = "Unknown : ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get length of the converted ansi string */
|
||||||
|
dwMessageLength = wcslen(lpMessageText) * sizeof(WCHAR);
|
||||||
|
RtlUnicodeToMultiByteSize (&dwMessageSize,
|
||||||
|
lpMessageText,
|
||||||
|
dwMessageLength);
|
||||||
|
|
||||||
|
/* Allocate message string buffer */
|
||||||
|
lpMessageString = (LPSTR) HeapAlloc (GetProcessHeap (),
|
||||||
|
HEAP_ZERO_MEMORY,
|
||||||
|
dwMessageSize);
|
||||||
|
if (lpMessageString == NULL)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Convert unicode to ansi */
|
||||||
|
RtlUnicodeToMultiByteN (lpMessageString,
|
||||||
|
dwMessageSize,
|
||||||
|
NULL,
|
||||||
|
lpMessageText,
|
||||||
|
dwMessageLength);
|
||||||
|
|
||||||
|
/* Set file pointer to the end of the file */
|
||||||
|
SetFilePointer (hLogFile,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
FILE_END);
|
||||||
|
|
||||||
|
/* Write severity code */
|
||||||
|
WriteFile (hLogFile,
|
||||||
|
lpSeverityString,
|
||||||
|
strlen (lpSeverityString),
|
||||||
|
&dwWritten,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Write message string */
|
||||||
|
WriteFile (hLogFile,
|
||||||
|
lpMessageString,
|
||||||
|
dwMessageSize,
|
||||||
|
&dwWritten,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Write newline */
|
||||||
|
WriteFile (hLogFile,
|
||||||
|
lpNewLine,
|
||||||
|
2,
|
||||||
|
&dwWritten,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
HeapFree (GetProcessHeap (),
|
||||||
|
0,
|
||||||
|
lpMessageString);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
29
reactos/lib/syssetup/syssetup.def
Normal file
29
reactos/lib/syssetup/syssetup.def
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
LIBRARY SYSSETUP.DLL
|
||||||
|
EXPORTS
|
||||||
|
;ApplyAcls
|
||||||
|
;DevInstallW
|
||||||
|
;GenerateScsiHwIdList
|
||||||
|
InitializeSetupActionLog@4
|
||||||
|
InstallReactOS@4
|
||||||
|
;KeyboardClassInstaller
|
||||||
|
;LogItem
|
||||||
|
;LogItem0
|
||||||
|
;LogItem1
|
||||||
|
;LogItem2
|
||||||
|
;LogItem3
|
||||||
|
;LogItemN
|
||||||
|
;MouseClassInstaller
|
||||||
|
;PnPInitializationThread
|
||||||
|
;RepairStartMenuItems
|
||||||
|
;ReportError
|
||||||
|
;ScsiClassInstaller
|
||||||
|
;SetupChangeFontSize
|
||||||
|
;SetupChangeLocale
|
||||||
|
;SetupCreateOptionalComponentsPage
|
||||||
|
;SetupInfObjectInstallActionW
|
||||||
|
;SetupSetLargeDialogFont
|
||||||
|
;TapeClassInstaller
|
||||||
|
;TerminateSetupActionLog
|
||||||
|
;UpgradePrinters
|
||||||
|
;ViewSetupActionLog
|
||||||
|
; EOF
|
29
reactos/lib/syssetup/syssetup.edf
Normal file
29
reactos/lib/syssetup/syssetup.edf
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
LIBRARY SYSSETUP.DLL
|
||||||
|
EXPORTS
|
||||||
|
;ApplyAcls
|
||||||
|
;DevInstallW
|
||||||
|
;GenerateScsiHwIdList
|
||||||
|
InitializeSetupActionLog=InitializeSetupActionLog@4
|
||||||
|
InstallReactOS=InstallReactOS@4
|
||||||
|
;KeyboardClassInstaller
|
||||||
|
LogItem=LogItem@8
|
||||||
|
;LogItem0
|
||||||
|
;LogItem1
|
||||||
|
;LogItem2
|
||||||
|
;LogItem3
|
||||||
|
;LogItemN
|
||||||
|
;MouseClassInstaller
|
||||||
|
;PnPInitializationThread
|
||||||
|
;RepairStartMenuItems
|
||||||
|
;ReportError
|
||||||
|
;ScsiClassInstaller
|
||||||
|
;SetupChangeFontSize
|
||||||
|
;SetupChangeLocale
|
||||||
|
;SetupCreateOptionalComponentsPage
|
||||||
|
;SetupInfObjectInstallActionW
|
||||||
|
;SetupSetLargeDialogFont
|
||||||
|
;TapeClassInstaller
|
||||||
|
TerminateSetupActionLog=TerminateSetupActionLog@0
|
||||||
|
;UpgradePrinters
|
||||||
|
;ViewSetupActionLog
|
||||||
|
; EOF
|
38
reactos/lib/syssetup/syssetup.rc
Normal file
38
reactos/lib/syssetup/syssetup.rc
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#include <defines.h>
|
||||||
|
#include <reactos/resource.h>
|
||||||
|
|
||||||
|
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", "System Setup DLL\0"
|
||||||
|
VALUE "FileVersion", RES_STR_FILE_VERSION
|
||||||
|
VALUE "InternalName", "syssetup\0"
|
||||||
|
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||||
|
VALUE "OriginalFilename", "syssetup.dll\0"
|
||||||
|
VALUE "ProductName", RES_STR_PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
5
reactos/subsys/system/setup/.cvsignore
Normal file
5
reactos/subsys/system/setup/.cvsignore
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
*.coff
|
||||||
|
*.d
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.sym
|
25
reactos/subsys/system/setup/makefile
Normal file
25
reactos/subsys/system/setup/makefile
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# $Id: makefile,v 1.1 2003/05/02 18:08:39 ekohl Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../../..
|
||||||
|
|
||||||
|
TARGET_TYPE = program
|
||||||
|
|
||||||
|
TARGET_APPTYPE = windows
|
||||||
|
|
||||||
|
TARGET_NAME = setup
|
||||||
|
|
||||||
|
TARGET_INSTALLDIR = system32
|
||||||
|
|
||||||
|
TARGET_SDKLIBS = kernel32.a
|
||||||
|
|
||||||
|
TARGET_CFLAGS = -DUNICODE
|
||||||
|
|
||||||
|
TARGET_LFLAGS =
|
||||||
|
|
||||||
|
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
||||||
|
|
||||||
|
# EOF
|
128
reactos/subsys/system/setup/setup.c
Normal file
128
reactos/subsys/system/setup/setup.c
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
/*
|
||||||
|
* ReactOS kernel
|
||||||
|
* Copyright (C) 2003 ReactOS Team
|
||||||
|
*
|
||||||
|
* This program 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 program 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 program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS GUI/console setup
|
||||||
|
* FILE: subsys/system/setup/setup.c
|
||||||
|
* PURPOSE: Second stage setup
|
||||||
|
* PROGRAMMER: Eric Kohl
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#include <syssetup.h>
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
|
||||||
|
typedef DWORD STDCALL (*PINSTALL_REACTOS)(HINSTANCE hInstance);
|
||||||
|
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
LPTSTR lstrchr(LPCTSTR s, TCHAR c)
|
||||||
|
{
|
||||||
|
while (*s)
|
||||||
|
{
|
||||||
|
if (*s == c)
|
||||||
|
return (LPTSTR)s;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == (TCHAR)0)
|
||||||
|
return (LPTSTR)s;
|
||||||
|
|
||||||
|
return (LPTSTR)NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static VOID
|
||||||
|
RunNewSetup (HINSTANCE hInstance)
|
||||||
|
{
|
||||||
|
HMODULE hDll;
|
||||||
|
PINSTALL_REACTOS InstallReactOS;
|
||||||
|
|
||||||
|
hDll = LoadLibrary (TEXT("syssetup"));
|
||||||
|
if (hDll == NULL)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
OutputDebugString (TEXT("Failed to load 'syssetup'!\n"));
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
OutputDebugString (TEXT("Loaded 'syssetup'!\n"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
|
||||||
|
if (InstallReactOS == NULL)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
OutputDebugString (TEXT("Failed to get address for 'InstallReactOS()'!\n"));
|
||||||
|
#endif
|
||||||
|
FreeLibrary (hDll);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
InstallReactOS (hInstance);
|
||||||
|
|
||||||
|
FreeLibrary (hDll);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int STDCALL
|
||||||
|
WinMain (HINSTANCE hInstance,
|
||||||
|
HINSTANCE hPrevInstance,
|
||||||
|
LPSTR lpCmdLine,
|
||||||
|
int nShowCmd)
|
||||||
|
{
|
||||||
|
LPTSTR CmdLine;
|
||||||
|
LPTSTR p;
|
||||||
|
|
||||||
|
CmdLine = GetCommandLine ();
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
OutputDebugString (TEXT("CmdLine: <"));
|
||||||
|
OutputDebugString (CmdLine);
|
||||||
|
OutputDebugString (TEXT(">\n"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
p = lstrchr (CmdLine, TEXT('-'));
|
||||||
|
if (p == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!lstrcmpi (p, TEXT("-newsetup")))
|
||||||
|
{
|
||||||
|
RunNewSetup (hInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Add new setup types here */
|
||||||
|
else if (...)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
38
reactos/subsys/system/setup/setup.rc
Normal file
38
reactos/subsys/system/setup/setup.rc
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#include <defines.h>
|
||||||
|
#include <reactos/resource.h>
|
||||||
|
|
||||||
|
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", "setup\0"
|
||||||
|
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||||
|
VALUE "OriginalFilename", "setup.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
|
||||||
|
|
Loading…
Reference in a new issue