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

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/vs200x')
-rw-r--r--src/actions/vs200x/tests/vs2002_solution_tests.cpp12
-rw-r--r--src/actions/vs200x/tests/vs2003_solution_tests.cpp4
-rw-r--r--src/actions/vs200x/tests/vs2005_solution_tests.cpp8
-rw-r--r--src/actions/vs200x/tests/vs2008_solution_tests.cpp2
-rw-r--r--src/actions/vs200x/tests/vs200x_compiler_tests.cpp17
-rw-r--r--src/actions/vs200x/tests/vs200x_config_tests.cpp25
-rw-r--r--src/actions/vs200x/tests/vs200x_linker_tests.cpp17
-rw-r--r--src/actions/vs200x/tests/vs200x_project_tests.cpp143
-rw-r--r--src/actions/vs200x/tests/vs200x_xml_tests.cpp39
-rw-r--r--src/actions/vs200x/vs2002_solution.c43
-rw-r--r--src/actions/vs200x/vs2003_solution.c14
-rw-r--r--src/actions/vs200x/vs2005_solution.c28
-rw-r--r--src/actions/vs200x/vs2008_solution.c7
-rw-r--r--src/actions/vs200x/vs200x.c22
-rw-r--r--src/actions/vs200x/vs200x.h11
-rw-r--r--src/actions/vs200x/vs200x_config.c31
-rw-r--r--src/actions/vs200x/vs200x_config.h12
-rw-r--r--src/actions/vs200x/vs200x_project.c152
-rw-r--r--src/actions/vs200x/vs200x_project.h60
-rw-r--r--src/actions/vs200x/vs200x_solution.c8
-rw-r--r--src/actions/vs200x/vs200x_solution.h30
21 files changed, 304 insertions, 381 deletions
diff --git a/src/actions/vs200x/tests/vs2002_solution_tests.cpp b/src/actions/vs200x/tests/vs2002_solution_tests.cpp
index 8852dee..c42db2a 100644
--- a/src/actions/vs200x/tests/vs2002_solution_tests.cpp
+++ b/src/actions/vs200x/tests/vs2002_solution_tests.cpp
@@ -19,7 +19,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_Signature_IsCorrect)
{
- vs2002_solution_signature(sess, sln, strm);
+ vs2002_solution_signature(sln, strm);
CHECK_EQUAL(
"Microsoft Visual Studio Solution File, Format Version 7.00\r\n",
buffer);
@@ -32,7 +32,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_ProjectEntry_UsesRelativePath)
{
- vs2002_solution_projects(sess, sln, strm);
+ vs2002_solution_projects(sln, strm);
CHECK_EQUAL(
"Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"My Project\", \"Project Folder\\My Project.vcproj\", \"{AE2461B7-236F-4278-81D3-F0D476F9A4C0}\"\n"
"EndProject\n",
@@ -46,7 +46,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_SolutionConfiguration_IsCorrect)
{
- vs2002_solution_configuration(sess, sln, strm);
+ vs2002_solution_configuration(sln, strm);
CHECK_EQUAL(
"Global\n"
"\tGlobalSection(SolutionConfiguration) = preSolution\n"
@@ -63,7 +63,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_ProjectDependencies_IsCorrect)
{
- vs2002_solution_dependencies(sess, sln, strm);
+ vs2002_solution_dependencies(sln, strm);
CHECK_EQUAL(
"\tGlobalSection(ProjectDependencies) = postSolution\n"
"\tEndGlobalSection\n",
@@ -77,7 +77,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_ProjectConfiguration_IsCorrect)
{
- vs2002_solution_project_configuration(sess, sln, strm);
+ vs2002_solution_project_configuration(sln, strm);
CHECK_EQUAL(
"\tGlobalSection(ProjectConfiguration) = postSolution\n"
"\t\t{AE2461B7-236F-4278-81D3-F0D476F9A4C0}.Debug DLL.ActiveCfg = Debug DLL|Win32\n"
@@ -95,7 +95,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2002_Extensibility_IsCorrect)
{
- vs2002_solution_extensibility(sess, sln, strm);
+ vs2002_solution_extensibility(sln, strm);
CHECK_EQUAL(
"\tGlobalSection(ExtensibilityGlobals) = postSolution\n"
"\tEndGlobalSection\n"
diff --git a/src/actions/vs200x/tests/vs2003_solution_tests.cpp b/src/actions/vs200x/tests/vs2003_solution_tests.cpp
index 8b54d5c..00aab54 100644
--- a/src/actions/vs200x/tests/vs2003_solution_tests.cpp
+++ b/src/actions/vs200x/tests/vs2003_solution_tests.cpp
@@ -19,7 +19,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2003_Signature_IsCorrect)
{
- vs2003_solution_signature(sess, sln, strm);
+ vs2003_solution_signature(sln, strm);
CHECK_EQUAL(
"Microsoft Visual Studio Solution File, Format Version 8.00\r\n",
buffer);
@@ -32,7 +32,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2003_SolutionConfiguration_IsCorrect)
{
- vs2003_solution_configuration(sess, sln, strm);
+ vs2003_solution_configuration(sln, strm);
CHECK_EQUAL(
"Global\n"
"\tGlobalSection(SolutionConfiguration) = preSolution\n"
diff --git a/src/actions/vs200x/tests/vs2005_solution_tests.cpp b/src/actions/vs200x/tests/vs2005_solution_tests.cpp
index 05e6081..4707c6b 100644
--- a/src/actions/vs200x/tests/vs2005_solution_tests.cpp
+++ b/src/actions/vs200x/tests/vs2005_solution_tests.cpp
@@ -19,7 +19,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2005_Signature_IsCorrect)
{
- vs2005_solution_signature(sess, sln, strm);
+ vs2005_solution_signature(sln, strm);
CHECK_EQUAL(
"\357\273\277\r\n"
"Microsoft Visual Studio Solution File, Format Version 9.00\r\n"
@@ -34,7 +34,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Platforms_IsCorrect)
{
- vs2005_solution_platforms(sess, sln, strm);
+ vs2005_solution_platforms(sln, strm);
CHECK_EQUAL(
"Global\n"
"\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n"
@@ -51,7 +51,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, ProjectPlatforms_IsCorrect)
{
- vs2005_solution_project_platforms(sess, sln, strm);
+ vs2005_solution_project_platforms(sln, strm);
CHECK_EQUAL(
"\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n"
"\t\t{AE2461B7-236F-4278-81D3-F0D476F9A4C0}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32\n"
@@ -69,7 +69,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Properties_IsCorrect)
{
- vs2005_solution_properties(sess, sln, strm);
+ vs2005_solution_properties(sln, strm);
CHECK_EQUAL(
"\tGlobalSection(SolutionProperties) = preSolution\n"
"\t\tHideSolutionNode = FALSE\n"
diff --git a/src/actions/vs200x/tests/vs2008_solution_tests.cpp b/src/actions/vs200x/tests/vs2008_solution_tests.cpp
index 7495b97..4579be1 100644
--- a/src/actions/vs200x/tests/vs2008_solution_tests.cpp
+++ b/src/actions/vs200x/tests/vs2008_solution_tests.cpp
@@ -19,7 +19,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs2008_Signature_IsCorrect)
{
- vs2008_solution_signature(sess, sln, strm);
+ vs2008_solution_signature(sln, strm);
CHECK_EQUAL(
"\357\273\277\r\n"
"Microsoft Visual Studio Solution File, Format Version 10.00\r\n"
diff --git a/src/actions/vs200x/tests/vs200x_compiler_tests.cpp b/src/actions/vs200x/tests/vs200x_compiler_tests.cpp
index 167ad30..2e68ff1 100644
--- a/src/actions/vs200x/tests/vs200x_compiler_tests.cpp
+++ b/src/actions/vs200x/tests/vs200x_compiler_tests.cpp
@@ -8,6 +8,7 @@
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x_project.h"
+#include "base/env.h"
}
SUITE(action)
@@ -18,8 +19,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCCLCompilerTool_Defaults_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_cl_compiler_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_cl_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCCLCompilerTool\"\n"
@@ -37,8 +38,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCCLCompilerTool_Defaults_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_project_vc_cl_compiler_tool(sess, prj, strm);
+ env_set_action("vs2005");
+ vs200x_project_vc_cl_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCCLCompilerTool\"\n"
@@ -56,8 +57,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCCLCompilerTool_Defaults_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_project_vc_cl_compiler_tool(sess, prj, strm);
+ env_set_action("vs2008");
+ vs200x_project_vc_cl_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCCLCompilerTool\"\n"
@@ -80,10 +81,10 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCCLCompilerTool_WithDefines)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
char* defines[] = { "DEFINE0", "DEFINE1", NULL };
SetConfigField(prj, BlockDefines, defines);
- vs200x_project_vc_cl_compiler_tool(sess, prj, strm);
+ vs200x_project_vc_cl_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCCLCompilerTool\"\n"
diff --git a/src/actions/vs200x/tests/vs200x_config_tests.cpp b/src/actions/vs200x/tests/vs200x_config_tests.cpp
index 7a8fbe9..2e80035 100644
--- a/src/actions/vs200x/tests/vs200x_config_tests.cpp
+++ b/src/actions/vs200x/tests/vs200x_config_tests.cpp
@@ -8,6 +8,7 @@
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x_config.h"
+#include "base/env.h"
}
SUITE(action)
@@ -18,29 +19,29 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsCharacterSet_Defaults_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_config_character_set(sess, strm);
+ env_set_action("vs2002");
+ vs200x_config_character_set(strm);
CHECK_EQUAL("\n\t\t\tCharacterSet=\"2\"", buffer);
}
TEST_FIXTURE(FxAction, VsCharacterSet_Defaults_OnVs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_config_character_set(sess, strm);
+ env_set_action("vs2003");
+ vs200x_config_character_set(strm);
CHECK_EQUAL("\n\t\t\tCharacterSet=\"2\"", buffer);
}
TEST_FIXTURE(FxAction, VsCharacterSet_Defaults_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_config_character_set(sess, strm);
+ env_set_action("vs2005");
+ vs200x_config_character_set(strm);
CHECK_EQUAL("\n\t\t\tCharacterSet=\"1\"", buffer);
}
TEST_FIXTURE(FxAction, VsCharacterSet_Defaults_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_config_character_set(sess, strm);
+ env_set_action("vs2008");
+ vs200x_config_character_set(strm);
CHECK_EQUAL("\n\t\t\tCharacterSet=\"1\"", buffer);
}
@@ -51,17 +52,17 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsDefines_Empty_OnNoSymbols)
{
- session_set_action(sess, "vs2002");
- vs200x_config_defines(sess, strm, prj);
+ env_set_action("vs2002");
+ vs200x_config_defines(strm, prj);
CHECK_EQUAL("", buffer);
}
TEST_FIXTURE(FxAction, VsDefines_SemiSplitList)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
char* values[] = { "DEFINE0", "DEFINE1", "DEFINE2", NULL };
SetConfigField(prj, BlockDefines, values);
- vs200x_config_defines(sess, strm, prj);
+ vs200x_config_defines(strm, prj);
CHECK_EQUAL("\n\t\t\t\tPreprocessorDefinitions=\"DEFINE0;DEFINE1;DEFINE2\"", buffer);
}
}
diff --git a/src/actions/vs200x/tests/vs200x_linker_tests.cpp b/src/actions/vs200x/tests/vs200x_linker_tests.cpp
index 10b8e01..358a352 100644
--- a/src/actions/vs200x/tests/vs200x_linker_tests.cpp
+++ b/src/actions/vs200x/tests/vs200x_linker_tests.cpp
@@ -8,6 +8,7 @@
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x_project.h"
+#include "base/env.h"
}
SUITE(action)
@@ -18,8 +19,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_linker_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_linker_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCLinkerTool\"\n"
@@ -33,8 +34,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_project_vc_linker_tool(sess, prj, strm);
+ env_set_action("vs2003");
+ vs200x_project_vc_linker_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCLinkerTool\"\n"
@@ -48,8 +49,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_project_vc_linker_tool(sess, prj, strm);
+ env_set_action("vs2005");
+ vs200x_project_vc_linker_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCLinkerTool\"\n"
@@ -64,8 +65,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_project_vc_linker_tool(sess, prj, strm);
+ env_set_action("vs2008");
+ vs200x_project_vc_linker_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCLinkerTool\"\n"
diff --git a/src/actions/vs200x/tests/vs200x_project_tests.cpp b/src/actions/vs200x/tests/vs200x_project_tests.cpp
index 7679685..6456637 100644
--- a/src/actions/vs200x/tests/vs200x_project_tests.cpp
+++ b/src/actions/vs200x/tests/vs200x_project_tests.cpp
@@ -8,6 +8,7 @@
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x_project.h"
+#include "base/env.h"
}
@@ -19,7 +20,7 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Encoding)
{
- vs200x_project_encoding(sess, prj, strm);
+ vs200x_project_encoding(prj, strm);
CHECK_EQUAL(
"<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\r\n",
buffer);
@@ -32,8 +33,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsProject_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_project_element(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_element(prj, strm);
CHECK_EQUAL(
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
@@ -46,8 +47,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsProject_OnVs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_project_element(sess, prj, strm);
+ env_set_action("vs2003");
+ vs200x_project_element(prj, strm);
CHECK_EQUAL(
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
@@ -60,8 +61,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsProject_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_project_element(sess, prj, strm);
+ env_set_action("vs2005");
+ vs200x_project_element(prj, strm);
CHECK_EQUAL(
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
@@ -76,8 +77,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsProject_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_project_element(sess, prj, strm);
+ env_set_action("vs2008");
+ vs200x_project_element(prj, strm);
CHECK_EQUAL(
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
@@ -98,8 +99,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Platforms)
{
- session_set_action(sess, "vs2002");
- vs200x_project_platforms(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_platforms(prj, strm);
CHECK_EQUAL(
"\t<Platforms>\n"
"\t\t<Platform\n"
@@ -115,8 +116,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsToolFiles_Defaults_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_project_tool_files(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_tool_files(prj, strm);
CHECK_EQUAL(
"\t<Configurations>\n",
buffer);
@@ -124,8 +125,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsToolFiles_Defaults_OnVs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_project_tool_files(sess, prj, strm);
+ env_set_action("vs2003");
+ vs200x_project_tool_files(prj, strm);
CHECK_EQUAL(
"\t<Configurations>\n",
buffer);
@@ -133,8 +134,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsToolFiles_Defaults_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_project_tool_files(sess, prj, strm);
+ env_set_action("vs2005");
+ vs200x_project_tool_files(prj, strm);
CHECK_EQUAL(
"\t<ToolFiles>\n"
"\t</ToolFiles>\n"
@@ -144,8 +145,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsToolFiles_Defaults_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_project_tool_files(sess, prj, strm);
+ env_set_action("vs2008");
+ vs200x_project_tool_files(prj, strm);
CHECK_EQUAL(
"\t<ToolFiles>\n"
"\t</ToolFiles>\n"
@@ -161,8 +162,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Configuration)
{
- session_set_action(sess, "vs2002");
- vs200x_project_config_element(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_config_element(prj, strm);
CHECK_EQUAL(
"\t\t<Configuration\n"
"\t\t\tName=\"Debug DLL|Win32\"\n"
@@ -180,8 +181,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCALinkTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_alink_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_alink_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCALinkTool\"/>\n",
@@ -190,8 +191,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCAppVerifierTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_app_verifier_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_app_verifier_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCAppVerifierTool\"/>\n",
@@ -200,8 +201,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCBscMakeTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_bsc_make_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_bsc_make_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCBscMakeTool\"/>\n",
@@ -210,8 +211,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCCustomBuildTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_custom_build_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_custom_build_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCCustomBuildTool\"/>\n",
@@ -220,8 +221,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCFxCopTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_fx_cop_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_fx_cop_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCFxCopTool\"/>\n",
@@ -230,8 +231,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCManagedResourceCompilerTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_managed_resource_compiler_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_managed_resource_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCManagedResourceCompilerTool\"/>\n",
@@ -240,8 +241,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCManifestTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_manifest_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_manifest_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCManifestTool\"/>\n",
@@ -250,8 +251,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCMIDLTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_midl_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_midl_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCMIDLTool\"/>\n",
@@ -260,8 +261,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCPreBuildEventTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_pre_build_event_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_pre_build_event_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCPreBuildEventTool\"/>\n",
@@ -270,8 +271,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCPreLinkEventTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_pre_link_event_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_pre_link_event_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCPreLinkEventTool\"/>\n",
@@ -280,8 +281,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCPostBuildEventTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_post_build_event_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_post_build_event_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCPostBuildEventTool\"/>\n",
@@ -290,8 +291,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCResourceCompilerTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_resource_compiler_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_resource_compiler_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCResourceCompilerTool\"/>\n",
@@ -300,8 +301,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCWebDeploymentTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_web_deployment_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_web_deployment_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCWebDeploymentTool\"/>\n",
@@ -310,8 +311,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCWebServiceProxyGeneratorTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_web_service_proxy_generator_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_web_service_proxy_generator_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\n",
@@ -320,8 +321,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCXDCMakeTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_xdc_make_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_xdc_make_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCXDCMakeTool\"/>\n",
@@ -330,8 +331,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_VCXMLDataGeneratorTool)
{
- session_set_action(sess, "vs2002");
- vs200x_project_vc_xml_data_generator_tool(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_vc_xml_data_generator_tool(prj, strm);
CHECK_EQUAL(
"\t\t\t<Tool\n"
"\t\t\t\tName=\"VCXMLDataGeneratorTool\"/>\n",
@@ -345,8 +346,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsReferences_Defaults_OnVs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_project_references(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_references(prj, strm);
CHECK_EQUAL(
"\t</Configurations>\n",
buffer);
@@ -354,8 +355,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsReferences_Defaults_OnVs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_project_references(sess, prj, strm);
+ env_set_action("vs2003");
+ vs200x_project_references(prj, strm);
CHECK_EQUAL(
"\t</Configurations>\n"
"\t<References>\n"
@@ -365,8 +366,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsReferences_Defaults_OnVs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_project_references(sess, prj, strm);
+ env_set_action("vs2005");
+ vs200x_project_references(prj, strm);
CHECK_EQUAL(
"\t</Configurations>\n"
"\t<References>\n"
@@ -376,8 +377,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, VsReferences_Defaults_OnVs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_project_references(sess, prj, strm);
+ env_set_action("vs2008");
+ vs200x_project_references(prj, strm);
CHECK_EQUAL(
"\t</Configurations>\n"
"\t<References>\n"
@@ -392,8 +393,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Files_OnNoFiles)
{
- session_set_action(sess, "vs2002");
- vs200x_project_files(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_files(prj, strm);
CHECK_EQUAL(
"\t<Files>\n"
"\t</Files>\n",
@@ -402,10 +403,10 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Files_OnSingleCppFile)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
char* values[] = { "Hello.cpp", 0 };
SetField(prj, ProjectFiles, values);
- vs200x_project_files(sess, prj, strm);
+ vs200x_project_files(prj, strm);
CHECK_EQUAL(
"\t<Files>\n"
"\t\t<File\n"
@@ -417,10 +418,10 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Files_OnUpperDirectory)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
char* values[] = { "../../Hello.cpp", 0 };
SetField(prj, ProjectFiles, values);
- vs200x_project_files(sess, prj, strm);
+ vs200x_project_files(prj, strm);
CHECK_EQUAL(
"\t<Files>\n"
"\t\t<File\n"
@@ -432,10 +433,10 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Files_OnGroupedCppFile)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
char* values[] = { "Src/Hello.cpp", 0 };
SetField(prj, ProjectFiles, values);
- vs200x_project_files(sess, prj, strm);
+ vs200x_project_files(prj, strm);
CHECK_EQUAL(
"\t<Files>\n"
"\t\t<Filter\n"
@@ -456,8 +457,8 @@ SUITE(action)
TEST_FIXTURE(FxAction, Vs200x_Globals)
{
- session_set_action(sess, "vs2002");
- vs200x_project_globals(sess, prj, strm);
+ env_set_action("vs2002");
+ vs200x_project_globals(prj, strm);
CHECK_EQUAL(
"\t<Globals>\n"
"\t</Globals>\n"
diff --git a/src/actions/vs200x/tests/vs200x_xml_tests.cpp b/src/actions/vs200x/tests/vs200x_xml_tests.cpp
index 9616b99..cc9ce36 100644
--- a/src/actions/vs200x/tests/vs200x_xml_tests.cpp
+++ b/src/actions/vs200x/tests/vs200x_xml_tests.cpp
@@ -8,6 +8,7 @@
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x.h"
+#include "base/env.h"
}
@@ -19,57 +20,57 @@ SUITE(action)
TEST_FIXTURE(FxAction, ElementEnd_SlashBracket_Vs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_element_end(sess, strm, 0, "/>");
+ env_set_action("vs2002");
+ vs200x_element_end(strm, 0, "/>");
CHECK_EQUAL("/>\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_SlashBracket_Vs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_element_end(sess, strm, 0, "/>");
+ env_set_action("vs2003");
+ vs200x_element_end(strm, 0, "/>");
CHECK_EQUAL("/>\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_SlashBracket_Vs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_element_end(sess, strm, 0, "/>");
+ env_set_action("vs2005");
+ vs200x_element_end(strm, 0, "/>");
CHECK_EQUAL("\n/>\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_SlashBracket_Vs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_element_end(sess, strm, 0, "/>");
+ env_set_action("vs2008");
+ vs200x_element_end(strm, 0, "/>");
CHECK_EQUAL("\n/>\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_Bracket_Vs2002)
{
- session_set_action(sess, "vs2002");
- vs200x_element_end(sess, strm, 0, ">");
+ env_set_action("vs2002");
+ vs200x_element_end(strm, 0, ">");
CHECK_EQUAL(">\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_Bracket_Vs2003)
{
- session_set_action(sess, "vs2003");
- vs200x_element_end(sess, strm, 0, ">");
+ env_set_action("vs2003");
+ vs200x_element_end(strm, 0, ">");
CHECK_EQUAL(">\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_Bracket_Vs2005)
{
- session_set_action(sess, "vs2005");
- vs200x_element_end(sess, strm, 0, ">");
+ env_set_action("vs2005");
+ vs200x_element_end(strm, 0, ">");
CHECK_EQUAL("\n\t>\n", buffer);
}
TEST_FIXTURE(FxAction, ElementEnd_Bracket_Vs2008)
{
- session_set_action(sess, "vs2008");
- vs200x_element_end(sess, strm, 0, ">");
+ env_set_action("vs2008");
+ vs200x_element_end(strm, 0, ">");
CHECK_EQUAL("\n\t>\n", buffer);
}
@@ -80,21 +81,21 @@ SUITE(action)
TEST_FIXTURE(FxAction, Attribute_OnLevel0)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
vs200x_attribute(strm, 0, "ProjectType", "Visual C++");
CHECK_EQUAL("\nProjectType=\"Visual C++\"", buffer);
}
TEST_FIXTURE(FxAction, Attribute_OnLevel3)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
vs200x_attribute(strm, 3, "ProjectType", "Visual C++");
CHECK_EQUAL("\n\t\t\tProjectType=\"Visual C++\"", buffer);
}
TEST_FIXTURE(FxAction, Attribute_IsEscaped)
{
- session_set_action(sess, "vs2002");
+ env_set_action("vs2002");
vs200x_attribute(strm, 1, "PreprocessorSymbols", "DEBUG;MSG=\"Hello\";TRACE");
CHECK_EQUAL("\n\tPreprocessorSymbols=\"DEBUG;MSG=&quot;Hello&quot;;TRACE\"", buffer);
}
diff --git a/src/actions/vs200x/vs2002_solution.c b/src/actions/vs200x/vs2002_solution.c
index 7274eb7..5e01b22 100644
--- a/src/actions/vs200x/vs2002_solution.c
+++ b/src/actions/vs200x/vs2002_solution.c
@@ -15,15 +15,10 @@
/**
* Create the Visual Studio 2002 solution configuration block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_configuration(Session sess, Solution sln, Stream strm)
+int vs2002_solution_configuration(Solution sln, Stream strm)
{
int i, n, z;
- UNUSED(sess);
z = stream_writeline(strm, "Global");
z |= stream_writeline(strm, "\tGlobalSection(SolutionConfiguration) = preSolution");
@@ -42,15 +37,10 @@ int vs2002_solution_configuration(Session sess, Solution sln, Stream strm)
/**
* Create the Visual Studio 2002 project dependencies block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_dependencies(Session sess, Solution sln, Stream strm)
+int vs2002_solution_dependencies(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
z = stream_writeline(strm, "\tGlobalSection(ProjectDependencies) = postSolution");
z |= stream_writeline(strm, "\tEndGlobalSection");
@@ -60,15 +50,10 @@ int vs2002_solution_dependencies(Session sess, Solution sln, Stream strm)
/**
* Write out the Visual Studio 2002 solution extensibility block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_extensibility(Session sess, Solution sln, Stream strm)
+int vs2002_solution_extensibility(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
z = stream_writeline(strm, "\tGlobalSection(ExtensibilityGlobals) = postSolution");
z |= stream_writeline(strm, "\tEndGlobalSection");
@@ -81,15 +66,10 @@ int vs2002_solution_extensibility(Session sess, Solution sln, Stream strm)
/**
* Write out the Visual Studio 2002 project configurations block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_project_configuration(Session sess, Solution sln, Stream strm)
+int vs2002_solution_project_configuration(Solution sln, Stream strm)
{
int pi, pn, z;
- UNUSED(sess);
z = stream_writeline(strm, "\tGlobalSection(ProjectConfiguration) = postSolution");
pn = solution_num_projects(sln);
for (pi = 0; pi < pn; ++pi)
@@ -113,18 +93,12 @@ int vs2002_solution_project_configuration(Session sess, Solution sln, Stream str
/**
* Write out the list of projects contained by the solution.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_projects(Session sess, Solution sln, Stream strm)
+int vs2002_solution_projects(Solution sln, Stream strm)
{
const char* sln_path;
int i, n, z = OKAY;
- UNUSED(sess);
-
/* project file paths are specified relative to the solution */
sln_path = path_directory(solution_get_filename(sln, NULL, NULL));
@@ -153,15 +127,10 @@ int vs2002_solution_projects(Session sess, Solution sln, Stream strm)
/**
* Write the Visual Studio 2002 solution file signature.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2002_solution_signature(Session sess, Solution sln, Stream strm)
+int vs2002_solution_signature(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
stream_set_newline(strm, "\r\n");
z = stream_writeline(strm, "Microsoft Visual Studio Solution File, Format Version 7.00");
diff --git a/src/actions/vs200x/vs2003_solution.c b/src/actions/vs200x/vs2003_solution.c
index 1c1517c..448cc70 100644
--- a/src/actions/vs200x/vs2003_solution.c
+++ b/src/actions/vs200x/vs2003_solution.c
@@ -12,15 +12,10 @@
/**
* Create the Visual Studio 2003 solution configuration block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2003_solution_configuration(Session sess, Solution sln, Stream strm)
+int vs2003_solution_configuration(Solution sln, Stream strm)
{
int i, n, z;
- UNUSED(sess);
z = stream_writeline(strm, "Global");
z |= stream_writeline(strm, "\tGlobalSection(SolutionConfiguration) = preSolution");
@@ -39,15 +34,10 @@ int vs2003_solution_configuration(Session sess, Solution sln, Stream strm)
/**
* Write the Visual Studio 2003 solution file signature.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2003_solution_signature(Session sess, Solution sln, Stream strm)
+int vs2003_solution_signature(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
stream_set_newline(strm, "\r\n");
z = stream_writeline(strm, "Microsoft Visual Studio Solution File, Format Version 8.00");
diff --git a/src/actions/vs200x/vs2005_solution.c b/src/actions/vs200x/vs2005_solution.c
index 6f589ea..6a659d0 100644
--- a/src/actions/vs200x/vs2005_solution.c
+++ b/src/actions/vs200x/vs2005_solution.c
@@ -12,15 +12,10 @@
/**
* Write out the Visual Studio solution-level platform configuration block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2005_solution_platforms(Session sess, Solution sln, Stream strm)
+int vs2005_solution_platforms(Solution sln, Stream strm)
{
int i, n, z;
- UNUSED(sess);
z = stream_writeline(strm, "Global");
z |= stream_writeline(strm, "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution");
@@ -39,15 +34,10 @@ int vs2005_solution_platforms(Session sess, Solution sln, Stream strm)
/**
* Write out the Visual Studio 2005 project-level platform configurations block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2005_solution_project_platforms(Session sess, Solution sln, Stream strm)
+int vs2005_solution_project_platforms(Solution sln, Stream strm)
{
int pi, pn, z;
- UNUSED(sess);
z = stream_writeline(strm, "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution");
pn = solution_num_projects(sln);
for (pi = 0; pi < pn; ++pi)
@@ -71,15 +61,10 @@ int vs2005_solution_project_platforms(Session sess, Solution sln, Stream strm)
/**
* Write out the Visual Studio 2005 solution properties block.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2005_solution_properties(Session sess, Solution sln, Stream strm)
+int vs2005_solution_properties(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
z = stream_writeline(strm, "\tGlobalSection(SolutionProperties) = preSolution");
z |= stream_writeline(strm, "\t\tHideSolutionNode = FALSE");
@@ -91,15 +76,10 @@ int vs2005_solution_properties(Session sess, Solution sln, Stream strm)
/**
* Write the Visual Studio 2005 solution file signature.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2005_solution_signature(Session sess, Solution sln, Stream strm)
+int vs2005_solution_signature(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
stream_set_newline(strm, "\r\n");
z = stream_write_unicode_marker(strm);
diff --git a/src/actions/vs200x/vs2008_solution.c b/src/actions/vs200x/vs2008_solution.c
index 856bd51..d116a53 100644
--- a/src/actions/vs200x/vs2008_solution.c
+++ b/src/actions/vs200x/vs2008_solution.c
@@ -10,15 +10,10 @@
/**
* Write the Visual Studio 2008 solution file signature.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs2008_solution_signature(Session sess, Solution sln, Stream strm)
+int vs2008_solution_signature(Solution sln, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(sln);
stream_set_newline(strm, "\r\n");
z = stream_write_unicode_marker(strm);
diff --git a/src/actions/vs200x/vs200x.c b/src/actions/vs200x/vs200x.c
index 91b4cfb..9273c19 100644
--- a/src/actions/vs200x/vs200x.c
+++ b/src/actions/vs200x/vs200x.c
@@ -11,6 +11,7 @@
#include "vs200x.h"
#include "base/buffers.h"
#include "base/cstr.h"
+#include "base/env.h"
#include "base/error.h"
@@ -65,16 +66,16 @@ int vs200x_list_attribute(Stream strm, int indent_size, const char* name, String
/**
* Write the ending part of an XML tag, adjust for the differing Visual Studio formats.
- * \param sess The current execution session.
* \param strm The output stream.
* \param level The XML element nesting level.
* \param markup The end tag markup.
* \returns OKAY if successful.
*/
-int vs200x_element_end(Session sess, Stream strm, int level, const char* markup)
+int vs200x_element_end(Stream strm, int level, const char* markup)
{
- int z;
- int version = vs200x_get_target_version(sess);
+ int z, version;
+
+ version = vs200x_get_target_version();
if (version >= 2005)
{
z = stream_writeline(strm, "");
@@ -97,21 +98,20 @@ int vs200x_element_end(Session sess, Stream strm, int level, const char* markup)
* Return the Visual Studio version appropriate version of the string for a false
* value. Before 2005 this was "FALSE", after it is "false".
*/
-const char* vs200x_false(Session sess)
+const char* vs200x_false(void)
{
- int version = vs200x_get_target_version(sess);
+ int version = vs200x_get_target_version();
return (version < 2005) ? "FALSE" : "false";
}
/**
* Converts the session action string to a Visual Studio version number.
- * \param sess The current execution session.
* \returns The Visual Studio version number corresponding to the current action.
*/
-int vs200x_get_target_version(Session sess)
+int vs200x_get_target_version(void)
{
- const char* action = session_get_action(sess);
+ const char* action = env_get_action();
if (cstr_eq(action, "vs2002"))
{
return 2002;
@@ -183,8 +183,8 @@ const char* vs200x_tool_guid(const char* language)
* Return the Visual Studio version appropriate version of the string for a true
* value. Before 2005 this was "TRUE", after it is "true".
*/
-const char* vs200x_true(Session sess)
+const char* vs200x_true(void)
{
- int version = vs200x_get_target_version(sess);
+ int version = vs200x_get_target_version();
return (version < 2005) ? "TRUE" : "true";
}
diff --git a/src/actions/vs200x/vs200x.h b/src/actions/vs200x/vs200x.h
index b99c2f5..3069b8d 100644
--- a/src/actions/vs200x/vs200x.h
+++ b/src/actions/vs200x/vs200x.h
@@ -6,16 +6,17 @@
#if !defined(PREMAKE_VS200X_H)
#define PREMAKE_VS200X_H
-#include "session/session.h"
+#include "objects/project.h"
+#include "base/stream.h"
int vs200x_attribute(Stream strm, int indent_size, const char* name, const char* value, ...);
int vs200x_list_attribute(Stream strm, int indent_size, const char* name, Strings values);
-int vs200x_element_end(Session sess, Stream strm, int level, const char* markup);
-const char* vs200x_false(Session sess);
-int vs200x_get_target_version(Session sess);
+int vs200x_element_end(Stream strm, int level, const char* markup);
+const char* vs200x_false(void);
+int vs200x_get_target_version(void);
const char* vs200x_project_file_extension(Project prj);
const char* vs200x_tool_guid(const char* language);
-const char* vs200x_true(Session sess);
+const char* vs200x_true(void);
#endif
diff --git a/src/actions/vs200x/vs200x_config.c b/src/actions/vs200x/vs200x_config.c
index 3e94305..4848169 100644
--- a/src/actions/vs200x/vs200x_config.c
+++ b/src/actions/vs200x/vs200x_config.c
@@ -9,10 +9,9 @@
#include "vs200x_config.h"
-int vs200x_config_character_set(Session sess, Stream strm)
+int vs200x_config_character_set(Stream strm)
{
- int version = vs200x_get_target_version(sess);
- return vs200x_attribute(strm, 3, "CharacterSet", version > 2003 ? "1" : "2");
+ return vs200x_attribute(strm, 3, "CharacterSet", vs200x_get_target_version() > 2003 ? "1" : "2");
}
@@ -20,45 +19,39 @@ int vs200x_config_character_set(Session sess, Stream strm)
* Write out the list of preprocessor symbols as defined by the configuration.
* This entry is only written if there are values to write.
*/
-int vs200x_config_defines(Session sess, Stream strm, Project prj)
+int vs200x_config_defines(Stream strm, Project prj)
{
Strings values = project_get_config_values(prj, BlockDefines);
- UNUSED(sess);
if (strings_size(values) > 0)
{
return vs200x_list_attribute(strm, 4, "PreprocessorDefinitions", values);
}
+
return OKAY;
}
-int vs200x_config_detect_64bit_portability(Session sess, Stream strm, Project prj)
+int vs200x_config_detect_64bit_portability(Stream strm)
{
- int version = vs200x_get_target_version(sess);
- UNUSED(prj);
- if (version < 2008)
+ if (vs200x_get_target_version() < 2008)
{
- return vs200x_attribute(strm, 4, "Detect64BitPortabilityProblems", vs200x_true(sess));
+ return vs200x_attribute(strm, 4, "Detect64BitPortabilityProblems", vs200x_true());
}
return OKAY;
}
-int vs200x_config_runtime_type_info(Session sess, Stream strm, Project prj)
+int vs200x_config_runtime_type_info(Stream strm)
{
- int version = vs200x_get_target_version(sess);
- UNUSED(prj);
- if (version < 2005)
+ if (vs200x_get_target_version() < 2005)
{
- return vs200x_attribute(strm, 4, "RuntimeTypeInfo", vs200x_true(sess));
+ return vs200x_attribute(strm, 4, "RuntimeTypeInfo", vs200x_true());
}
return OKAY;
}
-int vs200x_config_use_precompiled_header(Session sess, Stream strm, Project prj)
+int vs200x_config_use_precompiled_header(Stream strm)
{
- int version = vs200x_get_target_version(sess);
- UNUSED(prj);
- return vs200x_attribute(strm, 4, "UsePrecompiledHeader", (version > 2003) ? "0" : "2");
+ return vs200x_attribute(strm, 4, "UsePrecompiledHeader", vs200x_get_target_version() > 2003 ? "0" : "2");
}
diff --git a/src/actions/vs200x/vs200x_config.h b/src/actions/vs200x/vs200x_config.h
index 53172e9..8c8909d 100644
--- a/src/actions/vs200x/vs200x_config.h
+++ b/src/actions/vs200x/vs200x_config.h
@@ -6,12 +6,10 @@
#if !defined(PREMAKE_VS200X_CONFIG_H)
#define PREMAKE_VS200X_CONFIG_H
-#include "session/session.h"
-
-int vs200x_config_character_set(Session sess, Stream strm);
-int vs200x_config_defines(Session sess, Stream strm, Project prj);
-int vs200x_config_detect_64bit_portability(Session sess, Stream strm, Project prj);
-int vs200x_config_runtime_type_info(Session sess, Stream strm, Project prj);
-int vs200x_config_use_precompiled_header(Session sess, Stream strm, Project prj);
+int vs200x_config_character_set(Stream strm);
+int vs200x_config_defines(Stream strm, Project prj);
+int vs200x_config_detect_64bit_portability(Stream strm);
+int vs200x_config_runtime_type_info(Stream strm);
+int vs200x_config_use_precompiled_header(Stream strm);
#endif
diff --git a/src/actions/vs200x/vs200x_project.c b/src/actions/vs200x/vs200x_project.c
index 2fda5ad..c34c974 100644
--- a/src/actions/vs200x/vs200x_project.c
+++ b/src/actions/vs200x/vs200x_project.c
@@ -18,17 +18,18 @@
/**
* Write the opening [Configuration] element and attributes.
*/
-int vs200x_project_config_element(Session sess, Project prj, Stream strm)
+int vs200x_project_config_element(Project prj, Stream strm)
{
int z = OKAY;
- const char* cfg_name = project_get_configuration_filter(prj);
+ const char* cfg_name = project_get_config(prj);
+
z |= stream_write(strm, "\t\t<Configuration");
z |= vs200x_attribute(strm, 3, "Name", "%s|Win32", cfg_name);
z |= vs200x_attribute(strm, 3, "OutputDirectory", "$(SolutionDir)$(ConfigurationName)");
z |= vs200x_attribute(strm, 3, "IntermediateDirectory", "$(ConfigurationName)");
z |= vs200x_attribute(strm, 3, "ConfigurationType", "1");
- z |= vs200x_config_character_set(sess, strm);
- z |= vs200x_element_end(sess, strm, 2, ">");
+ z |= vs200x_config_character_set(strm);
+ z |= vs200x_element_end(strm, 2, ">");
return z;
}
@@ -36,9 +37,8 @@ int vs200x_project_config_element(Session sess, Project prj, Stream strm)
/**
* Write the closing [Configuration] element.
*/
-int vs200x_project_config_end(Session sess, Project prj, Stream strm)
+int vs200x_project_config_end(Project prj, Stream strm)
{
- UNUSED(sess);
UNUSED(prj);
return stream_writeline(strm, "\t\t</Configuration>");
}
@@ -47,7 +47,7 @@ int vs200x_project_config_end(Session sess, Project prj, Stream strm)
/**
* Create a new output stream for a project, and make it active for subsequent writes.
*/
-int vs200x_project_create(Session sess, Project prj, Stream strm)
+int vs200x_project_create(Project prj, Stream strm)
{
/* create the project file */
const char* extension = vs200x_project_file_extension(prj);
@@ -59,7 +59,7 @@ int vs200x_project_create(Session sess, Project prj, Stream strm)
}
/* make the stream active for the functions that come after */
- session_set_active_stream(sess, strm);
+ session_set_active_stream(project_get_session(prj), strm);
return OKAY;
}
@@ -67,14 +67,14 @@ int vs200x_project_create(Session sess, Project prj, Stream strm)
/**
* Write the root [VisualStudioProject] element and attributes.
*/
-int vs200x_project_element(Session sess, Project prj, Stream strm)
+int vs200x_project_element(Project prj, Stream strm)
{
int version, z;
const char* prj_ver;
const char* prj_name = project_get_name(prj);
const char* prj_guid = project_get_guid(prj);
- version = vs200x_get_target_version(sess);
+ version = vs200x_get_target_version();
switch (version)
{
default:
@@ -101,7 +101,8 @@ int vs200x_project_element(Session sess, Project prj, Stream strm)
{
z |= vs200x_attribute(strm, 1, "TargetFrameworkVersion", "196613");
}
- z |= vs200x_element_end(sess, strm, 0, ">");
+ z |= vs200x_element_end(strm, 0, ">");
+
return z;
}
@@ -109,10 +110,9 @@ int vs200x_project_element(Session sess, Project prj, Stream strm)
/**
* Write the file encoding at the start of the project file.
*/
-int vs200x_project_encoding(Session sess, Project prj, Stream strm)
+int vs200x_project_encoding(Project prj, Stream strm)
{
int z;
- UNUSED(sess);
UNUSED(prj);
stream_set_newline(strm, "\r\n");
@@ -123,14 +123,13 @@ int vs200x_project_encoding(Session sess, Project prj, Stream strm)
/**
* Write an individual file entry to the project file; callback for sourcetree_walk().
- * \param sess The current execution session context.
* \param prj The current project; contains the file being enumerated.
* \param strm The active output stream; for writing the file markup.
* \param filename The name of the file to process.
* \param state One of the ActionSourceStates, enabling file grouping.
* \returns OKAY if successful.
*/
-int vs200x_project_file(Session sess, Project prj, Stream strm, const char* filename, int state)
+int vs200x_project_file(Project prj, Stream strm, const char* filename, int state)
{
const char* name;
const char* ptr;
@@ -167,7 +166,7 @@ int vs200x_project_file(Session sess, Project prj, Stream strm, const char* file
z |= stream_write(strm, "<Filter");
z |= vs200x_attribute(strm, depth + 1, "Name", name);
z |= vs200x_attribute(strm, depth + 1, "Filter", "");
- z |= vs200x_element_end(sess, strm, depth, ">");
+ z |= vs200x_element_end(strm, depth, ">");
}
break;
@@ -184,7 +183,7 @@ int vs200x_project_file(Session sess, Project prj, Stream strm, const char* file
z |= stream_write(strm, "<File");
ptr = (filename[0] == '.') ? "" : ".\\";
z |= vs200x_attribute(strm, depth + 1, "RelativePath", "%s%s", ptr, filename);
- z |= vs200x_element_end(sess, strm, depth, ">");
+ z |= vs200x_element_end(strm, depth, ">");
z |= stream_write_n(strm, "\t", depth);
z |= stream_writeline(strm, "</File>");
break;
@@ -198,11 +197,11 @@ int vs200x_project_file(Session sess, Project prj, Stream strm, const char* file
/**
* Write out the [Files] element.
*/
-int vs200x_project_files(Session sess, Project prj, Stream strm)
+int vs200x_project_files(Project prj, Stream strm)
{
int z = OKAY;
z |= stream_writeline(strm, "\t<Files>");
- z |= sourcetree_walk(sess, prj, strm, vs200x_project_file);
+ z |= sourcetree_walk(prj, strm, vs200x_project_file);
z |= stream_writeline(strm, "\t</Files>");
return z;
}
@@ -211,10 +210,9 @@ int vs200x_project_files(Session sess, Project prj, Stream strm)
/**
* Write out the [Globals] element.
*/
-int vs200x_project_globals(Session sess, Project prj, Stream strm)
+int vs200x_project_globals(Project prj, Stream strm)
{
int z = OKAY;
- UNUSED(sess);
UNUSED(prj);
z |= stream_writeline(strm, "\t<Globals>");
z |= stream_writeline(strm, "\t</Globals>");
@@ -226,14 +224,14 @@ int vs200x_project_globals(Session sess, Project prj, Stream strm)
/**
* Write out the platforms section of a project file.
*/
-int vs200x_project_platforms(Session sess, Project prj, Stream strm)
+int vs200x_project_platforms(Project prj, Stream strm)
{
int z = OKAY;
UNUSED(prj);
z |= stream_writeline(strm, "\t<Platforms>");
z |= stream_write(strm, "\t\t<Platform");
z |= vs200x_attribute(strm, 3, "Name", "Win32");
- z |= vs200x_element_end(sess, strm, 2, "/>");
+ z |= vs200x_element_end(strm, 2, "/>");
z |= stream_writeline(strm, "\t</Platforms>");
return OKAY;
}
@@ -242,12 +240,13 @@ int vs200x_project_platforms(Session sess, Project prj, Stream strm)
/**
* Write out the [References] element and attributes.
*/
-int vs200x_project_references(Session sess, Project prj, Stream strm)
+int vs200x_project_references(Project prj, Stream strm)
{
int z;
UNUSED(prj);
+
z = stream_writeline(strm, "\t</Configurations>");
- if (vs200x_get_target_version(sess) > 2002)
+ if (vs200x_get_target_version() > 2002)
{
z |= stream_writeline(strm, "\t<References>");
z |= stream_writeline(strm, "\t</References>");
@@ -259,13 +258,12 @@ int vs200x_project_references(Session sess, Project prj, Stream strm)
/**
* Write out the [ToolFiles] section of a Visual Studio project.
*/
-int vs200x_project_tool_files(Session sess, Project prj, Stream strm)
+int vs200x_project_tool_files(Project prj, Stream strm)
{
- int version, z = OKAY;
+ int z = OKAY;
UNUSED(prj);
- version = vs200x_get_target_version(sess);
- if (version > 2003)
+ if (vs200x_get_target_version() > 2003)
{
z |= stream_writeline(strm, "\t<ToolFiles>");
z |= stream_writeline(strm, "\t</ToolFiles>");
@@ -278,13 +276,13 @@ int vs200x_project_tool_files(Session sess, Project prj, Stream strm)
/**
* Common function to write an empty [Tool] element.
*/
-static int vs200x_project_vc_empty_tool(Session sess, Project prj, Stream strm, const char* name)
+static int vs200x_project_vc_empty_tool(Project prj, Stream strm, const char* name)
{
- int z;
+ int z = OKAY;
UNUSED(prj);
- z = stream_write(strm, "\t\t\t<Tool");
+ z |= stream_write(strm, "\t\t\t<Tool");
z |= vs200x_attribute(strm, 4, "Name", name);
- z |= vs200x_element_end(sess, strm, 3, "/>");
+ z |= vs200x_element_end(strm, 3, "/>");
return z;
}
@@ -292,49 +290,49 @@ static int vs200x_project_vc_empty_tool(Session sess, Project prj, Stream strm,
/**
* Write the VCALinkTool [Tool] element and attributes.
*/
-int vs200x_project_vc_alink_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_alink_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCALinkTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCALinkTool");
}
/**
* Write the VCAppVerifierTool [Tool] element and attributes.
*/
-int vs200x_project_vc_app_verifier_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_app_verifier_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCAppVerifierTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCAppVerifierTool");
}
/**
* Write the VCBscMakeTool [Tool] element and attributes.
*/
-int vs200x_project_vc_bsc_make_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_bsc_make_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCBscMakeTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCBscMakeTool");
}
/**
* Write the VCCLCompilerTool [Tool] element and attributes.
*/
-int vs200x_project_vc_cl_compiler_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_cl_compiler_tool(Project prj, Stream strm)
{
int z = OKAY;
z |= stream_write(strm, "\t\t\t<Tool");
z |= vs200x_attribute(strm, 4, "Name", "VCCLCompilerTool");
z |= vs200x_attribute(strm, 4, "Optimization", "0");
- z |= vs200x_config_defines(sess, strm, prj);
- z |= vs200x_attribute(strm, 4, "MinimalRebuild", vs200x_true(sess));
+ z |= vs200x_config_defines(strm, prj);
+ z |= vs200x_attribute(strm, 4, "MinimalRebuild", vs200x_true());
z |= vs200x_attribute(strm, 4, "BasicRuntimeChecks", "3");
z |= vs200x_attribute(strm, 4, "RuntimeLibrary", "3");
- z |= vs200x_config_runtime_type_info(sess, strm, prj);
- z |= vs200x_config_use_precompiled_header(sess, strm, prj);
+ z |= vs200x_config_runtime_type_info(strm);
+ z |= vs200x_config_use_precompiled_header(strm);
z |= vs200x_attribute(strm, 4, "WarningLevel", "3");
- z |= vs200x_config_detect_64bit_portability(sess, strm, prj);
+ z |= vs200x_config_detect_64bit_portability(strm);
z |= vs200x_attribute(strm, 4, "DebugInformationFormat", "4");
- z |= vs200x_element_end(sess, strm, 3, "/>");
+ z |= vs200x_element_end(strm, 3, "/>");
return z;
}
@@ -342,36 +340,36 @@ int vs200x_project_vc_cl_compiler_tool(Session sess, Project prj, Stream strm)
/**
* Write the VCCustomBuildTool [Tool] element and attributes.
*/
-int vs200x_project_vc_custom_build_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_custom_build_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCCustomBuildTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCCustomBuildTool");
}
/**
* Write the VCFxCopTool [Tool] element and attributes.
*/
-int vs200x_project_vc_fx_cop_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_fx_cop_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCFxCopTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCFxCopTool");
}
/**
* Write the VCLinkerTool [Tool] element and attributes.
*/
-int vs200x_project_vc_linker_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_linker_tool(Project prj, Stream strm)
{
- int z;
+ int z = OKAY;
UNUSED(prj);
- z = stream_write(strm, "\t\t\t<Tool");
+ z |= stream_write(strm, "\t\t\t<Tool");
z |= vs200x_attribute(strm, 4, "Name", "VCLinkerTool");
z |= vs200x_attribute(strm, 4, "LinkIncremental", "2");
- z |= vs200x_attribute(strm, 4, "GenerateDebugInformation", vs200x_true(sess));
+ z |= vs200x_attribute(strm, 4, "GenerateDebugInformation", vs200x_true());
z |= vs200x_attribute(strm, 4, "SubSystem", "1");
z |= vs200x_attribute(strm, 4, "EntryPointSymbol", "mainCRTStartup");
z |= vs200x_attribute(strm, 4, "TargetMachine", "1");
- z |= vs200x_element_end(sess, strm, 3, "/>");
+ z |= vs200x_element_end(strm, 3, "/>");
return z;
}
@@ -379,97 +377,97 @@ int vs200x_project_vc_linker_tool(Session sess, Project prj, Stream strm)
/**
* Write the VCManagedResourceCompilerTool [Tool] element and attributes.
*/
-int vs200x_project_vc_managed_resource_compiler_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_managed_resource_compiler_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCManagedResourceCompilerTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCManagedResourceCompilerTool");
}
/**
* Write the VCManifestTool [Tool] element and attributes.
*/
-int vs200x_project_vc_manifest_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_manifest_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCManifestTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCManifestTool");
}
/**
* Write the VCMIDLTool [Tool] element and attributes.
*/
-int vs200x_project_vc_midl_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_midl_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCMIDLTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCMIDLTool");
}
/**
* Write the VCPreBuildEventTool [Tool] element and attributes.
*/
-int vs200x_project_vc_pre_build_event_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_pre_build_event_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCPreBuildEventTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCPreBuildEventTool");
}
/**
* Write the VCPreLinkEventTool [Tool] element and attributes.
*/
-int vs200x_project_vc_pre_link_event_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_pre_link_event_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCPreLinkEventTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCPreLinkEventTool");
}
/**
* Write the VCPostBuildEventTool [Tool] element and attributes.
*/
-int vs200x_project_vc_post_build_event_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_post_build_event_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCPostBuildEventTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCPostBuildEventTool");
}
/**
* Write the VCResourceCompiler [Tool] element and attributes.
*/
-int vs200x_project_vc_resource_compiler_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_resource_compiler_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCResourceCompilerTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCResourceCompilerTool");
}
/**
* Write the VCWebDeploymentTool [Tool] element and attributes.
*/
-int vs200x_project_vc_web_deployment_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_web_deployment_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCWebDeploymentTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCWebDeploymentTool");
}
/**
* Write the VCWebServiceProxyGeneratorTool [Tool] element and attributes.
*/
-int vs200x_project_vc_web_service_proxy_generator_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_web_service_proxy_generator_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCWebServiceProxyGeneratorTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCWebServiceProxyGeneratorTool");
}
/**
* Write the VCXDCMakeTool [Tool] element and attributes.
*/
-int vs200x_project_vc_xdc_make_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_xdc_make_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCXDCMakeTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCXDCMakeTool");
}
/**
* Write the VCXMLDataGeneratorTool [Tool] element and attributes.
*/
-int vs200x_project_vc_xml_data_generator_tool(Session sess, Project prj, Stream strm)
+int vs200x_project_vc_xml_data_generator_tool(Project prj, Stream strm)
{
- return vs200x_project_vc_empty_tool(sess, prj, strm, "VCXMLDataGeneratorTool");
+ return vs200x_project_vc_empty_tool(prj, strm, "VCXMLDataGeneratorTool");
}
diff --git a/src/actions/vs200x/vs200x_project.h b/src/actions/vs200x/vs200x_project.h
index a4950f9..020cdea 100644
--- a/src/actions/vs200x/vs200x_project.h
+++ b/src/actions/vs200x/vs200x_project.h
@@ -6,36 +6,34 @@
#if !defined(PREMAKE_VS200X_PROJECT_H)
#define PREMAKE_VS200X_PROJECT_H
-#include "session/session.h"
-
-int vs200x_project_config_element(Session sess, Project prj, Stream strm);
-int vs200x_project_config_end(Session sess, Project prj, Stream strm);
-int vs200x_project_create(Session sess, Project prj, Stream strm);
-int vs200x_project_element(Session sess, Project prj, Stream strm);
-int vs200x_project_encoding(Session sess, Project prj, Stream strm);
-int vs200x_project_file(Session sess, Project prj, Stream strm, const char* filename, int state);
-int vs200x_project_files(Session sess, Project prj, Stream strm);
-int vs200x_project_globals(Session sess, Project prj, Stream strm);
-int vs200x_project_platforms(Session sess, Project prj, Stream strm);
-int vs200x_project_references(Session sess, Project prj, Stream strm);
-int vs200x_project_tool_files(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_alink_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_app_verifier_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_bsc_make_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_cl_compiler_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_custom_build_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_fx_cop_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_midl_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_linker_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_managed_resource_compiler_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_manifest_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_pre_build_event_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_pre_link_event_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_post_build_event_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_resource_compiler_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_web_deployment_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_web_service_proxy_generator_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_xdc_make_tool(Session sess, Project prj, Stream strm);
-int vs200x_project_vc_xml_data_generator_tool(Session sess, Project prj, Stream strm);
+int vs200x_project_config_element(Project prj, Stream strm);
+int vs200x_project_config_end(Project prj, Stream strm);
+int vs200x_project_create(Project prj, Stream strm);
+int vs200x_project_element(Project prj, Stream strm);
+int vs200x_project_encoding(Project prj, Stream strm);
+int vs200x_project_file(Project prj, Stream strm, const char* filename, int state);
+int vs200x_project_files(Project prj, Stream strm);
+int vs200x_project_globals(Project prj, Stream strm);
+int vs200x_project_platforms(Project prj, Stream strm);
+int vs200x_project_references(Project prj, Stream strm);
+int vs200x_project_tool_files(Project prj, Stream strm);
+int vs200x_project_vc_alink_tool(Project prj, Stream strm);
+int vs200x_project_vc_app_verifier_tool(Project prj, Stream strm);
+int vs200x_project_vc_bsc_make_tool(Project prj, Stream strm);
+int vs200x_project_vc_cl_compiler_tool(Project prj, Stream strm);
+int vs200x_project_vc_custom_build_tool(Project prj, Stream strm);
+int vs200x_project_vc_fx_cop_tool(Project prj, Stream strm);
+int vs200x_project_vc_midl_tool(Project prj, Stream strm);
+int vs200x_project_vc_linker_tool(Project prj, Stream strm);
+int vs200x_project_vc_managed_resource_compiler_tool(Project prj, Stream strm);
+int vs200x_project_vc_manifest_tool(Project prj, Stream strm);
+int vs200x_project_vc_pre_build_event_tool(Project prj, Stream strm);
+int vs200x_project_vc_pre_link_event_tool(Project prj, Stream strm);
+int vs200x_project_vc_post_build_event_tool(Project prj, Stream strm);
+int vs200x_project_vc_resource_compiler_tool(Project prj, Stream strm);
+int vs200x_project_vc_web_deployment_tool(Project prj, Stream strm);
+int vs200x_project_vc_web_service_proxy_generator_tool(Project prj, Stream strm);
+int vs200x_project_vc_xdc_make_tool(Project prj, Stream strm);
+int vs200x_project_vc_xml_data_generator_tool(Project prj, Stream strm);
#endif
diff --git a/src/actions/vs200x/vs200x_solution.c b/src/actions/vs200x/vs200x_solution.c
index 6578bd4..23faa42 100644
--- a/src/actions/vs200x/vs200x_solution.c
+++ b/src/actions/vs200x/vs200x_solution.c
@@ -12,12 +12,8 @@
/**
* Create a new output stream for a solution, and make it active for subsequent writes.
- * \param sess The execution session context.
- * \param sln The current solution.
- * \param strm The currently active stream; set with session_set_active_stream().
- * \returns OKAY if successful.
*/
-int vs200x_solution_create(Session sess, Solution sln, Stream strm)
+int vs200x_solution_create(Solution sln, Stream strm)
{
/* create the solution file */
const char* filename = solution_get_filename(sln, NULL, ".sln");
@@ -28,6 +24,6 @@ int vs200x_solution_create(Session sess, Solution sln, Stream strm)
}
/* make the stream active for the functions that come after */
- session_set_active_stream(sess, strm);
+ session_set_active_stream(solution_get_session(sln), strm);
return OKAY;
}
diff --git a/src/actions/vs200x/vs200x_solution.h b/src/actions/vs200x/vs200x_solution.h
index 18683c4..0917ca9 100644
--- a/src/actions/vs200x/vs200x_solution.h
+++ b/src/actions/vs200x/vs200x_solution.h
@@ -6,25 +6,25 @@
#if !defined(PREMAKE_VS200X_SOLUTION_H)
#define PREMAKE_VS200X_SOLUTION_H
-#include "session/session.h"
+#include "objects/solution.h"
-int vs2002_solution_configuration(Session sess, Solution sln, Stream strm);
-int vs2002_solution_dependencies(Session sess, Solution sln, Stream strm);
-int vs2002_solution_extensibility(Session sess, Solution sln, Stream strm);
-int vs2002_solution_project_configuration(Session sess, Solution sln, Stream strm);
-int vs2002_solution_projects(Session sess, Solution sln, Stream strm);
-int vs2002_solution_signature(Session sess, Solution sln, Stream strm);
+int vs2002_solution_configuration(Solution sln, Stream strm);
+int vs2002_solution_dependencies(Solution sln, Stream strm);
+int vs2002_solution_extensibility(Solution sln, Stream strm);
+int vs2002_solution_project_configuration(Solution sln, Stream strm);
+int vs2002_solution_projects(Solution sln, Stream strm);
+int vs2002_solution_signature(Solution sln, Stream strm);
-int vs2003_solution_configuration(Session sess, Solution sln, Stream strm);
-int vs2003_solution_signature(Session sess, Solution sln, Stream strm);
+int vs2003_solution_configuration(Solution sln, Stream strm);
+int vs2003_solution_signature(Solution sln, Stream strm);
-int vs2005_solution_platforms(Session sess, Solution sln, Stream strm);
-int vs2005_solution_project_platforms(Session sess, Solution sln, Stream strm);
-int vs2005_solution_properties(Session sess, Solution sln, Stream strm);
-int vs2005_solution_signature(Session sess, Solution sln, Stream strm);
+int vs2005_solution_platforms(Solution sln, Stream strm);
+int vs2005_solution_project_platforms(Solution sln, Stream strm);
+int vs2005_solution_properties(Solution sln, Stream strm);
+int vs2005_solution_signature(Solution sln, Stream strm);
-int vs2008_solution_signature(Session sess, Solution sln, Stream strm);
+int vs2008_solution_signature(Solution sln, Stream strm);
-int vs200x_solution_create(Session sess, Solution sln, Stream strm);
+int vs200x_solution_create(Solution sln, Stream strm);
#endif