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 along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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
26 #define WIN32_NO_STATUS
29 #include <syssetup/syssetup.h>
37 typedef DWORD (WINAPI
*PINSTALL_REACTOS
)(HINSTANCE hInstance
);
40 /* FUNCTIONS ****************************************************************/
42 LPTSTR
lstrchr(LPCTSTR s
, TCHAR c
)
58 RunNewSetup (HINSTANCE hInstance
)
61 PINSTALL_REACTOS InstallReactOS
;
63 hDll
= LoadLibrary (TEXT("syssetup"));
66 DPRINT("Failed to load 'syssetup'!\n");
70 DPRINT("Loaded 'syssetup'!\n");
71 InstallReactOS
= (PINSTALL_REACTOS
)GetProcAddress (hDll
, "InstallReactOS");
73 if (InstallReactOS
== NULL
)
75 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
80 InstallReactOS (hInstance
);
86 RunLiveCD (HINSTANCE hInstance
)
89 PINSTALL_REACTOS InstallLiveCD
;
91 hDll
= LoadLibrary (TEXT("syssetup"));
94 DPRINT("Failed to load 'syssetup'!\n");
98 DPRINT("Loaded 'syssetup'!\n");
99 InstallLiveCD
= (PINSTALL_REACTOS
)GetProcAddress (hDll
, "InstallLiveCD");
101 if (InstallLiveCD
== NULL
)
103 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
108 InstallLiveCD (hInstance
);
114 _tWinMain (HINSTANCE hInstance
,
115 HINSTANCE hPrevInstance
,
122 CmdLine
= GetCommandLine ();
124 DPRINT("CmdLine: <%s>\n",CmdLine
);
126 p
= lstrchr (CmdLine
, TEXT('-'));
130 if (!lstrcmpi (p
, TEXT("-newsetup")))
132 RunNewSetup (hInstance
);
134 else if (!lstrcmpi (p
, TEXT("-mini")))
136 RunLiveCD (hInstance
);
140 /* Add new setup types here */