Skip to content

Commit

Permalink
Merge pull request #90 from Piotrekol/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol authored Jan 22, 2025
2 parents 0fdbd3b + d45e4bc commit 46055f0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
11 changes: 4 additions & 7 deletions CollectionManagerDll/CollectionManagerDll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="Realm" Version="11.7.0" />
<PackageReference Include="SharpCompress" Version="0.36.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="SharpCompress" Version="0.39.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.*" />
<PackageReference Include="Microsoft.CSharp" Version="4.*" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="9.0.1" />
</ItemGroup>
</Project>
17 changes: 12 additions & 5 deletions CollectionManagerDll/Modules/FileIO/OsuRealmReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ protected static Realm GetRealm(string realmFilePath, bool readOnly = true)
}
catch (RealmException exception)
{
const string RealmFileVersionMismatchMessage = "because it has a file format version";

if (exception.Message.Contains(RealmFileVersionMismatchMessage))
{
throw new RealmNotValidatedException($"Opening osu!lazer database failed. Consider reporting this on github. {exception.Message}");
}

Match numberMatch = _lastNumber.Match(exception.Message);
string schemaVersionOrMessage = numberMatch.Success
? numberMatch.Value
string schemaVersionOrMessage = numberMatch.Success
? numberMatch.Value
: exception.Message;

throw new RealmNotValidatedException($"Opening osu!lazer database failed." +
$" Expected schema version: '{_lastValidatedRealmSchemaVersion}'," +
$" got: '{schemaVersionOrMessage}'. Consider reporting this on github.");
throw new RealmNotValidatedException($"Opening osu!lazer database failed. " +
$"Expected schema version: '{_lastValidatedRealmSchemaVersion}', " +
$"got: '{schemaVersionOrMessage}'. Consider reporting this on github.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions InnoSetup/script.iss
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ Source: "..\App\bin\Release\net48\NAudio.xml"; DestDir: "{app}"; Flags: ignoreve
Source: "..\App\bin\Release\net48\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\ObjectListView.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\ObjectListView.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\realm-wrappers.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\Realm.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\Realm.PlatformHelpers.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\Remotion.Linq.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\SharpCompress.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Buffers.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.IO.Pipelines.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Memory.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Numerics.Vectors.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Runtime.CompilerServices.Unsafe.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Security.AccessControl.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Security.Principal.Windows.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Text.Encoding.CodePages.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Text.Encodings.Web.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Text.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\App\bin\Release\net48\System.Threading.Channels.dll"; DestDir: "{app}"; Flags: ignoreversion
Expand Down

0 comments on commit 46055f0

Please sign in to comment.