[PR #563] [MERGED] Remove IMAPI2 as a dependency #1040

Open
opened 2026-01-29 16:25:02 +00:00 by claunia · 0 comments
Owner

📋 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: masterHead: no-imapi


📝 Commits (9)

  • 4805572 Remove IMAPI2 with no substitution
  • 1e556c1 Remove framework exceptions
  • 1f6a8fc Slight reorganization of code
  • e6829a1 Update README with support information
  • 1c3de38 Remove msbuild-specific AppVeyor items
  • cced239 Be trickier when it comes to type from size
  • 728fd54 Fix formatting of changelist
  • 73ff3db Fix "detected" message
  • 02dce07 Be 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

  • Keeping IMAPI2 means that it can only be used on Windows ever in the future. It also is not actively maintained
  • Using Aaru code is possible, but a very large chunk of code would need to be imported and potentially modified to work with .NET Framework 4.8 (a separate issue unto itself)
  • Porting code from Redumper or another cross-platform tool is a possibility, but is not in the immediate cards for prioritized work
  • Using the size/filesystem method is quick and semi-reasonably accurate but can be turned off exactly like the existing solutions

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SabreTools/MPF/pull/563 **Author:** [@mnadareski](https://github.com/mnadareski) **Created:** 10/5/2023 **Status:** ✅ Merged **Merged:** 10/7/2023 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `no-imapi` --- ### 📝 Commits (9) - [`4805572`](https://github.com/SabreTools/MPF/commit/4805572ec2c47603373d683646fd893f27a5d8de) Remove IMAPI2 with no substitution - [`1e556c1`](https://github.com/SabreTools/MPF/commit/1e556c1ad8da8f1b877d654222efcbf896c23c8c) Remove framework exceptions - [`1f6a8fc`](https://github.com/SabreTools/MPF/commit/1f6a8fc6801e7bb1043d934d3ddd42ec6d52ebfc) Slight reorganization of code - [`e6829a1`](https://github.com/SabreTools/MPF/commit/e6829a1ae5617448002e0bf2ed7759709dcf3d5d) Update README with support information - [`1c3de38`](https://github.com/SabreTools/MPF/commit/1c3de38d35aa8188c012b2f8bec45dbe0cf23b88) Remove msbuild-specific AppVeyor items - [`cced239`](https://github.com/SabreTools/MPF/commit/cced23955c3bb433e97c9b27e9e0d5629cf2e8e5) Be trickier when it comes to type from size - [`728fd54`](https://github.com/SabreTools/MPF/commit/728fd5489238d33294842f583e00666078220ee8) Fix formatting of changelist - [`73ff3db`](https://github.com/SabreTools/MPF/commit/73ff3dbf1e8af67ad4baf9153050a096178a8d72) Fix "detected" message - [`02dce07`](https://github.com/SabreTools/MPF/commit/02dce07c8824aae26f83c005d6e3de1dee376dd4) Be smarter about media type based on system ### 📊 Changes **12 files changed** (+112 additions, -323 deletions) <details> <summary>View changed files</summary> 📝 `.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) </details> ### 📄 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 - Keeping IMAPI2 means that it can only be used on Windows ever in the future. It also is not actively maintained - Using Aaru code is possible, but a very large chunk of code would need to be imported and potentially modified to work with .NET Framework 4.8 (a separate issue unto itself) - Porting code from Redumper or another cross-platform tool is a possibility, but is not in the immediate cards for prioritized work - Using the size/filesystem method is quick and semi-reasonably accurate but can be turned off exactly like the existing solutions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:25:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#1040