src/Cedar/SW.c
// Execution thread of the setup process

Execution thread of the setup process
Execution thread of the setup process
void SwPerformThread(THREAD* thread, void* param)
{
	WIZARD_PAGE* wp = (WIZARD_PAGE*)param;
	SW* sw;
	SW_COMPONENT* c;
	bool ret;
	SW_UI ui;
	if (thread == NULL || param == NULL)
	{
		return;
	}
	sw = (SW*)wp->Wizard->Param;
	sw->ExitCode = SW_EXIT_CODE_INTERNAL_ERROR;
	c = sw->CurrentComponent;
	if (sw->EasyMode)
	{
		ret = SwEasyMain(sw, wp);
	}
	else if (sw->WebMode)
	{
		ret = SwWebMain(sw, wp);
	}
	else if (sw->UninstallMode == false)
	{
		ret = SwInstallMain(sw, wp, c);
	}
	else
	{
		ret = SwUninstallMain(sw, wp, c);
	}
	Zero(&ui, sizeof(ui));
	ui.Type = (ret ? SW_UI_TYPE_FINISH : SW_UI_TYPE_ERROR);
	SwInteractUi(wp, &ui);
}
void SwPerformThread ( THREAD * thread , void * param ) { WIZARD_PAGE * wp = ( WIZARD_PAGE * ) param ; SW * sw ; SW_COMPONENT * c ; bool ret ; SW_UI ui ; if ( thread == NULL || param == NULL ) { return ; } sw = ( SW * ) wp -> Wizard -> Param ; sw -> ExitCode = SW_EXIT_CODE_INTERNAL_ERROR ; c = sw -> CurrentComponent ; if ( sw -> EasyMode ) { ret = SwEasyMain ( sw , wp ) ; } else if ( sw -> WebMode ) { ret = SwWebMain ( sw , wp ) ; } else if ( sw -> UninstallMode == false ) { ret = SwInstallMain ( sw , wp , c ) ; } else { ret = SwUninstallMain ( sw , wp , c ) ; } Zero ( & ui , sizeof ( ui ) ) ; ui . Type = ( ret ? SW_UI_TYPE_FINISH : SW_UI_TYPE_ERROR ) ; SwInteractUi ( wp , & ui ) ; }
Execution thread of the setup process
Execution thread of the setup process
// Validate arguments
 // Components to be installed
 // Create a simple installer
 // Create a Web installer
 // Installation
 // Uninstallation
 // Notify the results to the window
