Skip to content

Commit

Permalink
Restored original LibRetro mechanism, because I give up
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Dec 31, 2024
1 parent b0417ba commit 3faec55
Show file tree
Hide file tree
Showing 19 changed files with 252 additions and 362 deletions.
20 changes: 1 addition & 19 deletions FriishProduce/App.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings />
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="libraries;libs;resources\libraries;resources\libs;lib;resources\lib" />
Expand All @@ -19,10 +18,6 @@
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
Expand All @@ -37,17 +32,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
</configuration>
71 changes: 3 additions & 68 deletions FriishProduce/FriishProduce.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -61,12 +60,6 @@
<StartupObject>FriishProduce.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="HtmlRenderer, Version=1.5.0.6, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlRenderer.Core.1.5.0.6\lib\net45\HtmlRenderer.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -101,30 +94,6 @@
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="ServiceStack, Version=3.9.71.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Common, Version=1.0.4333.5581, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.Common.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite, Version=3.0.3.5599, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.OrmLite.SqlServer.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Redis, Version=3.9.71.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.Redis.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.ServiceInterface, Version=3.9.71.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text, Version=3.9.71.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Redis.Complete.1.0.0\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
Expand All @@ -134,15 +103,6 @@
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.119.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.119.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Formats.Nrbf, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Nrbf.9.0.0\lib\net462\System.Formats.Nrbf.dll</HintPath>
Expand Down Expand Up @@ -731,14 +691,6 @@
<PreBuildEvent>:: Make needed folders
:: -------
mkdir "$(TargetDir)strings\" 1&gt;nul
mkdir "$(TargetDir)resources\databases" 1&gt;nul

cd "$(ProjectDir)Resources\databases\"


for %25%25f in (*.rdb) do (call :copy2 %25%25f)



:: Move banners to project folder for development use
:: -------
Expand All @@ -753,17 +705,10 @@ for %25%25f in (*.app) do (call :copy1 %25%25f)



:copy1
:copy
if NOT exist %251\* (move %251 "$(ProjectDir)Resources\banners\%25~n1%25~x1" 1&gt;nul)
exit /b





:copy2
if NOT exist "$(TargetDir)resources\databases\%25~n1%25~x1" (copy /b/v/y %251 "$(TargetDir)resources\databases\%25~n1%25~x1" 1&gt;nul)
exit /b</PreBuildEvent>
exit /b
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>set location=resources\libraries
Expand Down Expand Up @@ -837,14 +782,4 @@ exit /b
<PropertyGroup>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" />
</Project>
12 changes: 6 additions & 6 deletions FriishProduce/ProjectForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,19 +1489,19 @@ public async void GameScan(bool imageOnly)
try
{
var gameData = await Task.FromResult(rom.GetData(targetPlatform, rom.FilePath));
bool retrieved = imageOnly ? gameData.Image != null : gameData != (null, null, null, null, null);
bool retrieved = imageOnly ? !string.IsNullOrEmpty(gameData.Image) : gameData != (null, null, null, null, null);

if (retrieved)
{
if (!imageOnly)
{
// Set banner title
banner_form.title.Text = rom.CleanTitle ?? banner_form.title.Text;
banner_form.title.Text = gameData.Name ?? banner_form.title.Text;

// Set channel title text
if (rom.CleanTitle != null)
if (!string.IsNullOrEmpty(gameData.Name))
{
var text = rom.CleanTitle.Replace("\r", "").Split('\n');
var text = gameData.Name.Replace("\r", "").Split('\n');
if (text[0].Length <= channel_name.MaxLength) { channel_name.Text = text[0]; }
}

Expand All @@ -1513,7 +1513,7 @@ public async void GameScan(bool imageOnly)
}

// Set image
if (gameData.Image != null)
if (!string.IsNullOrEmpty(gameData.Image))
{
LoadImage(gameData.Image);
}
Expand All @@ -1522,7 +1522,7 @@ public async void GameScan(bool imageOnly)
}

// Show message if partially failed to retrieve data
if (retrieved && (gameData.Title == null || gameData.Players == null || gameData.Year == null || gameData.Image == null) && !imageOnly)
if (retrieved && (string.IsNullOrEmpty(gameData.Name) || string.IsNullOrEmpty(gameData.Players) || string.IsNullOrEmpty(gameData.Year) || string.IsNullOrEmpty(gameData.Image)) && !imageOnly)
MessageBox.Show(Program.Lang.Msg(4));
else if (!retrieved) SystemSounds.Beep.Play();
}
Expand Down
Binary file removed FriishProduce/Resources/databases/32x.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/n64.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/neo.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/nes.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/psx.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/rpgm.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/sgg.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/smcd.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/smd.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/sms.rdb
Binary file not shown.
Binary file removed FriishProduce/Resources/databases/snes.rdb
Binary file not shown.
Loading

0 comments on commit 3faec55

Please sign in to comment.