mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-06 21:29:33 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dcac28488 | ||
|
|
4cd7073bf6 | ||
|
|
1af21e7aba | ||
|
|
52adcd0b46 | ||
|
|
8a91593e58 | ||
|
|
729f8273fc | ||
|
|
78df6f6583 | ||
|
|
dc8dae4df7 | ||
|
|
53db9dbf81 | ||
|
|
22755a4af9 | ||
|
|
ba28b414ba | ||
|
|
95d10ecb1e | ||
|
|
c5ab2c747a | ||
|
|
476c494f4e | ||
|
|
758c49c1cc |
@@ -1,3 +1,20 @@
|
||||
### 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
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
@@ -1204,7 +1205,7 @@ namespace MPF.Library
|
||||
return files;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Normalization
|
||||
|
||||
@@ -2096,7 +2097,7 @@ namespace MPF.Library
|
||||
// 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()}";
|
||||
@@ -2274,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);
|
||||
@@ -2304,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()
|
||||
@@ -2324,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
|
||||
|
||||
@@ -2384,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());
|
||||
|
||||
@@ -2395,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>();
|
||||
@@ -2409,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
|
||||
@@ -2488,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>
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -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:
|
||||
@@ -1563,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>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<AssemblyName>MPF.UI.Core</AssemblyName>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<Version>2.6.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
2
MPF.sln
2
MPF.sln
@@ -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}"
|
||||
|
||||
@@ -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.1</Version>
|
||||
<Version>2.6.2</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -1002,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;
|
||||
@@ -1010,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>
|
||||
@@ -1479,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
|
||||
|
||||
35
README.md
35
README.md
@@ -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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# version format
|
||||
version: 2.6.1-{build}
|
||||
version: 2.6.2-{build}
|
||||
|
||||
# pull request template
|
||||
pull_requests:
|
||||
|
||||
57
publish-nix.sh
Executable file
57
publish-nix.sh
Executable 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
64
publish-win.bat
Normal 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 *
|
||||
Reference in New Issue
Block a user