mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 05:05:40 +12:00
change sqllite libary
This commit is contained in:
parent
6627ca5dc4
commit
41a6038527
7 changed files with 25 additions and 14 deletions
|
@ -23,9 +23,6 @@
|
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="6.0.7" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>false</GenerateBindingRedirectsOutputType>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: hisp
|
||||
Version: 1.7.90
|
||||
Version: 1.7.91
|
||||
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
||||
Maintainer: Li
|
||||
Homepage: https://islehorse.com
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</ContentWithTargetPath>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="6.0.7" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.7" />
|
||||
<PackageReference Include="MySqlConnector" Version="2.1.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.7.90.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.90.0")]
|
||||
[assembly: AssemblyVersion("1.7.91.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.91.0")]
|
||||
|
|
|
@ -13,6 +13,7 @@ using HISP.Game.SwfModules;
|
|||
|
||||
using MySqlConnector;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using SQLitePCL;
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
|
@ -67,11 +68,16 @@ namespace HISP.Server
|
|||
public static void OpenDatabase()
|
||||
{
|
||||
if (!ConfigReader.SqlLite)
|
||||
{
|
||||
ConnectionString = "server=" + ConfigReader.DatabaseIP + ";user=" + ConfigReader.DatabaseUsername + ";password=" + ConfigReader.DatabasePassword + ";database=" + ConfigReader.DatabaseName;
|
||||
else
|
||||
ConnectionString = "Data Source=\"" + ConfigReader.DatabaseName + ".db\";";
|
||||
|
||||
DataFixerUpper.FixUpDb();
|
||||
}
|
||||
else
|
||||
{
|
||||
ConnectionString = "Data Source=\"" + ConfigReader.DatabaseName + ".db\";";
|
||||
Batteries.Init();
|
||||
}
|
||||
|
||||
|
||||
using (DbConnection db = connectDb())
|
||||
{
|
||||
|
@ -128,6 +134,7 @@ namespace HISP.Server
|
|||
|
||||
if (ConfigReader.SqlLite)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
DbCommand sqlCommand = db.CreateCommand();
|
||||
|
@ -624,6 +631,7 @@ namespace HISP.Server
|
|||
};
|
||||
}
|
||||
|
||||
DataFixerUpper.FixUpDb();
|
||||
}
|
||||
|
||||
public static void DeleteRanchOwner(int ranchId)
|
||||
|
|
|
@ -109,7 +109,13 @@ namespace HISP.Noobs
|
|||
ConfigReader.SqlLite = true;
|
||||
ConfigReader.LogLevel = 0;
|
||||
ConfigReader.CrossDomainPolicyFile = Path.Combine(BaseDir, "CrossDomainPolicy.xml");
|
||||
ConfigReader.DatabaseName = Path.Combine(BaseDir, "game1.db");
|
||||
|
||||
// Compatibility patch
|
||||
if (File.Exists(Path.Combine(BaseDir, "game1.db.db"))) {
|
||||
File.Move(Path.Combine(BaseDir, "game1.db.db"), Path.Combine(BaseDir, "game1.db"));
|
||||
}
|
||||
|
||||
ConfigReader.DatabaseName = Path.Combine(BaseDir, "game1");
|
||||
|
||||
|
||||
IncrementProgress();
|
||||
|
@ -175,7 +181,7 @@ namespace HISP.Noobs
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Horse Isle server failed to start: " + e.Message, "Error starting web server", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("Horse Isle server failed to start: " + e.Message, "Error starting hi1 server", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
IncrementProgress();
|
||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.7.90.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.90.0")]
|
||||
[assembly: AssemblyVersion("1.7.91.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.91.0")]
|
||||
|
|
Loading…
Add table
Reference in a new issue