Skip to content

Commit

Permalink
杂项改进
Browse files Browse the repository at this point in the history
  • Loading branch information
Rcmcpe committed Aug 26, 2020
1 parent b00d3d5 commit 28d0863
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>REVUnit.AutoArknights.Core</RootNamespace>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<nullable>enable</nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Colorful.Console" Version="1.2.11" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Refit" Version="5.1.67" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
<None Update="Adb\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -20,11 +23,14 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Folder Include="Assets\Cache" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Crlib\Crlib\Crlib.csproj" />
<ProjectReference Include="..\ImageLocator\ImageLocator\ImageLocator.csproj" />
</ItemGroup>

</Project>
9 changes: 8 additions & 1 deletion Auto Arknights CLI/Auto Arknights CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>REVUnit.AutoArknights.CLI</RootNamespace>
<Platforms>x64</Platforms>
Expand All @@ -10,25 +11,31 @@
<PublishDir>artifact\</PublishDir>
<nullable>enable</nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<None Remove="artifact\**" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Arknights Automation Library\Arknights Automation Library.csproj" />
<ProjectReference Include="..\Crlib\Crlib\Crlib.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Auto Arknights CLI.config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
</ItemGroup>

</Project>
5 changes: 2 additions & 3 deletions Auto Arknights CLI/AutoArknightsCli.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Configuration;
using System.IO;
using System.Reflection;
using Microsoft.Extensions.Configuration;
Expand All @@ -26,7 +25,7 @@ public AutoArknightsCli()
_config = new ConfigurationBuilder().AddJsonFile(ConfigJson).Build();

Log.LogLevel = Log.Level.Get(Conf("Log:Level")) ??
throw new ConfigurationErrorsException("Value of Log:Level in configuration is invalid");
throw new Exception("Value of Log:Level in configuration is invalid");
}

public void Run()
Expand All @@ -46,7 +45,7 @@ public void Run()

private string Conf(string key)
{
return _config[key] ?? throw new ConfigurationErrorsException($"Configuration key {key} is required");
return _config[key] ?? throw new Exception($"Configuration key {key} is required");
}
}
}
1 change: 1 addition & 0 deletions Auto Arknights CLI/Entry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using REVUnit.AutoArknights.Core;
using REVUnit.Crlib.Extension;

#endif

namespace REVUnit.AutoArknights.CLI
Expand Down
9 changes: 4 additions & 5 deletions Auto Arknights.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageLocator", "ImageLocato
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crlib", "Crlib\Crlib\Crlib.csproj", "{D0C9D2B9-210A-4E2B-9F5A-148C234FE0BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickTest", "QuickTest\QuickTest.csproj", "{F7707506-2D86-44D9-B3D1-20F757F8755B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -27,18 +25,19 @@ Global
{AF3D1DDF-8CC0-4A1C-A3D2-DB3875B8C3ED}.Debug|x64.ActiveCfg = Debug|x64
{AF3D1DDF-8CC0-4A1C-A3D2-DB3875B8C3ED}.Debug|x64.Build.0 = Debug|x64
{AF3D1DDF-8CC0-4A1C-A3D2-DB3875B8C3ED}.Release|x64.ActiveCfg = Release|x64
{AF3D1DDF-8CC0-4A1C-A3D2-DB3875B8C3ED}.Release|x64.Build.0 = Release|x64
{0C76DBB2-8CCF-4860-8C28-C542E74666BE}.Debug|x64.ActiveCfg = Debug|x64
{0C76DBB2-8CCF-4860-8C28-C542E74666BE}.Debug|x64.Build.0 = Debug|x64
{0C76DBB2-8CCF-4860-8C28-C542E74666BE}.Release|x64.ActiveCfg = Release|x64
{0C76DBB2-8CCF-4860-8C28-C542E74666BE}.Release|x64.Build.0 = Release|x64
{20BF00F4-DDBE-4592-A6C0-EEAF080326FC}.Debug|x64.ActiveCfg = Debug|Any CPU
{20BF00F4-DDBE-4592-A6C0-EEAF080326FC}.Debug|x64.Build.0 = Debug|Any CPU
{20BF00F4-DDBE-4592-A6C0-EEAF080326FC}.Release|x64.ActiveCfg = Release|Any CPU
{20BF00F4-DDBE-4592-A6C0-EEAF080326FC}.Release|x64.Build.0 = Release|Any CPU
{D0C9D2B9-210A-4E2B-9F5A-148C234FE0BB}.Debug|x64.ActiveCfg = Debug|Any CPU
{D0C9D2B9-210A-4E2B-9F5A-148C234FE0BB}.Debug|x64.Build.0 = Debug|Any CPU
{D0C9D2B9-210A-4E2B-9F5A-148C234FE0BB}.Release|x64.ActiveCfg = Release|Any CPU
{F7707506-2D86-44D9-B3D1-20F757F8755B}.Debug|x64.ActiveCfg = Debug|x64
{F7707506-2D86-44D9-B3D1-20F757F8755B}.Debug|x64.Build.0 = Debug|x64
{F7707506-2D86-44D9-B3D1-20F757F8755B}.Release|x64.ActiveCfg = Release|x64
{D0C9D2B9-210A-4E2B-9F5A-148C234FE0BB}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion Crlib
Submodule Crlib updated from 0fec95 to 1f09a4
2 changes: 1 addition & 1 deletion ImageLocator
18 changes: 0 additions & 18 deletions QuickTest/QuickTest.csproj

This file was deleted.

0 comments on commit 28d0863

Please sign in to comment.