ReactOS  0.4.14-dev-552-g2fad488
setup.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <debug.h>
Include dependency graph for setup.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Typedefs

typedef INT(WINAPIPINSTALL_REACTOS) (INT argc, WCHAR **argv)
 

Functions

static INT RunInstallReactOS (INT argc, WCHAR *argv[])
 
INT wmain (INT argc, WCHAR *argv[])
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file setup.c.

Typedef Documentation

◆ PINSTALL_REACTOS

typedef INT(WINAPI * PINSTALL_REACTOS) (INT argc, WCHAR **argv)

Definition at line 16 of file setup.c.

Function Documentation

◆ RunInstallReactOS()

static INT RunInstallReactOS ( INT  argc,
WCHAR argv[] 
)
static

Definition at line 22 of file setup.c.

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  FreeLibrary(hDll);
49  return RetVal;
50 }
static int argc
Definition: ServiceArgs.c:12
static DWORD InstallReactOS(VOID)
Definition: install.c:1189
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define argv
Definition: mplay32.c:18
int32_t INT
Definition: typedefs.h:56
INT(WINAPI * PINSTALL_REACTOS)(INT argc, WCHAR **argv)
Definition: setup.c:16
#define LoadLibraryW(x)
Definition: compat.h:412
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
#define FreeLibrary(x)
Definition: compat.h:413
static const WCHAR L[]
Definition: oid.c:1250
#define GetProcAddress(x, y)
Definition: compat.h:418

Referenced by wmain().

◆ wmain()

INT wmain ( INT  argc,
WCHAR argv[] 
)

Definition at line 54 of file setup.c.

55 {
56  LPWSTR CmdLine, p;
57 
58  // NOTE: Temporary, until we correctly use argc/argv.
60  DPRINT("CmdLine: <%S>\n", CmdLine);
61 
62  p = wcschr(CmdLine, L'-');
63  if (p == NULL)
65  p++;
66 
67  // NOTE: On Windows, "mini" means "minimal UI", and can be used
68  // in addition to "newsetup"; these options are not exclusive.
69  if (_wcsicmp(p, L"newsetup") == 0 || _wcsicmp(p, L"mini") == 0)
70  {
72  }
73 
74 #if 0
75  /* Add new setup types here */
76  else if (...)
77  {
78 
79  }
80 #endif
81 
82  return 0;
83 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
static int argc
Definition: ServiceArgs.c:12
#define argv
Definition: mplay32.c:18
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
CHAR CmdLine[MAX_PATH]
Definition: mach.c:34
static const WCHAR L[]
Definition: oid.c:1250
static INT RunInstallReactOS(INT argc, WCHAR *argv[])
Definition: setup.c:22
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)