D2k csproj: Use MSBuild tasks instead of shelling out
This commit is contained in:
@@ -39,12 +39,6 @@
|
|||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<CustomCommands>
|
|
||||||
<CustomCommands>
|
|
||||||
<Command type="AfterBuild" command="cp ${TargetFile} ../mods/d2k" workingdir="${ProjectDir}" />
|
|
||||||
<Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/d2k" workingdir="${ProjectDir}" />
|
|
||||||
</CustomCommands>
|
|
||||||
</CustomCommands>
|
|
||||||
<DefineConstants>TRACE;DEBUG;</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;</DefineConstants>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
@@ -59,12 +53,6 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<CustomCommands>
|
|
||||||
<CustomCommands>
|
|
||||||
<Command type="AfterBuild" command="cp ${TargetFile} ../mods/d2k" workingdir="${ProjectDir}" />
|
|
||||||
<Command type="AfterBuild" command="cp ${TargetFile}.mdb ../mods/d2k" workingdir="${ProjectDir}" />
|
|
||||||
</CustomCommands>
|
|
||||||
</CustomCommands>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
@@ -101,7 +89,6 @@
|
|||||||
<Compile Include="Traits\World\D2kEditorResourceLayer.cs" />
|
<Compile Include="Traits\World\D2kEditorResourceLayer.cs" />
|
||||||
<Compile Include="Lint\CheckImportActors.cs" />
|
<Compile Include="Lint\CheckImportActors.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)mods/d2k/"
|
<PostBuildEvent>mkdir "$(SolutionDir)mods/d2k/"
|
||||||
copy "$(TargetPath)" "$(SolutionDir)mods/d2k/"
|
copy "$(TargetPath)" "$(SolutionDir)mods/d2k/"
|
||||||
@@ -136,6 +123,30 @@ cd "$(SolutionDir)"</PostBuildEvent>
|
|||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup />
|
<Target Name="AfterBuild">
|
||||||
|
<MakeDir Directories="$(SolutionDir)mods/d2k/"/>
|
||||||
|
<Copy
|
||||||
|
SourceFiles="$(TargetPath)"
|
||||||
|
DestinationFolder="$(SolutionDir)mods/d2k/"/>
|
||||||
|
<!--
|
||||||
|
We need to copy OpenRA.Mods.D2k.pdb (not `.dll.pdb`). This is only necessary on Windows.
|
||||||
|
Mono outputs a `.dll.mdb` so we can just append `.mdb` directly.
|
||||||
|
-->
|
||||||
|
<Copy
|
||||||
|
SourceFiles="$(TargetDir)$(TargetName).pdb"
|
||||||
|
DestinationFolder="$(SolutionDir)mods/d2k/"
|
||||||
|
Condition="'$(OS)' == 'Windows_NT'"/>
|
||||||
|
<Copy
|
||||||
|
SourceFiles="$(TargetPath).mdb"
|
||||||
|
DestinationFolder="$(SolutionDir)mods/d2k/"
|
||||||
|
Condition="'$(OS)' == 'Unix'"/>
|
||||||
|
<!-- Uncomment these lines when debugging or adding to this target
|
||||||
|
<Message Text="DEBUG OS: $(OS)"/>
|
||||||
|
<Message Text="DEBUG SolutionDir: $(SolutionDir)"/>
|
||||||
|
<Message Text="DEBUG TargetPath: $(TargetPath)"/>
|
||||||
|
<Message Text="DEBUG TargetDir: $(TargetDir)"/>
|
||||||
|
<Message Text="DEBUG TargetName: $(TargetName)"/>
|
||||||
|
-->
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user