Compare commits

...

24 Commits
2.6 ... 2.6.2

Author SHA1 Message Date
Matt Nadareski
3dcac28488 Bump version to 2.6.2 2023-07-24 09:40:20 -04:00
Matt Nadareski
4cd7073bf6 Clarify build instructions 2023-07-23 23:51:05 -04:00
Matt Nadareski
1af21e7aba Add build instructions to README 2023-07-23 23:48:04 -04:00
Matt Nadareski
52adcd0b46 Add *nix publish script 2023-07-23 23:44:03 -04:00
Matt Nadareski
8a91593e58 Add Windows publish script 2023-07-23 21:42:10 -04:00
Matt Nadareski
729f8273fc Fix universal hash URL generation 2023-07-23 19:16:57 -04:00
Matt Nadareski
78df6f6583 Fix .NET Framework 4.8 build 2023-07-23 16:48:44 -04:00
Matt Nadareski
dc8dae4df7 Attempt to match universal hash 2023-07-23 16:41:40 -04:00
Matt Nadareski
53db9dbf81 Modify the track count on checking 2023-07-23 15:09:46 -04:00
Matt Nadareski
22755a4af9 Skip extra tracks during checking (fixes #529) 2023-07-22 21:31:20 -04:00
Matt Nadareski
ba28b414ba Normalize old universal hash text (fixes #528) 2023-07-20 20:26:57 -04:00
Matt Nadareski
95d10ecb1e Always show extension for Redumper (fixes #525) 2023-07-20 11:35:15 -04:00
Matt Nadareski
c5ab2c747a Support LibCrypt data from Redumper 2023-07-19 17:07:59 -04:00
Matt Nadareski
476c494f4e Universal hash only for audio discs (fixes #524) 2023-07-19 13:33:14 -04:00
Matt Nadareski
758c49c1cc Ensure custom parameters properly set (fixes #523) 2023-07-19 12:51:22 -04:00
Matt Nadareski
d80ad3b3cf Bump version to 2.6.1 2023-07-19 09:36:34 -04:00
Matt Nadareski
3d06f80703 Fix comment field pulling again 2023-07-19 00:05:33 -04:00
Matt Nadareski
7344460409 Fix comment field pulling again (fixes #522) 2023-07-18 22:40:08 -04:00
Matt Nadareski
19f58d9dde Set extensions for Redumper in UI (fixes #521) 2023-07-18 20:56:08 -04:00
Matt Nadareski
ad9f39f832 Be more explicit about .NET 6 limitation 2023-07-17 13:23:00 -04:00
Matt Nadareski
d51117b058 Be more explicit about .NET 6 limitation (fixes #519) 2023-07-17 13:17:42 -04:00
Matt Nadareski
0d65d5114a Set best compression levels for log files (fixes #518) 2023-07-17 13:13:16 -04:00
Matt Nadareski
30fec3c3d0 Don't pull comment fields that auto-populate (fixes #517) 2023-07-17 10:28:37 -04:00
Matt Nadareski
8eb86fde90 Simplify Redumper error value extraction (fixes #515) 2023-07-14 16:42:47 -04:00
21 changed files with 417 additions and 44 deletions

View File

@@ -1,4 +1,30 @@
### 2.6 (2023-07-xx)
### 2.6.2 (2023-07-25)
- Ensure custom parameters properly set
- Universal hash only for audio discs
- Support LibCrypt data from Redumper
- Always show extension for Redumper
- Normalize old universal hash text
- Skip extra tracks during checking
- Modify the track count on checking
- Attempt to match universal hash
- Fix .NET Framework 4.8 build
- Fix universal hash URL generation
- Add Windows publish script
- Add *nix publish script
- Add build instructions to README
- Clarify build instructions
### 2.6.1 (2023-07-19)
- Simplify Redumper error value extraction
- Don't pull comment fields that auto-populate
- Set best compression levels for log files
- Be more explicit about .NET 6 limitation
- Set extensions for Redumper in UI
- Fix comment field pulling again
### 2.6 (2023-07-14)
- Update README
- Add warning to login tab

View File

@@ -10,7 +10,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -6,7 +6,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -101,6 +101,7 @@ namespace MPF.Core.Utilities
case RedumpSystem.HasbroVideoNowJr:
case RedumpSystem.HasbroVideoNowXP:
case RedumpSystem.PhilipsCDi:
case RedumpSystem.PlayStationGameSharkUpdates:
case RedumpSystem.SuperAudioCD:
return true;
default:

View File

@@ -6,7 +6,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.IO;
using System.IO.Compression;
using System.Linq;
@@ -615,7 +616,11 @@ namespace MPF.Library
foreach (string file in files)
{
string entryName = file.Substring(outputDirectory.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
zf.CreateEntryFromFile(file, entryName);
#if NET48 || NETSTANDARD2_1
zf.CreateEntryFromFile(file, entryName, CompressionLevel.Optimal);
#else
zf.CreateEntryFromFile(file, entryName, CompressionLevel.SmallestSize);
#endif
// If the file is MPF-specific, don't delete
if (mpfFiles.Contains(file))
@@ -2048,41 +2053,55 @@ namespace MPF.Library
if (!commentLine.Contains(siteCode.ShortName()))
continue;
// Mark as having found a tag
foundTag = true;
// Cache the current site code
lastSiteCode = siteCode;
// A subset of tags can be multiline
addToLast = IsMultiLine(siteCode);
// Skip certain site codes because of data issues
switch (siteCode)
{
// Audio CD
case SiteCode.UniversalHash:
foundTag = true;
// Multiple
case SiteCode.InternalSerialName:
case SiteCode.Multisession:
case SiteCode.VolumeLabel:
continue;
// Xbox and X360
// Audio CD
case SiteCode.RingNonZeroDataStart:
case SiteCode.UniversalHash:
continue;
// Microsoft Xbox and Xbox 360
case SiteCode.DMIHash:
case SiteCode.PFIHash:
case SiteCode.SSHash:
case SiteCode.SSVersion:
case SiteCode.XMID:
case SiteCode.XeMID:
foundTag = true;
continue;
// Microsoft Xbox One and Series X/S
case SiteCode.Filename:
continue;
// Nintendo Gamecube
case SiteCode.InternalName:
continue;
}
// Cache the current site code
lastSiteCode = siteCode;
// If we don't already have this site code, add it to the dictionary
if (!info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(siteCode))
info.CommonDiscInfo.CommentsSpecialFields[siteCode] = $"(VERIFY THIS) {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
// Otherwise, append the value to the existing key
else
info.CommonDiscInfo.CommentsSpecialFields[siteCode] += $", {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
// A subset of tags can be multiline
addToLast = IsMultiLine(siteCode);
// Mark as having found a tag
foundTag = true;
break;
}
@@ -2256,11 +2275,27 @@ namespace MPF.Library
// Loop through all of the hashdata to find matching IDs
resultProgress?.Report(Result.Success("Finding disc matches on Redump..."));
string[] splitData = info.TracksAndWriteOffsets.ClrMameProData.TrimEnd('\n').Split('\n');
int trackCount = splitData.Length;
foreach (string hashData in splitData)
{
// Catch any errant blank lines
if (string.IsNullOrWhiteSpace(hashData))
{
trackCount--;
resultProgress?.Report(Result.Success("Blank line found, skipping!"));
continue;
}
// If the line ends in a known extra track names, skip them for checking
if (hashData.Contains("(Track 0).bin")
|| hashData.Contains("(Track 00).bin")
|| hashData.Contains("(Track A).bin")
|| hashData.Contains("(Track AA).bin"))
{
trackCount--;
resultProgress?.Report(Result.Success("Extra track found, skipping!"));
continue;
}
#if NET48 || NETSTANDARD2_1
(bool singleFound, List<int> foundIds) = ValidateSingleTrack(wc, info, hashData, resultProgress);
@@ -2286,6 +2321,30 @@ namespace MPF.Library
}
}
// If we don't have any matches but we have a universal hash
if (!info.PartiallyMatchedIDs.Any() && info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.UniversalHash))
{
#if NET48 || NETSTANDARD2_1
(bool singleFound, List<int> foundIds) = ValidateUniversalHash(wc, info, resultProgress);
#else
(bool singleFound, List<int> foundIds) = await ValidateUniversalHash(wc, info, resultProgress);
#endif
// Ensure that the hash is found
allFound = singleFound;
// If we found a track, only keep track of distinct found tracks
if (singleFound && foundIds != null)
{
fullyMatchedIDs = foundIds;
}
// If no tracks were found, remove all fully matched IDs found so far
else
{
fullyMatchedIDs = new List<int>();
}
}
// Make sure we only have unique IDs
info.PartiallyMatchedIDs = info.PartiallyMatchedIDs
.Distinct()
@@ -2306,10 +2365,10 @@ namespace MPF.Library
{
// Skip if the track count doesn't match
#if NET48 || NETSTANDARD2_1
if (!ValidateTrackCount(wc, fullyMatchedIDs[i], splitData.Length))
if (!ValidateTrackCount(wc, fullyMatchedIDs[i], trackCount))
continue;
#else
if (!await ValidateTrackCount(wc, fullyMatchedIDs[i], splitData.Length))
if (!await ValidateTrackCount(wc, fullyMatchedIDs[i], trackCount))
continue;
#endif
@@ -2366,6 +2425,7 @@ namespace MPF.Library
text = text.Replace("SSv2:", ((SiteCode?)SiteCode.SSHash).ShortName());
text = text.Replace("<b>SSv2</b>:", ((SiteCode?)SiteCode.SSHash).ShortName());
text = text.Replace("SS version:", ((SiteCode?)SiteCode.SSVersion).ShortName());
text = text.Replace("Universal Hash (SHA-1):", ((SiteCode?)SiteCode.UniversalHash).ShortName());
text = text.Replace("XeMID:", ((SiteCode?)SiteCode.XeMID).ShortName());
text = text.Replace("XMID:", ((SiteCode?)SiteCode.XMID).ShortName());
@@ -2377,11 +2437,12 @@ namespace MPF.Library
/// </summary>
/// <param name="wc">RedumpWebClient for making the connection</param>
/// <param name="query">Query string to attempt to search for</param>
/// <param name="filterForwardSlashes">True to filter forward slashes, false otherwise</param>
/// <returns>All disc IDs for the given query, null on error</returns>
#if NET48 || NETSTANDARD2_1
private static List<int> ListSearchResults(RedumpWebClient wc, string query)
private static List<int> ListSearchResults(RedumpWebClient wc, string query, bool filterForwardSlashes = true)
#else
private async static Task<List<int>> ListSearchResults(RedumpHttpClient wc, string query)
private async static Task<List<int>> ListSearchResults(RedumpHttpClient wc, string query, bool filterForwardSlashes = true)
#endif
{
List<int> ids = new List<int>();
@@ -2391,7 +2452,8 @@ namespace MPF.Library
// Special characters become dashes
query = query.Replace(' ', '-');
query = query.Replace('/', '-');
if (filterForwardSlashes)
query = query.Replace('/', '-');
query = query.Replace('\\', '/');
// Lowercase is defined per language
@@ -2470,6 +2532,57 @@ namespace MPF.Library
return (true, newIds);
}
/// <summary>
/// Validate a universal hash against Redump, if possible
/// </summary>
/// <param name="wc">RedumpWebClient for making the connection</param>
/// <param name="info">Existing SubmissionInfo object to fill</param>
/// <param name="resultProgress">Optional result progress callback</param>
/// <returns>True if the track was found, false otherwise; List of found values, if possible</returns>
#if NET48 || NETSTANDARD2_1
private static (bool, List<int>) ValidateUniversalHash(RedumpWebClient wc, SubmissionInfo info, IProgress<Result> resultProgress = null)
#else
private async static Task<(bool, List<int>)> ValidateUniversalHash(RedumpHttpClient wc, SubmissionInfo info, IProgress<Result> resultProgress = null)
#endif
{
// If we don't have a universal hash
string universalHash = info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash];
if (string.IsNullOrEmpty(universalHash))
{
resultProgress?.Report(Result.Failure("Universal hash was missing"));
return (false, null);
}
// Format the universal hash for finding within the comments
universalHash = $"{universalHash.Substring(0, universalHash.Length - 1)}/comments/only";
// Get all matching IDs for the hash
#if NET48 || NETSTANDARD2_1
List<int> newIds = ListSearchResults(wc, universalHash, filterForwardSlashes: false);
#else
List<int> newIds = await ListSearchResults(wc, universalHash, filterForwardSlashes: false);
#endif
// If we got null back, there was an error
if (newIds == null)
{
resultProgress?.Report(Result.Failure("There was an unknown error retrieving information from Redump"));
return (false, null);
}
// If no IDs match any track, just return
if (!newIds.Any())
return (false, null);
// Join the list of found IDs to the existing list, if possible
if (info.PartiallyMatchedIDs.Any())
info.PartiallyMatchedIDs.AddRange(newIds);
else
info.PartiallyMatchedIDs = newIds;
return (true, newIds);
}
/// <summary>
/// Validate that the current track count and remote track count match
/// </summary>

View File

@@ -7,7 +7,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -445,9 +445,12 @@ namespace MPF.Modules.DiscImageCreator
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
// Attempt to get the universal hash
string universalHash = GetUniversalHash($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
// Attempt to get the universal hash, if it's an audio disc
if (this.System.IsAudio())
{
string universalHash = GetUniversalHash($"{basePath}_disc.txt") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
}
break;

View File

@@ -6,7 +6,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -13,8 +13,18 @@ namespace MPF.Modules.Redumper
/// <returns>Valid extension (with leading '.'), null on error</returns>
public static string Extension(MediaType? type)
{
// TODO: Determine what extensions are used for each supported type
return ".bin";
switch (type)
{
case MediaType.CDROM:
return ".bin";
case MediaType.DVD:
case MediaType.HDDVD:
case MediaType.BluRay:
return ".iso";
case MediaType.NONE:
default:
return null;
}
}
#endregion

View File

@@ -5,6 +5,7 @@ using System.Linq;
using System.Text.RegularExpressions;
using MPF.Core.Converters;
using MPF.Core.Data;
using MPF.Core.Utilities;
using RedumpLib.Data;
namespace MPF.Modules.Redumper
@@ -28,7 +29,7 @@ namespace MPF.Modules.Redumper
public override string InputPath => DriveValue;
/// <inheritdoc/>
public override string OutputPath => Path.Combine(ImagePathValue?.Trim('"') ?? string.Empty, ImageNameValue?.Trim('"') ?? string.Empty);
public override string OutputPath => Path.Combine(ImagePathValue?.Trim('"') ?? string.Empty, ImageNameValue?.Trim('"') ?? string.Empty) + GetDefaultExtension(this.Type);
/// <inheritdoc/>
public override int? Speed => SpeedValue;
@@ -275,9 +276,12 @@ namespace MPF.Modules.Redumper
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
// Attempt to get the universal hash
string universalHash = GetUniversalHash($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
// Attempt to get the universal hash, if it's an audio disc
if (this.System.IsAudio())
{
string universalHash = GetUniversalHash($"{basePath}.log") ?? string.Empty;
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
}
// Attempt to get the non-zero data start
string ringNonZeroDataStart = GetRingNonZeroDataStart($"{basePath}.log") ?? string.Empty;
@@ -394,6 +398,7 @@ namespace MPF.Modules.Redumper
info.CopyProtection.AntiModchip = GetPlayStationAntiModchipDetected($"{basePath}.log").ToYesNo();
info.EDC.EDC = GetPlayStationEDCStatus($"{basePath}.log").ToYesNo();
info.CopyProtection.LibCrypt = GetPlayStationLibCryptStatus($"{basePath}.log").ToYesNo();
info.CopyProtection.LibCryptData = GetPlayStationLibCryptData($"{basePath}.log");
break;
case RedumpSystem.SonyPlayStation2:
@@ -1340,7 +1345,6 @@ namespace MPF.Modules.Redumper
return 0;
// Now that we're at the relevant lines, find the error count
long errorCount = 0;
while (!sr.EndOfStream)
{
// Skip forward to the "REDUMP.ORG" line
@@ -1352,12 +1356,12 @@ namespace MPF.Modules.Redumper
// REDUMP.ORG errors: <error count>
string[] parts = line.Split(' ');
if (long.TryParse(parts[2], out long redump))
errorCount += redump;
return redump;
else
return -1;
}
return errorCount;
return -1;
}
catch
{
@@ -1564,6 +1568,44 @@ namespace MPF.Modules.Redumper
}
}
/// <summary>
/// Get the LibCrypt data from the input file, if possible
/// </summary>
/// <param name="log">Log file location</param>
/// <returns>PS1 LibCrypt data, if possible</returns>
private static string GetPlayStationLibCryptData(string log)
{
// If the file doesn't exist, we can't get info from it
if (!File.Exists(log))
return null;
using (StreamReader sr = File.OpenText(log))
{
try
{
// Fast forward to the LibCrypt line
while (!sr.EndOfStream && !sr.ReadLine().TrimStart().StartsWith("libcrypt:")) ;
if (sr.EndOfStream)
return null;
// Now that we're at the relevant entries, read each line in and concatenate
string libCryptString = "", line = sr.ReadLine().Trim();
while (line.StartsWith("MSF:"))
{
libCryptString += line + "\n";
line = sr.ReadLine().Trim();
}
return libCryptString.TrimEnd('\n');
}
catch
{
// We don't care what the exception is right now
return null;
}
}
}
/// <summary>
/// Get the existence of LibCrypt from the input file, if possible
/// </summary>

View File

@@ -9,7 +9,7 @@
<AssemblyName>MPF.UI.Core</AssemblyName>
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -18,7 +18,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\ISSUE_TEMPLATE\feature-request.md = .github\ISSUE_TEMPLATE\feature-request.md
.github\ISSUE_TEMPLATE\informational.md = .github\ISSUE_TEMPLATE\informational.md
.github\ISSUE_TEMPLATE\issue-report.md = .github\ISSUE_TEMPLATE\issue-report.md
publish-nix.sh = publish-nix.sh
README.md = README.md
publish-win.bat = publish-win.bat
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RedumpLib", "RedumpLib\RedumpLib.csproj", "{13574913-A426-4644-9955-F49AD0876E5F}"

View File

@@ -13,7 +13,7 @@
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
<Copyright>Copyright (c)2019-2023</Copyright>
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
<Version>2.6</Version>
<Version>2.6.2</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<IncludeSource>true</IncludeSource>

View File

@@ -795,13 +795,13 @@ namespace MPF.UI.ViewModels
if (defaultMediaType == MediaType.NONE)
defaultMediaType = MediaType.CDROM;
#if NET48 || NETSTANDARD2_1
// If we're skipping detection, set the default value
if (App.Options.SkipMediaTypeDetection)
{
App.Logger.VerboseLogLn($"Media type detection disabled, defaulting to {defaultMediaType.LongName()}.");
CurrentMediaType = defaultMediaType;
}
// If the drive is marked active, try to read from it
else if (drive.MarkedActive)
{
@@ -831,6 +831,11 @@ namespace MPF.UI.ViewModels
App.Logger.VerboseLogLn($"Drive marked as empty, defaulting to {defaultMediaType.LongName()}.");
CurrentMediaType = defaultMediaType;
}
#else
// Media type detection on initialize is always disabled
App.Logger.VerboseLogLn($"Media type detection not available, defaulting to {defaultMediaType.LongName()}.");
CurrentMediaType = defaultMediaType;
#endif
// Ensure the UI gets updated
App.Instance.UpdateLayout();
@@ -997,6 +1002,9 @@ namespace MPF.UI.ViewModels
else
Env.Parameters.Speed = App.Instance.DriveSpeedComboBox.SelectedValue as int?;
// Disable change handling
DisableEventHandlers();
string trimmedPath = Env.Parameters.OutputPath?.Trim('"') ?? string.Empty;
trimmedPath = InfoTool.NormalizeOutputPaths(trimmedPath);
App.Instance.OutputPathTextBox.Text = trimmedPath;
@@ -1005,6 +1013,9 @@ namespace MPF.UI.ViewModels
int mediaTypeIndex = MediaTypes.FindIndex(m => m == mediaType);
if (mediaTypeIndex > -1)
App.Instance.MediaTypeComboBox.SelectedIndex = mediaTypeIndex;
// Reenable change handling
EnableEventHandlers();
}
/// <summary>
@@ -1474,7 +1485,10 @@ namespace MPF.UI.ViewModels
/// Handler for OutputPathTextBox TextChanged event
/// </summary>
private void OutputPathTextBoxTextChanged(object sender, TextChangedEventArgs e)
=> EnsureDiscInformation();
{
if (_canExecuteSelectionChanged)
EnsureDiscInformation();
}
/// <summary>
/// Handler for StartStopButton Click event

View File

@@ -133,7 +133,7 @@
<StackPanel>
<GroupBox Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Header="Dumping">
<UniformGrid Columns="2" Rows="9">
<CheckBox VerticalAlignment="Center" Content="Skip Type Detect"
<CheckBox x:Name="SkipMediaTypeDetectionCheckBox" VerticalAlignment="Center" Content="Skip Type Detect"
IsChecked="{Binding Options.SkipMediaTypeDetection}"
ToolTip="Disable trying to guess media type inserted (may improve performance at startup)" Margin="0,4"
/>

View File

@@ -20,6 +20,12 @@ namespace MPF.Windows
{
InitializeComponent();
DataContext = new OptionsViewModel(this);
#if NET6_0_OR_GREATER
this.SkipMediaTypeDetectionCheckBox.IsEnabled = false;
this.SkipMediaTypeDetectionCheckBox.IsChecked = false;
this.SkipMediaTypeDetectionCheckBox.ToolTip = "This feature is not enabled for .NET 6";
#endif
}
}
}

View File

@@ -32,6 +32,24 @@ MPF is the main, UI-centric application of the MPF suite. This program allows us
Ensure that your operating system is as up-to-date as possible, since some features may rely on those updates.
### Build Instructions
To build for .NET Framework 4.8 (Windows only), ensure that the .NET Framework 4.8 SDK is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, or Terminal:
```
dotnet restore
msbuild MPF\MPF.csproj -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
```
To build for .NET 6.0 (Windows only), ensure that the .NET 6.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, or Terminal:
```
dotnet build MPF\MPF.csproj --framework net6.0-windows --runtime [win7-x64|win8-x64|win81-x64|win10-x64]
```
Choose one of `[win7-x64|win8-x64|win81-x64|win10-x64]` depending on the machine you are targeting. `win10-x64` also includes Windows 11.
## Media Preservation Frontend Checker (MPF.Check)
MPF.Check is a commandline-only program that allows users to generate submission information from their personal rips. This program supports the outputs from DiscImageCreator, Aaru, Redumper, dd for Windows, Cleanrip, and UmdImageCreator. Running this program without any parameters will display the help text, including all supported parameters.
@@ -41,6 +59,23 @@ MPF.Check is a commandline-only program that allows users to generate submission
- Windows 8.1 (x86 or x64) or newer, GNU/Linux x64, or OSX x64
- .NET Framework 4.8 (Windows or `mono` only) or .NET 6.0 Runtimes
### Build Instructions
To build for .NET Framework 4.8 (Windows only), ensure that the .NET Framework 4.8 SDK is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, or Terminal:
```
dotnet restore
msbuild MPF.Check\MPF.Check.csproj -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
```
To build for .NET 6.0 (All supported OSes), ensure that the .NET 6.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, Terminal, or shell:
```
dotnet build MPF.Check\MPF.Check.csproj --framework net6.0 --runtime [win7-x64|win8-x64|win81-x64|win10-x64|linux-x64|osx-x64]
```
Choose one of `[win7-x64|win8-x64|win81-x64|win10-x64|linux-x64|osx-x64]` depending on the machine you are targeting. `win10-x64` also includes Windows 11.
## Information
For all additional information, including information about the individual components included in the project and what dumping programs are supported, please see [the wiki](https://github.com/SabreTools/MPF/wiki) for more details.

View File

@@ -1,5 +1,5 @@
# version format
version: 2.6-{build}
version: 2.6.2-{build}
# pull request template
pull_requests:

57
publish-nix.sh Executable file
View File

@@ -0,0 +1,57 @@
#! /bin/bash
# This batch file assumes the following:
# - .NET 6.0 (or newer) SDK is installed and in PATH
# - zip is installed and in PATH
# - The relevant commandline programs are already downloaded
# and put into their respective folders
#
# If any of these are not satisfied, the operation may fail
# in an unpredictable way and result in an incomplete output.
# TODO: Re-enable MPF building after figuring out how to build Windows desktop applications on Linux
# This may require an additional package to be installed?
# Set the current directory as a variable
BUILD_FOLDER=$PWD
# Restore Nuget packages for all builds
echo "Restoring Nuget packages"
dotnet restore
# .NET 6.0
echo "Building .NET 6.0 releases"
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
# Create MPF archives
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win7-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win7-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win8-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win8-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win81-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win81-x64.zip .
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win10-x64/publish/
#zip -r $BUILD_FOLDER/MPF_net6.0_win10-x64.zip .
# Create MPF.Check archives
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win7-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win7-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win8-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win8-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win81-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win81-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win10-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win10-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/linux-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_linux-x64.zip .
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/osx-x64/publish/
zip -r $BUILD_FOLDER/MPF.Check_net6.0_osx-x64.zip .

64
publish-win.bat Normal file
View File

@@ -0,0 +1,64 @@
@echo OFF
REM This batch file assumes the following:
REM - .NET Framework 4.8 SDK is installed and in PATH
REM - .NET 6.0 (or newer) SDK is installed and in PATH
REM - 7-zip commandline (7z.exe) is installed and in PATH
REM - The relevant commandline programs are already downloaded
REM and put into their respective folders
REM
REM If any of these are not satisfied, the operation may fail
REM in an unpredictable way and result in an incomplete output.
REM Set the current directory as a variable
set BUILD_FOLDER=%~dp0
REM Restore Nuget packages for all builds
echo Restoring Nuget packages
dotnet restore
REM .NET Framework 4.8
echo Building .NET Framework 4.8 releases
msbuild MPF\MPF.csproj -target:Publish -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
msbuild MPF.Check\MPF.Check.csproj -target:Publish -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
REM .NET 6.0
echo Building .NET 6.0 releases
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
REM Create MPF archives
cd %BUILD_FOLDER%\MPF\bin\Debug\net48\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net48.zip *
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win10-x64.zip *
REM Create MPF.Check archives
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net48\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net48.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win7-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win7-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win8-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win8-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win81-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win81-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win10-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win10-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\linux-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_linux-x64.zip *
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\osx-x64\publish\
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *