forked from NebulaModTeam/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SharedConfig.targets
27 lines (23 loc) · 1.24 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
<?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)')" />
</Project>