-
-
Notifications
You must be signed in to change notification settings - Fork 124
/
SharedConfig.targets
37 lines (31 loc) · 1.52 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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
InitialTargets="TestDSPGameFolder;CreatePluginDirectory">
<PropertyGroup>
</PropertyGroup>
<PropertyGroup>
</PropertyGroup>
<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)')" />
<Target Name="CreatePluginDirectory"
Condition="Exists('$(DSPGameDir)') and !Exists('$(PluginOutputDirectory)')">
<MakeDir Directories="$(PluginOutputDirectory)" />
</Target>
</Project>