-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathXCOM2.targets
More file actions
92 lines (84 loc) · 3.81 KB
/
XCOM2.targets
File metadata and controls
92 lines (84 loc) · 3.81 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- BEGIN Required for ModBuddy -->
<PropertyGroup>
<StartAction>Program</StartAction>
<StartProgram>$(XCOM2_GamePath)\..\Binaries\Win64\Launcher\StartDebugging.bat</StartProgram>
</PropertyGroup>
<PropertyGroup>
<OutputPath>.</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Default|XCOM 2' ">
<OutputPath>.</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>.</OutputPath>
</PropertyGroup>
<PropertyGroup>
<ProjectDir Condition="'$(BuildPath)'==''">$(MSBuildProjectDirectory)</ProjectDir>
<ModsDir>$(XCOM2_UserPath)\Mods\</ModsDir>
<OutputDir>$(ModsDir)$(SafeName)\</OutputDir>
</PropertyGroup>
<!-- Prevent spontaneous build warnings/errors -->
<Target Name="GetFrameworkPaths" />
<!-- END Required for ModBuddy -->
<!-- Setup default build entrypoint if none is set -->
<PropertyGroup>
<BuildEntryFileName Condition=" '$(BuildEntryFileName)' == '' ">build.ps1</BuildEntryFileName>
<BuildEntryPs1 Condition=" '$(BuildEntryPs1)' == '' ">$(ScriptsDir)$(BuildEntryFileName)</BuildEntryPs1>
</PropertyGroup>
<!-- Setup powershell build config -->
<PropertyGroup Condition=" '$(BuildEntryConfig)' == '' ">
<BuildEntryConfig Condition=" '$(Configuration)' == 'Default' ">default</BuildEntryConfig>
<BuildEntryConfig Condition=" '$(Configuration)' == 'Debug' ">debug</BuildEntryConfig>
</PropertyGroup>
<!-- Misc targets -->
<Target Name="Clean">
<ItemGroup>
<Args Include="modName">
<Value>$(SafeName)</Value>
</Args>
</ItemGroup>
<InvokePowershellTask
EntryPs1="$([System.IO.Path]::GetFullPath('$(BuildCommonRoot)clean.ps1'))"
SolutionRoot="$([System.IO.Path]::GetFullPath('$(SolutionRoot)'))"
SdkInstallPath="$([System.IO.Path]::GetFullPath('$(XCOM2_UserPath)..\\'))"
GameInstallPath="$([System.IO.Path]::GetFullPath('$(XCOM2_GamePath)..\\'))"
AdditionalArgs="@(Args)"
/>
</Target>
<Target Name="ReBuild">
<CallTarget Targets="Clean;Default"/>
</Target>
<!-- The actual build -->
<Target Name="Default">
<!-- Uncomment if MSBuild insists that project is up to date -->
<!-- <Exec Command="exit" /> -->
<ItemGroup>
<Args Include="config">
<Value>$(BuildEntryConfig)</Value>
</Args>
</ItemGroup>
<!-- Clean up the \..\ from the paths - makes it easier to debug -->
<InvokePowershellTask
EntryPs1="$([System.IO.Path]::GetFullPath('$(BuildEntryPs1)'))"
SolutionRoot="$([System.IO.Path]::GetFullPath('$(SolutionRoot)'))"
SdkInstallPath="$([System.IO.Path]::GetFullPath('$(XCOM2_UserPath)..\\'))"
GameInstallPath="$([System.IO.Path]::GetFullPath('$(XCOM2_GamePath)..\\'))"
AdditionalArgs="@(Args)"
/>
</Target>
<!-- Task definition -->
<UsingTask TaskName="InvokePowershellTask" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<EntryPs1 Required="true" />
<SolutionRoot Required="true" />
<SdkInstallPath Required="true" />
<GameInstallPath Required="true" />
<AdditionalArgs ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="false" />
</ParameterGroup>
<Task>
<Reference Include="System.Management.Automation" />
<Code Language="cs" Source="$(BuildCommonRoot)InvokePowershellTask.cs" />
</Task>
</UsingTask>
</Project>