From a66edea6dc281f6a24d21fa8943e13ea785d43ec Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 21 Nov 2017 15:33:05 +0900 Subject: [PATCH] Move sqlite batteries to osu.Desktop Fixes e_sqlite.dll not being copied to output on Windows --- osu.Desktop/Program.cs | 3 +++ osu.Desktop/osu.Desktop.csproj | 1 + osu.Game/Database/OsuDbContext.cs | 6 ------ osu.Game/osu.Game.csproj | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index 720b38144c..b7ecefe1ce 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -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; diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index 9fed566703..56a455e6b7 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -28,6 +28,7 @@ + diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs index 928c355696..4208bad2d3 100644 --- a/osu.Game/Database/OsuDbContext.cs +++ b/osu.Game/Database/OsuDbContext.cs @@ -29,12 +29,6 @@ namespace osu.Game.Database private static readonly Lazy logger = new Lazy(() => new OsuDbLoggerFactory()); - static OsuDbContext() - { - // required to initialise native SQLite libraries on some platforms. - SQLitePCL.Batteries_V2.Init(); - } - /// /// Create a new in-memory OsuDbContext instance. /// diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index dd591bcba8..b8c1e0551c 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -19,7 +19,7 @@ - +