Browse Source

Add ILRepack and LZMA packages

habeebweeb 4 years ago
parent
commit
616f90c39e
3 changed files with 38 additions and 0 deletions
  1. 13 0
      MultipleMaids/ILRepack.targets
  2. 19 0
      MultipleMaids/MultipleMaids.csproj
  3. 6 0
      MultipleMaids/packages.config

+ 13 - 0
MultipleMaids/ILRepack.targets

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
+
+        <ItemGroup>
+            <InputAssemblies Include="$(OutputPath)\$(AssemblyName).dll" />
+            <InputAssemblies Include="$(OutputPath)\SevenZip.dll" />
+        </ItemGroup>
+
+        <ILRepack LibraryPath=".\lib\" Parallel="true" Internalize="true" InputAssemblies="@(InputAssemblies)" TargetKind="Dll" OutputFile="$(OutputPath)\$(AssemblyName).dll" />
+
+    </Target>
+</Project>

+ 19 - 0
MultipleMaids/MultipleMaids.csproj

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="packages\ILRepack.2.0.17\build\ILRepack.props" Condition="Exists('packages\ILRepack.2.0.17\build\ILRepack.props')" />
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -28,6 +29,8 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -61,6 +64,9 @@
     <Reference Include="ExIni">
       <HintPath>lib\ExIni.dll</HintPath>
     </Reference>
+    <Reference Include="SevenZip, Version=18.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>packages\LZMA-SDK.18.1.0\lib\net20\SevenZip.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="UnityEngine">
@@ -88,7 +94,9 @@
     <Compile Include="ImportCM2.cs" />
     <Compile Include="CM3D2\MultipleMaids\Plugin\MultipleMaids.cs" />
     <Compile Include="AssemblyInfo.cs" />
+    <Compile Include="SaveManager.cs" />
     <Compile Include="Util\Logger.cs" />
+    <Compile Include="Util\LZMA.cs" />
     <Compile Include="Util\SimpleJSON.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -98,5 +106,16 @@
       <Install>true</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('packages\ILRepack.2.0.17\build\ILRepack.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILRepack.2.0.17\build\ILRepack.props'))" />
+    <Error Condition="!Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.17\build\ILRepack.Lib.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILRepack.Lib.MSBuild.Task.2.0.17\build\ILRepack.Lib.MSBuild.Task.targets'))" />
+  </Target>
+  <Import Project="packages\ILRepack.Lib.MSBuild.Task.2.0.17\build\ILRepack.Lib.MSBuild.Task.targets" Condition="Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.17\build\ILRepack.Lib.MSBuild.Task.targets')" />
 </Project>

+ 6 - 0
MultipleMaids/packages.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="ILRepack" version="2.0.17" targetFramework="net35" />
+  <package id="ILRepack.Lib.MSBuild.Task" version="2.0.17" targetFramework="net35" />
+  <package id="LZMA-SDK" version="18.1.0" targetFramework="net35" />
+</packages>