mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-04 21:30:11 +00:00
Compare commits
109 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a4b6d613a | ||
|
|
97aef5e29c | ||
|
|
9549178c3a | ||
|
|
c531539c87 | ||
|
|
fa04461631 | ||
|
|
83d230dfe1 | ||
|
|
ca18bbb72c | ||
|
|
de0f2c1ad9 | ||
|
|
2f0019282e | ||
|
|
72ca479c9f | ||
|
|
de3c4362e7 | ||
|
|
987348fee8 | ||
|
|
100e012fe6 | ||
|
|
af59ebe1ff | ||
|
|
0762c88655 | ||
|
|
bbe9c94545 | ||
|
|
c7efda7da8 | ||
|
|
5c78f9bc29 | ||
|
|
e7c17c7b4b | ||
|
|
7a2497f168 | ||
|
|
5172f6f253 | ||
|
|
9017472fa4 | ||
|
|
6659c410c6 | ||
|
|
8c7b66a2f5 | ||
|
|
8f57d78200 | ||
|
|
ad2ee9efa8 | ||
|
|
192964f65a | ||
|
|
672f30af35 | ||
|
|
a7a17298f2 | ||
|
|
e17ad8e4a1 | ||
|
|
2a544676e6 | ||
|
|
6abfa9581d | ||
|
|
a6de548e5d | ||
|
|
9dc3e579b5 | ||
|
|
c5be7d7f73 | ||
|
|
70c0da703b | ||
|
|
1cbe81fba6 | ||
|
|
420e356f34 | ||
|
|
0e0ff0cb80 | ||
|
|
9003d05ae2 | ||
|
|
c247225cac | ||
|
|
4bccaa8ecf | ||
|
|
b579fec7ab | ||
|
|
37e4525c98 | ||
|
|
2269537848 | ||
|
|
441fb91222 | ||
|
|
89e0473019 | ||
|
|
3e13b35c84 | ||
|
|
fd4910fc36 | ||
|
|
964685770f | ||
|
|
634d64b5a1 | ||
|
|
19ec1c448f | ||
|
|
e3532d6f02 | ||
|
|
aaf0aabb55 | ||
|
|
575a5936ca | ||
|
|
391d265353 | ||
|
|
f90d19821c | ||
|
|
b79babf57e | ||
|
|
a929bb0022 | ||
|
|
975eb97e27 | ||
|
|
49800cf0ed | ||
|
|
de18609e00 | ||
|
|
9911446bf9 | ||
|
|
a9223211ab | ||
|
|
54c4eeba03 | ||
|
|
a30ee3e6ff | ||
|
|
1fa19489a3 | ||
|
|
f6298dfe89 | ||
|
|
79802a53f6 | ||
|
|
54bf43fd6b | ||
|
|
bb2b2f668b | ||
|
|
ecca27e012 | ||
|
|
fe0699ca48 | ||
|
|
73b2f0921f | ||
|
|
c56230c3af | ||
|
|
919b62822d | ||
|
|
21b0c9a08d | ||
|
|
63fafd05b3 | ||
|
|
0a2493a953 | ||
|
|
87ab750714 | ||
|
|
5cf3eca9eb | ||
|
|
b4a079b65f | ||
|
|
7f2d501edf | ||
|
|
c981f94092 | ||
|
|
afba46b8b0 | ||
|
|
4e416df3c8 | ||
|
|
1b54e52351 | ||
|
|
5e1568a148 | ||
|
|
8f0ac56cf8 | ||
|
|
37f0f9d4a4 | ||
|
|
a48f75c704 | ||
|
|
58a683e3c9 | ||
|
|
907637b128 | ||
|
|
85f3e97a44 | ||
|
|
beae9691fd | ||
|
|
b7876d54cc | ||
|
|
5b24223cb5 | ||
|
|
88cadff9ef | ||
|
|
b92b39e7eb | ||
|
|
8d29a29591 | ||
|
|
daf516bf9c | ||
|
|
115d9857af | ||
|
|
b322146e9e | ||
|
|
b6e3c9da82 | ||
|
|
6abdc632dc | ||
|
|
335ca6d5ac | ||
|
|
8752426694 | ||
|
|
5357ba5900 | ||
|
|
f2686096bd |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "Aaru"]
|
||||
path = Aaru
|
||||
url = https://github.com/aaru-dps/Aaru.git
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/MPF/bin/Debug/netcoreapp3.1/MPF.dll",
|
||||
"program": "${workspaceFolder}/MPF/bin/Debug/net6.0-windows/MPF.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/MPF",
|
||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"omnisharp.projectLoadTimeout": 480
|
||||
}
|
||||
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@@ -7,7 +7,7 @@
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/MPF/MPF.csproj",
|
||||
"${workspaceFolder}/MPF.sln",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
|
||||
1
Aaru
1
Aaru
Submodule Aaru deleted from b1ac16c551
110
CHANGELIST.md
110
CHANGELIST.md
@@ -1,4 +1,107 @@
|
||||
### WIP (xxxx-xx-xx)
|
||||
|
||||
### 2.5 (2023-03-12)
|
||||
|
||||
- Add _drive file to zip for UIC
|
||||
- Add Xbox Series X and PS5 to list, fix Acorn
|
||||
- Add Xbox Series X short name to list
|
||||
- Remove windows from test target
|
||||
- Remove .NET 6.0 from tests, add TODO
|
||||
- Add .NET 6.0 to tests, remove msbuild args
|
||||
- Add HD-DVD to speed definitions
|
||||
- Add PS3 internal serial and version parsing (tjanas)
|
||||
- Update Nuget packages to newest stable
|
||||
- Simplify path selection in UI
|
||||
- Fix broken normalization test
|
||||
- Update drive info before dumping
|
||||
- Update redumper strings
|
||||
- Add new parameter and mode validation
|
||||
- Add redumper to the UI
|
||||
- Update redumper to build 81
|
||||
- Fix incorrect naming in Options window
|
||||
- Initial attempt at parsing redumper outputs
|
||||
- Update README
|
||||
- Reenable write offset for all CDs
|
||||
- Add missing redumper output file
|
||||
- Force a filename for redumper
|
||||
- Fix incorrect SetParameters
|
||||
- Fix a couple redumper things
|
||||
- Update AppVeyor version
|
||||
- Output security sectors to info
|
||||
- Remove x86 requirement for build
|
||||
- Fix XGD media type outputs
|
||||
- Fix typo in ToInternalProgram
|
||||
- Fix redumper error count parsing
|
||||
- Update to Aaru v5.3.2 LTS
|
||||
- Update options loader with sane defaults
|
||||
- Fix AppVeyor pathing
|
||||
- Skip during detection
|
||||
- Address some UI concerns
|
||||
- Tweak AppVeyor, show Check 6.0 builds
|
||||
- More strict when custom parameters editing
|
||||
- Use msbuild for .NET Framework 4.8
|
||||
- Update nuget packages
|
||||
- ReadAllText not ReadAllLines
|
||||
- Add drive format (fs) to log
|
||||
- Go back to pre .NET 7 Aaru
|
||||
- Be smarter about old paths
|
||||
- Fix relative paths for DIC
|
||||
- Add nicer failure message
|
||||
- Update to DIC 20230201
|
||||
- Use relative path output for DIC
|
||||
- Remove usage of Aaru
|
||||
- Remove Aaru as submodule
|
||||
- Fix Aaru removal
|
||||
- Enable .NET 6 Windows builds
|
||||
- Update Redumper to build_106
|
||||
- Reformat CICM for old .NET versions
|
||||
- Attempt to handle no drives
|
||||
- Handle no drives better
|
||||
- Handle no drives betterer
|
||||
- Packaging requires `-windows` for framework
|
||||
- Fix other `-windows` places for .NET 6
|
||||
- Fix typo in DICMultiSectorReadValue
|
||||
- Semi-unify drive finding
|
||||
- Introduce cross-platform MMI
|
||||
- Remove System.Management
|
||||
- Add Redumper Universal Hash support
|
||||
- Fix Redumper write offset support
|
||||
- Add Redumper non-zero data start
|
||||
- Use media size for type detection on .NET 6
|
||||
- Trim PIC for PS3
|
||||
- Get the version of redumper (fuzz6001)
|
||||
- Update VSCode config files
|
||||
- Can't publish single file for UI
|
||||
- Handle missing extension gracefully
|
||||
- Fix incorrect option slider display
|
||||
- Handle undetected discs on refresh
|
||||
- Originally intended behaviour of the Update Label button (IcySon55)
|
||||
- Update to BurnOutSharp 2.7.0
|
||||
- Get error count from recent redumper log (fuzz6001)
|
||||
- Minor cosmetic changes
|
||||
- Set saner defaults for dumping speeds
|
||||
- Attempt to support Windows 7
|
||||
- Add `win7-x64` to identifier list
|
||||
- Remove unsupported identifiers
|
||||
- Add identifiers in more places
|
||||
- Move drive finding inside of the try/catch
|
||||
- Update to DIC 20230309
|
||||
- Fix errant forward slashes
|
||||
- Add TOC back as optional file
|
||||
- Fix Redumper path generation
|
||||
- Use and trim quotes for Redumper
|
||||
- Fix incorrect image name setting
|
||||
- Ensure Redumper parameters are set
|
||||
- Ensure min values are taken care of
|
||||
- Update parameters with `=` handling
|
||||
- Ensure drive and speed are set
|
||||
- Handle quotes embedded
|
||||
- Return list of missing files for Redumper
|
||||
- Readd accidentally deleted line
|
||||
- Detect EOF during the search for error counts (fuzz6001)
|
||||
|
||||
### 2.4 (2022-10-26)
|
||||
|
||||
- Update to DIC 20211001
|
||||
- Fix Redump disc title pulling
|
||||
- Add /mr default flag options
|
||||
@@ -178,6 +281,7 @@
|
||||
- Fix offset formatting (fuzz6001)
|
||||
|
||||
### 2.3 (2022-02-05)
|
||||
|
||||
- Start overhauling Redump information pulling, again
|
||||
- Add internal structure for special site codes
|
||||
- Add new tabs for special site information
|
||||
@@ -262,6 +366,7 @@
|
||||
- Adjust paths for DIC just before dumping
|
||||
|
||||
### 2.2 (2021-12-30)
|
||||
|
||||
- Fix Saturn header finding
|
||||
- Add Pocket PC support
|
||||
- Add HD-DVD-Video support
|
||||
@@ -313,6 +418,7 @@
|
||||
- Add safety around volume labels
|
||||
|
||||
### 2.1 (2021-07-22)
|
||||
|
||||
- Enum, no more
|
||||
- Sony works backward
|
||||
- Add experimental dark mode
|
||||
@@ -342,6 +448,7 @@
|
||||
- Update to BurnOutSharp 1.7.0
|
||||
|
||||
### 2.0 (2021-04-23)
|
||||
|
||||
- Rename DICUI to Media Preservation Frontend (MPF)
|
||||
- Add handling for BEh drive _mainInfo.txt changes
|
||||
- Fix multiline regex fields during info pulling
|
||||
@@ -396,6 +503,7 @@
|
||||
- Update to BurnOutSharp 1.6.1
|
||||
|
||||
### 1.18 (2020-11-10)
|
||||
|
||||
- Add more information extraction and generation for Aaru
|
||||
- Remove instances of CD Check from copy protection (again, sorry)
|
||||
- Fix multiline submission info outputs
|
||||
@@ -420,6 +528,7 @@
|
||||
- Added HD-DVD-Video detection
|
||||
|
||||
### 1.17.1 (2020-09-14)
|
||||
|
||||
- Shuffled some shared, internal UI variables
|
||||
- Synced WPF and Avalonia UI internals
|
||||
- Made the disc information window less prone to bugs
|
||||
@@ -427,6 +536,7 @@
|
||||
- Added support for old(?) DIC flags: `/fix` and `/re`
|
||||
|
||||
### 1.17 (2020-09-12)
|
||||
|
||||
- Updated to Aaru version 5.1
|
||||
- Updated to BurnOutSharp version 1.4.0
|
||||
- Updated to DIC version 20200716
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<OutputType>Exe</OutputType>
|
||||
<Title>MPF Check</Title>
|
||||
<AssemblyName>MPF.Check</AssemblyName>
|
||||
<Description>Validator for various dumping programs</Description>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
@@ -28,7 +28,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.3.4" GeneratePathProperty="true">
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.7.0" GeneratePathProperty="true">
|
||||
<IncludeAssets>runtime; compile; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.3">
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace MPF.Check
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
drive = Drive.Create(null, path);
|
||||
|
||||
var env = new DumpEnvironment(options, "", filepath, drive, knownSystem, mediaType, null);
|
||||
var env = new DumpEnvironment(options, filepath, drive, knownSystem, mediaType, null);
|
||||
|
||||
// Finally, attempt to do the output dance
|
||||
var result = env.VerifyAndSaveDumpOutput(resultProgress, protectionProgress).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
|
||||
@@ -73,56 +73,6 @@ namespace MPF.Core.Converters
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#else
|
||||
/// <summary>
|
||||
/// Convert Aaru media type to a MediaType
|
||||
/// </summary>
|
||||
/// <param name="type">Aaru.CommonTypes.MediaType value to check</param>
|
||||
/// <returns>MediaType if possible, null on error</returns>
|
||||
public static MediaType? MediaTypeToMediaType(this Aaru.CommonTypes.MediaType? type)
|
||||
{
|
||||
if (type == null)
|
||||
return null;
|
||||
|
||||
return (int)type switch
|
||||
{
|
||||
// Generics
|
||||
>= 10 and <= 39 => MediaType.CDROM,
|
||||
>= 40 and <= 50 => MediaType.DVD,
|
||||
>= 51 and <= 59 => MediaType.HDDVD,
|
||||
>= 60 and <= 69 => MediaType.BluRay,
|
||||
|
||||
// Specialty
|
||||
112 => MediaType.CDROM,
|
||||
113 => MediaType.CDROM,
|
||||
114 => MediaType.DVD,
|
||||
115 => MediaType.DVD,
|
||||
116 => MediaType.BluRay,
|
||||
117 => MediaType.BluRay,
|
||||
118 => MediaType.UMD,
|
||||
120 => MediaType.BluRay,
|
||||
150 => MediaType.CDROM,
|
||||
151 => MediaType.CDROM,
|
||||
152 => MediaType.GDROM,
|
||||
153 => MediaType.GDROM,
|
||||
155 => MediaType.CDROM, // MilCD... is this GD-ROM?
|
||||
171 => MediaType.CDROM,
|
||||
172 => MediaType.CDROM,
|
||||
173 => MediaType.CDROM,
|
||||
174 => MediaType.CDROM,
|
||||
175 => MediaType.CDROM,
|
||||
176 => MediaType.CDROM,
|
||||
177 => MediaType.CDROM,
|
||||
178 => MediaType.DVD,
|
||||
179 => MediaType.CDROM,
|
||||
453 => MediaType.NintendoGameCubeGameDisc,
|
||||
463 => MediaType.NintendoWiiOpticalDisc,
|
||||
464 => MediaType.NintendoWiiUOpticalDisc,
|
||||
>= 770 and <= 799 => MediaType.BluRay,
|
||||
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
@@ -186,7 +136,7 @@ namespace MPF.Core.Converters
|
||||
case InternalProgram.DiscImageCreator:
|
||||
return "DiscImageCreator";
|
||||
case InternalProgram.Redumper:
|
||||
return "Redumper";
|
||||
return "redumper";
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -235,7 +185,7 @@ namespace MPF.Core.Converters
|
||||
return InternalProgram.DiscImageCreator;
|
||||
case "dd":
|
||||
return InternalProgram.DD;
|
||||
case "rd:":
|
||||
case "rd":
|
||||
case "redumper":
|
||||
return InternalProgram.Redumper;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace MPF.Core.Data
|
||||
// Private lists of known drive speed ranges
|
||||
private static IReadOnlyList<int> CD { get; } = new List<int> { 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 };
|
||||
private static IReadOnlyList<int> DVD { get; } = CD.Where(s => s <= 24).ToList();
|
||||
private static IReadOnlyList<int> HDDVD { get; } = CD.Where(s => s <= 24).ToList();
|
||||
private static IReadOnlyList<int> BD { get; } = CD.Where(s => s <= 16).ToList();
|
||||
private static IReadOnlyList<int> Unknown { get; } = new List<int> { 1 };
|
||||
|
||||
@@ -35,10 +36,11 @@ namespace MPF.Core.Data
|
||||
case MediaType.GDROM:
|
||||
return CD;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCubeGameDisc:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
return DVD;
|
||||
case MediaType.HDDVD:
|
||||
return HDDVD;
|
||||
case MediaType.BluRay:
|
||||
return BD;
|
||||
default:
|
||||
|
||||
@@ -2,17 +2,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Management.Infrastructure;
|
||||
using Microsoft.Management.Infrastructure.Generic;
|
||||
using MPF.Core.Converters;
|
||||
using MPF.Core.Utilities;
|
||||
using RedumpLib.Data;
|
||||
#if NETFRAMEWORK
|
||||
using System.Management;
|
||||
using IMAPI2;
|
||||
#else
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core.Media.Info;
|
||||
using Aaru.Decoders.SCSI.MMC;
|
||||
using Aaru.Devices;
|
||||
#endif
|
||||
|
||||
namespace MPF.Core.Data
|
||||
@@ -149,6 +145,12 @@ namespace MPF.Core.Data
|
||||
this.TotalSize = driveInfo.TotalSize;
|
||||
this.VolumeLabel = driveInfo.VolumeLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DriveFormat = string.Empty;
|
||||
this.TotalSize = default;
|
||||
this.VolumeLabel = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
#region Public Functionality
|
||||
@@ -170,7 +172,83 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public (MediaType?, string) GetMediaType()
|
||||
=> GetMediaType(this.Name, this.InternalDriveType);
|
||||
{
|
||||
// Take care of the non-optical stuff first
|
||||
// TODO: See if any of these can be more granular, like Optical is
|
||||
if (this.InternalDriveType == Data.InternalDriveType.Floppy)
|
||||
return (MediaType.FloppyDisk, null);
|
||||
else if (this.InternalDriveType == Data.InternalDriveType.HardDisk)
|
||||
return (MediaType.HardDisk, null);
|
||||
else if (this.InternalDriveType == Data.InternalDriveType.Removable)
|
||||
return (MediaType.FlashDrive, null);
|
||||
#if NET6_0_OR_GREATER
|
||||
else
|
||||
return GetMediaTypeFromSize();
|
||||
#endif
|
||||
|
||||
// Get the current drive information
|
||||
string deviceId = null;
|
||||
bool loaded = false;
|
||||
try
|
||||
{
|
||||
// Get the device ID first
|
||||
CimSession session = CimSession.Create(null);
|
||||
var collection = session.QueryInstances("root\\CIMV2", "WQL", $"SELECT * FROM Win32_CDROMDrive WHERE Id = '{this.Letter}:\'");
|
||||
|
||||
foreach (CimInstance instance in collection)
|
||||
{
|
||||
CimKeyedCollection<CimProperty> properties = instance.CimInstanceProperties;
|
||||
deviceId = (string)properties["DeviceID"]?.Value;
|
||||
loaded = (bool)properties["MediaLoaded"]?.Value;
|
||||
}
|
||||
|
||||
// If we got no valid device, we don't care and just return
|
||||
if (deviceId == null)
|
||||
return (null, "Device could not be found");
|
||||
else if (!loaded)
|
||||
return (null, "Device is not reporting media loaded");
|
||||
|
||||
#if NETFRAMEWORK
|
||||
|
||||
MsftDiscMaster2 discMaster = new MsftDiscMaster2();
|
||||
deviceId = deviceId.ToLower().Replace('\\', '#').Replace('/', '#');
|
||||
string id = null;
|
||||
foreach (var disc in discMaster)
|
||||
{
|
||||
if (disc.ToString().Contains(deviceId))
|
||||
id = disc.ToString();
|
||||
}
|
||||
|
||||
// If we couldn't find the drive, we don't care and return
|
||||
if (id == null)
|
||||
return (null, "Device ID could not be found");
|
||||
|
||||
// Create the required objects for reading from the drive
|
||||
MsftDiscRecorder2 recorder = new MsftDiscRecorder2();
|
||||
recorder.InitializeDiscRecorder(id);
|
||||
MsftDiscFormat2Data dataWriter = new MsftDiscFormat2Data();
|
||||
|
||||
// If the recorder is not supported, just return
|
||||
if (!dataWriter.IsRecorderSupported(recorder))
|
||||
return (null, "IMAPI2 recorder not supported");
|
||||
|
||||
// Otherwise, set the recorder to get information from
|
||||
dataWriter.Recorder = recorder;
|
||||
|
||||
var media = dataWriter.CurrentPhysicalMediaType;
|
||||
return (media.IMAPIToMediaType(), null);
|
||||
|
||||
#else
|
||||
|
||||
return (null, "IMAPI2 recorder not supported");
|
||||
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (null, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current system from drive
|
||||
@@ -216,7 +294,7 @@ namespace MPF.Core.Data
|
||||
{
|
||||
return RedumpSystem.MattelFisherPriceiXL;
|
||||
}
|
||||
|
||||
|
||||
// Microsoft Xbox 360
|
||||
try
|
||||
{
|
||||
@@ -379,7 +457,7 @@ namespace MPF.Core.Data
|
||||
}
|
||||
catch { }
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
// Default return
|
||||
return defaultValue;
|
||||
@@ -491,7 +569,19 @@ namespace MPF.Core.Data
|
||||
|
||||
#region Helpers
|
||||
|
||||
#if NETFRAMEWORK
|
||||
/// <summary>
|
||||
/// Get the media type for a device path based on size
|
||||
/// </summary>
|
||||
/// <returns>MediaType, null on error</returns>
|
||||
private (MediaType?, string) GetMediaTypeFromSize()
|
||||
{
|
||||
if (this.TotalSize >= 0 && this.TotalSize < 800_000_000 && this.DriveFormat == "CDFS")
|
||||
return (MediaType.CDROM, null);
|
||||
else if (this.TotalSize >= 400_000_000 && this.TotalSize <= 8_540_000_000 && this.DriveFormat == "UDF")
|
||||
return (MediaType.DVD, null);
|
||||
else
|
||||
return (MediaType.BluRay, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all current attached Drives
|
||||
@@ -511,349 +601,39 @@ namespace MPF.Core.Data
|
||||
desiredDriveTypes.Add(DriveType.Removable);
|
||||
}
|
||||
|
||||
// Get all supported drive types
|
||||
var drives = DriveInfo.GetDrives()
|
||||
.Where(d => desiredDriveTypes.Contains(d.DriveType))
|
||||
.Select(d => Create(EnumConverter.ToInternalDriveType(d.DriveType), d.Name))
|
||||
.ToList();
|
||||
// TODO: Reduce reliance on `DriveInfo`
|
||||
// https://github.com/aaru-dps/Aaru/blob/5164a154e2145941472f2ee0aeb2eff3338ecbb3/Aaru.Devices/Windows/ListDevices.cs#L66
|
||||
|
||||
// Get the floppy drives and set the flag from removable
|
||||
try
|
||||
{
|
||||
ManagementObjectSearcher searcher =
|
||||
new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_LogicalDisk");
|
||||
// Get all supported drive types
|
||||
var drives = DriveInfo.GetDrives()
|
||||
.Where(d => desiredDriveTypes.Contains(d.DriveType))
|
||||
.Select(d => Create(EnumConverter.ToInternalDriveType(d.DriveType), d.Name))
|
||||
.ToList();
|
||||
|
||||
var collection = searcher.Get();
|
||||
foreach (ManagementObject queryObj in collection)
|
||||
CimSession session = CimSession.Create(null);
|
||||
var collection = session.QueryInstances("root\\CIMV2", "WQL", "SELECT * FROM Win32_LogicalDisk");
|
||||
|
||||
foreach (CimInstance instance in collection)
|
||||
{
|
||||
uint? mediaType = (uint?)queryObj["MediaType"];
|
||||
CimKeyedCollection<CimProperty> properties = instance.CimInstanceProperties;
|
||||
uint? mediaType = properties["MediaType"]?.Value as uint?;
|
||||
if (mediaType != null && ((mediaType > 0 && mediaType < 11) || (mediaType > 12 && mediaType < 22)))
|
||||
{
|
||||
char devId = queryObj["DeviceID"].ToString()[0];
|
||||
char devId = (properties["Caption"].Value as string)[0];
|
||||
drives.ForEach(d => { if (d.Letter == devId) { d.InternalDriveType = Data.InternalDriveType.Floppy; } });
|
||||
}
|
||||
}
|
||||
|
||||
return drives;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// No-op
|
||||
}
|
||||
|
||||
return drives;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the media type for a device path using the Aaru libraries
|
||||
/// </summary>
|
||||
/// <param name="devicePath">Path to the device</param>
|
||||
/// <param name="internalDriveType">Current internal drive type</param>
|
||||
/// <returns>MediaType, null on error</returns>
|
||||
private static (MediaType?, string) GetMediaType(string devicePath, InternalDriveType? internalDriveType)
|
||||
{
|
||||
char driveLetter = devicePath == null || !devicePath.Any() ? '\0' : devicePath[0];
|
||||
|
||||
// Take care of the non-optical stuff first
|
||||
// TODO: See if any of these can be more granular, like Optical is
|
||||
if (internalDriveType == Data.InternalDriveType.Floppy)
|
||||
return (MediaType.FloppyDisk, null);
|
||||
else if (internalDriveType == Data.InternalDriveType.HardDisk)
|
||||
return (MediaType.HardDisk, null);
|
||||
else if (internalDriveType == Data.InternalDriveType.Removable)
|
||||
return (MediaType.FlashDrive, null);
|
||||
|
||||
// Get the current drive information
|
||||
string deviceId = null;
|
||||
bool loaded = false;
|
||||
try
|
||||
{
|
||||
// Get the device ID first
|
||||
var searcher = new ManagementObjectSearcher(
|
||||
"root\\CIMV2",
|
||||
$"SELECT * FROM Win32_CDROMDrive WHERE Id = '{driveLetter}:\'");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
deviceId = (string)queryObj["DeviceID"];
|
||||
loaded = (bool)queryObj["MediaLoaded"];
|
||||
}
|
||||
|
||||
// If we got no valid device, we don't care and just return
|
||||
if (deviceId == null)
|
||||
return (null, "Device could not be found");
|
||||
else if (!loaded)
|
||||
return (null, "Device is not reporting media loaded");
|
||||
|
||||
MsftDiscMaster2 discMaster = new MsftDiscMaster2();
|
||||
deviceId = deviceId.ToLower().Replace('\\', '#').Replace('/', '#');
|
||||
string id = null;
|
||||
foreach (var disc in discMaster)
|
||||
{
|
||||
if (disc.ToString().Contains(deviceId))
|
||||
id = disc.ToString();
|
||||
}
|
||||
|
||||
// If we couldn't find the drive, we don't care and return
|
||||
if (id == null)
|
||||
return (null, "Device ID could not be found");
|
||||
|
||||
// Create the required objects for reading from the drive
|
||||
MsftDiscRecorder2 recorder = new MsftDiscRecorder2();
|
||||
recorder.InitializeDiscRecorder(id);
|
||||
MsftDiscFormat2Data dataWriter = new MsftDiscFormat2Data();
|
||||
|
||||
// If the recorder is not supported, just return
|
||||
if (!dataWriter.IsRecorderSupported(recorder))
|
||||
return (null, "IMAPI2 recorder not supported");
|
||||
|
||||
// Otherwise, set the recorder to get information from
|
||||
dataWriter.Recorder = recorder;
|
||||
|
||||
var media = dataWriter.CurrentPhysicalMediaType;
|
||||
return (media.IMAPIToMediaType(), null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (null, ex.Message);
|
||||
return new List<Drive>();
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/// <summary>
|
||||
/// Get all devices attached converted to Drive objects
|
||||
/// </summary>
|
||||
/// <param name="ignoreFixedDrives">True to ignore fixed drives from population, false otherwise</param>
|
||||
/// <returns>List of drives, null on error</returns>
|
||||
private static List<Drive> GetDriveList(bool ignoreFixedDrives)
|
||||
{
|
||||
DeviceInfo[] deviceInfos = Device.ListDevices();
|
||||
if (deviceInfos == null)
|
||||
return null;
|
||||
|
||||
var drives = new List<Drive>();
|
||||
foreach (DeviceInfo deviceInfo in deviceInfos)
|
||||
{
|
||||
if (deviceInfo.Path == null)
|
||||
continue;
|
||||
|
||||
if (!deviceInfo.Supported)
|
||||
continue;
|
||||
|
||||
var drive = GetDriveFromDevice(deviceInfo.Path, ignoreFixedDrives);
|
||||
if (drive == null)
|
||||
continue;
|
||||
|
||||
drives.Add(drive);
|
||||
}
|
||||
|
||||
return drives;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate a Drive object from a single device
|
||||
/// </summary>
|
||||
/// <param name="devicePath">Path to the device</param>
|
||||
/// <param name="ignoreFixedDrives">True to ignore fixed drives from population, false otherwise</param>
|
||||
/// <returns>Drive object for the device, null on error</returns>
|
||||
private static Drive GetDriveFromDevice(string devicePath, bool ignoreFixedDrives)
|
||||
{
|
||||
if (devicePath.Length == 2 &&
|
||||
devicePath[1] == ':' &&
|
||||
devicePath[0] != '/' &&
|
||||
char.IsLetter(devicePath[0]))
|
||||
devicePath = "\\\\.\\" + char.ToUpper(devicePath[0]) + ':';
|
||||
|
||||
string windowsLocalDevicePath = devicePath;
|
||||
if (windowsLocalDevicePath.StartsWith("\\\\.\\"))
|
||||
windowsLocalDevicePath = windowsLocalDevicePath.Substring("\\\\.\\".Length);
|
||||
|
||||
var dev = Device.Create(devicePath, out _);
|
||||
if (dev == null || dev.Error)
|
||||
return null;
|
||||
|
||||
var devInfo = new Aaru.Core.Devices.Info.DeviceInfo(dev);
|
||||
if (devInfo.MmcConfiguration != null)
|
||||
{
|
||||
Features.SeparatedFeatures ftr = Features.Separate(devInfo.MmcConfiguration);
|
||||
if (ftr.Descriptors != null && ftr.Descriptors.Any(d => d.Code == 0x0000))
|
||||
{
|
||||
var desc = ftr.Descriptors.First(d => d.Code == 0x0000);
|
||||
bool isOptical = IsOptical(desc.Data);
|
||||
if (isOptical)
|
||||
return Create(Data.InternalDriveType.Optical, windowsLocalDevicePath);
|
||||
else if (!ignoreFixedDrives)
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ignoreFixedDrives)
|
||||
{
|
||||
switch (dev.Type)
|
||||
{
|
||||
case DeviceType.MMC:
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
|
||||
case DeviceType.SecureDigital:
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
}
|
||||
|
||||
if (dev.IsUsb)
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
|
||||
if (dev.IsFireWire)
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
|
||||
if (dev.IsPcmcia)
|
||||
return Create(Data.InternalDriveType.Removable, windowsLocalDevicePath);
|
||||
}
|
||||
|
||||
dev.Close();
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the media type for a device path using the Aaru libraries
|
||||
/// </summary>
|
||||
/// <param name="devicePath">Path to the device</param>
|
||||
/// <param name="internalDriveType">Current internal drive type</param>
|
||||
/// <returns>MediaType, null on error</returns>
|
||||
/// <remarks>
|
||||
/// TODO: Get the device type for devices with set media types
|
||||
/// </remarks>
|
||||
private static (MediaType?, string) GetMediaType(string devicePath, InternalDriveType? internalDriveType)
|
||||
{
|
||||
if (devicePath.Length == 2 &&
|
||||
devicePath[1] == ':' &&
|
||||
devicePath[0] != '/' &&
|
||||
char.IsLetter(devicePath[0]))
|
||||
devicePath = "\\\\.\\" + char.ToUpper(devicePath[0]) + ':';
|
||||
|
||||
var dev = Device.Create(devicePath, out _);
|
||||
if (dev == null || dev.Error)
|
||||
return (null, "Device could not be accessed");
|
||||
|
||||
switch (dev.Type)
|
||||
{
|
||||
case DeviceType.ATAPI:
|
||||
case DeviceType.SCSI:
|
||||
ScsiInfo scsiInfo = new ScsiInfo(dev);
|
||||
var mediaType = EnumConverter.MediaTypeToMediaType(scsiInfo?.MediaType);
|
||||
if (mediaType == null)
|
||||
return (mediaType, "Could not determine media type");
|
||||
else
|
||||
return (mediaType, null);
|
||||
}
|
||||
|
||||
return (null, "Device does not support media type finding");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determine if a drive is optical or not
|
||||
/// </summary>
|
||||
/// <param name="featureBytes">Bytes representing the field to check</param>
|
||||
/// <returns>True if the drive is optical, false otherwise</returns>
|
||||
private static bool IsOptical(byte[] featureBytes)
|
||||
{
|
||||
var supportedMediaTypes = OpticalMediaSupport(featureBytes);
|
||||
if (supportedMediaTypes == null || !supportedMediaTypes.Any())
|
||||
return false;
|
||||
|
||||
if (supportedMediaTypes.Contains(MediaType.CDROM))
|
||||
return true;
|
||||
else if (supportedMediaTypes.Contains(MediaType.DVD))
|
||||
return true;
|
||||
else if (supportedMediaTypes.Contains(MediaType.BluRay))
|
||||
return true;
|
||||
else if (supportedMediaTypes.Contains(MediaType.HDDVD))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get supported media types for a drive
|
||||
/// </summary>
|
||||
/// <param name="featureBytes">Bytes representing the field to check</param>
|
||||
/// <returns>List of supported media types, null on error</returns>
|
||||
private static List<MediaType> OpticalMediaSupport(byte[] featureBytes)
|
||||
{
|
||||
Feature_0000? feature = Features.Decode_0000(featureBytes);
|
||||
|
||||
if (!feature.HasValue)
|
||||
return null;
|
||||
|
||||
var supportedMediaTypes = new List<MediaType>();
|
||||
foreach (Profile prof in feature.Value.Profiles)
|
||||
{
|
||||
switch (prof.Number)
|
||||
{
|
||||
// Values we don't care about for Optical
|
||||
case ProfileNumber.Reserved:
|
||||
case ProfileNumber.NonRemovable:
|
||||
case ProfileNumber.Removable:
|
||||
case ProfileNumber.MOErasable:
|
||||
case ProfileNumber.OpticalWORM:
|
||||
case ProfileNumber.ASMO:
|
||||
case ProfileNumber.Unconforming:
|
||||
break;
|
||||
|
||||
// Every supported optical profile
|
||||
case ProfileNumber.CDROM:
|
||||
case ProfileNumber.CDR:
|
||||
case ProfileNumber.CDRW:
|
||||
supportedMediaTypes.Add(MediaType.CDROM);
|
||||
break;
|
||||
|
||||
case ProfileNumber.DVDROM:
|
||||
case ProfileNumber.DVDRSeq:
|
||||
case ProfileNumber.DVDRAM:
|
||||
case ProfileNumber.DVDRWRes:
|
||||
case ProfileNumber.DVDRWSeq:
|
||||
case ProfileNumber.DVDRDLSeq:
|
||||
case ProfileNumber.DVDRDLJump:
|
||||
case ProfileNumber.DVDRWDL:
|
||||
case ProfileNumber.DVDDownload:
|
||||
case ProfileNumber.DVDRWPlus:
|
||||
case ProfileNumber.DVDRPlus:
|
||||
case ProfileNumber.DVDRWDLPlus:
|
||||
case ProfileNumber.DVDRDLPlus:
|
||||
supportedMediaTypes.Add(MediaType.DVD);
|
||||
break;
|
||||
|
||||
// TODO: Add DDCD as media type
|
||||
case ProfileNumber.DDCDROM:
|
||||
case ProfileNumber.DDCDR:
|
||||
case ProfileNumber.DDCDRW:
|
||||
supportedMediaTypes.Add(MediaType.DVD);
|
||||
break;
|
||||
|
||||
case ProfileNumber.BDROM:
|
||||
case ProfileNumber.BDRSeq:
|
||||
case ProfileNumber.BDRRdm:
|
||||
case ProfileNumber.BDRE:
|
||||
supportedMediaTypes.Add(MediaType.BluRay);
|
||||
break;
|
||||
|
||||
case ProfileNumber.HDDVDROM:
|
||||
case ProfileNumber.HDDVDR:
|
||||
case ProfileNumber.HDDVDRAM:
|
||||
case ProfileNumber.HDDVDRW:
|
||||
case ProfileNumber.HDDVDRDL:
|
||||
case ProfileNumber.HDDVDRWDL:
|
||||
case ProfileNumber.HDBURNROM:
|
||||
case ProfileNumber.HDBURNR:
|
||||
case ProfileNumber.HDBURNRW:
|
||||
supportedMediaTypes.Add(MediaType.HDDVD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return supportedMediaTypes.Distinct().ToList();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public string RedumperPath
|
||||
{
|
||||
get { return GetStringSetting(_settings, "RedumperPath", "Programs\\RedumperPath\\redumper.exe"); }
|
||||
get { return GetStringSetting(_settings, "RedumperPath", "Programs\\Redumper\\redumper.exe"); }
|
||||
set { _settings["RedumperPath"] = value; }
|
||||
}
|
||||
|
||||
@@ -87,6 +87,15 @@ namespace MPF.Core.Data
|
||||
set { _settings["CheckForUpdatesOnStartup"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fast update label - Skips disc checks and updates path only
|
||||
/// </summary>
|
||||
public bool FastUpdateLabel
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "FastUpdateLabel", false); }
|
||||
set { _settings["FastUpdateLabel"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default output path for dumps
|
||||
/// </summary>
|
||||
@@ -132,7 +141,7 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedCD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedCD", 72); }
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedCD", 24); }
|
||||
set { _settings["PreferredDumpSpeedCD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
@@ -141,16 +150,25 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedDVD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedDVD", 24); }
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedDVD", 16); }
|
||||
set { _settings["PreferredDumpSpeedDVD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default HD-DVD dumping speed
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedHDDVD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedHDDVD", 8); }
|
||||
set { _settings["PreferredDumpSpeedHDDVD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default BD dumping speed
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedBD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedBD", 16); }
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedBD", 8); }
|
||||
set { _settings["PreferredDumpSpeedBD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
@@ -222,7 +240,7 @@ namespace MPF.Core.Data
|
||||
public int DICMultiSectorReadValue
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "DICMultiSectorReadValue", 0); }
|
||||
set { _settings["DICMultiSectorRead"] = value.ToString(); }
|
||||
set { _settings["DICMultiSectorReadValue"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -286,6 +304,19 @@ namespace MPF.Core.Data
|
||||
|
||||
#endregion
|
||||
|
||||
#region Redumper
|
||||
|
||||
/// <summary>
|
||||
/// Default number of rereads
|
||||
/// </summary>
|
||||
public int RedumperRereadCount
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "RedumperRereadCount", 20); }
|
||||
set { _settings["RedumperRereadCount"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extra Dumping Options
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
@@ -45,20 +45,10 @@
|
||||
<ProjectReference Include="..\RedumpLib\RedumpLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
|
||||
<ProjectReference Include="..\Aaru\CICMMetadata\CICMMetadataEditor\CICMMetadataEditor\CICMMetadataEditor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
|
||||
<ProjectReference Include="..\Aaru\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
|
||||
<ProjectReference Include="..\Aaru\Aaru.Core\Aaru.Core.csproj" />
|
||||
<ProjectReference Include="..\Aaru\Aaru.Devices\Aaru.Devices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
|
||||
<PackageReference Include="System.Management" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -14,8 +14,16 @@ namespace MPF.Core.Utilities
|
||||
/// </summary>
|
||||
public static (Options, string, int) LoadFromArguments(string[] args, int startIndex = 0)
|
||||
{
|
||||
// Create the output values
|
||||
var options = new Options();
|
||||
// Create the output values with defaults
|
||||
var options = new Options()
|
||||
{
|
||||
RedumpUsername = null,
|
||||
RedumpPassword = null,
|
||||
InternalProgram = InternalProgram.NONE,
|
||||
OutputSubmissionJSON = false,
|
||||
CompressLogFiles = false,
|
||||
};
|
||||
|
||||
string parsedPath = null;
|
||||
|
||||
// These values require multiple parts to be active
|
||||
|
||||
@@ -161,8 +161,15 @@ namespace MPF.Core.Utilities
|
||||
/// </summary>
|
||||
public static string GetCurrentVersion()
|
||||
{
|
||||
var assemblyVersion = Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute;
|
||||
return assemblyVersion.InformationalVersion;
|
||||
try
|
||||
{
|
||||
var assemblyVersion = Attribute.GetCustomAttribute(Assembly.GetEntryAssembly(), typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute;
|
||||
return assemblyVersion.InformationalVersion;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -19,14 +19,9 @@ namespace MPF.Library
|
||||
#region Output paths
|
||||
|
||||
/// <summary>
|
||||
/// Base output directory to write files to
|
||||
/// Base output file path to write files to
|
||||
/// </summary>
|
||||
public string OutputDirectory { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Base output filename for output
|
||||
/// </summary>
|
||||
public string OutputFilename { get; private set; }
|
||||
public string OutputPath { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -87,15 +82,13 @@ namespace MPF.Library
|
||||
/// Constructor for a full DumpEnvironment object from user information
|
||||
/// </summary>
|
||||
/// <param name="options"></param>
|
||||
/// <param name="outputDirectory"></param>
|
||||
/// <param name="outputFilename"></param>
|
||||
/// <param name="outputPath"></param>
|
||||
/// <param name="drive"></param>
|
||||
/// <param name="system"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="parameters"></param>
|
||||
public DumpEnvironment(Options options,
|
||||
string outputDirectory,
|
||||
string outputFilename,
|
||||
string outputPath,
|
||||
Drive drive,
|
||||
RedumpSystem? system,
|
||||
MediaType? type,
|
||||
@@ -105,7 +98,7 @@ namespace MPF.Library
|
||||
this.Options = options;
|
||||
|
||||
// Output paths
|
||||
(this.OutputDirectory, this.OutputFilename) = InfoTool.NormalizeOutputPaths(outputDirectory, outputFilename);
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(outputPath);
|
||||
|
||||
// UI information
|
||||
this.Drive = drive;
|
||||
@@ -127,20 +120,32 @@ namespace MPF.Library
|
||||
if (this.Parameters.InternalProgram != InternalProgram.DiscImageCreator)
|
||||
return;
|
||||
|
||||
// Replace all instances in the output directory
|
||||
this.OutputDirectory = this.OutputDirectory.Replace('.', '_');
|
||||
try
|
||||
{
|
||||
// Normalize the output path
|
||||
string outputPath = InfoTool.NormalizeOutputPaths(this.OutputPath);
|
||||
|
||||
// Currently, only periods in directories matter
|
||||
// Leave the following code commented in case filename handling breaks again
|
||||
// Replace all instances in the output directory
|
||||
string outputDirectory = Path.GetDirectoryName(outputPath);
|
||||
outputDirectory = outputDirectory.Replace(".", "_");
|
||||
|
||||
// Replace all instances in the output filename, except the extension
|
||||
//string tempFilename = Path.GetFileNameWithoutExtension(this.OutputFilename)
|
||||
// .Replace('.', '_');
|
||||
//string tempExtension = Path.GetExtension(this.OutputFilename)?.TrimStart('.');
|
||||
//this.OutputFilename = $"{tempFilename}.{tempExtension}";
|
||||
// Replace all instances in the output filename
|
||||
string outputFilename = Path.GetFileNameWithoutExtension(outputPath);
|
||||
outputFilename = outputFilename.Replace(".", "_");
|
||||
|
||||
// Assign the path to the filename as well for dumping
|
||||
((Modules.DiscImageCreator.Parameters)this.Parameters).Filename = Path.Combine(this.OutputDirectory, this.OutputFilename);
|
||||
// Get the extension for recreating the path
|
||||
string outputExtension = Path.GetExtension(outputPath).TrimStart('.');
|
||||
|
||||
// Rebuild the output path
|
||||
if (!string.IsNullOrWhiteSpace(outputExtension))
|
||||
this.OutputPath = Path.Combine(outputDirectory, $"{outputFilename}.{outputExtension}");
|
||||
else
|
||||
this.OutputPath = Path.Combine(outputDirectory, outputFilename);
|
||||
|
||||
// Assign the path to the filename as well for dumping
|
||||
((Modules.DiscImageCreator.Parameters)this.Parameters).Filename = this.OutputPath;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -165,7 +170,7 @@ namespace MPF.Library
|
||||
break;
|
||||
|
||||
case InternalProgram.Redumper:
|
||||
this.Parameters = new Modules.DD.Parameters(parameters) { ExecutablePath = Options.RedumperPath };
|
||||
this.Parameters = new Modules.Redumper.Parameters(parameters) { ExecutablePath = Options.RedumperPath };
|
||||
break;
|
||||
|
||||
// Verification support only
|
||||
@@ -207,28 +212,27 @@ namespace MPF.Library
|
||||
return null;
|
||||
|
||||
// Set the proper parameters
|
||||
string filename = OutputDirectory + Path.DirectorySeparatorChar + OutputFilename;
|
||||
switch (Options.InternalProgram)
|
||||
{
|
||||
case InternalProgram.Aaru:
|
||||
Parameters = new Modules.Aaru.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options);
|
||||
Parameters = new Modules.Aaru.Parameters(System, Type, Drive.Letter, this.OutputPath, driveSpeed, Options);
|
||||
break;
|
||||
|
||||
case InternalProgram.DD:
|
||||
Parameters = new Modules.DD.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options);
|
||||
Parameters = new Modules.DD.Parameters(System, Type, Drive.Letter, this.OutputPath, driveSpeed, Options);
|
||||
break;
|
||||
|
||||
case InternalProgram.DiscImageCreator:
|
||||
Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options);
|
||||
Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, this.OutputPath, driveSpeed, Options);
|
||||
break;
|
||||
|
||||
case InternalProgram.Redumper:
|
||||
Parameters = new Modules.Redumper.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options);
|
||||
Parameters = new Modules.Redumper.Parameters(System, Type, Drive.Letter, this.OutputPath, driveSpeed, Options);
|
||||
break;
|
||||
|
||||
// This should never happen, but it needs a fallback
|
||||
default:
|
||||
Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, filename, driveSpeed, Options);
|
||||
Parameters = new Modules.DiscImageCreator.Parameters(System, Type, Drive.Letter, this.OutputPath, driveSpeed, Options);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -280,7 +284,7 @@ namespace MPF.Library
|
||||
|
||||
// Execute internal tool
|
||||
progress?.Report(Result.Success($"Executing {Options.InternalProgram}... {(Options.ToolsInSeparateWindow ? "please wait!" : "see log for output!")}"));
|
||||
Directory.CreateDirectory(OutputDirectory);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(this.OutputPath));
|
||||
await Task.Run(() => Parameters.ExecuteInternalProgram(Options.ToolsInSeparateWindow));
|
||||
progress?.Report(Result.Success($"{Options.InternalProgram} has finished!"));
|
||||
|
||||
@@ -313,8 +317,12 @@ namespace MPF.Library
|
||||
{
|
||||
resultProgress?.Report(Result.Success("Gathering submission information... please wait!"));
|
||||
|
||||
// Get the output directory and filename separately
|
||||
string outputDirectory = Path.GetDirectoryName(this.OutputPath);
|
||||
string outputFilename = Path.GetFileName(this.OutputPath);
|
||||
|
||||
// Check to make sure that the output had all the correct files
|
||||
(bool foundFiles, List<string> missingFiles) = InfoTool.FoundAllFiles(this.OutputDirectory, this.OutputFilename, this.Parameters, false);
|
||||
(bool foundFiles, List<string> missingFiles) = InfoTool.FoundAllFiles(outputDirectory, outputFilename, this.Parameters, false);
|
||||
if (!foundFiles)
|
||||
{
|
||||
resultProgress?.Report(Result.Failure($"There were files missing from the output:\n{string.Join("\n", missingFiles)}"));
|
||||
@@ -324,8 +332,7 @@ namespace MPF.Library
|
||||
// Extract the information from the output files
|
||||
resultProgress?.Report(Result.Success("Extracting output information from output files..."));
|
||||
SubmissionInfo submissionInfo = await InfoTool.ExtractOutputInformation(
|
||||
this.OutputDirectory,
|
||||
this.OutputFilename,
|
||||
this.OutputPath,
|
||||
this.Drive,
|
||||
this.System,
|
||||
this.Type,
|
||||
@@ -378,7 +385,7 @@ namespace MPF.Library
|
||||
|
||||
// Write the text output
|
||||
resultProgress?.Report(Result.Success("Writing information to !submissionInfo.txt..."));
|
||||
(bool txtSuccess, string txtResult) = InfoTool.WriteOutputData(this.OutputDirectory, formattedValues);
|
||||
(bool txtSuccess, string txtResult) = InfoTool.WriteOutputData(outputDirectory, formattedValues);
|
||||
if (txtSuccess)
|
||||
resultProgress?.Report(Result.Success(txtResult));
|
||||
else
|
||||
@@ -388,7 +395,7 @@ namespace MPF.Library
|
||||
if (Options.ScanForProtection && Options.OutputSeparateProtectionFile)
|
||||
{
|
||||
resultProgress?.Report(Result.Success("Writing protection to !protectionInfo.txt..."));
|
||||
bool scanSuccess = InfoTool.WriteProtectionData(this.OutputDirectory, submissionInfo);
|
||||
bool scanSuccess = InfoTool.WriteProtectionData(outputDirectory, submissionInfo);
|
||||
if (scanSuccess)
|
||||
resultProgress?.Report(Result.Success("Writing complete!"));
|
||||
else
|
||||
@@ -399,7 +406,7 @@ namespace MPF.Library
|
||||
if (Options.OutputSubmissionJSON)
|
||||
{
|
||||
resultProgress?.Report(Result.Success($"Writing information to !submissionInfo.json{(Options.IncludeArtifacts ? ".gz" : string.Empty)}..."));
|
||||
bool jsonSuccess = InfoTool.WriteOutputData(this.OutputDirectory, submissionInfo, Options.IncludeArtifacts);
|
||||
bool jsonSuccess = InfoTool.WriteOutputData(outputDirectory, submissionInfo, Options.IncludeArtifacts);
|
||||
if (jsonSuccess)
|
||||
resultProgress?.Report(Result.Success("Writing complete!"));
|
||||
else
|
||||
@@ -410,7 +417,7 @@ namespace MPF.Library
|
||||
if (Options.CompressLogFiles)
|
||||
{
|
||||
resultProgress?.Report(Result.Success("Compressing log files..."));
|
||||
(bool compressSuccess, string compressResult) = InfoTool.CompressLogFiles(this.OutputDirectory, this.OutputFilename, this.Parameters);
|
||||
(bool compressSuccess, string compressResult) = InfoTool.CompressLogFiles(outputDirectory, outputFilename, this.Parameters);
|
||||
if (compressSuccess)
|
||||
resultProgress?.Report(Result.Success(compressResult));
|
||||
else
|
||||
@@ -491,12 +498,11 @@ namespace MPF.Library
|
||||
return Result.Failure("Error! Current configuration is not supported!");
|
||||
|
||||
// Fix the output paths, just in case
|
||||
(OutputDirectory, OutputFilename) = InfoTool.NormalizeOutputPaths(OutputDirectory, OutputFilename);
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(this.OutputPath);
|
||||
|
||||
// Validate that the output path isn't on the dumping drive
|
||||
string fullOutputPath = Path.GetFullPath(Path.Combine(OutputDirectory, OutputFilename));
|
||||
if (fullOutputPath[0] == Drive.Letter)
|
||||
return Result.Failure($"Error! Cannot output to same drive that is being dumped!");
|
||||
if (this.OutputPath[0] == Drive.Letter)
|
||||
return Result.Failure("Error! Cannot output to same drive that is being dumped!");
|
||||
|
||||
// Validate that the required program exists
|
||||
if (!File.Exists(Parameters.ExecutablePath))
|
||||
@@ -505,7 +511,7 @@ namespace MPF.Library
|
||||
// Validate that the dumping drive doesn't contain the executable
|
||||
string fullExecutablePath = Path.GetFullPath(Parameters.ExecutablePath);
|
||||
if (fullExecutablePath[0] == Drive.Letter)
|
||||
return Result.Failure("$Error! Cannot dump same drive that executable resides on!");
|
||||
return Result.Failure("Error! Cannot dump same drive that executable resides on!");
|
||||
|
||||
// Validate that the current configuration is supported
|
||||
return Tools.GetSupportStatus(System, Type);
|
||||
|
||||
@@ -26,8 +26,7 @@ namespace MPF.Library
|
||||
/// <summary>
|
||||
/// Extract all of the possible information from a given input combination
|
||||
/// </summary>
|
||||
/// <param name="outputDirectory">Output folder to write to</param>
|
||||
/// <param name="outputFilename">Output filename to use as the base path</param>
|
||||
/// <param name="outputPath">Output path to write to</param>
|
||||
/// <param name="drive">Drive object representing the current drive</param>
|
||||
/// <param name="system">Currently selected system</param>
|
||||
/// <param name="mediaType">Currently selected media type</param>
|
||||
@@ -37,8 +36,7 @@ namespace MPF.Library
|
||||
/// <param name="protectionProgress">Optional protection progress callback</param>
|
||||
/// <returns>SubmissionInfo populated based on outputs, null on error</returns>
|
||||
public static async Task<SubmissionInfo> ExtractOutputInformation(
|
||||
string outputDirectory,
|
||||
string outputFilename,
|
||||
string outputPath,
|
||||
Drive drive,
|
||||
RedumpSystem? system,
|
||||
MediaType? mediaType,
|
||||
@@ -51,11 +49,16 @@ namespace MPF.Library
|
||||
if (!system.MediaTypes().Contains(mediaType))
|
||||
return null;
|
||||
|
||||
// Split the output path for easier use
|
||||
string outputDirectory = Path.GetDirectoryName(outputPath);
|
||||
string outputFilename = Path.GetFileName(outputPath);
|
||||
|
||||
// Check that all of the relevant files are there
|
||||
(bool foundFiles, List<string> missingFiles) = FoundAllFiles(outputDirectory, outputFilename, parameters, false);
|
||||
if (!foundFiles)
|
||||
{
|
||||
resultProgress.Report(Result.Failure($"There were files missing from the output:\n{string.Join("\n", missingFiles)}"));
|
||||
resultProgress.Report(Result.Failure($"This may indicate an issue with the hardware or media, including unsupported devices.\nPlease see dumping program documentation for more details."));
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -494,7 +497,7 @@ namespace MPF.Library
|
||||
return BitConverter.ToString(bytes).Replace("-", string.Empty);
|
||||
}
|
||||
|
||||
return string.Join("\n", File.ReadAllLines(filename));
|
||||
return File.ReadAllText(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -778,7 +781,7 @@ namespace MPF.Library
|
||||
// AddIfExists(output, Template.RegionalParentField, info.RegionalParent.ToString());
|
||||
|
||||
// Extras section
|
||||
if (info.Extras.PVD != null || info.Extras.PIC != null || info.Extras.BCA != null)
|
||||
if (info.Extras.PVD != null || info.Extras.PIC != null || info.Extras.BCA != null || info.Extras.SecuritySectorRanges != null)
|
||||
{
|
||||
output.Add(""); output.Add("Extras:");
|
||||
AddIfExists(output, Template.PVDField, info.Extras.PVD?.Trim(), 1);
|
||||
@@ -832,11 +835,9 @@ namespace MPF.Library
|
||||
output.Add(""); output.Add("Size & Checksum:");
|
||||
|
||||
// Gross hack because of automatic layerbreaks in Redump
|
||||
if ((info.CommonDiscInfo.Media != DiscType.BD25
|
||||
&& info.CommonDiscInfo.Media != DiscType.BD50
|
||||
&& info.CommonDiscInfo.Media != DiscType.BD100
|
||||
&& info.CommonDiscInfo.Media != DiscType.BD128)
|
||||
|| (!options.EnableRedumpCompatibility))
|
||||
if (!options.EnableRedumpCompatibility
|
||||
|| (info.CommonDiscInfo.Media.ToMediaType() != MediaType.BluRay
|
||||
&& !info.CommonDiscInfo.System.IsXGD()))
|
||||
{
|
||||
AddIfExists(output, Template.LayerbreakField, (info.SizeAndChecksums.Layerbreak == default ? null : info.SizeAndChecksums.Layerbreak.ToString()), 1);
|
||||
}
|
||||
@@ -1655,57 +1656,33 @@ namespace MPF.Library
|
||||
/// <summary>
|
||||
/// Normalize a split set of paths
|
||||
/// </summary>
|
||||
/// <param name="directory">Directory name to normalize</param>
|
||||
/// <param name="filename">Filename to normalize</param>
|
||||
public static (string, string) NormalizeOutputPaths(string directory, string filename)
|
||||
/// <param name="path">Path value to normalize</param>
|
||||
public static string NormalizeOutputPaths(string path)
|
||||
{
|
||||
// The easy way
|
||||
try
|
||||
{
|
||||
// Cache if we had a directory separator or not
|
||||
bool endedWithDirectorySeparator = directory.EndsWith(Path.DirectorySeparatorChar.ToString())
|
||||
|| directory.EndsWith(Path.AltDirectorySeparatorChar.ToString());
|
||||
// Trim quotes from the path
|
||||
path = path.Trim('"');
|
||||
|
||||
// Combine the path to make things separate easier
|
||||
string combinedPath = Path.Combine(directory, filename);
|
||||
// Try getting the combined path and returning that directly
|
||||
string fullPath = Path.GetFullPath(path);
|
||||
string fullDirectory = Path.GetDirectoryName(fullPath);
|
||||
string fullFile = Path.GetFileName(fullPath);
|
||||
|
||||
// If we have have a blank path, just return
|
||||
if (string.IsNullOrWhiteSpace(combinedPath))
|
||||
return (directory, filename);
|
||||
|
||||
// Now get the normalized paths
|
||||
directory = Path.GetDirectoryName(combinedPath);
|
||||
filename = Path.GetFileName(combinedPath);
|
||||
|
||||
// Take care of extra path characters
|
||||
directory = new StringBuilder(directory)
|
||||
.Replace(':', '_', 0, directory.LastIndexOf(':') == -1 ? 0 : directory.LastIndexOf(':'))
|
||||
.ToString();
|
||||
|
||||
// Sanitize the directory path
|
||||
directory = directory.Replace('?', '_');
|
||||
// Remove invalid path characters
|
||||
foreach (char c in Path.GetInvalidPathChars())
|
||||
directory = directory.Replace(c, '_');
|
||||
fullDirectory = fullDirectory.Replace(c, '_');
|
||||
|
||||
// Sanitize the filename
|
||||
filename = filename.Replace('?', '_');
|
||||
// Remove invalid filename characters
|
||||
foreach (char c in Path.GetInvalidFileNameChars())
|
||||
filename = filename.Replace(c, '_');
|
||||
fullFile = fullFile.Replace(c, '_');
|
||||
|
||||
// If we had a directory separator at the end before, add it again
|
||||
if (endedWithDirectorySeparator)
|
||||
directory += Path.DirectorySeparatorChar;
|
||||
|
||||
// If we have a root directory, sanitize
|
||||
if (Directory.Exists(directory))
|
||||
{
|
||||
var possibleRootDir = new DirectoryInfo(directory);
|
||||
if (possibleRootDir.Parent == null)
|
||||
directory = directory.Replace($"{Path.DirectorySeparatorChar}{Path.DirectorySeparatorChar}", $"{Path.DirectorySeparatorChar}");
|
||||
}
|
||||
return Path.Combine(fullDirectory, fullFile);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return (directory, filename);
|
||||
return path;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -2587,6 +2564,10 @@ namespace MPF.Library
|
||||
sorted.Add(new KeyValuePair<SiteCode?, string>(SiteCode.VolumeLabel, tags[SiteCode.VolumeLabel]));
|
||||
if (tags.ContainsKey(SiteCode.Multisession))
|
||||
sorted.Add(new KeyValuePair<SiteCode?, string>(SiteCode.Multisession, tags[SiteCode.Multisession]));
|
||||
if (tags.ContainsKey(SiteCode.UniversalHash))
|
||||
sorted.Add(new KeyValuePair<SiteCode?, string>(SiteCode.UniversalHash, tags[SiteCode.UniversalHash]));
|
||||
if (tags.ContainsKey(SiteCode.RingNonZeroDataStart))
|
||||
sorted.Add(new KeyValuePair<SiteCode?, string>(SiteCode.RingNonZeroDataStart, tags[SiteCode.RingNonZeroDataStart]));
|
||||
|
||||
if (tags.ContainsKey(SiteCode.XMID))
|
||||
sorted.Add(new KeyValuePair<SiteCode?, string>(SiteCode.XMID, tags[SiteCode.XMID]));
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<AssemblyName>MPF.Library</AssemblyName>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
@@ -28,10 +28,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.3.4" GeneratePathProperty="true">
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.7.0" GeneratePathProperty="true">
|
||||
<IncludeAssets>runtime; compile; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
|
||||
@@ -28,7 +28,9 @@ namespace MPF.Library
|
||||
{
|
||||
var scanner = new Scanner(
|
||||
options.ScanArchivesForProtection,
|
||||
scanContents: true, // Hardcoded value to avoid issues
|
||||
options.ScanPackersForProtection,
|
||||
scanPaths: true, // Hardcoded value to avoid issues
|
||||
options.IncludeDebugProtectionInformation,
|
||||
progress);
|
||||
|
||||
|
||||
@@ -376,6 +376,11 @@ namespace MPF.Modules.Aaru
|
||||
info.VersionAndEditions.Version = GetPlayStation2Version(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation3:
|
||||
info.VersionAndEditions.Version = GetPlayStation3Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation3Serial(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation4:
|
||||
info.VersionAndEditions.Version = GetPlayStation4Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation4Serial(drive?.Letter) ?? "";
|
||||
|
||||
7391
MPF.Modules/Aaru/cicm.cs
Normal file
7391
MPF.Modules/Aaru/cicm.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -242,7 +242,7 @@ namespace MPF.Modules
|
||||
/// </summary>
|
||||
/// <param name="parameters">String possibly representing parameters</param>
|
||||
/// <returns>True if the parameters were set correctly, false otherwise</returns>
|
||||
protected virtual bool ValidateAndSetParameters(string parameters) => true;
|
||||
protected virtual bool ValidateAndSetParameters(string parameters) => !string.IsNullOrWhiteSpace(parameters);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace MPF.Modules
|
||||
return BitConverter.ToString(bytes).Replace("-", string.Empty);
|
||||
}
|
||||
|
||||
return string.Join("\n", File.ReadAllLines(filename));
|
||||
return File.ReadAllText(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -622,6 +622,7 @@ namespace MPF.Modules
|
||||
|
||||
string valuePart = commandParts[1];
|
||||
|
||||
this[longFlagString] = true;
|
||||
(string value, long factor) = ExtractFactorFromValue(valuePart);
|
||||
return (sbyte)(sbyte.Parse(value) * factor);
|
||||
}
|
||||
@@ -698,6 +699,7 @@ namespace MPF.Modules
|
||||
|
||||
string valuePart = commandParts[1];
|
||||
|
||||
this[longFlagString] = true;
|
||||
(string value, long factor) = ExtractFactorFromValue(valuePart);
|
||||
return (short)(short.Parse(value) * factor);
|
||||
}
|
||||
@@ -774,6 +776,7 @@ namespace MPF.Modules
|
||||
|
||||
string valuePart = commandParts[1];
|
||||
|
||||
this[longFlagString] = true;
|
||||
(string value, long factor) = ExtractFactorFromValue(valuePart);
|
||||
return (int)(int.Parse(value) * factor);
|
||||
}
|
||||
@@ -850,6 +853,7 @@ namespace MPF.Modules
|
||||
|
||||
string valuePart = commandParts[1];
|
||||
|
||||
this[longFlagString] = true;
|
||||
(string value, long factor) = ExtractFactorFromValue(valuePart);
|
||||
return long.Parse(value) * factor;
|
||||
}
|
||||
@@ -1002,6 +1006,7 @@ namespace MPF.Modules
|
||||
|
||||
string valuePart = commandParts[1];
|
||||
|
||||
this[longFlagString] = true;
|
||||
(string value, long factor) = ExtractFactorFromValue(valuePart);
|
||||
return (byte)(byte.Parse(value) * factor);
|
||||
}
|
||||
@@ -1322,6 +1327,80 @@ namespace MPF.Modules
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal serial from a PlayStation 3 disc, if possible
|
||||
/// </summary>
|
||||
/// <param name="driveLetter">Drive letter to use to check</param>
|
||||
/// <returns>Internal disc serial if possible, null on error</returns>
|
||||
protected static string GetPlayStation3Serial(char? driveLetter)
|
||||
{
|
||||
// If there's no drive letter, we can't do this part
|
||||
if (driveLetter == null)
|
||||
return null;
|
||||
|
||||
// If the folder no longer exists, we can't do this part
|
||||
string drivePath = driveLetter + ":\\";
|
||||
if (!Directory.Exists(drivePath))
|
||||
return null;
|
||||
|
||||
// If we can't find PARAM.SFO, we don't have a PlayStation 3 disc
|
||||
string paramSfoPath = Path.Combine(drivePath, "PS3_GAME", "PARAM.SFO");
|
||||
if (!File.Exists(paramSfoPath))
|
||||
return null;
|
||||
|
||||
// Let's try reading PARAM.SFO to find the serial at the end of the file
|
||||
try
|
||||
{
|
||||
using (BinaryReader br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x18, SeekOrigin.End);
|
||||
return new string(br.ReadChars(9));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We don't care what the error was
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the version from a PlayStation 3 disc, if possible
|
||||
/// </summary>
|
||||
/// <param name="driveLetter">Drive letter to use to check</param>
|
||||
/// <returns>Game version if possible, null on error</returns>
|
||||
protected static string GetPlayStation3Version(char? driveLetter)
|
||||
{
|
||||
// If there's no drive letter, we can't do this part
|
||||
if (driveLetter == null)
|
||||
return null;
|
||||
|
||||
// If the folder no longer exists, we can't do this part
|
||||
string drivePath = driveLetter + ":\\";
|
||||
if (!Directory.Exists(drivePath))
|
||||
return null;
|
||||
|
||||
// If we can't find PARAM.SFO, we don't have a PlayStation 3 disc
|
||||
string paramSfoPath = Path.Combine(drivePath, "PS3_GAME", "PARAM.SFO");
|
||||
if (!File.Exists(paramSfoPath))
|
||||
return null;
|
||||
|
||||
// Let's try reading PARAM.SFO to find the version at the end of the file
|
||||
try
|
||||
{
|
||||
using (BinaryReader br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x08, SeekOrigin.End);
|
||||
return new string(br.ReadChars(5));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We don't care what the error was
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal serial from a PlayStation 4 disc, if possible
|
||||
/// </summary>
|
||||
|
||||
@@ -126,6 +126,11 @@ namespace MPF.Modules.DD
|
||||
info.VersionAndEditions.Version = GetPlayStation2Version(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation3:
|
||||
info.VersionAndEditions.Version = GetPlayStation3Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation3Serial(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation4:
|
||||
info.VersionAndEditions.Version = GetPlayStation4Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation4Serial(drive?.Letter) ?? "";
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
public const string C2Opcode = "/c2";
|
||||
public const string CopyrightManagementInformation = "/c";
|
||||
public const string D8Opcode = "/d8";
|
||||
public const string DatExpand = "/d";
|
||||
public const string DisableBeep = "/q";
|
||||
public const string DVDReread = "/rr";
|
||||
public const string ExtractMicroSoftCabFile = "/mscf";
|
||||
|
||||
@@ -224,6 +224,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
- subInfo - Subchannel informational messages
|
||||
- subIntention - Subchannel intentional error information
|
||||
- subReadable - Human-readable version of `sub`
|
||||
- toc - Binary representation of the table of contents
|
||||
- volDesc - Volume descriptor information
|
||||
*/
|
||||
|
||||
@@ -257,6 +258,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
missingFiles.Add($"{basePath}.dat");
|
||||
if (!File.Exists($"{basePath}.sub") && !File.Exists($"{basePath}.subtmp"))
|
||||
missingFiles.Add($"{basePath}.sub");
|
||||
if (!File.Exists($"{basePath}.toc"))
|
||||
missingFiles.Add($"{basePath}.toc");
|
||||
if (!File.Exists($"{basePath}_disc.txt"))
|
||||
missingFiles.Add($"{basePath}_disc.txt");
|
||||
if (!File.Exists($"{basePath}_drive.txt"))
|
||||
@@ -420,19 +423,21 @@ namespace MPF.Modules.DiscImageCreator
|
||||
info.TracksAndWriteOffsets.Cuesheet = GetFullFile($"{basePath}.cue") ?? "";
|
||||
//var cueSheet = new CueSheet($"{basePath}.cue"); // TODO: Do something with this
|
||||
|
||||
// Audio CDs "all have an offset of 0" and should not be included
|
||||
if (System != RedumpSystem.AudioCD)
|
||||
{
|
||||
string cdWriteOffset = GetWriteOffset($"{basePath}_disc.txt") ?? "";
|
||||
info.CommonDiscInfo.RingWriteOffset = cdWriteOffset;
|
||||
info.TracksAndWriteOffsets.OtherWriteOffsets = cdWriteOffset;
|
||||
}
|
||||
// Attempt to get the write offset
|
||||
string cdWriteOffset = GetWriteOffset($"{basePath}_disc.txt") ?? "";
|
||||
info.CommonDiscInfo.RingWriteOffset = cdWriteOffset;
|
||||
info.TracksAndWriteOffsets.OtherWriteOffsets = cdWriteOffset;
|
||||
|
||||
// Attempt to get multisession data
|
||||
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}_disc.txt");
|
||||
if (!string.IsNullOrWhiteSpace(cdMultiSessionInfo))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
|
||||
|
||||
|
||||
// Attempt to get the universal hash
|
||||
string universalHash = GetUniversalHash($"{basePath}_disc.txt") ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = universalHash;
|
||||
|
||||
break;
|
||||
|
||||
case MediaType.DVD:
|
||||
@@ -450,11 +455,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
// Deal with the layerbreaks
|
||||
if (this.Type == MediaType.DVD)
|
||||
{
|
||||
if (!options.EnableRedumpCompatibility || !System.IsXGD())
|
||||
{
|
||||
string layerbreak = GetLayerbreak($"{basePath}_disc.txt", System.IsXGD()) ?? "";
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
}
|
||||
string layerbreak = GetLayerbreak($"{basePath}_disc.txt", System.IsXGD()) ?? "";
|
||||
info.SizeAndChecksums.Layerbreak = !string.IsNullOrEmpty(layerbreak) ? Int64.Parse(layerbreak) : default;
|
||||
}
|
||||
else if (this.Type == MediaType.BluRay)
|
||||
{
|
||||
@@ -477,7 +479,17 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
// Bluray-specific options
|
||||
if (this.Type == MediaType.BluRay)
|
||||
info.Extras.PIC = GetPIC($"{basePath}_PIC.bin") ?? "";
|
||||
{
|
||||
int trimLength = -1;
|
||||
switch (this.System)
|
||||
{
|
||||
case RedumpSystem.SonyPlayStation3:
|
||||
trimLength = 264;
|
||||
break;
|
||||
}
|
||||
|
||||
info.Extras.PIC = GetPIC($"{basePath}_PIC.bin", trimLength) ?? "";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -732,6 +744,11 @@ namespace MPF.Modules.DiscImageCreator
|
||||
info.VersionAndEditions.Version = GetPlayStation2Version(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation3:
|
||||
info.VersionAndEditions.Version = GetPlayStation3Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation3Serial(drive?.Letter) ?? "";
|
||||
break;
|
||||
|
||||
case RedumpSystem.SonyPlayStation4:
|
||||
info.VersionAndEditions.Version = GetPlayStation4Version(drive?.Letter) ?? "";
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = GetPlayStation4Serial(drive?.Letter) ?? "";
|
||||
@@ -1002,6 +1019,13 @@ namespace MPF.Modules.DiscImageCreator
|
||||
parameters.Add(FlagStrings.D8Opcode);
|
||||
}
|
||||
|
||||
// DAT Expand
|
||||
if (IsFlagSupported(FlagStrings.DatExpand))
|
||||
{
|
||||
if (this[FlagStrings.DatExpand] == true)
|
||||
parameters.Add(FlagStrings.DatExpand);
|
||||
}
|
||||
|
||||
// Disable Beep
|
||||
if (IsFlagSupported(FlagStrings.DisableBeep))
|
||||
{
|
||||
@@ -1298,6 +1322,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.BEOpcode,
|
||||
FlagStrings.C2Opcode,
|
||||
FlagStrings.D8Opcode,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.MultiSession,
|
||||
@@ -1314,6 +1339,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.BluRay] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.DVDReread,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
@@ -1332,6 +1358,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.BEOpcode,
|
||||
FlagStrings.C2Opcode,
|
||||
FlagStrings.D8Opcode,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ExtractMicroSoftCabFile,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
@@ -1358,6 +1385,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.BEOpcode,
|
||||
FlagStrings.C2Opcode,
|
||||
FlagStrings.D8Opcode,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.MultiSession,
|
||||
@@ -1375,6 +1403,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
[CommandStrings.DigitalVideoDisc] = new List<string>()
|
||||
{
|
||||
FlagStrings.CopyrightManagementInformation,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.DVDReread,
|
||||
FlagStrings.Fix,
|
||||
@@ -1384,11 +1413,13 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.Resume,
|
||||
FlagStrings.Reverse,
|
||||
FlagStrings.ScanFileProtect,
|
||||
FlagStrings.SkipSector,
|
||||
FlagStrings.UseAnchorVolumeDescriptorPointer,
|
||||
},
|
||||
|
||||
[CommandStrings.Disk] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
},
|
||||
|
||||
[CommandStrings.DriveSpeed] = new List<string>()
|
||||
@@ -1401,6 +1432,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.Floppy] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
},
|
||||
|
||||
[CommandStrings.GDROM] = new List<string>()
|
||||
@@ -1408,6 +1440,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.BEOpcode,
|
||||
FlagStrings.C2Opcode,
|
||||
FlagStrings.D8Opcode,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.NoFixSubP,
|
||||
@@ -1430,6 +1463,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.SACD] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
},
|
||||
|
||||
@@ -1451,6 +1485,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
FlagStrings.BEOpcode,
|
||||
FlagStrings.C2Opcode,
|
||||
FlagStrings.D8Opcode,
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.MultiSession,
|
||||
@@ -1475,6 +1510,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.XBOX] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.DVDReread,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
@@ -1483,6 +1519,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.XBOXSwap] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.NoSkipSS,
|
||||
@@ -1490,6 +1527,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.XGD2Swap] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.NoSkipSS,
|
||||
@@ -1497,6 +1535,7 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
[CommandStrings.XGD3Swap] = new List<string>()
|
||||
{
|
||||
FlagStrings.DatExpand,
|
||||
FlagStrings.DisableBeep,
|
||||
FlagStrings.ForceUnitAccess,
|
||||
FlagStrings.NoSkipSS,
|
||||
@@ -1533,6 +1572,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
logFiles.Add($"{basePath}.sub");
|
||||
if (File.Exists($"{basePath}.subtmp"))
|
||||
logFiles.Add($"{basePath}.subtmp");
|
||||
if (File.Exists($"{basePath}.toc"))
|
||||
logFiles.Add($"{basePath}.toc");
|
||||
if (File.Exists($"{basePath}_disc.txt"))
|
||||
logFiles.Add($"{basePath}_disc.txt");
|
||||
if (File.Exists($"{basePath}_drive.txt"))
|
||||
@@ -1575,6 +1616,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
logFiles.Add($"{basePath}_CSSKey.txt");
|
||||
if (File.Exists($"{basePath}.dat"))
|
||||
logFiles.Add($"{basePath}.dat");
|
||||
if (File.Exists($"{basePath}.toc"))
|
||||
logFiles.Add($"{basePath}.toc");
|
||||
if (File.Exists($"{basePath}_disc.txt"))
|
||||
logFiles.Add($"{basePath}_disc.txt");
|
||||
if (File.Exists($"{basePath}_drive.txt"))
|
||||
@@ -2269,6 +2312,9 @@ namespace MPF.Modules.DiscImageCreator
|
||||
// D8 Opcode
|
||||
ProcessFlagParameter(parts, FlagStrings.D8Opcode, ref i);
|
||||
|
||||
// DAT Expand
|
||||
ProcessFlagParameter(parts, FlagStrings.DatExpand, ref i);
|
||||
|
||||
// Disable Beep
|
||||
ProcessFlagParameter(parts, FlagStrings.DisableBeep, ref i);
|
||||
|
||||
@@ -3116,9 +3162,10 @@ namespace MPF.Modules.DiscImageCreator
|
||||
/// Get the hex contents of the PIC file
|
||||
/// </summary>
|
||||
/// <param name="picPath">Path to the PIC.bin file associated with the dump</param>
|
||||
/// <param name="trimLength">Number of characters to trim the PIC to, if -1, ignored</param>
|
||||
/// <returns>PIC data as a hex string if possible, null on error</returns>
|
||||
/// <remarks>https://stackoverflow.com/questions/9932096/add-separator-to-string-at-every-n-characters</remarks>
|
||||
private static string GetPIC(string picPath)
|
||||
private static string GetPIC(string picPath, int trimLength = -1)
|
||||
{
|
||||
// If the file doesn't exist, we can't get the info
|
||||
if (!File.Exists(picPath))
|
||||
@@ -3127,6 +3174,9 @@ namespace MPF.Modules.DiscImageCreator
|
||||
try
|
||||
{
|
||||
string hex = GetFullFile(picPath, true);
|
||||
if (trimLength > -1)
|
||||
hex = hex.Substring(0, trimLength);
|
||||
|
||||
return Regex.Replace(hex, ".{32}", "$0\n");
|
||||
}
|
||||
catch
|
||||
@@ -3456,6 +3506,47 @@ namespace MPF.Modules.DiscImageCreator
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the universal hash from the input file, if possible
|
||||
/// </summary>
|
||||
/// <param name="disc">_disc.txt file location</param>
|
||||
/// <returns>Universal hash if possible, null on error</returns>
|
||||
private static string GetUniversalHash(string disc)
|
||||
{
|
||||
// If the file doesn't exist, we can't get info from it
|
||||
if (!File.Exists(disc))
|
||||
return null;
|
||||
|
||||
using (StreamReader sr = File.OpenText(disc))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Fast forward to the universal hash information
|
||||
while (!sr.ReadLine().Trim().StartsWith("========== Hash(Universal Whole image) ==========")) ;
|
||||
|
||||
// If we find the universal hash line, return the SHA-1 hash only
|
||||
string line;
|
||||
while (!sr.EndOfStream)
|
||||
{
|
||||
line = sr.ReadLine().TrimStart();
|
||||
if (line.StartsWith("<rom name"))
|
||||
{
|
||||
if (GetISOHashValues(line, out _, out _, out _, out string sha1))
|
||||
return sha1;
|
||||
}
|
||||
}
|
||||
|
||||
// We couldn't detect it then
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We don't care what the exception is right now
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the write offset from the input file, if possible
|
||||
/// </summary>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace MPF.Modules.Redumper
|
||||
public const string Info = "info";
|
||||
public const string Protection = "protection";
|
||||
public const string Refine = "refine";
|
||||
//public const string Rings = "rings";
|
||||
public const string Split = "split";
|
||||
}
|
||||
|
||||
@@ -19,32 +20,46 @@ namespace MPF.Modules.Redumper
|
||||
/// </summary>
|
||||
public static class FlagStrings
|
||||
{
|
||||
public const string AudioSilenceThreshold = "--audio-silence-threshold";
|
||||
public const string CDiCorrectOffset = "--cdi-correct-offset";
|
||||
public const string CDiReadyNormalize = "--cdi-ready-normalize";
|
||||
public const string DescrambleNew = "--descramble-new";
|
||||
public const string Drive = "--drive";
|
||||
public const string ForceOffset = "--force-offset";
|
||||
public const string ForceQTOC = "--force-qtoc";
|
||||
public const string ForceSplit = "--force-split";
|
||||
public const string ForceTOC = "--force-toc";
|
||||
// General
|
||||
public const string HelpLong = "--help";
|
||||
public const string HelpShort = "-h";
|
||||
public const string ISO9660Trim = "--iso9660-trim";
|
||||
public const string ImageName = "--image-name";
|
||||
public const string ImagePath = "--image-path";
|
||||
public const string LeaveUnchanged = "--leave-unchanged";
|
||||
public const string Overwrite = "--overwrite";
|
||||
public const string RefineSubchannel = "--refine-subchannel";
|
||||
public const string Retries = "--retries";
|
||||
public const string RingSize = "--ring-size";
|
||||
public const string Skip = "--skip";
|
||||
public const string SkipFill = "--skip-fill";
|
||||
public const string SkipLeadIn = "--skip-leadin";
|
||||
public const string SkipSize = "--skip-size";
|
||||
public const string Speed = "--speed";
|
||||
public const string StopLBA = "--stop-lba";
|
||||
public const string Unsupported = "--unsupported";
|
||||
public const string Verbose = "--verbose";
|
||||
public const string Drive = "--drive";
|
||||
public const string Speed = "--speed";
|
||||
public const string Retries = "--retries";
|
||||
public const string ImagePath = "--image-path";
|
||||
public const string ImageName = "--image-name";
|
||||
public const string Overwrite = "--overwrite";
|
||||
|
||||
// Drive Configuration
|
||||
public const string DriveType = "--drive-type";
|
||||
public const string DriveReadOffset = "--drive-read-offset";
|
||||
public const string DriveC2Shift = "--drive-c2-shift";
|
||||
public const string DrivePregapStart = "--drive-pregap-start";
|
||||
public const string DriveReadMethod = "--drive-read-method";
|
||||
public const string DriveSectorOrder = "--drive-sector-order";
|
||||
|
||||
// Drive Specific
|
||||
public const string PlextorSkipLeadin = "--plextor-skip-leadin";
|
||||
public const string AsusSkipLeadout = "--asus-skip-leadout";
|
||||
|
||||
// Offset
|
||||
public const string ForceOffset = "--force-offset";
|
||||
public const string AudioSilenceThreshold = "--audio-silence-threshold";
|
||||
public const string CorrectOffsetShift = "--correct-offset-shift";
|
||||
|
||||
// Split
|
||||
public const string ForceSplit = "--force-split";
|
||||
public const string LeaveUnchanged = "--leave-unchanged";
|
||||
public const string ForceQTOC = "--force-qtoc";
|
||||
public const string SkipFill = "--skip-fill";
|
||||
public const string ISO9660Trim = "--iso9660-trim";
|
||||
public const string CDiReadyNormalize = "--cdi-ready-normalize";
|
||||
|
||||
// Miscellaneous
|
||||
public const string LBAStart = "--lba-start";
|
||||
public const string LBAEnd = "--lba-end";
|
||||
public const string RefineSubchannel = "--refine-subchannel";
|
||||
public const string Skip = "--skip";
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using MPF.Core.Converters;
|
||||
using MPF.Core.Data;
|
||||
using MPF.Core.Utilities;
|
||||
using RedumpLib.Data;
|
||||
|
||||
namespace MPF.Modules.UmdImageCreator
|
||||
@@ -43,6 +42,8 @@ namespace MPF.Modules.UmdImageCreator
|
||||
{
|
||||
if (!File.Exists($"{basePath}_disc.txt"))
|
||||
missingFiles.Add($"{basePath}_disc.txt");
|
||||
if (!File.Exists($"{basePath}_drive.txt"))
|
||||
missingFiles.Add($"{basePath}_drive.txt");
|
||||
if (!File.Exists($"{basePath}_mainError.txt"))
|
||||
missingFiles.Add($"{basePath}_mainError.txt");
|
||||
if (!File.Exists($"{basePath}_mainInfo.txt"))
|
||||
@@ -100,6 +101,8 @@ namespace MPF.Modules.UmdImageCreator
|
||||
{
|
||||
if (File.Exists(basePath + "_disc.txt"))
|
||||
info.Artifacts["disc"] = GetBase64(GetFullFile(basePath + "_disc.txt"));
|
||||
if (File.Exists(basePath + "_drive.txt"))
|
||||
info.Artifacts["drive"] = GetBase64(GetFullFile(basePath + "_drive.txt"));
|
||||
if (File.Exists(basePath + "_mainError.txt"))
|
||||
info.Artifacts["mainError"] = GetBase64(GetFullFile(basePath + "_mainError.txt"));
|
||||
if (File.Exists(basePath + "_mainInfo.txt"))
|
||||
@@ -118,6 +121,8 @@ namespace MPF.Modules.UmdImageCreator
|
||||
case MediaType.UMD:
|
||||
if (File.Exists($"{basePath}_disc.txt"))
|
||||
logFiles.Add($"{basePath}_disc.txt");
|
||||
if (File.Exists($"{basePath}_drive.txt"))
|
||||
logFiles.Add($"{basePath}_drive.txt");
|
||||
if (File.Exists($"{basePath}_mainError.txt"))
|
||||
logFiles.Add($"{basePath}_mainError.txt");
|
||||
if (File.Exists($"{basePath}_mainInfo.txt"))
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace MPF.Test.Library
|
||||
? Drive.Create(InternalDriveType.Floppy, letter.ToString())
|
||||
: Drive.Create(InternalDriveType.Optical, letter.ToString());
|
||||
|
||||
var env = new DumpEnvironment(options, string.Empty, string.Empty, drive, RedumpSystem.IBMPCcompatible, mediaType, parameters);
|
||||
var env = new DumpEnvironment(options, string.Empty, drive, RedumpSystem.IBMPCcompatible, mediaType, parameters);
|
||||
|
||||
bool actual = env.ParametersValid();
|
||||
Assert.Equal(expected, actual);
|
||||
|
||||
@@ -48,19 +48,18 @@ namespace MPF.Test.Library
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null, null, null, null)]
|
||||
[InlineData(" ", "", " ", "")]
|
||||
[InlineData("super", "blah.bin", "super", "blah.bin")]
|
||||
[InlineData("super\\hero", "blah.bin", "super\\hero", "blah.bin")]
|
||||
[InlineData("super.hero", "blah.bin", "super.hero", "blah.bin")]
|
||||
[InlineData("superhero", "blah.rev.bin", "superhero", "blah.rev.bin")]
|
||||
[InlineData("super&hero", "blah.bin", "super&hero", "blah.bin")]
|
||||
[InlineData("superhero", "blah&foo.bin", "superhero", "blah&foo.bin")]
|
||||
public void NormalizeOutputPathsTest(string outputDirectory, string outputFilename, string expectedOutputDirectory, string expectedOutputFilename)
|
||||
[InlineData(null, null)]
|
||||
[InlineData(" ", " ")]
|
||||
[InlineData("super\\blah.bin", "super\\blah.bin")]
|
||||
[InlineData("super\\hero\\blah.bin", "super\\hero\\blah.bin")]
|
||||
[InlineData("super.hero\\blah.bin", "super.hero\\blah.bin")]
|
||||
[InlineData("superhero\\blah.rev.bin", "superhero\\blah.rev.bin")]
|
||||
[InlineData("super&hero\\blah.bin", "super&hero\\blah.bin")]
|
||||
[InlineData("superhero\\blah&foo.bin", "superhero\\blah&foo.bin")]
|
||||
public void NormalizeOutputPathsTest(string outputPath, string expectedPath)
|
||||
{
|
||||
(string actualOutputDirectory, string actualOutputFilename) = InfoTool.NormalizeOutputPaths(outputDirectory, outputFilename);
|
||||
Assert.Equal(expectedOutputDirectory, actualOutputDirectory);
|
||||
Assert.Equal(expectedOutputFilename, actualOutputFilename);
|
||||
string actualPath = InfoTool.NormalizeOutputPaths(outputPath);
|
||||
Assert.Equal(expectedPath, actualPath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -35,12 +34,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeCoverage" Version="17.3.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Microsoft.CodeCoverage" Version="17.4.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.0.0" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.1.0" />
|
||||
<PackageReference Include="xunit.assert" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.core" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.extensibility.core" Version="2.4.2" />
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64</RuntimeIdentifiers>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Title>MPF.UI.Core</Title>
|
||||
<AssemblyName>MPF.UI.Core</AssemblyName>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Version>2.4</Version>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
@@ -20,6 +20,7 @@
|
||||
<NrtRevisionFormat>$(Version)-{chash:8}</NrtRevisionFormat>
|
||||
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
|
||||
<NrtShowRevision>false</NrtShowRevision>
|
||||
<UserSecretsId>27abb4ca-bf7a-431e-932f-49153303d5ff</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -322,6 +322,8 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.PVD.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.Multisession) != true)
|
||||
Parent.Multisession.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.RingNonZeroDataStart) != true)
|
||||
Parent.RingNonZeroDataStart.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.CopyProtection?.SecuROMData))
|
||||
Parent.SecuROMData.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.SSHash) != true)
|
||||
@@ -330,6 +332,8 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.SecuritySectorRanges.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.SSVersion) != true)
|
||||
Parent.SSVersion.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.UniversalHash) != true)
|
||||
Parent.UniversalHash.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.VolumeLabel) != true)
|
||||
Parent.VolumeLabel.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.XeMID) != true)
|
||||
@@ -465,10 +469,14 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.Multisession.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.PFIHash))
|
||||
Parent.PFIHash.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.RingNonZeroDataStart))
|
||||
Parent.RingNonZeroDataStart.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.RingNonZeroDataStart];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.SSHash))
|
||||
Parent.SSHash.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.SSHash];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.SSVersion))
|
||||
Parent.SSVersion.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.SSVersion];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.UniversalHash))
|
||||
Parent.UniversalHash.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.VolumeLabel))
|
||||
Parent.VolumeLabel.Text = SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.VolumeLabel];
|
||||
if (SubmissionInfo.CommonDiscInfo.CommentsSpecialFields.ContainsKey(SiteCode.XeMID))
|
||||
@@ -581,8 +589,10 @@ namespace MPF.UI.Core.ViewModels
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = Parent.InternalSerialName.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = Parent.Multisession.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = Parent.PFIHash.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.RingNonZeroDataStart] = Parent.RingNonZeroDataStart.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.SSHash] = Parent.SSHash.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.SSVersion] = Parent.SSVersion.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.UniversalHash] = Parent.UniversalHash.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.VolumeLabel] = Parent.VolumeLabel.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.XeMID] = Parent.XeMID.Text;
|
||||
SubmissionInfo.CommonDiscInfo.CommentsSpecialFields[SiteCode.XMID] = Parent.XMID.Text;
|
||||
|
||||
@@ -369,6 +369,7 @@
|
||||
<controls:UserInput x:Name="PVD" Label="PVD" IsReadOnly="True"
|
||||
Text="{Binding SubmissionInfo.Extras.PVD, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
|
||||
VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||
<controls:UserInput x:Name="RingNonZeroDataStart" Label="Universal Hash (SHA-1)" IsReadOnly="True"/>
|
||||
<controls:UserInput x:Name="SecuROMData" Label="SecuROM Data" IsReadOnly="True"
|
||||
Text="{Binding SubmissionInfo.CopyProtection.SecuROMData, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
|
||||
VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||
@@ -377,6 +378,7 @@
|
||||
Text="{Binding SubmissionInfo.Extras.SecuritySectorRanges, Mode=TwoWay}" TextHeight="75" TextWrapping="NoWrap"
|
||||
VerticalContentAlignmentValue="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||
<controls:UserInput x:Name="SSVersion" Label="Security Sector Version" IsReadOnly="True"/>
|
||||
<controls:UserInput x:Name="UniversalHash" Label="Universal Hash (SHA-1)" IsReadOnly="True"/>
|
||||
<controls:UserInput x:Name="VolumeLabel" Label="Volume Label" IsReadOnly="True"/>
|
||||
<controls:UserInput x:Name="XeMID" Label="XeMID" IsReadOnly="True"/>
|
||||
<controls:UserInput x:Name="XMID" Label="XMID" IsReadOnly="True"/>
|
||||
|
||||
128
MPF.sln
128
MPF.sln
@@ -31,44 +31,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MPF.Modules", "MPF.Modules\
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MPF.UI.Core", "MPF.UI.Core\MPF.UI.Core.csproj", "{EA3768DB-694A-4653-82E4-9FF71B8963F3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.CommonTypes", "Aaru\Aaru.CommonTypes\Aaru.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Devices", "Aaru\Aaru.Devices\Aaru.Devices.csproj", "{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Console", "Aaru\Aaru.Console\Aaru.Console.csproj", "{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Decoders", "Aaru\Aaru.Decoders\Aaru.Decoders.csproj", "{0BEB3088-B634-4289-AE17-CDF2D25D00D5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Checksums", "Aaru\Aaru.Checksums\Aaru.Checksums.csproj", "{CC48B324-A532-4A45-87A6-6F91F7141E8D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Helpers", "Aaru\Aaru.Helpers\Aaru.Helpers.csproj", "{F8BDF57B-1571-4CD0-84B3-B422088D359A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CICMMetadataEditor", "Aaru\CICMMetadata\CICMMetadataEditor\CICMMetadataEditor\CICMMetadataEditor.csproj", "{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Core", "Aaru\Aaru.Core\Aaru.Core.csproj", "{679659B8-25D0-4279-B632-56EF8F94ADC0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Decryption", "Aaru\Aaru.Decryption\Aaru.Decryption.csproj", "{B38840FC-7A2F-4F68-9508-6DE313E04C6E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Archives", "Aaru\Aaru.Archives\Aaru.Archives.csproj", "{282271D0-CCC2-4ED7-BA38-EC06A84BB974}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Dto", "Aaru\Aaru.Dto\Aaru.Dto.csproj", "{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Database", "Aaru\Aaru.Database\Aaru.Database.csproj", "{EE2CE4AA-1422-4A44-8B46-086E01D9AC08}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Filesystems", "Aaru\Aaru.Filesystems\Aaru.Filesystems.csproj", "{D7016DF2-5A5E-4524-B40D-BA2D59576688}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Filters", "Aaru\Aaru.Filters\Aaru.Filters.csproj", "{D571B8EF-903D-4353-BDD5-B834F9F029EF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Images", "Aaru\Aaru.Images\Aaru.Images.csproj", "{74032CBC-339B-42F3-AF6F-E96C261F3E6A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Partitions", "Aaru\Aaru.Partitions\Aaru.Partitions.csproj", "{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Settings", "Aaru\Aaru.Settings\Aaru.Settings.csproj", "{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Compression", "Aaru\Aaru.Compression\Aaru.Compression.csproj", "{858398D1-7321-4763-8BAB-56BBFEC74E29}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Aaru", "Aaru", "{29ED0535-C038-4CDB-87D8-11F6F33D95CF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MPF", "MPF", "{4160167D-681D-480B-ABC6-06AC869E5769}"
|
||||
EndProject
|
||||
Global
|
||||
@@ -113,78 +75,6 @@ Global
|
||||
{EA3768DB-694A-4653-82E4-9FF71B8963F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA3768DB-694A-4653-82E4-9FF71B8963F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA3768DB-694A-4653-82E4-9FF71B8963F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0BEB3088-B634-4289-AE17-CDF2D25D00D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{679659B8-25D0-4279-B632-56EF8F94ADC0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B38840FC-7A2F-4F68-9508-6DE313E04C6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B38840FC-7A2F-4F68-9508-6DE313E04C6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B38840FC-7A2F-4F68-9508-6DE313E04C6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B38840FC-7A2F-4F68-9508-6DE313E04C6E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EE2CE4AA-1422-4A44-8B46-086E01D9AC08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE2CE4AA-1422-4A44-8B46-086E01D9AC08}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EE2CE4AA-1422-4A44-8B46-086E01D9AC08}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EE2CE4AA-1422-4A44-8B46-086E01D9AC08}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D571B8EF-903D-4353-BDD5-B834F9F029EF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{74032CBC-339B-42F3-AF6F-E96C261F3E6A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{858398D1-7321-4763-8BAB-56BBFEC74E29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -198,24 +88,6 @@ Global
|
||||
{70B1265D-FE49-472A-A83D-0B462152D37A} = {4160167D-681D-480B-ABC6-06AC869E5769}
|
||||
{8A4254BD-552F-4238-B8EB-D59AACD768B9} = {4160167D-681D-480B-ABC6-06AC869E5769}
|
||||
{EA3768DB-694A-4653-82E4-9FF71B8963F3} = {4160167D-681D-480B-ABC6-06AC869E5769}
|
||||
{F2B84194-26EB-4227-B1C5-6602517E85AE} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{57BB2341-AB62-48FD-91B8-46F5A2F9ED51} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{CCAA7AFE-C094-4D82-A66D-630DE8A3F545} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{0BEB3088-B634-4289-AE17-CDF2D25D00D5} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{CC48B324-A532-4A45-87A6-6F91F7141E8D} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{F8BDF57B-1571-4CD0-84B3-B422088D359A} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{7BCE5DC7-BA1C-4B59-9AA9-1AB5F81A703C} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{679659B8-25D0-4279-B632-56EF8F94ADC0} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{B38840FC-7A2F-4F68-9508-6DE313E04C6E} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{282271D0-CCC2-4ED7-BA38-EC06A84BB974} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{EE2CE4AA-1422-4A44-8B46-086E01D9AC08} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{D7016DF2-5A5E-4524-B40D-BA2D59576688} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{D571B8EF-903D-4353-BDD5-B834F9F029EF} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{74032CBC-339B-42F3-AF6F-E96C261F3E6A} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{DA7AB65D-B5BA-4003-8893-A51BB071BA2F} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{5C4C7BAA-CF60-4233-84ED-39CB2312AF38} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
{858398D1-7321-4763-8BAB-56BBFEC74E29} = {29ED0535-C038-4CDB-87D8-11F6F33D95CF}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {73C62E6A-6584-4D93-83B5-ECB1FBDB469B}
|
||||
|
||||
@@ -13,11 +13,13 @@ namespace MPF
|
||||
// Private lists of known drive speed ranges
|
||||
private static IReadOnlyList<int> CD { get; } = new List<int> { 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 };
|
||||
private static IReadOnlyList<int> DVD { get; } = CD.Where(s => s <= 24).ToList();
|
||||
private static IReadOnlyList<int> HDDVD { get; } = CD.Where(s => s <= 24).ToList();
|
||||
private static IReadOnlyList<int> BD { get; } = CD.Where(s => s <= 16).ToList();
|
||||
|
||||
// Create collections for UI based on known drive speeds
|
||||
public static DoubleCollection SpeedsForCDAsCollection { get; } = GetDoubleCollectionFromIntList(CD);
|
||||
public static DoubleCollection SpeedsForDVDAsCollection { get; } = GetDoubleCollectionFromIntList(DVD);
|
||||
public static DoubleCollection SpeedsForHDDVDAsCollection { get; } = GetDoubleCollectionFromIntList(HDDVD);
|
||||
public static DoubleCollection SpeedsForBDAsCollection { get; } = GetDoubleCollectionFromIntList(BD);
|
||||
private static DoubleCollection GetDoubleCollectionFromIntList(IReadOnlyList<int> list)
|
||||
=> new DoubleCollection(list.Select(i => Convert.ToDouble(i)).ToList());
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64</RuntimeIdentifiers>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
@@ -11,9 +11,9 @@
|
||||
<AssemblyName>MPF</AssemblyName>
|
||||
<Description>Frontend for various dumping programs</Description>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2022</Copyright>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
@@ -27,10 +27,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.3.4" GeneratePathProperty="true">
|
||||
<PackageReference Include="BurnOutSharp" PrivateAssets="build; analyzers" ExcludeAssets="contentFiles" Version="2.7.0" GeneratePathProperty="true">
|
||||
<IncludeAssets>runtime; compile; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -60,11 +60,6 @@ namespace MPF.UI.ViewModels
|
||||
/// </summary>
|
||||
private bool _canExecuteSelectionChanged = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if TextChanged events can be executed
|
||||
/// </summary>
|
||||
private bool _canExecuteTextChanged = false;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@@ -249,11 +244,11 @@ namespace MPF.UI.ViewModels
|
||||
public void ExitApplication() => Application.Current.Shutdown();
|
||||
|
||||
/// <summary>
|
||||
/// Set the output directory from a dialog box
|
||||
/// Set the output path from a dialog box
|
||||
/// </summary>
|
||||
public void SetOutputDirectory()
|
||||
public void SetOutputPath()
|
||||
{
|
||||
BrowseFolder();
|
||||
BrowseFile();
|
||||
EnsureDiscInformation();
|
||||
}
|
||||
|
||||
@@ -435,12 +430,32 @@ namespace MPF.UI.ViewModels
|
||||
{
|
||||
if (App.Instance.EnableParametersCheckBox.IsChecked == true)
|
||||
{
|
||||
App.Instance.SystemTypeComboBox.IsEnabled = false;
|
||||
App.Instance.MediaTypeComboBox.IsEnabled = false;
|
||||
|
||||
App.Instance.OutputPathTextBox.IsEnabled = false;
|
||||
App.Instance.OutputPathBrowseButton.IsEnabled = false;
|
||||
|
||||
App.Instance.MediaScanButton.IsEnabled = false;
|
||||
App.Instance.UpdateVolumeLabel.IsEnabled = false;
|
||||
App.Instance.CopyProtectScanButton.IsEnabled = false;
|
||||
|
||||
App.Instance.ParametersTextBox.IsEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
App.Instance.ParametersTextBox.IsEnabled = false;
|
||||
ProcessCustomParameters();
|
||||
|
||||
App.Instance.SystemTypeComboBox.IsEnabled = true;
|
||||
App.Instance.MediaTypeComboBox.IsEnabled = true;
|
||||
|
||||
App.Instance.OutputPathTextBox.IsEnabled = true;
|
||||
App.Instance.OutputPathBrowseButton.IsEnabled = true;
|
||||
|
||||
App.Instance.MediaScanButton.IsEnabled = true;
|
||||
App.Instance.UpdateVolumeLabel.IsEnabled = true;
|
||||
App.Instance.CopyProtectScanButton.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,6 +570,43 @@ namespace MPF.UI.ViewModels
|
||||
App.Instance.StartStopButton.IsEnabled = ShouldEnableDumpingButton();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs a fast update of the output path while skipping disc checks
|
||||
/// </summary>
|
||||
/// <param name="removeEventHandlers">Whether event handlers need to be removed first</param>
|
||||
private void FastUpdateLabel(bool removeEventHandlers)
|
||||
{
|
||||
// Disable the dumping button
|
||||
App.Instance.StartStopButton.IsEnabled = false;
|
||||
|
||||
// Safely uncheck the parameters box, just in case
|
||||
if (App.Instance.EnableParametersCheckBox.IsChecked == true)
|
||||
{
|
||||
App.Instance.EnableParametersCheckBox.Checked -= EnableParametersCheckBoxClick;
|
||||
App.Instance.EnableParametersCheckBox.IsChecked = false;
|
||||
App.Instance.ParametersTextBox.IsEnabled = false;
|
||||
App.Instance.EnableParametersCheckBox.Checked += EnableParametersCheckBoxClick;
|
||||
}
|
||||
|
||||
// Remove event handlers to ensure ordering
|
||||
if (removeEventHandlers)
|
||||
DisableEventHandlers();
|
||||
|
||||
// Refresh the drive info
|
||||
(App.Instance.DriveLetterComboBox.SelectedItem as Drive)?.RefreshDrive();
|
||||
|
||||
// Set the initial environment and UI values
|
||||
Env = DetermineEnvironment();
|
||||
GetOutputNames(true);
|
||||
EnsureDiscInformation();
|
||||
|
||||
// Enable event handlers
|
||||
EnableEventHandlers();
|
||||
|
||||
// Enable the dumping button, if necessary
|
||||
App.Instance.StartStopButton.IsEnabled = ShouldEnableDumpingButton();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add all event handlers
|
||||
/// </summary>
|
||||
@@ -572,7 +624,7 @@ namespace MPF.UI.ViewModels
|
||||
App.Instance.EnableParametersCheckBox.Click += EnableParametersCheckBoxClick;
|
||||
App.Instance.MediaScanButton.Click += MediaScanButtonClick;
|
||||
App.Instance.UpdateVolumeLabel.Click += UpdateVolumeLabelClick;
|
||||
App.Instance.OutputDirectoryBrowseButton.Click += OutputDirectoryBrowseButtonClick;
|
||||
App.Instance.OutputPathBrowseButton.Click += OutputPathBrowseButtonClick;
|
||||
App.Instance.StartStopButton.Click += StartStopButtonClick;
|
||||
|
||||
// User Area SelectionChanged
|
||||
@@ -582,8 +634,7 @@ namespace MPF.UI.ViewModels
|
||||
App.Instance.DriveSpeedComboBox.SelectionChanged += DriveSpeedComboBoxSelectionChanged;
|
||||
|
||||
// User Area TextChanged
|
||||
App.Instance.OutputFilenameTextBox.TextChanged += OutputFilenameTextBoxTextChanged;
|
||||
App.Instance.OutputDirectoryTextBox.TextChanged += OutputDirectoryTextBoxTextChanged;
|
||||
App.Instance.OutputPathTextBox.TextChanged += OutputPathTextBoxTextChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -592,7 +643,6 @@ namespace MPF.UI.ViewModels
|
||||
private void EnableEventHandlers()
|
||||
{
|
||||
_canExecuteSelectionChanged = true;
|
||||
EnablePathEventHandlers();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -601,23 +651,6 @@ namespace MPF.UI.ViewModels
|
||||
private void DisableEventHandlers()
|
||||
{
|
||||
_canExecuteSelectionChanged = false;
|
||||
DisablePathEventHandlers();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable path textbox event handlers
|
||||
/// </summary>
|
||||
private void EnablePathEventHandlers()
|
||||
{
|
||||
_canExecuteTextChanged = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disable path textbox event handlers
|
||||
/// </summary>
|
||||
private void DisablePathEventHandlers()
|
||||
{
|
||||
_canExecuteTextChanged = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -628,9 +661,8 @@ namespace MPF.UI.ViewModels
|
||||
App.Instance.OptionsMenuItem.IsEnabled = false;
|
||||
App.Instance.SystemTypeComboBox.IsEnabled = false;
|
||||
App.Instance.MediaTypeComboBox.IsEnabled = false;
|
||||
App.Instance.OutputFilenameTextBox.IsEnabled = false;
|
||||
App.Instance.OutputDirectoryTextBox.IsEnabled = false;
|
||||
App.Instance.OutputDirectoryBrowseButton.IsEnabled = false;
|
||||
App.Instance.OutputPathTextBox.IsEnabled = false;
|
||||
App.Instance.OutputPathBrowseButton.IsEnabled = false;
|
||||
App.Instance.DriveLetterComboBox.IsEnabled = false;
|
||||
App.Instance.DriveSpeedComboBox.IsEnabled = false;
|
||||
App.Instance.EnableParametersCheckBox.IsEnabled = false;
|
||||
@@ -648,9 +680,8 @@ namespace MPF.UI.ViewModels
|
||||
App.Instance.OptionsMenuItem.IsEnabled = true;
|
||||
App.Instance.SystemTypeComboBox.IsEnabled = true;
|
||||
App.Instance.MediaTypeComboBox.IsEnabled = true;
|
||||
App.Instance.OutputFilenameTextBox.IsEnabled = true;
|
||||
App.Instance.OutputDirectoryTextBox.IsEnabled = true;
|
||||
App.Instance.OutputDirectoryBrowseButton.IsEnabled = true;
|
||||
App.Instance.OutputPathTextBox.IsEnabled = true;
|
||||
App.Instance.OutputPathBrowseButton.IsEnabled = true;
|
||||
App.Instance.DriveLetterComboBox.IsEnabled = true;
|
||||
App.Instance.DriveSpeedComboBox.IsEnabled = true;
|
||||
App.Instance.EnableParametersCheckBox.IsEnabled = true;
|
||||
@@ -798,24 +829,36 @@ namespace MPF.UI.ViewModels
|
||||
#region Helpers
|
||||
|
||||
/// <summary>
|
||||
/// Browse for an output folder
|
||||
/// Browse for an output file path
|
||||
/// </summary>
|
||||
private void BrowseFolder()
|
||||
private void BrowseFile()
|
||||
{
|
||||
string currentPath = App.Options.DefaultOutputPath;
|
||||
if (string.IsNullOrWhiteSpace(currentPath) || !Directory.Exists(currentPath))
|
||||
currentPath = System.AppDomain.CurrentDomain.BaseDirectory;
|
||||
// Get the current path, if possible
|
||||
string currentPath = App.Instance.OutputPathTextBox.Text;
|
||||
if (string.IsNullOrWhiteSpace(currentPath))
|
||||
currentPath = Path.Combine(App.Options.DefaultOutputPath, "track.bin");
|
||||
if (string.IsNullOrWhiteSpace(currentPath))
|
||||
currentPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "track.bin");
|
||||
|
||||
WinForms.FolderBrowserDialog folderDialog = new WinForms.FolderBrowserDialog
|
||||
// Get the full path
|
||||
currentPath = Path.GetFullPath(currentPath);
|
||||
|
||||
// Get the directory
|
||||
string directory = Path.GetDirectoryName(currentPath);
|
||||
|
||||
// Get the filename
|
||||
string filename = Path.GetFileName(currentPath);
|
||||
|
||||
WinForms.FileDialog fileDialog = new WinForms.SaveFileDialog
|
||||
{
|
||||
ShowNewFolderButton = false,
|
||||
SelectedPath = currentPath,
|
||||
FileName = filename,
|
||||
InitialDirectory = directory,
|
||||
};
|
||||
WinForms.DialogResult result = folderDialog.ShowDialog();
|
||||
WinForms.DialogResult result = fileDialog.ShowDialog();
|
||||
|
||||
if (result == WinForms.DialogResult.OK)
|
||||
{
|
||||
App.Instance.OutputDirectoryTextBox.Text = folderDialog.SelectedPath;
|
||||
App.Instance.OutputPathTextBox.Text = fileDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -844,7 +887,7 @@ namespace MPF.UI.ViewModels
|
||||
// If the drive is marked active, try to read from it
|
||||
else if (drive.MarkedActive)
|
||||
{
|
||||
App.Logger.VerboseLog($"Trying to detect media type for drive {drive.Letter}.. ");
|
||||
App.Logger.VerboseLog($"Trying to detect media type for drive {drive.Letter} [{drive.DriveFormat}].. ");
|
||||
(MediaType? detectedMediaType, string errorMessage) = drive.GetMediaType();
|
||||
|
||||
// If we got an error message, post it to the log
|
||||
@@ -881,47 +924,24 @@ namespace MPF.UI.ViewModels
|
||||
/// <returns>Filled DumpEnvironment instance</returns>
|
||||
private DumpEnvironment DetermineEnvironment()
|
||||
{
|
||||
// Populate the new environment
|
||||
var env = new DumpEnvironment(App.Options,
|
||||
App.Instance.OutputDirectoryTextBox.Text,
|
||||
App.Instance.OutputFilenameTextBox.Text,
|
||||
return new DumpEnvironment(App.Options,
|
||||
App.Instance.OutputPathTextBox.Text,
|
||||
App.Instance.DriveLetterComboBox.SelectedItem as Drive,
|
||||
App.Instance.SystemTypeComboBox.SelectedItem as RedumpSystemComboBoxItem,
|
||||
App.Instance.MediaTypeComboBox.SelectedItem as Element<MediaType>,
|
||||
App.Instance.ParametersTextBox.Text);
|
||||
|
||||
// Disable automatic reprocessing of the textboxes until we're done
|
||||
DisablePathEventHandlers();
|
||||
|
||||
// Save the current cursor positions
|
||||
int outputDirectorySelectionStart = App.Instance.OutputDirectoryTextBox.SelectionStart;
|
||||
int outputFilenameSelectionStart = App.Instance.OutputFilenameTextBox.SelectionStart;
|
||||
|
||||
// Set the new text
|
||||
App.Instance.OutputDirectoryTextBox.Text = env.OutputDirectory;
|
||||
App.Instance.OutputFilenameTextBox.Text = env.OutputFilename;
|
||||
|
||||
// Set the cursor position back to where it was
|
||||
App.Instance.OutputDirectoryTextBox.SelectionStart = outputDirectorySelectionStart;
|
||||
App.Instance.OutputDirectoryTextBox.SelectionLength = 0;
|
||||
App.Instance.OutputFilenameTextBox.SelectionStart = outputFilenameSelectionStart;
|
||||
App.Instance.OutputFilenameTextBox.SelectionLength = 0;
|
||||
|
||||
// Re-enable automatic reprocessing of textboxes
|
||||
EnablePathEventHandlers();
|
||||
|
||||
// Ensure the UI gets updated
|
||||
App.Instance.UpdateLayout();
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determine and set the current system type, if Allowed
|
||||
/// Determine and set the current system type, if allowed
|
||||
/// </summary>
|
||||
private void DetermineSystemType()
|
||||
{
|
||||
if (!App.Options.SkipSystemDetection && App.Instance.DriveLetterComboBox.SelectedIndex > -1)
|
||||
if (Drives == null || Drives.Count == 0 || App.Instance.DriveLetterComboBox.SelectedIndex == -1)
|
||||
{
|
||||
App.Logger.VerboseLog("Skipping system type detection because no valid drives found!");
|
||||
}
|
||||
else if (!App.Options.SkipSystemDetection)
|
||||
{
|
||||
App.Logger.VerboseLog($"Trying to detect system for drive {Drives[App.Instance.DriveLetterComboBox.SelectedIndex].Letter}.. ");
|
||||
var currentSystem = Drives[App.Instance.DriveLetterComboBox.SelectedIndex]?.GetRedumpSystem(App.Options.DefaultSystem) ?? App.Options.DefaultSystem;
|
||||
@@ -984,6 +1004,12 @@ namespace MPF.UI.ViewModels
|
||||
/// <param name="driveChanged">Force an updated name if the drive letter changes</param>
|
||||
public void GetOutputNames(bool driveChanged)
|
||||
{
|
||||
if (Drives == null || Drives.Count == 0 || App.Instance.DriveLetterComboBox.SelectedIndex == -1)
|
||||
{
|
||||
App.Logger.VerboseLog("Skipping output name building because no valid drives found!");
|
||||
return;
|
||||
}
|
||||
|
||||
Drive drive = App.Instance.DriveLetterComboBox.SelectedItem as Drive;
|
||||
RedumpSystem? systemType = App.Instance.SystemTypeComboBox.SelectedItem as RedumpSystemComboBoxItem;
|
||||
MediaType? mediaType = App.Instance.MediaTypeComboBox.SelectedItem as Element<MediaType>;
|
||||
@@ -991,33 +1017,38 @@ namespace MPF.UI.ViewModels
|
||||
// Get the extension for the file for the next two statements
|
||||
string extension = Env.Parameters?.GetDefaultExtension(mediaType);
|
||||
|
||||
// Disable automatic reprocessing of the textboxes until we're done
|
||||
DisablePathEventHandlers();
|
||||
// Set the output filename, if it's not already
|
||||
if (string.IsNullOrEmpty(App.Instance.OutputPathTextBox.Text))
|
||||
{
|
||||
string label = drive?.FormattedVolumeLabel ?? systemType.LongName();
|
||||
string directory = App.Options.DefaultOutputPath;
|
||||
string filename = $"{label}{extension ?? ".bin"}";
|
||||
|
||||
// Save the current cursor positions
|
||||
int outputDirectorySelectionStart = App.Instance.OutputDirectoryTextBox.SelectionStart;
|
||||
int outputFilenameSelectionStart = App.Instance.OutputFilenameTextBox.SelectionStart;
|
||||
// If the path ends with the label already
|
||||
if (directory.EndsWith(label, StringComparison.OrdinalIgnoreCase))
|
||||
directory = Path.GetDirectoryName(directory);
|
||||
|
||||
// Set the output filename, if we changed drives or it's not already
|
||||
if (driveChanged || string.IsNullOrEmpty(App.Instance.OutputFilenameTextBox.Text))
|
||||
App.Instance.OutputFilenameTextBox.Text = (drive?.FormattedVolumeLabel ?? systemType.LongName()) + (extension ?? ".bin");
|
||||
App.Instance.OutputPathTextBox.Text = Path.Combine(directory, label, filename);
|
||||
}
|
||||
|
||||
// If the extension for the file changed, update that automatically
|
||||
else if (Path.GetExtension(App.Instance.OutputFilenameTextBox.Text) != extension)
|
||||
App.Instance.OutputFilenameTextBox.Text = Path.GetFileNameWithoutExtension(App.Instance.OutputFilenameTextBox.Text) + (extension ?? ".bin");
|
||||
// Set the output filename, if we changed drives
|
||||
else if (driveChanged)
|
||||
{
|
||||
string label = drive?.FormattedVolumeLabel ?? systemType.LongName();
|
||||
string oldFilename = Path.GetFileNameWithoutExtension(App.Instance.OutputPathTextBox.Text);
|
||||
string directory = Path.GetDirectoryName(App.Instance.OutputPathTextBox.Text);
|
||||
string filename = $"{label}{extension ?? ".bin"}";
|
||||
|
||||
// Set the output directory, if we changed drives or it's not already
|
||||
if (driveChanged || string.IsNullOrEmpty(App.Instance.OutputDirectoryTextBox.Text))
|
||||
App.Instance.OutputDirectoryTextBox.Text = Path.Combine(App.Options.DefaultOutputPath, Path.GetFileNameWithoutExtension(App.Instance.OutputFilenameTextBox.Text) ?? string.Empty);
|
||||
// If the previous path included the label
|
||||
if (directory.EndsWith(oldFilename, StringComparison.OrdinalIgnoreCase))
|
||||
directory = Path.GetDirectoryName(directory);
|
||||
|
||||
// Set the cursor position back to where it was
|
||||
App.Instance.OutputDirectoryTextBox.SelectionStart = outputDirectorySelectionStart;
|
||||
App.Instance.OutputDirectoryTextBox.SelectionLength = 0;
|
||||
App.Instance.OutputFilenameTextBox.SelectionStart = outputFilenameSelectionStart;
|
||||
App.Instance.OutputFilenameTextBox.SelectionLength = 0;
|
||||
// If the path ends with the label already
|
||||
if (directory.EndsWith(label, StringComparison.OrdinalIgnoreCase))
|
||||
directory = Path.GetDirectoryName(directory);
|
||||
|
||||
// Re-enable automatic reprocessing of textboxes
|
||||
EnablePathEventHandlers();
|
||||
App.Instance.OutputPathTextBox.Text = Path.Combine(directory, label, filename);
|
||||
}
|
||||
|
||||
// Ensure the UI gets updated
|
||||
App.Instance.UpdateLayout();
|
||||
@@ -1047,34 +1078,9 @@ namespace MPF.UI.ViewModels
|
||||
else
|
||||
Env.Parameters.Speed = App.Instance.DriveSpeedComboBox.SelectedValue as int?;
|
||||
|
||||
// Disable automatic reprocessing of the textboxes until we're done
|
||||
DisablePathEventHandlers();
|
||||
|
||||
// Save the current cursor positions
|
||||
int outputDirectorySelectionStart = App.Instance.OutputDirectoryTextBox.SelectionStart;
|
||||
int outputFilenameSelectionStart = App.Instance.OutputFilenameTextBox.SelectionStart;
|
||||
|
||||
string trimmedPath = Env.Parameters.OutputPath?.Trim('"') ?? string.Empty;
|
||||
string outputDirectory = Path.GetDirectoryName(trimmedPath);
|
||||
string outputFilename = Path.GetFileName(trimmedPath);
|
||||
(outputDirectory, outputFilename) = InfoTool.NormalizeOutputPaths(outputDirectory, outputFilename);
|
||||
if (!string.IsNullOrWhiteSpace(outputDirectory))
|
||||
App.Instance.OutputDirectoryTextBox.Text = outputDirectory;
|
||||
else
|
||||
outputDirectory = App.Instance.OutputDirectoryTextBox.Text;
|
||||
if (!string.IsNullOrWhiteSpace(outputFilename))
|
||||
App.Instance.OutputFilenameTextBox.Text = outputFilename;
|
||||
else
|
||||
outputFilename = App.Instance.OutputFilenameTextBox.Text;
|
||||
|
||||
// Set the cursor position back to where it was
|
||||
App.Instance.OutputDirectoryTextBox.SelectionStart = outputDirectorySelectionStart;
|
||||
App.Instance.OutputDirectoryTextBox.SelectionLength = 0;
|
||||
App.Instance.OutputFilenameTextBox.SelectionStart = outputFilenameSelectionStart;
|
||||
App.Instance.OutputFilenameTextBox.SelectionLength = 0;
|
||||
|
||||
// Re-enable automatic reprocessing of textboxes
|
||||
EnablePathEventHandlers();
|
||||
trimmedPath = InfoTool.NormalizeOutputPaths(trimmedPath);
|
||||
App.Instance.OutputPathTextBox.Text = trimmedPath;
|
||||
|
||||
MediaType? mediaType = Env.Parameters.GetMediaType();
|
||||
int mediaTypeIndex = MediaTypes.FindIndex(m => m == mediaType);
|
||||
@@ -1176,11 +1182,13 @@ namespace MPF.UI.ViewModels
|
||||
speed = App.Options.PreferredDumpSpeedCD;
|
||||
break;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCubeGameDisc:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
speed = App.Options.PreferredDumpSpeedDVD;
|
||||
break;
|
||||
case MediaType.HDDVD:
|
||||
speed = App.Options.PreferredDumpSpeedHDDVD;
|
||||
break;
|
||||
case MediaType.BluRay:
|
||||
speed = App.Options.PreferredDumpSpeedBD;
|
||||
break;
|
||||
@@ -1201,9 +1209,10 @@ namespace MPF.UI.ViewModels
|
||||
/// </summary>
|
||||
private bool ShouldEnableDumpingButton()
|
||||
{
|
||||
return App.Instance.SystemTypeComboBox.SelectedItem as RedumpSystemComboBoxItem != null
|
||||
&& Drives != null
|
||||
return Drives != null
|
||||
&& Drives.Count > 0
|
||||
&& App.Instance.SystemTypeComboBox.SelectedIndex > -1
|
||||
&& App.Instance.SystemTypeComboBox.SelectedItem as RedumpSystemComboBoxItem != null
|
||||
&& !string.IsNullOrEmpty(App.Instance.ParametersTextBox.Text);
|
||||
}
|
||||
|
||||
@@ -1269,6 +1278,10 @@ namespace MPF.UI.ViewModels
|
||||
// Disable all UI elements apart from dumping button
|
||||
DisableAllUIElements();
|
||||
|
||||
// Refresh the drive, if it wasn't null
|
||||
if (Env.Drive != null)
|
||||
Env.Drive.RefreshDrive();
|
||||
|
||||
// Output to the label and log
|
||||
App.Instance.StatusLabel.Text = "Starting dumping process... Please wait!";
|
||||
App.Logger.LogLn("Starting dumping process... Please wait!");
|
||||
@@ -1328,6 +1341,14 @@ namespace MPF.UI.ViewModels
|
||||
/// <returns>True if dumping should start, false otherwise</returns>
|
||||
private bool ValidateBeforeDumping()
|
||||
{
|
||||
// Validate that we have an output path of any sort
|
||||
if (string.IsNullOrWhiteSpace(Env.OutputPath))
|
||||
{
|
||||
MessageBoxResult mbresult = CustomMessageBox.Show("No output path was provided so dumping cannot continue.", "Missing Path", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
App.Logger.LogLn("Dumping aborted!");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Validate that the user explicitly wants an inactive drive to be considered for dumping
|
||||
if (!Env.Drive.MarkedActive)
|
||||
{
|
||||
@@ -1343,8 +1364,12 @@ namespace MPF.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
// Pre-split the output path
|
||||
string outputDirectory = Path.GetDirectoryName(Env.OutputPath);
|
||||
string outputFilename = Path.GetFileName(Env.OutputPath);
|
||||
|
||||
// If a complete dump already exists
|
||||
(bool foundFiles, List<string> _) = InfoTool.FoundAllFiles(Env.OutputDirectory, Env.OutputFilename, Env.Parameters, true);
|
||||
(bool foundFiles, List<string> _) = InfoTool.FoundAllFiles(outputDirectory, outputFilename, Env.Parameters, true);
|
||||
if (foundFiles)
|
||||
{
|
||||
MessageBoxResult mbresult = CustomMessageBox.Show("A complete dump already exists! Are you sure you want to overwrite?", "Overwrite?", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
|
||||
@@ -1357,7 +1382,7 @@ namespace MPF.UI.ViewModels
|
||||
|
||||
// Validate that at least some space exists
|
||||
// TODO: Tie this to the size of the disc, type of disc, etc.
|
||||
string fullPath = Path.GetFullPath(Env.OutputDirectory);
|
||||
string fullPath = Path.GetFullPath(outputDirectory);
|
||||
var driveInfo = new DriveInfo(Path.GetPathRoot(fullPath));
|
||||
if (driveInfo.AvailableFreeSpace < Math.Pow(2, 30))
|
||||
{
|
||||
@@ -1512,28 +1537,16 @@ namespace MPF.UI.ViewModels
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler for OutputDirectoryBrowseButton Click event
|
||||
/// Handler for OutputPathBrowseButton Click event
|
||||
/// </summary>
|
||||
private void OutputDirectoryBrowseButtonClick(object sender, RoutedEventArgs e) =>
|
||||
SetOutputDirectory();
|
||||
private void OutputPathBrowseButtonClick(object sender, RoutedEventArgs e) =>
|
||||
SetOutputPath();
|
||||
|
||||
/// <summary>
|
||||
/// Handler for OutputFilenameTextBox TextInput event
|
||||
/// Handler for OutputPathTextBox TextChanged event
|
||||
/// </summary>
|
||||
private void OutputDirectoryTextBoxTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (_canExecuteTextChanged)
|
||||
EnsureDiscInformation();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler for OutputFilenameTextBox TextInput event
|
||||
/// </summary>
|
||||
private void OutputFilenameTextBoxTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (_canExecuteTextChanged)
|
||||
EnsureDiscInformation();
|
||||
}
|
||||
private void OutputPathTextBoxTextChanged(object sender, TextChangedEventArgs e)
|
||||
=> EnsureDiscInformation();
|
||||
|
||||
/// <summary>
|
||||
/// Handler for StartStopButton Click event
|
||||
@@ -1556,7 +1569,12 @@ namespace MPF.UI.ViewModels
|
||||
private void UpdateVolumeLabelClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_canExecuteSelectionChanged)
|
||||
InitializeUIValues(removeEventHandlers: true, rescanDrives: false);
|
||||
{
|
||||
if (App.Options.FastUpdateLabel)
|
||||
FastUpdateLabel(removeEventHandlers: true);
|
||||
else
|
||||
InitializeUIValues(removeEventHandlers: true, rescanDrives: false);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace MPF.UI.ViewModels
|
||||
/// </summary>
|
||||
private static List<Element<InternalProgram>> PopulateInternalPrograms()
|
||||
{
|
||||
var internalPrograms = new List<InternalProgram> { InternalProgram.DiscImageCreator, InternalProgram.Aaru, /*InternalProgram.Redumper,*/ InternalProgram.DD };
|
||||
var internalPrograms = new List<InternalProgram> { InternalProgram.DiscImageCreator, InternalProgram.Aaru, InternalProgram.Redumper, InternalProgram.DD };
|
||||
return internalPrograms.Select(ip => new Element<InternalProgram>(ip)).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label x:Name="SystemMediaTypeLabel" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="System/Media Type" />
|
||||
@@ -136,16 +135,13 @@
|
||||
</ComboBox>
|
||||
<ComboBox x:Name="MediaTypeComboBox" Grid.Row="0" Grid.Column="1" Height="22" Width="140" HorizontalAlignment="Right" Style="{DynamicResource CustomComboBoxStyle}" />
|
||||
|
||||
<Label x:Name="OutputFilenameLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="Output Filename"/>
|
||||
<TextBox x:Name="OutputFilenameTextBox" Grid.Row="1" Grid.Column="1" Height="22" VerticalContentAlignment="Center" />
|
||||
|
||||
<Label x:Name="OutputDirectoryLabel" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Content="Output Directory"/>
|
||||
<TextBox x:Name="OutputDirectoryTextBox" Grid.Row="2" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="OutputDirectoryBrowseButton" Grid.Row="2" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse"
|
||||
<Label x:Name="OutputPathLabel" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="Output Path"/>
|
||||
<TextBox x:Name="OutputPathTextBox" Grid.Row="1" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="OutputPathBrowseButton" Grid.Row="1" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse"
|
||||
Style="{DynamicResource CustomButtonStyle}"/>
|
||||
|
||||
<Label x:Name="DriveLetterLabel" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Content="Drive Letter"/>
|
||||
<ComboBox x:Name="DriveLetterComboBox" Grid.Row="3" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left" Style="{DynamicResource CustomComboBoxStyle}">
|
||||
<Label x:Name="DriveLetterLabel" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Content="Drive Letter"/>
|
||||
<ComboBox x:Name="DriveLetterComboBox" Grid.Row="2" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left" Style="{DynamicResource CustomComboBoxStyle}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Letter}" />
|
||||
@@ -153,12 +149,12 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label x:Name="DriveSpeedLabel" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Content="Drive Speed"/>
|
||||
<ComboBox x:Name="DriveSpeedComboBox" Grid.Row="4" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left" Style="{DynamicResource CustomComboBoxStyle}" />
|
||||
<Label x:Name="DriveSpeedLabel" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Content="Drive Speed"/>
|
||||
<ComboBox x:Name="DriveSpeedComboBox" Grid.Row="3" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="Left" Style="{DynamicResource CustomComboBoxStyle}" />
|
||||
|
||||
<Label x:Name="ParametersLabel" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center" Content="Parameters"/>
|
||||
<TextBox x:Name="ParametersTextBox" Grid.Row="5" Grid.Column="1" Height="22" Width="370" HorizontalAlignment="Left" IsEnabled="False" VerticalContentAlignment="Center" />
|
||||
<CheckBox x:Name="EnableParametersCheckBox" Grid.Row="5" Grid.Column="1" Height="22" HorizontalAlignment="Right" IsChecked="False" />
|
||||
<Label x:Name="ParametersLabel" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Content="Parameters"/>
|
||||
<TextBox x:Name="ParametersTextBox" Grid.Row="4" Grid.Column="1" Height="22" Width="370" HorizontalAlignment="Left" IsEnabled="False" VerticalContentAlignment="Center" />
|
||||
<CheckBox x:Name="EnableParametersCheckBox" Grid.Row="4" Grid.Column="1" Height="22" HorizontalAlignment="Right" IsChecked="False" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -70,12 +70,15 @@
|
||||
<CheckBox VerticalAlignment="Center" Content="Enable Dark Mode"
|
||||
IsChecked="{Binding Options.EnableDarkMode}"
|
||||
ToolTip="(Experimental) Enable dark mode across the entire application" Margin="0,4"
|
||||
/>
|
||||
|
||||
/>
|
||||
<CheckBox VerticalAlignment="Center" Content="Check for Updates on Startup"
|
||||
IsChecked="{Binding Options.CheckForUpdatesOnStartup}"
|
||||
ToolTip="Check for updates when the application starts" Margin="0,4"
|
||||
/>
|
||||
<CheckBox VerticalAlignment="Center" Content="Fast Update Label"
|
||||
IsChecked="{Binding Options.FastUpdateLabel}"
|
||||
ToolTip="Bypasses disc checks to quickly update the output path. Use with caution!" Margin="0,4"
|
||||
/>
|
||||
</UniformGrid>
|
||||
</TabItem>
|
||||
|
||||
@@ -92,6 +95,7 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Aaru Path" />
|
||||
@@ -109,13 +113,18 @@
|
||||
<Button x:Name="DDPathButton" Grid.Row="2" Grid.Column="2" Height="22" Width="22" Content="..."
|
||||
Style="{DynamicResource CustomButtonStyle}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Dumping Program" />
|
||||
<ComboBox x:Name="InternalProgramComboBox" Grid.Row="3" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
|
||||
<Label Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Redumper Path" />
|
||||
<TextBox x:Name="RedumperPathTextBox" Grid.Row="3" Grid.Column="1" Height="22" HorizontalAlignment="Stretch" Text="{Binding Options.RedumperPath}" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="RedumperPathButton" Grid.Row="3" Grid.Column="2" Height="22" Width="22" Content="..."
|
||||
Style="{DynamicResource CustomButtonStyle}" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Dumping Program" />
|
||||
<ComboBox x:Name="InternalProgramComboBox" Grid.Row="4" Grid.Column="1" Height="22" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding InternalPrograms}" Style="{DynamicResource CustomComboBoxStyle}" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Default Output Path" />
|
||||
<TextBox x:Name="DefaultOutputPathTextBox" Grid.Row="4" Grid.Column="1" Height="22" HorizontalAlignment="Stretch" Text="{Binding Options.DefaultOutputPath}" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="DefaultOutputPathButton" Grid.Row="4" Grid.Column="2" Height="22" Width="22" Content="..."
|
||||
<Label Grid.Row="5" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Right" Content="Default Output Path" />
|
||||
<TextBox x:Name="DefaultOutputPathTextBox" Grid.Row="5" Grid.Column="1" Height="22" HorizontalAlignment="Stretch" Text="{Binding Options.DefaultOutputPath}" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="DefaultOutputPathButton" Grid.Row="5" Grid.Column="2" Height="22" Width="22" Content="..."
|
||||
Style="{DynamicResource CustomButtonStyle}" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
@@ -162,7 +171,7 @@
|
||||
ToolTip="Enable automatic checking for copy protection on dumped media" Margin="0,4,0,0"
|
||||
/>
|
||||
|
||||
<CheckBox VerticalAlignment="Center" Content="Protection File"
|
||||
<CheckBox VerticalAlignment="Center" Content="Output Protection File"
|
||||
IsChecked="{Binding Options.OutputSeparateProtectionFile}" IsEnabled="{Binding Options.ScanForProtection}"
|
||||
ToolTip="Output protection information to a separate file" Margin="0,4,0,0"
|
||||
/>
|
||||
@@ -226,27 +235,35 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="CD-ROM" />
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="CD" />
|
||||
<Slider x:Name="DumpSpeedCDSlider" Grid.Row="0" Grid.Column="1" Minimum="1" Maximum="72" IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
||||
Ticks="{Binding Source={x:Static local:Constants.SpeedsForCDAsCollection}}"
|
||||
Value="{Binding Options.PreferredDumpSpeedCD}" />
|
||||
<TextBox x:Name="DumpSpeedCDTextBox" Grid.Row="0" Grid.Column="2" Width="22" Height="22" TextAlignment="Center" IsReadOnly="True" IsReadOnlyCaretVisible="False" VerticalAlignment="Center"
|
||||
Text="{Binding ElementName=DumpSpeedCDSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Background="LightGray" Foreground="Gray"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="DVD-ROM" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="DVD" />
|
||||
<Slider x:Name="DumpSpeedDVDSlider" Grid.Row="1" Grid.Column="1" Minimum="1" Maximum="24" IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
||||
Ticks="{Binding Source={x:Static local:Constants.SpeedsForDVDAsCollection}}"
|
||||
Value="{Binding Options.PreferredDumpSpeedDVD}" />
|
||||
<TextBox x:Name="DumpSpeedDVDTextBox" Grid.Row="1" Grid.Column="2" Width="22" Height="22" TextAlignment="Center" IsReadOnly="True" IsReadOnlyCaretVisible="False" VerticalAlignment="Center"
|
||||
Text="{Binding ElementName=DumpSpeedDVDSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Background="LightGray" Foreground="Gray"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="BD-ROM" />
|
||||
<Slider x:Name="DumpSpeedBDSlider" Grid.Row="2" Grid.Column="1" Minimum="1" Maximum="16" IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="HD-DVD" />
|
||||
<Slider x:Name="DumpSpeedHDDVDSlider" Grid.Row="2" Grid.Column="1" Minimum="1" Maximum="24" IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
||||
Ticks="{Binding Source={x:Static local:Constants.SpeedsForHDDVDAsCollection}}"
|
||||
Value="{Binding Options.PreferredDumpSpeedHDDVD}" />
|
||||
<TextBox x:Name="DumpSpeedHDDVDTextBox" Grid.Row="2" Grid.Column="2" Width="22" Height="22" TextAlignment="Center" IsReadOnly="True" IsReadOnlyCaretVisible="False" VerticalAlignment="Center"
|
||||
Text="{Binding ElementName=DumpSpeedHDDVDSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Background="LightGray" Foreground="Gray"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="BD" />
|
||||
<Slider x:Name="DumpSpeedBDSlider" Grid.Row="3" Grid.Column="1" Minimum="1" Maximum="16" IsSnapToTickEnabled="True" TickPlacement="BottomRight"
|
||||
Ticks="{Binding Source={x:Static local:Constants.SpeedsForBDAsCollection}}"
|
||||
Value="{Binding Options.PreferredDumpSpeedBD}" />
|
||||
<TextBox x:Name="DumpSpeedBDTextBox" Grid.Row="2" Grid.Column="2" Width="22" Height="22" TextAlignment="Center" IsReadOnly="True" IsReadOnlyCaretVisible="False" VerticalAlignment="Center"
|
||||
<TextBox x:Name="DumpSpeedBDTextBox" Grid.Row="3" Grid.Column="2" Width="22" Height="22" TextAlignment="Center" IsReadOnly="True" IsReadOnlyCaretVisible="False" VerticalAlignment="Center"
|
||||
Text="{Binding ElementName=DumpSpeedBDSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Background="LightGray" Foreground="Gray"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -352,6 +369,16 @@
|
||||
</UniformGrid>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Redumper" Style="{DynamicResource CustomTabItemStyle}">
|
||||
<UniformGrid Columns="2" Rows="1">
|
||||
<Label Content="Reread Tries:" VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
<TextBox VerticalAlignment="Center" VerticalContentAlignment="Center"
|
||||
Text="{Binding Options.RedumperRereadCount}"
|
||||
ToolTip="Specifies how many rereads are attempted on read error"
|
||||
/>
|
||||
</UniformGrid>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Logging" Style="{DynamicResource CustomTabItemStyle}">
|
||||
<UniformGrid Columns="2">
|
||||
<CheckBox VerticalAlignment="Center" Content="Verbose Logging"
|
||||
|
||||
@@ -18,7 +18,7 @@ For those who like to test the newest features, download the latest AppVeyor WIP
|
||||
Even though this is written in C#, this program can only be used on Windows systems due to one of the base programs, DiscImageCreator, being Windows-only. There is some preliminary support for Linux underway, and we will try to integrate with that when the time comes.
|
||||
|
||||
- Windows 7 (newest version of Windows recommended) or Mono-compatible Linux environment (MPF.Check only)
|
||||
- .NET Framework 4.8 or .NET Core 3.1 Runtimes (.NET Core 3.1 is mostly functional due to a dependency issues but may be unstable in some situations)
|
||||
- .NET Framework 4.8 or .NET 6.0 Runtimes (.NET 6.0 is mostly functional due to a dependency issues but may be unstable in some situations)
|
||||
- 1 GB of free RAM
|
||||
- As much hard drive space as the amount of discs you will be dumping (20+ GB recommended)
|
||||
|
||||
@@ -36,7 +36,6 @@ A list of all changes in each stable release and current WIP builds can now be f
|
||||
|
||||
MPF uses some external libraries to assist with additional information gathering after the dumping process.
|
||||
|
||||
- **Aaru** - Device and media type retrieval - [GitHub](https://github.com/aaru-dps/Aaru)
|
||||
- **BurnOutSharp** - Protection scanning - [GitHub](https://github.com/mnadareski/BurnOutSharp)
|
||||
- **UnshieldSharp** - Protection scanning - [GitHub](https://github.com/mnadareski/UnshieldSharp)
|
||||
- **WPFCustomMessageBox.thabse** - Custom message boxes in UI - [GitHub](https://github.com/thabse/WPFCustomMessageBox)
|
||||
|
||||
@@ -1975,7 +1975,7 @@ namespace RedumpLib.Data
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Microsoft Xbox One", ShortName = "xboxone", IsBanned = true, HasDat = true)]
|
||||
MicrosoftXboxOne,
|
||||
|
||||
[System(Category = SystemCategory.DiscBasedConsole, Available = false, LongName = "Microsoft Xbox Series X/S")]
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Microsoft Xbox Series X", ShortName = "xboxsx", IsBanned = true)]
|
||||
MicrosoftXboxSeriesXS,
|
||||
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Memorex Visual Information System", ShortName = "vis", HasCues = true, HasDat = true)]
|
||||
@@ -2035,7 +2035,7 @@ namespace RedumpLib.Data
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Sony PlayStation 4", ShortName = "ps4", IsBanned = true, HasDat = true)]
|
||||
SonyPlayStation4,
|
||||
|
||||
[System(Category = SystemCategory.DiscBasedConsole, Available = false, LongName = "Sony PlayStation 5")]
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Sony PlayStation 5", ShortName = "ps5", IsBanned = true)]
|
||||
SonyPlayStation5,
|
||||
|
||||
[System(Category = SystemCategory.DiscBasedConsole, LongName = "Sony PlayStation Portable", ShortName = "psp", HasDat = true)]
|
||||
@@ -2210,7 +2210,7 @@ namespace RedumpLib.Data
|
||||
|
||||
#region Computers
|
||||
|
||||
[System(Category = SystemCategory.Computer, LongName = "Acorn Archimedes", ShortName = "archcd", HasCues = true, HasDat = true)]
|
||||
[System(Category = SystemCategory.Computer, LongName = "Acorn Archimedes", ShortName = "arch", HasCues = true, HasDat = true)]
|
||||
AcornArchimedes,
|
||||
|
||||
[System(Category = SystemCategory.Computer, LongName = "Apple Macintosh", ShortName = "mac", HasCues = true, HasDat = true)]
|
||||
@@ -3630,6 +3630,10 @@ namespace RedumpLib.Data
|
||||
[HumanReadable(ShortName = "[T:PPN]", LongName = "<b>PPN</b>:")]
|
||||
PPN,
|
||||
|
||||
// TODO: This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Ring non-zero data start</b>:", LongName = "<b>Ring non-zero data start</b>:")]
|
||||
RingNonZeroDataStart,
|
||||
|
||||
[HumanReadable(ShortName = "[T:RD]", LongName = "<b>Rolling Demos</b>:")]
|
||||
RollingDemos,
|
||||
|
||||
@@ -3666,6 +3670,10 @@ namespace RedumpLib.Data
|
||||
[HumanReadable(ShortName = "[T:UID]", LongName = "<b>Ubisoft ID</b>:")]
|
||||
UbisoftID,
|
||||
|
||||
// TODO: This doesn't have a site tag yet
|
||||
[HumanReadable(ShortName = "<b>Universal Hash (SHA-1)</b>:", LongName = "<b>Universal Hash (SHA-1)</b>:")]
|
||||
UniversalHash,
|
||||
|
||||
[HumanReadable(ShortName = "[T:VID]", LongName = "<b>Valve ID</b>:")]
|
||||
ValveID,
|
||||
|
||||
|
||||
@@ -1400,6 +1400,7 @@ namespace RedumpLib.Data
|
||||
case "microsoft xbox one":
|
||||
return RedumpSystem.MicrosoftXboxOne;
|
||||
case "xbs":
|
||||
case "xboxsx":
|
||||
case "xbseries":
|
||||
case "xbseriess":
|
||||
case "xbseriesx":
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;netstandard2.1;net6.0</TargetFrameworks>
|
||||
<TargetFrameworks>net48;net6.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
142
appveyor.yml
142
appveyor.yml
@@ -1,5 +1,5 @@
|
||||
# version format
|
||||
version: 2.3-{build}
|
||||
version: 2.4-{build}
|
||||
|
||||
# pull request template
|
||||
pull_requests:
|
||||
@@ -12,61 +12,99 @@ image: Visual Studio 2022
|
||||
environment:
|
||||
EnableNuGetPackageRestore: true
|
||||
|
||||
# msbuild configuration
|
||||
platform:
|
||||
- Any CPU
|
||||
configuration:
|
||||
- Debug
|
||||
|
||||
# install dependencies
|
||||
install:
|
||||
- ps: appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- git submodule update --init --recursive
|
||||
|
||||
# pre-build script
|
||||
before_build:
|
||||
- nuget restore
|
||||
|
||||
# build step
|
||||
build:
|
||||
verbosity: minimal
|
||||
project: MPF.sln
|
||||
build_script:
|
||||
- dotnet restore
|
||||
|
||||
# .NET Framework 4.8
|
||||
- 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
|
||||
|
||||
# .NET 6.0
|
||||
- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win-x86 --self-contained true
|
||||
- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win-x64 --self-contained true
|
||||
#- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime linux-x64 --self-contained true
|
||||
#- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime osx-x64 --self-contained true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win-x86 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win-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
|
||||
|
||||
# post-build step
|
||||
after_build:
|
||||
- ps: appveyor DownloadFile https://github.com/aaru-dps/Aaru/releases/download/v5.3.1/aaru-5.3.1_windows_x64.zip
|
||||
|
||||
# Aaru
|
||||
- ps: appveyor DownloadFile https://github.com/aaru-dps/Aaru/releases/download/v5.3.2/aaru-5.3.2_windows_x64.zip
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net48\publish\Programs\Aaru *
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\Aaru *
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\win-x86\publish\Programs\Aaru *
|
||||
#- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\linux-x64\publish\Programs\Aaru *
|
||||
#- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\osx-x64\publish\Programs\Aaru *
|
||||
|
||||
# dd for Windows
|
||||
- ps: appveyor DownloadFile http://www.chrysocome.net/downloads/8ab730cd2a29e76ddd89be1f99357942/dd-0.6beta3.zip
|
||||
- ps: appveyor DownloadFile https://github.com/saramibreak/DiscImageCreator/files/9536254/DiscImageCreator_20220909.zip
|
||||
- ps: appveyor DownloadFile https://github.com/superg/redumper/releases/download/build_51/redumper-2022.09.26_build51-win64.zip
|
||||
- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net48\publish\Programs\DD *
|
||||
- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\DD *
|
||||
- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net6.0-windows\win-x86\publish\Programs\DD *
|
||||
#- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net6.0-windows\linux-x64\publish\Programs\DD *
|
||||
#- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net6.0-windows\osx-x64\publish\Programs\DD *
|
||||
|
||||
# DiscImageCreator
|
||||
- ps: appveyor DownloadFile https://github.com/saramibreak/DiscImageCreator/files/10931241/DiscImageCreator_20230309.zip
|
||||
- 7z e DiscImageCreator_20230309.zip -oMPF\bin\Debug\net48\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230309.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230309.zip -oMPF\bin\DebugFix \net6.0-windows\win-x86\publish\Programs\Creator Release_ANSI\*
|
||||
#- 7z e DiscImageCreator_20230309.zip -oMPF\bin\Debug\net6.0-windows\linux-x64\publish\Programs\Creator Release_ANSI\*
|
||||
#- 7z e DiscImageCreator_20230309.zip -oMPF\bin\Debug\net6.0-windows\osx-x64\publish\Programs\Creator Release_ANSI\*
|
||||
|
||||
# Redumper
|
||||
- ps: appveyor DownloadFile https://github.com/superg/redumper/releases/download/build_106/redumper-2023.02.19_build106-win64.zip
|
||||
- 7z e redumper-2023.02.19_build106-win64.zip -oMPF\bin\Debug\net48\publish\Programs\Redumper redumper-2023.02.19_build106-win64\bin\*
|
||||
- 7z e redumper-2023.02.19_build106-win64.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\Redumper redumper-2023.02.19_build106-win64\bin\*
|
||||
- 7z e redumper-2023.02.19_build106-win64.zip -oMPF\bin\Debug\net6.0-windows\win-x86\publish\Programs\Redumper redumper-2023.02.19_build106-win64\bin\*
|
||||
#- 7z e redumper-2023.02.19_build106-win64.zip -oMPF\bin\Debug\net6.0-windows\linux-x64\publish\Programs\Redumper redumper-2023.02.19_build106-win64\bin\*
|
||||
#- 7z e redumper-2023.02.19_build106-win64.zip -oMPF\bin\Debug\net6.0-windows\osx-x64\publish\Programs\Redumper redumper-2023.02.19_build106-win64\bin\*
|
||||
|
||||
# Subdump
|
||||
- ps: appveyor DownloadFile https://archive.org/download/subdump_fua_0x28/subdump_fua_0x28.zip
|
||||
|
||||
- 7z x aaru-5.3.1_windows_x64.zip -oMPF\bin\Debug\net48\Programs\Aaru *
|
||||
#- 7z x aaru-5.3.1_windows_x64.zip -oMPF\bin\Debug\net6.0\Programs\Aaru *
|
||||
|
||||
- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net48\Programs\DD *
|
||||
#- 7z e dd-0.6beta3.zip -oMPF\bin\Debug\net6.0\Programs\DD *
|
||||
|
||||
- 7z e DiscImageCreator_20220909.zip -oMPF\bin\Debug\net48\Programs\Creator Release_ANSI\*
|
||||
#- 7z e DiscImageCreator_20220909.zip -oMPF\bin\Debug\net6.0\Programs\Creator Release_ANSI\*
|
||||
|
||||
- 7z e redumper-2022.09.26_build51-win64.zip -oMPF\bin\Debug\net48\Programs\Redumper redumper-2022.09.26_build51-win64\bin\*
|
||||
#- 7z e redumper-2022.09.26_build51-win64.zip -oMPF\bin\Debug\net6.0\Programs\Redumper redumper-2022.09.26_build51-win64\bin\*
|
||||
|
||||
- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net48 *
|
||||
- mkdir MPF\bin\Debug\net48\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net48\subdump_fua_0x28.exe MPF\bin\Debug\net48\Programs\Subdump\subdump.exe
|
||||
- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net48\publish *
|
||||
- mkdir MPF\bin\Debug\net48\publish\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net48\publish\subdump_fua_0x28.exe MPF\bin\Debug\net48\publish\Programs\Subdump\subdump.exe
|
||||
#- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net6.0 *
|
||||
#- mkdir MPF\bin\Debug\net6.0\Programs\Subdump
|
||||
#- mv MPF\bin\Debug\net6.0\subdump_fua_0x28.exe MPF\bin\Debug\net6.0\Programs\Subdump\subdump.exe
|
||||
#- mkdir MPF\bin\Debug\net6.0-windows\Programs\Subdump
|
||||
#- mv MPF\bin\Debug\net6.0-windows\subdump_fua_0x28.exe MPF\bin\Debug\net6.0-windows\Programs\Subdump\subdump.exe
|
||||
|
||||
- cd MPF\bin\Debug
|
||||
- 7z a MPF_net48.zip net48\*
|
||||
#- 7z a MPF_net6.0.zip net6.0\*
|
||||
# MPF
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net48\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net48.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win-x86\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win-x86.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win-x64.zip *
|
||||
#- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\linux-x64\publish\
|
||||
#- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_linux-x64.zip *
|
||||
#- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\osx-x64\publish\
|
||||
#- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_osx-x64.zip *
|
||||
|
||||
- cd ..\..\..\MPF.Check\bin\Debug
|
||||
- 7z a MPF-Check_net48.zip net48\*
|
||||
#- 7z a MPF-Check_net6.0.zip net6.0\*
|
||||
# MPF.Check
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net48\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net48.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win-x86\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win-x86.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\linux-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_linux-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\osx-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *
|
||||
|
||||
# success/failure tracking
|
||||
on_success:
|
||||
@@ -78,12 +116,24 @@ on_failure:
|
||||
|
||||
# artifact linking
|
||||
artifacts:
|
||||
- path: MPF\bin\Debug\MPF_net48.zip
|
||||
name: MPF (WPF UI) (.NET Framework 4.8)
|
||||
#- path: MPF\bin\Debug\MPF_net6.0.zip
|
||||
# name: MPF (WPF UI) (.NET 6.0)
|
||||
- path: MPF_net48.zip
|
||||
name: MPF (.NET Framework 4.8)
|
||||
- path: MPF_net6.0_win-x86.zip
|
||||
name: MPF (.NET 6.0, Windows x86)
|
||||
- path: MPF_net6.0_win-x64.zip
|
||||
name: MPF (.NET 6.0, Windows x64)
|
||||
#- path: MPF_net6.0_linux-x64.zip
|
||||
# name: MPF (.NET 6.0, Linux x64)
|
||||
#- path: MPF_net6.0_osx-x64.zip
|
||||
# name: MPF (.NET 6.0, OSX x64)
|
||||
|
||||
- path: MPF.Check\bin\Debug\MPF-Check_net48.zip
|
||||
- path: MPF.Check_net48.zip
|
||||
name: MPF Check (.NET Framework 4.8)
|
||||
#- path: MPF.Check\bin\Debug\MPF-Check_net6.0.zip
|
||||
# name: MPF Check (.NET 6.0)
|
||||
- path: MPF.Check_net6.0_win-x86.zip
|
||||
name: MPF.Check (.NET 6.0, Windows x86)
|
||||
- path: MPF.Check_net6.0_win-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Windows x64)
|
||||
- path: MPF.Check_net6.0_linux-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Linux x64)
|
||||
- path: MPF.Check_net6.0_osx-x64.zip
|
||||
name: MPF.Check (.NET 6.0, OSX x64)
|
||||
Reference in New Issue
Block a user