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
35 typedef DWORD (WINAPI
*PINSTALL_REACTOS
)(HINSTANCE hInstance
);
37 /* FUNCTIONS ****************************************************************/
39 LPTSTR
lstrchr(LPCTSTR s
, TCHAR c
)
55 RunNewSetup (HINSTANCE hInstance
)
58 PINSTALL_REACTOS InstallReactOS
;
60 hDll
= LoadLibrary (TEXT("syssetup"));
63 DPRINT("Failed to load 'syssetup'!\n");
67 DPRINT("Loaded 'syssetup'!\n");
68 InstallReactOS
= (PINSTALL_REACTOS
)GetProcAddress (hDll
, "InstallReactOS");
70 if (InstallReactOS
== NULL
)
72 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
77 InstallReactOS (hInstance
);
83 RunLiveCD (HINSTANCE hInstance
)
86 PINSTALL_REACTOS InstallLiveCD
;
88 hDll
= LoadLibrary (TEXT("syssetup"));
91 DPRINT("Failed to load 'syssetup'!\n");
95 DPRINT("Loaded 'syssetup'!\n");
96 InstallLiveCD
= (PINSTALL_REACTOS
)GetProcAddress (hDll
, "InstallLiveCD");
98 if (InstallLiveCD
== NULL
)
100 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
105 InstallLiveCD (hInstance
);
111 _tWinMain (HINSTANCE hInstance
,
112 HINSTANCE hPrevInstance
,
119 CmdLine
= GetCommandLine ();
121 DPRINT("CmdLine: <%s>\n",CmdLine
);
123 p
= lstrchr (CmdLine
, TEXT('-'));
127 if (!lstrcmpi (p
, TEXT("-newsetup")))
129 RunNewSetup (hInstance
);
131 else if (!lstrcmpi (p
, TEXT("-mini")))
133 RunLiveCD (hInstance
);
137 /* Add new setup types here */