-
-
Notifications
You must be signed in to change notification settings - Fork 124
/
SharedConfig.targets
61 lines (53 loc) · 2.81 KB
/
SharedConfig.targets
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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
InitialTargets="TestDSPGameFolder">
<Target Name="MaybeCopyDevEnv"
Inputs="$(MSBuildAllProjects)"
Outputs="$(DevEnvLoc)"
Condition="!Exists('$(DevEnvLoc)')">
<Copy SourceFiles="$(DevEnvLoc).example"
DestinationFiles="$(DevEnvLoc)"
SkipUnchangedFiles="true"/>
<Error Text="It appears your Dyson Sphere Program installation is not in the default Steam directory. Please set the path correctly in '$(DevEnvLoc)' (it has been created for you)."/>
</Target>
<Target Name="DevEnvInvalid"
Condition="Exists('$(DevEnvLoc)')">
<!-- If the default path is overriden in DevEnv, and it doesn't exist -->
<Error Text="Your Dyson Sphere Program installation folder has not been found at the path defined in '$(DevEnvLoc)'. Please set it correctly."/>
</Target>
<!-- Using DependsOnTarget with Conditional targets as an if else structure... -->
<!-- Note that this is the first target, called by InitialTargets -->
<Target Name="TestDSPGameFolder"
DependsOnTargets="MaybeCopyDevEnv;DevEnvInvalid"
Condition="!Exists('$(DSPGameDir)') And !Exists('$(PropSheetPath).remoteBuild')"/>
<ItemGroup>
<ProjectAssembliesForUnityProject Include="$(OutputPath)\*.dll"/>
<ProjectAssembliesMetaFilesFolder Include="..\NebulaUnity\AssemblyMeta\*.meta"/>
</ItemGroup>
<Target Name="CopyAssembliesToUnityProject"
AfterTargets="Build">
<Message Text="Executing CopyAssembliesToUnityProject task $(ProjectName)" Importance="high"/>
<Copy
SourceFiles="@(ProjectAssembliesForUnityProject)"
DestinationFolder="..\NebulaUnity\Assets\Assemblies\"/>
</Target>
<Target Name="CopyMetaFilesToUnityProject"
AfterTargets="Build">
<Copy
SourceFiles="@(ProjectAssembliesMetaFilesFolder)"
DestinationFolder="..\NebulaUnity\Assets\Assemblies\"/>
</Target>
<Target Name="CopyFilesToOutDir" AfterTargets="Build" Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' ">
<ItemGroup>
<DiscordLibs Include="..\dep\discord_game_sdk\lib\x86_64\*"/>
</ItemGroup>
<Copy SourceFiles="..\NebulaWorld\Assets\nebulabundle" DestinationFolder="$(OutDir)"/>
<Copy SourceFiles="@(DiscordLibs)" DestinationFolder="$(OutDir)"/>
</Target>
<Target Name="BeforeBuild">
<Copy
Condition="Exists('..\NebulaUnity\Assets\StreamingAssets\AssetBundles\nebulabundle')"
SourceFiles="..\NebulaUnity\Assets\StreamingAssets\AssetBundles\nebulabundle"
DestinationFolder="..\NebulaWorld\Assets\"/>
</Target>
</Project>