-
Notifications
You must be signed in to change notification settings - Fork 38
/
buildshaders.msbuild
66 lines (57 loc) · 2.07 KB
/
buildshaders.msbuild
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Export Nebula3 project assets for multiple platforms.
(C) 2007 Radon Labs GmbH
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
<!-- define properties -->
<PropertyGroup>
<ProjDir>c:\nebula3</ProjDir>
<ToolkitDir>$(PROGRAMFILES)\Nebula2 Toolkit For Maya\bin\win32</ToolkitDir>
<MayaDir>$(PROGRAMFILES)\Alias\Maya7.0\bin</MayaDir>
<Platform>win32</Platform>
<ExportDir>$(ProjDir)\export</ExportDir>
<Rebuild>false</Rebuild>
<Debug>false</Debug>
</PropertyGroup>
<Choose>
<When Condition="$(Rebuild)=='true'">
<PropertyGroup>
<ForceArg>-force true</ForceArg>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ForceArg></ForceArg>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<When Condition="$(Debug)=='true'">
<PropertyGroup>
<DebugArg>-debug</DebugArg>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DebugArg></DebugArg>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- define items -->
<ItemGroup>
<DataFiles Include="$(ProjDir)\data\**\*.xml"/>
</ItemGroup>
<!-- preparation -->
<Target Name="Prepare">
<Exec Command="nsetpath -projdir $(ProjDir)" WorkingDirectory="$(ToolkitDir)"/>
<RemoveDir Condition="$(Rebuild)=='true'" Directories="$(ExportDir)_$(Platform)\shaders" ContinueOnError="true"/>
</Target>
<!-- export graphics objects -->
<Target Name="ExportShader" DependsOnTargets="Prepare">
<Exec Command="shaderbatcher3 $(ForceArg) -platform $(Platform) $(DebugArg)" WorkingDirectory="$(ToolkitDir)"/>
<Exec Command="archiver3 -platform $(Platform)" WorkingDirectory="$(ToolkitDir)"/>
</Target>
<!-- final target -->
<Target Name="All" DependsOnTargets="ExportShader" />
</Project>