Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vs2005.c « vs200x « action « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ab0a8314a5f7b5fae9ddf77b289504884b73e2bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
 * \file   vs2005.c
 * \brief  Visual Studio 2005 project file generation action.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include <stdlib.h>
#include "premake.h"
#include "action/action.h"
#include "vs200x.h"
#include "vs200x_solution.h"
#include "vs200x_project.h"


/** The project features supported by this action */
static SessionFeatures Features =
{
	{ "c", "c++", NULL },
};


/** The VS2005 solution writing process, for session_enumerate_objects() */
static SessionSolutionCallback SolutionCallbacks[] = 
{
	vs200x_solution_create,
	vs2005_solution_signature,
	vs2002_solution_projects,
	vs2005_solution_platforms,
	vs2005_solution_project_platforms,
	vs2005_solution_properties,
	NULL
};

/** The VS2005 project writing process, for session_enumerate_objects() */
static SessionProjectCallback ProjectCallbacks[] =
{
	vs200x_project_create,
	vs200x_project_encoding,
	vs200x_project_element,
	vs200x_project_platforms,
	vs200x_project_tool_files,
	session_enumerate_configurations,
	vs200x_project_references,
	vs200x_project_files,
	vs200x_project_globals,
	NULL
};

/** The VS2005 configuration writing process, for session_enumerate_configurations() */
static SessionProjectCallback ConfigCallbacks[] =
{
	vs200x_project_config_element,
	vs200x_project_vc_pre_build_event_tool,
	vs200x_project_vc_custom_build_tool,
	vs200x_project_vc_xml_data_generator_tool,
	vs200x_project_vc_web_service_proxy_generator_tool,
	vs200x_project_vc_midl_tool,
	vs200x_project_vc_cl_compiler_tool,
	vs200x_project_vc_managed_resource_compiler_tool,
	vs200x_project_vc_resource_compiler_tool,
	vs200x_project_vc_pre_link_event_tool,
	vs200x_project_vc_linker_tool,
	vs200x_project_vc_alink_tool,
	vs200x_project_vc_manifest_tool,
	vs200x_project_vc_xdc_make_tool,
	vs200x_project_vc_bsc_make_tool,
	vs200x_project_vc_fx_cop_tool,
	vs200x_project_vc_app_verifier_tool,
	vs200x_project_vc_web_deployment_tool,
	vs200x_project_vc_post_build_event_tool,
	vs200x_project_config_end,
	NULL
};


/**
 * The Visual Studio 2005 action handler.
 * \param   sess   The active session object.
 * \returns OKAY if successful.
 */
int vs2005_action(Session sess)
{
	/* make sure I can support all of the features used in the session */
	if (session_validate(sess, &Features) != OKAY)
	{
		return !OKAY;
	}

	stream_writeline(Console, "Generating project files for Visual Studio 2005...");
	return session_enumerate_objects(sess, SolutionCallbacks, ProjectCallbacks, ConfigCallbacks);
}