summaryrefslogtreecommitdiff
path: root/utils/itemtest/itemtest_com.vpc
blob: 1bea97ac14bc89876335b3604a54bea71d359079 (plain) (blame)
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
93
94
95
96
97
98
99
100
101
102
//============ Copyright (c) Valve Corporation, All rights reserved. ==========
//
//=============================================================================


$Macro SRCDIR		"..\.."
$Macro OUTBINDIR	"$SRCDIR\..\game\bin"
// Initially we link this as itemtest_com.exe, to avoid conflicting with itemtest.exe
$Macro OUTBINNAME	"itemtest_com"
// Then we copy the result to itemtest.com so that the command-line version will be
// launched first.
$Macro FINAL_OUTBINNAME "itemtest.com"

$Include "$SRCDIR\vpc_scripts\source_exe_con_base.vpc"
$Include "$SRCDIR\utils\itemtest_lib\itemtest_lib_support.vpc"

$Configuration
{
	$Linker
	{
		$AdditionalDependencies					"$BASE comctl32.lib odbc32.lib odbccp32.lib Rpcrt4.lib"
	}

	// This is a special case... there is a name collision between game/bin/itemtest.com (this project)
	// and game/bin/itemtest.exe, so we need a custom build event that doesn't try to copy the .map/.pdb
	// for the .com into game/bin to avoid a race condition when doing parallel builds...  maybe there's
	// a better solution
	$PostBuildEvent [!$ANALYZE]
	{
		$CommandLine		"call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$FINAL_OUTBINNAME $SRCDIR" "\n" \
							"copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$FINAL_OUTBINNAME" "\n" \
							"if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
							"call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
							"copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
							"if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
							"goto BuildEventOK" "\n" \
							":BuildEventFailed" "\n" \
							"echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! COM is probably running. ***" "\n" \
							"del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
							"exit 1" "\n" \
							":BuildEventOK" "\n"

		$Description		"Publishing to $OUTBINDIR"
		$ExcludedFromBuild	"No"
	}
}

$Configuration  "Debug"
{
	$General
	{
		$OutputDirectory						".\Debug_itemtest_com"
		$IntermediateDirectory					".\Debug_itemtest_com"
	}
}

$Configuration  "Release"
{
	$General
	{
		$OutputDirectory						".\Release_itemtest_com"
		$IntermediateDirectory					".\Release_itemtest_com"
	}
}

$Project "itemtest_com"
{
	$Folder	"Source Files"
	{
		$File	"itemtestapp.cpp"
		$File	"itemtest_con.cpp"
		$File	"runexe.cpp"

		$Folder "External"
		{
			$File	"$SRCDIR\public\interpolatortypes.cpp"
			$File	"$SRCDIR\public\movieobjects\movieobjects.cpp"
		}
	}

	$Folder	"Header Files"
	{
		$File	"itemtestapp.h"
		$File	"runexe.h"
		$Folder "External"
		{
			$File	"$SRCDIR\public\interpolatortypes.h"
		}
	}

	$Folder	"Link Libraries"
	{
		$Lib appframework
		$Lib bitmap
		$Lib mathlib
		$Lib tier2
		$Lib tier3

		$ImpLib steam_api
		$Lib vtf
	}
}