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.

120 lines
4.9 KiB

  1. <Project Sdk="Microsoft.NET.Sdk">
  2. <Import Project="..\Common.props" />
  3. <PropertyGroup>
  4. <TargetFrameworks>net472</TargetFrameworks>
  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\I18N.Net4.dll">
  36. <Link>Libraries\Mono\I18N.dll</Link>
  37. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  38. </Content>
  39. <Content Include="..\Libs\I18N.West.Net4.dll">
  40. <Link>Libraries\Mono\I18N.West.dll</Link>
  41. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  42. </Content>
  43. <Content Include="..\Libs\Microsoft.CSharp.dll">
  44. <Link>Libraries\Mono\Microsoft.CSharp.dll</Link>
  45. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  46. </Content>
  47. <Content Include="..\Libs\System.Runtime.Serialization.Net4.dll">
  48. <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
  49. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  50. </Content>
  51. <Content Include="..\Libs\netstandard.dll">
  52. <Link>Libraries\Mono\netstandard.dll</Link>
  53. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  54. </Content>
  55. </ItemGroup>
  56. <ItemGroup>
  57. <Content Include="..\Libs\thirdparty\*">
  58. <Link>Libraries\Thirdparty\%(Filename)%(Extension)</Link>
  59. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  60. </Content>
  61. </ItemGroup>
  62. <ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
  63. <Content Include="..\Libs\I18N.Net3.dll">
  64. <Link>Libraries\Mono\I18N.dll</Link>
  65. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  66. </Content>
  67. <Content Include="..\Libs\I18N.West.Net3.dll">
  68. <Link>Libraries\Mono\I18N.West.dll</Link>
  69. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  70. </Content>
  71. <Content Include="..\Libs\System.Runtime.Serialization.Net3.dll">
  72. <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
  73. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  74. </Content>
  75. </ItemGroup>
  76. <ItemGroup>
  77. <PackageReference Include="Mono.Cecil" Version="0.11.4" />
  78. <PackageReference Include="AsyncBridge" Version="0.3.1" />
  79. <ProjectReference Include="..\SemVer\SemVer.csproj" />
  80. </ItemGroup>
  81. <Target Name="PostBuild" AfterTargets="PostBuildEvent">
  82. <Message Text="Relocating" Importance="normal" />
  83. <ItemGroup>
  84. <SystemFiles Include="$(OutputPath)IPA.Injector.*" />
  85. <SystemFiles Include="$(OutputPath)IPA.Loader.*" />
  86. <SystemFiles Include="$(OutputPath)AsyncBridge.*" />
  87. <SystemFiles Include="$(OutputPath)System.*" />
  88. <SystemFiles Include="$(OutputPath)Portable.System.*" />
  89. <SystemFiles Include="$(OutputPath)Net3-Proxy.*" />
  90. <SystemFiles Include="$(OutputPath)Libraries\Mono\**\*" />
  91. <OldLibFiles Include="$(OutputPath)Libs\**\*" />
  92. </ItemGroup>
  93. <Move SourceFiles="@(SystemFiles)" DestinationFolder="$(OutputPath)Data\Managed" />
  94. <RemoveDir Directories="$(OutputPath)Libraries\Mono" />
  95. <Delete Files="@(OldLibFiles)" />
  96. <RemoveDir Directories="$(OutputPath)Libs" />
  97. <ItemGroup>
  98. <LibFiles Include="$(OutputPath)**\*" Exclude="$(OutputPath)Data\**\*;$(OutputPath)Libs\**\*" />
  99. </ItemGroup>
  100. <Move SourceFiles="@(LibFiles)" DestinationFolder="$(OutputPath)Libs\" />
  101. <RemoveDir Directories="$(OutputPath)Libraries\Included" />
  102. <RemoveDir Directories="$(OutputPath)Libraries" />
  103. </Target>
  104. <Import Project="..\Common.targets" />
  105. </Project>