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 ****************************************************************/
64 PINSTALL_REACTOS InstallReactOS
;
66 hDll
= LoadLibrary(TEXT("syssetup"));
69 DPRINT("Failed to load 'syssetup'!\n");
73 DPRINT("Loaded 'syssetup'!\n");
74 InstallReactOS
= (PINSTALL_REACTOS
)GetProcAddress(hDll
, "InstallReactOS");
75 if (InstallReactOS
== NULL
)
77 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
82 InstallReactOS(hInstance
);
94 PINSTALL_REACTOS InstallLiveCD
;
96 hDll
= LoadLibrary(TEXT("syssetup"));
99 DPRINT("Failed to load 'syssetup'!\n");
103 DPRINT("Loaded 'syssetup'!\n");
104 InstallLiveCD
= (PINSTALL_REACTOS
)GetProcAddress(hDll
, "InstallLiveCD");
105 if (InstallLiveCD
== NULL
)
107 DPRINT("Failed to get address for 'InstallReactOS()'!\n");
112 InstallLiveCD(hInstance
);
122 HINSTANCE hPrevInstance
,
129 CmdLine
= GetCommandLine();
131 DPRINT("CmdLine: <%s>\n",CmdLine
);
133 p
= lstrchr(CmdLine
, TEXT('-'));
137 if (!lstrcmpi(p
, TEXT("-newsetup")))
139 RunNewSetup(hInstance
);
141 else if (!lstrcmpi(p
, TEXT("-mini")))
143 RunLiveCD(hInstance
);
147 /* Add new setup types here */