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.

119 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. </ItemGroup>
  52. <ItemGroup>
  53. <Content Include="..\Libs\thirdparty\*">
  54. <Link>Libraries\Thirdparty\%(Filename)%(Extension)</Link>
  55. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  56. </Content>
  57. </ItemGroup>
  58. <ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
  59. <Content Include="..\Libs\I18N.Net3.dll">
  60. <Link>Libraries\Mono\I18N.dll</Link>
  61. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  62. </Content>
  63. <Content Include="..\Libs\I18N.West.Net3.dll">
  64. <Link>Libraries\Mono\I18N.West.dll</Link>
  65. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  66. </Content>
  67. <Content Include="..\Libs\System.Runtime.Serialization.Net3.dll">
  68. <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
  69. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  70. </Content>
  71. </ItemGroup>
  72. <ItemGroup>
  73. <PackageReference Include="Mono.Cecil" Version="0.11.3" />
  74. <PackageReference Include="AsyncBridge" Version="0.3.1" />
  75. <ProjectReference Include="..\SemVer\SemVer.csproj" />
  76. <Reference Include="Hive.Versioning" Version="0.1.0">
  77. <HintPath>$(MSBuildThisFileDirectory)..\Libs\thirdparty\Hive.Versioning.dll</HintPath>
  78. </Reference>
  79. </ItemGroup>
  80. <Target Name="PostBuild" AfterTargets="PostBuildEvent">
  81. <Message Text="Relocating" Importance="normal" />
  82. <ItemGroup>
  83. <SystemFiles Include="$(OutputPath)IPA.Injector.*" />
  84. <SystemFiles Include="$(OutputPath)IPA.Loader.*" />
  85. <SystemFiles Include="$(OutputPath)AsyncBridge.*" />
  86. <SystemFiles Include="$(OutputPath)System.*" />
  87. <SystemFiles Include="$(OutputPath)Portable.System.*" />
  88. <SystemFiles Include="$(OutputPath)Net3-Proxy.*" />
  89. <SystemFiles Include="$(OutputPath)Libraries\Mono\**\*" />
  90. <OldLibFiles Include="$(OutputPath)Libs\**\*" />
  91. </ItemGroup>
  92. <Move SourceFiles="@(SystemFiles)" DestinationFolder="$(OutputPath)Data\Managed" />
  93. <RemoveDir Directories="$(OutputPath)Libraries\Mono" />
  94. <Delete Files="@(OldLibFiles)" />
  95. <RemoveDir Directories="$(OutputPath)Libs" />
  96. <ItemGroup>
  97. <LibFiles Include="$(OutputPath)**\*" Exclude="$(OutputPath)Data\**\*;$(OutputPath)Libs\**\*" />
  98. </ItemGroup>
  99. <Move SourceFiles="@(LibFiles)" DestinationFolder="$(OutputPath)Libs\" />
  100. <RemoveDir Directories="$(OutputPath)Libraries\Included" />
  101. <RemoveDir Directories="$(OutputPath)Libraries" />
  102. </Target>
  103. <Import Project="..\Common.targets"/>
  104. </Project>