3 * Copyright (C) 2003 ReactOS Team
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.
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.
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.
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS GUI/console setup
22 * FILE: subsys/system/setup/setup.c
23 * PURPOSE: Second stage setup
24 * PROGRAMMER: Eric Kohl
34 typedef DWORD STDCALL (*PINSTALL_REACTOS)(HINSTANCE hInstance);
37 /* FUNCTIONS ****************************************************************/
40 LPTSTR lstrchr(LPCTSTR s, TCHAR c)
57 RunNewSetup (HINSTANCE hInstance)
60 PINSTALL_REACTOS InstallReactOS;
62 hDll = LoadLibrary (TEXT("syssetup"));
66 OutputDebugString (TEXT("Failed to load 'syssetup'!\n"));
72 OutputDebugString (TEXT("Loaded 'syssetup'!\n"));
75 InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
76 if (InstallReactOS == NULL)
79 OutputDebugString (TEXT("Failed to get address for 'InstallReactOS()'!\n"));
85 InstallReactOS (hInstance);
92 WinMain (HINSTANCE hInstance,
93 HINSTANCE hPrevInstance,
100 CmdLine = GetCommandLine ();
103 OutputDebugString (TEXT("CmdLine: <"));
104 OutputDebugString (CmdLine);
105 OutputDebugString (TEXT(">\n"));
108 p = lstrchr (CmdLine, TEXT('-'));
112 if (!lstrcmpi (p, TEXT("-newsetup")))
114 RunNewSetup (hInstance);
118 /* Add new setup types here */