mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-03 21:29:27 +00:00
[PR #563] [MERGED] Remove IMAPI2 as a dependency #1040
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SabreTools/MPF/pull/563
Author: @mnadareski
Created: 10/5/2023
Status: ✅ Merged
Merged: 10/7/2023
Merged by: @mnadareski
Base:
master← Head:no-imapi📝 Commits (9)
4805572Remove IMAPI2 with no substitution1e556c1Remove framework exceptions1f6a8fcSlight reorganization of codee6829a1Update README with support information1c3de38Remove msbuild-specific AppVeyor itemscced239Be trickier when it comes to type from size728fd54Fix formatting of changelist73ff3dbFix "detected" message02dce07Be smarter about media type based on system📊 Changes
12 files changed (+112 additions, -323 deletions)
View changed files
📝
.vscode/tasks.json(+2 -13)📝
CHANGELIST.md(+9 -0)📝
MPF.Core/Converters/EnumConverter.cs(+0 -44)📝
MPF.Core/Data/Drive.cs(+70 -81)📝
MPF.Core/MPF.Core.csproj(+0 -21)📝
MPF.Test/Core/Converters/EnumConverterTests.cs(+0 -71)📝
MPF.Test/MPF.Test.csproj(+0 -21)📝
MPF.UI.Core/ViewModels/MainViewModel.cs(+3 -10)📝
MPF.UI.Core/Windows/OptionsWindow.xaml.cs(+0 -6)📝
README.md(+6 -22)📝
appveyor.yml(+14 -26)📝
publish-win.bat(+8 -8)📄 Description
Problem
IMAPI2 is a Windows library that allows for media type detection and media burning in Windows applications. It is lightly maintained but is entirely locked to the Windows platform. IMAPI2 is a major blocker to making the entirety of MPF cross-platform, with the other major blocker being the UI framework. Removing this library would mean the end of very accurate media type detection.
Solution
Remove IMAPI2 from the application even if it means less accurate media type detection until another solution is found. This solution allows .NET Framework 4.8 builds to be built and packaged near-identically to the newer .NET 6 and .NET 7 builds and places those more modern .NET builds on equal footing.
Commentary
This is deliberately being made into a separate branch because this is a very divisive change. This removes the ability (on .NET Framework 4.8) to accurately determine the type of the media being detected, instead falling back on the same method that .NET 6 and .NET 7 use. This fallback method makes a best guess based on the media size and the filesystem.
The only dumping program supported by MPF right now that cares about the media type on dump is DiscImageCreator. It is still the default program and is the only one that benefits from this arrangement. If this is removed, there's more of a burden on the user to determine what type the media is before dumping.
This does put all 3 build versions (.NET Framework 4.8, .NET 6.0, and .NET 7.0) on equal footing for the first time, however. The build instructions become the same and no differences in functionality will be observed. For .NET Framework 4.8, this may also bring slightly more stability, given that IMAPI2 does not play well with all hardware.
Alternatives
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.