ReactOS 0.4.15-dev-5669-g09dde2c
setup.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS GUI/console setup
4 * FILE: base/setup/setup/setup.c
5 * PURPOSE: Second stage setup
6 * PROGRAMMER: Eric Kohl
7 */
8
9#include <stdarg.h>
10#include <windef.h>
11#include <winbase.h>
12
13#define NDEBUG
14#include <debug.h>
15
17
18/* FUNCTIONS ****************************************************************/
19
20static
21INT
23{
24 INT RetVal;
25 HMODULE hDll;
27
28 hDll = LoadLibraryW(L"syssetup.dll");
29 if (hDll == NULL)
30 {
31 DPRINT("Failed to load 'syssetup.dll'!\n");
32 return GetLastError();
33 }
34 DPRINT("Loaded 'syssetup.dll'!\n");
35
36 /* Call the standard Windows-compatible export */
37 InstallReactOS = (PINSTALL_REACTOS)GetProcAddress(hDll, "InstallWindowsNt");
38 if (InstallReactOS == NULL)
39 {
40 RetVal = GetLastError();
41 DPRINT("Failed to get address for 'InstallWindowsNt()'!\n");
42 }
43 else
44 {
45 RetVal = InstallReactOS(argc, argv);
46 }
47
48 return RetVal;
49}
50
51
52/* Called from wmainCRTStartup */
54{
56
57 // NOTE: Temporary, until we correctly use argc/argv.
59 DPRINT("CmdLine: <%S>\n", CmdLine);
60
61 p = wcschr(CmdLine, L'-');
62 if (p == NULL)
64 p++;
65
66 // NOTE: On Windows, "mini" means "minimal UI", and can be used
67 // in addition to "newsetup"; these options are not exclusive.
68 if (_wcsicmp(p, L"newsetup") == 0 || _wcsicmp(p, L"mini") == 0)
69 {
71 }
72
73#if 0
74 /* Add new setup types here */
75 else if (...)
76 {
77
78 }
79#endif
80
81 return 0;
82}
83
84/* EOF */
static int argc
Definition: ServiceArgs.c:12
static INT RunInstallReactOS(INT argc, WCHAR *argv[])
Definition: setup.c:22
INT(WINAPI * PINSTALL_REACTOS)(INT argc, WCHAR **argv)
Definition: setup.c:16
#define NULL
Definition: types.h:112
#define wcschr
Definition: compat.h:17
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define GetProcAddress(x, y)
Definition: compat.h:753
#define LoadLibraryW(x)
Definition: compat.h:747
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
static const WCHAR CmdLine[]
Definition: install.c:48
static DWORD InstallReactOS(VOID)
Definition: install.c:1390
GLfloat GLfloat p
Definition: glext.h:8902
#define argv
Definition: mplay32.c:18
#define L(x)
Definition: ntvdm.h:50
#define INT
Definition: polytest.cpp:20
int wmain()
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define DPRINT
Definition: sndvol32.h:71
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184