Move sqlite batteries to osu.Desktop

Fixes e_sqlite.dll not being copied to output on Windows
This commit is contained in:
smoogipoo 2017-11-21 15:33:05 +09:00
parent 538acadd23
commit a66edea6dc
4 changed files with 5 additions and 7 deletions

View File

@ -15,6 +15,9 @@ namespace osu.Desktop
[STAThread]
public static int Main(string[] args)
{
// required to initialise native SQLite libraries on some platforms.
SQLitePCL.Batteries_V2.Init();
// Back up the cwd before DesktopGameHost changes it
var cwd = Environment.CurrentDirectory;

View File

@ -28,6 +28,7 @@
<ProjectReference Include="..\osu-resources\osu.Game.Resources\osu.Game.Resources.csproj" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.1" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="squirrel.windows" Version="1.7.8" Condition="'$(TargetFramework)' == 'net461'" />
</ItemGroup>

View File

@ -29,12 +29,6 @@ namespace osu.Game.Database
private static readonly Lazy<OsuDbLoggerFactory> logger = new Lazy<OsuDbLoggerFactory>(() => new OsuDbLoggerFactory());
static OsuDbContext()
{
// required to initialise native SQLite libraries on some platforms.
SQLitePCL.Batteries_V2.Init();
}
/// <summary>
/// Create a new in-memory OsuDbContext instance.
/// </summary>

View File

@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Humanizer" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="SharpCompress" Version="0.18.1" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.0" />