Moving source files into a separate folder

This commit is contained in:
Anton Kasyanov
2021-02-28 17:09:33 +02:00
parent cd5002abb3
commit 656c68065e
108 changed files with 68 additions and 82 deletions

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="3.3.2" targetFramework="net47" developmentDependency="true" />
<package id="Fody" version="4.0.2" targetFramework="net47" developmentDependency="true" />
<package id="LightInject" version="5.4.0" targetFramework="net47" />
<package id="MediatR" version="6.0.0" targetFramework="net47" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net47" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net47" />
</packages>

View File

@@ -2,7 +2,7 @@
{
static class Configuration
{
public const string SolutionName = @"./EVE-O-Preview.sln";
public const string SolutionName = @"./src/EVE-O-Preview.sln";
public const string BinFolder = @"./bin";
public const string ToolsFolder = @"./tools";

View File

@@ -1,9 +1,13 @@
using Cake.Core;
using Cake.Frosting;
public class Context : FrostingContext
namespace Build
{
public class Context : FrostingContext
{
public Context(ICakeContext context)
: base(context)
{
}
}
}

View File

@@ -5,12 +5,11 @@ using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
public sealed class Lifetime : FrostingLifetime<Context>
namespace Build
{
public sealed class Lifetime : FrostingLifetime<Context>
{
private const string NuGetUrl = @"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
private const string ToolsDirectoryName = "./tools";
private const string BinDirectoryName = "./bin";
private const string PublishDirectoryName = "./publish";
private void DeleteDirectory(Context context, string directoryName)
{
@@ -24,18 +23,18 @@ public sealed class Lifetime : FrostingLifetime<Context>
private void DownloadNuGet(Context context)
{
if (context.FileExists(ToolsDirectoryName + "/nuget.exe"))
if (context.FileExists(Configuration.ToolsFolder + "/nuget.exe"))
{
return;
}
if (!context.DirectoryExists(ToolsDirectoryName))
if (!context.DirectoryExists(Configuration.ToolsFolder))
{
context.CreateDirectory(ToolsDirectoryName);
context.CreateDirectory(Configuration.ToolsFolder);
}
var tempFile = context.DownloadFile(NuGetUrl);
context.CopyFile(tempFile, new FilePath(ToolsDirectoryName + "/nuget.exe"));
context.CopyFile(tempFile, new FilePath(Configuration.ToolsFolder + "/nuget.exe"));
}
public override void Setup(Context context)
@@ -43,8 +42,8 @@ public sealed class Lifetime : FrostingLifetime<Context>
context.Information("Setting things up...");
context.Information("Delete bin and publish folders");
this.DeleteDirectory(context, BinDirectoryName);
this.DeleteDirectory(context, PublishDirectoryName);
this.DeleteDirectory(context, Configuration.BinFolder);
this.DeleteDirectory(context, Configuration.PublishFolder);
context.Information("Download NuGet");
this.DownloadNuGet(context);
@@ -56,4 +55,5 @@ public sealed class Lifetime : FrostingLifetime<Context>
context.Information("Tearing things down...");
//this.DeleteDirectory(context, ToolsDirectoryName);
}
}
}

View File

@@ -7,7 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eve-O-Preview", "Eve-O-Prev
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eve-O-Mock", "Eve-O-Mock\Eve-O-Mock.csproj", "{BE2C3A13-CC19-4525-895F-381DD71C5833}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "build\Build.csproj", "{68083BCC-92B8-4A73-BFD2-0DE619873F86}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "..\build\Build.csproj", "{68083BCC-92B8-4A73-BFD2-0DE619873F86}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -31,7 +30,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin</OutputPath>
<OutputPath>..\..\bin</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -76,19 +75,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="LightInject, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LightInject.5.4.0\lib\net46\LightInject.dll</HintPath>
</Reference>
<Reference Include="MediatR, Version=6.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2, processorArchitecture=MSIL">
<HintPath>..\packages\MediatR.6.0.0\lib\net461\MediatR.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
@@ -96,9 +83,6 @@
<Reference Include="System.Linq.Expressions" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
@@ -227,24 +211,31 @@
<ItemGroup>
<None Include="app.config" />
<EmbeddedResource Include="app.manifest" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<None Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<PackageReference Include="Costura.Fody">
<Version>3.3.2</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>4.0.2</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="LightInject">
<Version>5.4.0</Version>
</PackageReference>
<PackageReference Include="MediatR">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.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\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

Some files were not shown because too many files have changed in this diff Show More