summaryrefslogtreecommitdiffstats
path: root/Studio/Build Configurations/Viewer.build
blob: 83d75beb327bf121ae26e3e58f57f5699d4ebecc (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
<?xml version="1.0"?>
<project name="Viewer" default="uicpreview">
	<!-- The following variables can be used to customize the way this script is executed. They can be configured either by the dropdown of Studio's toolbar or the environment variables in Studio Preferences.
		BUILDFILE : path to this Nant file. This is auto-generated by Studio based on the configuration chosed.
		UIPFILE : path to the UIC Project file.
		MODE : Selected via Preview toolbar. It defines the C++ Build Configuration to executed, either ( Debug, Profile or Release )
		PLATFORM : Selected via Preview toolbar. This defines the platform to preview the exported presentation.
		FLOW : Configured via Studio's environment variable. Points to the location of the .xif file if previewing a Flow file
		PREVIEW : Configured via Studio's environment variable. Alternative application to execute on preview.
	-->
	<uic:integration xmlns:uic="http://www.nvidia.com">
		<uic:preview>"Build Configurations\Nant\bin\nant" -nologo -f:"%BUILDFILE%" -D:uipfile="%UIPFILE%" -D:mode=%MODE% -D:platform=%PLATFORM% -D:useflowfile="%FLOW%" -D:preview_app="%PREVIEW%"</uic:preview>
		<uic:deploy>"Build Configurations\Nant\bin\nant" uicdeploy -nologo -f:"%BUILDFILE%" -D:uipfile="%UIPFILE%" -D:mode=%MODE% -D:platform=%PLATFORM% -D:useflowfile="%FLOW%"</uic:deploy>
		<uic:property name="PLATFORM" label="Platform" help="Which box do you want to preview on?">
			<uic:value name="PC"  label="PC"/>
		</uic:property>
		<uic:property name="MODE" label="Release Mode">
			<uic:value name="Release" label="Release"/>
			<uic:value name="Debug"   label="Debug"/>
		</uic:property>
	</uic:integration>

  <property name="uicomposerpath" value="${ directory::get-parent-directory( directory::get-parent-directory( project::get-base-directory( ) ) )  }" />
	<property name="status"         value="0" />

	<!--
		Set default property values if they're not passed in.
		Must do this before calculating what external file(s) to pull in.
	-->
	<property name="platform"      value="PC"      overwrite="false" />
	<property name="mode"          value="release" overwrite="false" />
	<property name="varStudioName" value="Studio"  overwrite="false" />

	<property name="flowfile" value="${ path::combine( directory::get-current-directory( ), useflowfile ) }" unless="${ useflowfile == '_NULL_' }" />
	<property name="flowfile" value=""                                                                       if=    "${ useflowfile == '_NULL_' }" />

	<!-- Name of the executable viewer that is used for preview -->
	<property name="Win32ViewerApp" value="${ 'UICViewerWin32' + mode + '.EXE' }" />
	
	<!-- For conditioners/viewers that have additional DLL dependencies. -->
	<setenv name="PATH" value="${ environment::get-variable( 'PATH' ) };${uicomposerpath}\Studio\Build Configurations\bin"/>
	
	<!--
		Bring in external NAnt files. Altogether, these must define
		all main targets, "setup", "deploy", "preview".
	-->
	<include buildfile="Viewer/setup.include" />
	<include buildfile="Viewer/deploy_${platform}.include" />
	<include buildfile="Viewer/preview_${platform}.include" />

	<!-- Defer to targets in external file(s), but using our dependencies. -->
	<target
		name="uicsetup"
		description="E.g. ceate output folders, set up extra variables.">
		<call target="setup" />
	</target>
	<target
		name="uicdeploy" depends="uicsetup"
		description="Copy all require files to necessary destination(s)">
		<call target="deploy" />
	</target>
	<target
		name="uicpreview" depends="uicdeploy"
		description="Kick off the appropriate preview application.">
		<call target="preview" />
	</target>
</project>