Revert "Simplify MainSlnExecutable.props"
This reverts commit 1edddb2126
.
This commit is contained in:
parent
1edddb2126
commit
a11077ef4e
|
@ -5,10 +5,12 @@
|
||||||
This allows us to have the executable dependencies automagically copied over to our dll folder while still keeping the executable in the output folder. -->
|
This allows us to have the executable dependencies automagically copied over to our dll folder while still keeping the executable in the output folder. -->
|
||||||
<OutputPath>$(MSBuildProjectDirectory)/../../output/dll/</OutputPath>
|
<OutputPath>$(MSBuildProjectDirectory)/../../output/dll/</OutputPath>
|
||||||
<ExecFilesDest>$(MSBuildProjectDirectory)/../../output/</ExecFilesDest>
|
<ExecFilesDest>$(MSBuildProjectDirectory)/../../output/</ExecFilesDest>
|
||||||
<!-- Setting TargetName changes the output file name while preserving the AssemblyName -->
|
<!-- Setting TargetFileName does not change the AssemblyName (as setting TargetName would), but also does not change the output file name
|
||||||
<TargetName>$(MSBuildProjectName.Substring($([MSBuild]::Add($(MSBuildProjectName.LastIndexOf('.')), 1))))</TargetName>
|
for the executable on build (as one would expect). So we still need to rename the executable file below. Using this method has the advantage
|
||||||
|
of IDEs respecting the TargetFileName and expecting it. -->
|
||||||
|
<TargetFileName>$(MSBuildProjectName.Substring($([MSBuild]::Add($(MSBuildProjectName.LastIndexOf('.')), 1)))).exe</TargetFileName>
|
||||||
<!-- This also doesn't actually change where the executable is output, rather it's just a hint to the IDE to know where the executable is (since we move it). -->
|
<!-- This also doesn't actually change where the executable is output, rather it's just a hint to the IDE to know where the executable is (since we move it). -->
|
||||||
<TargetPath>$(ExecFilesDest)$(TargetName).exe</TargetPath>
|
<TargetPath>$(ExecFilesDest)$(TargetFileName)</TargetPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- This is somewhat wasteful for DiscoHawk, but it still relies on some unmanaged libraries
|
<!-- This is somewhat wasteful for DiscoHawk, but it still relies on some unmanaged libraries
|
||||||
|
@ -23,9 +25,13 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ExecFilesFromExecProj Include="$(OutputPath)$(TargetFileName).*" /> <!-- note: doesn't include the .xml file (although we wouldn't want to rename/move that) -->
|
<ExecFilesFromExecProj Include="$(OutputPath)$(MSBuildProjectName).*" /> <!-- doesn't include the .exe.config because those are automatically renamed??? -->
|
||||||
|
<ExecConfigFilesFromExecProj Include="$(OutputPath)$(TargetFileName).*" /> <!-- include the .exe.config files -->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Move SourceFiles="@(ExecFilesFromExecProj)" DestinationFolder="$(ExecFilesDest)" />
|
<!-- Surely this can be done in one step, right? FIXME -->
|
||||||
|
<Move SourceFiles="@(ExecFilesFromExecProj)" DestinationFiles="@(ExecFilesFromExecProj->Replace('BizHawk.Client.', ''))" />
|
||||||
|
<Move SourceFiles="@(ExecFilesFromExecProj->Replace('BizHawk.Client.', ''))" DestinationFolder="$(ExecFilesDest)" />
|
||||||
|
<Move SourceFiles="@(ExecConfigFilesFromExecProj)" DestinationFolder="$(ExecFilesDest)" />
|
||||||
<MakeDir Directories="$(ExecFilesDest)ExternalTools;$(ExecFilesDest)Firmware;$(ExecFilesDest)Tools" />
|
<MakeDir Directories="$(ExecFilesDest)ExternalTools;$(ExecFilesDest)Firmware;$(ExecFilesDest)Tools" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in New Issue