You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
4.1 KiB

  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <Import Project="..\Common.props" />
  3. <PropertyGroup>
  4. <TargetFramework>net472</TargetFramework>
  5. <RootNamespace>IPA.Injector</RootNamespace>
  6. <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  7. <GenerateDocumentationFile>false</GenerateDocumentationFile>
  8. <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
  9. <BuildForBeatSaber Condition=" '$(BuildForBeatSaber)' == '' And '$(TargetFramework)' == 'net472' ">true</BuildForBeatSaber>
  10. </PropertyGroup>
  11. <PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
  12. <DefineConstants>$(DefineConstants);NET4</DefineConstants>
  13. </PropertyGroup>
  14. <PropertyGroup Condition="'$(TargetFramework)' == 'net35'">
  15. <DefineConstants>$(DefineConstants);NET3</DefineConstants>
  16. </PropertyGroup>
  17. <PropertyGroup Condition="'$(BuildForBeatSaber)' == 'true'">
  18. <DefineConstants>$(DefineConstants);BeatSaber</DefineConstants>
  19. </PropertyGroup>
  20. <ItemGroup>
  21. <ProjectReference Include="..\IPA.Loader\IPA.Loader.csproj" />
  22. <ProjectReference Include="..\Net3-Proxy\Net3-Proxy.csproj" Condition=" '$(TargetFramework)' == 'net35' " />
  23. </ItemGroup>
  24. <ItemGroup>
  25. <Reference Include="UnityEngine.CoreModule" Condition=" '$(TargetFramework)' == 'net472' ">
  26. <HintPath>..\Refs\UnityEngine.CoreModule.Net4.dll</HintPath>
  27. <Private>False</Private>
  28. </Reference>
  29. <Reference Include="UnityEngine.CoreModule" Condition=" '$(TargetFramework)' == 'net35' ">
  30. <HintPath>..\Refs\UnityEngine.CoreModule.Net3.dll</HintPath>
  31. <Private>False</Private>
  32. </Reference>
  33. </ItemGroup>
  34. <ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
  35. <Content Include="..\Libs\Microsoft.CSharp.dll">
  36. <Link>Libraries\Mono\Microsoft.CSharp.dll</Link>
  37. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  38. </Content>
  39. </ItemGroup>
  40. <ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
  41. <Content Include="..\Libs\I18N.Net3.dll">
  42. <Link>Libraries\Mono\I18N.dll</Link>
  43. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  44. </Content>
  45. <Content Include="..\Libs\I18N.West.Net3.dll">
  46. <Link>Libraries\Mono\I18N.West.dll</Link>
  47. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  48. </Content>
  49. <Content Include="..\Libs\System.Runtime.Serialization.Net3.dll">
  50. <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
  51. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  52. </Content>
  53. </ItemGroup>
  54. <ItemGroup>
  55. <PackageReference Include="Mono.Cecil" Version="0.11.5" />
  56. <PackageReference Include="AsyncBridge" Version="0.3.1" />
  57. <ProjectReference Include="..\SemVer\SemVer.csproj" />
  58. </ItemGroup>
  59. <Target Name="PostBuild" AfterTargets="PostBuildEvent">
  60. <Message Text="Copying documentation" Importance="high" />
  61. <ItemGroup>
  62. <XmlFiles Include="%(ReferenceCopyLocalPaths.RelativeDir)%(ReferenceCopyLocalPaths.Filename).xml" Condition="Exists('%(ReferenceCopyLocalPaths.RelativeDir)%(ReferenceCopyLocalPaths.Filename).xml')" />
  63. </ItemGroup>
  64. <Copy SourceFiles="@(XmlFiles)" DestinationFolder="$(OutputPath)" />
  65. <Message Text="Relocating" Importance="normal" />
  66. <ItemGroup>
  67. <SystemFiles Include="$(OutputPath)IPA.Injector.*" />
  68. <SystemFiles Include="$(OutputPath)IPA.Loader.*" />
  69. <SystemFiles Include="$(OutputPath)AsyncBridge.*" />
  70. <SystemFiles Include="$(OutputPath)System.*" />
  71. <SystemFiles Include="$(OutputPath)Portable.System.*" />
  72. <SystemFiles Include="$(OutputPath)Net3-Proxy.*" />
  73. <OldLibFiles Include="$(OutputPath)Libs\**\*" />
  74. </ItemGroup>
  75. <Move SourceFiles="@(SystemFiles)" DestinationFolder="$(OutputPath)Data\Managed" />
  76. <Delete Files="@(OldLibFiles)" />
  77. <RemoveDir Directories="$(OutputPath)Libs" />
  78. <ItemGroup>
  79. <LibFiles Include="$(OutputPath)**\*" Exclude="$(OutputPath)Data\**\*;$(OutputPath)Libs\**\*" />
  80. </ItemGroup>
  81. <Move SourceFiles="@(LibFiles)" DestinationFolder="$(OutputPath)Libs\" />
  82. <RemoveDir Directories="$(OutputPath)Libraries\Included" />
  83. <RemoveDir Directories="$(OutputPath)Libraries" />
  84. </Target>
  85. <Import Project="..\Common.targets" />
  86. </Project>