|
|
- <Project Sdk="Microsoft.NET.Sdk">
-
- <Import Project="..\Common.props"/>
-
- <PropertyGroup>
- <TargetFrameworks>net461;net35</TargetFrameworks>
- <RootNamespace>IPA.Injector</RootNamespace>
-
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <GenerateDocumentationFile>false</GenerateDocumentationFile>
- <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
- <BuildForBeatSaber Condition=" '$(BuildForBeatSaber)' == '' And '$(TargetFramework)' == 'net461' ">true</BuildForBeatSaber>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
- <DefineConstants>$(DefineConstants);NET4</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'net35'">
- <DefineConstants>$(DefineConstants);NET3</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(BuildForBeatSaber)' == 'true'">
- <DefineConstants>$(DefineConstants);BeatSaber</DefineConstants>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\IPA.Loader\IPA.Loader.csproj" />
- <ProjectReference Include="..\Net3-Proxy\Net3-Proxy.csproj" Condition=" '$(TargetFramework)' == 'net35' " />
- </ItemGroup>
-
- <ItemGroup>
- <Reference Include="UnityEngine.CoreModule" Condition=" '$(TargetFramework)' == 'net461' ">
- <HintPath>..\Refs\UnityEngine.CoreModule.Net4.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="UnityEngine.CoreModule" Condition=" '$(TargetFramework)' == 'net35' ">
- <HintPath>..\Refs\UnityEngine.CoreModule.Net3.dll</HintPath>
- <Private>False</Private>
- </Reference>
- </ItemGroup>
-
- <ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
- <Content Include="..\Libs\I18N.Net4.dll">
- <Link>Libraries\Mono\I18N.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\Libs\I18N.West.Net4.dll">
- <Link>Libraries\Mono\I18N.West.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\Libs\Microsoft.CSharp.dll">
- <Link>Libraries\Mono\Microsoft.CSharp.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\Libs\System.Runtime.Serialization.Net4.dll">
- <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
- <Content Include="..\Libs\I18N.Net3.dll">
- <Link>Libraries\Mono\I18N.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\Libs\I18N.West.Net3.dll">
- <Link>Libraries\Mono\I18N.West.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="..\Libs\System.Runtime.Serialization.Net3.dll">
- <Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="Mono.Cecil" Version="0.10.4" />
- <PackageReference Include="SemanticVersioning" Version="1.2.2" />
- <PackageReference Include="AsyncBridge" Version="0.3.1" />
- </ItemGroup>
-
- <Target Name="PostBuild" AfterTargets="PostBuildEvent">
- <Message Text="Relocating" Importance="normal" />
- <ItemGroup>
- <SystemFiles Include="$(OutputPath)IPA.Injector.*" />
- <SystemFiles Include="$(OutputPath)IPA.Loader.*" />
- <SystemFiles Include="$(OutputPath)AsyncBridge.*" />
- <SystemFiles Include="$(OutputPath)System.*" />
- <SystemFiles Include="$(OutputPath)Portable.System.*" />
- <SystemFiles Include="$(OutputPath)Net3-Proxy.*" />
- <SystemFiles Include="$(OutputPath)Libraries\Mono\**\*" />
- <OldLibFiles Include="$(OutputPath)Libs\**\*" />
- </ItemGroup>
- <Move SourceFiles="@(SystemFiles)" DestinationFolder="$(OutputPath)Data\Managed" />
- <RemoveDir Directories="$(OutputPath)Libraries\Mono" />
-
- <Delete Files="@(OldLibFiles)" />
- <RemoveDir Directories="$(OutputPath)Libs" />
- <ItemGroup>
- <LibFiles Include="$(OutputPath)**\*" Exclude="$(OutputPath)Data\**\*;$(OutputPath)Libs\**\*" />
- </ItemGroup>
- <Move SourceFiles="@(LibFiles)" DestinationFolder="$(OutputPath)Libs\" />
- <RemoveDir Directories="$(OutputPath)Libraries\Included" />
- <RemoveDir Directories="$(OutputPath)Libraries" />
- </Target>
-
- <Import Project="..\Common.targets"/>
-
- </Project>
|