mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-06 05:35:22 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88551bc2ed | ||
|
|
039af56f6a | ||
|
|
7a428e2add | ||
|
|
c8dd85eb72 | ||
|
|
7c7a19c5a0 | ||
|
|
9bedd26b24 | ||
|
|
09afdf52fb | ||
|
|
c69afe69dd | ||
|
|
ab18c7920a | ||
|
|
5af1841d13 | ||
|
|
8c324e3b8b | ||
|
|
d99099d587 | ||
|
|
fa7b46a516 | ||
|
|
f7c746b536 | ||
|
|
b6e109133f | ||
|
|
0d694c1bde | ||
|
|
47f45fa46f | ||
|
|
481f4b41d1 | ||
|
|
359ad87faa | ||
|
|
ba47cb7da2 | ||
|
|
8927c49963 | ||
|
|
21f9668093 | ||
|
|
371571d13f | ||
|
|
b231f82c4c | ||
|
|
1741326253 | ||
|
|
1878ef5ad6 | ||
|
|
ae42f5edd7 | ||
|
|
4362ed71e0 | ||
|
|
f02904ea49 | ||
|
|
abf4eb9b7c | ||
|
|
1f942977cc | ||
|
|
7edadd4739 | ||
|
|
cb09816c63 | ||
|
|
48f0a826ca | ||
|
|
9c10842924 |
@@ -1,3 +1,42 @@
|
||||
### 2.6.6 (2023-10-04)
|
||||
|
||||
- Update Nuget packages
|
||||
- Update to MMI 3.0.0-preview.2
|
||||
- Remove errant character from script
|
||||
- Add placeholders for release builds
|
||||
- Fully sync AppVeyor build with script
|
||||
- Stop compiling Chime finally
|
||||
- Address some warnings and infos
|
||||
- Add setting for pulling comment/contents
|
||||
- Move to config.json
|
||||
- Omit track 0.2 and 00.2 from hash search
|
||||
- Tweak README again
|
||||
- Fix redumper EDC detection output
|
||||
- Fix XGD4 PIC reading
|
||||
- Ensure popups are topmost
|
||||
- Try out more UI functionality
|
||||
- Skip system detection on inactive drives
|
||||
- Fix path tests
|
||||
- Clean up csproj files
|
||||
- Update redumper to build 221
|
||||
- Ensure multisession info is populated
|
||||
- Be clearer with protection outputs
|
||||
|
||||
### 2.6.5 (2023-09-27)
|
||||
|
||||
- Normalize Redumper CSS output
|
||||
- Update redumper to build 219
|
||||
- Add .NET 7 to build scripts
|
||||
- Disable subdump download in AppVeyor
|
||||
- Normalize publish scripts
|
||||
- Update AppVeyor to match scripts
|
||||
- Add release publish scripts
|
||||
- Handle invalid characters when changing program
|
||||
- Fix options not saving on update
|
||||
- Combine build scripts
|
||||
- Force information window to top
|
||||
- Reset debug option to false
|
||||
|
||||
### 2.6.4 (2023-09-25)
|
||||
|
||||
- Add CD Projekt ID field
|
||||
|
||||
@@ -2,17 +2,13 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0;net7.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>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-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -113,7 +113,11 @@ namespace MPF.Core.Data
|
||||
|
||||
// Sanitize a Windows-formatted long device path
|
||||
if (devicePath.StartsWith("\\\\.\\"))
|
||||
#if NET48
|
||||
devicePath = devicePath.Substring("\\\\.\\".Length);
|
||||
#else
|
||||
devicePath = devicePath["\\\\.\\".Length..];
|
||||
#endif
|
||||
|
||||
// Create and validate the drive info object
|
||||
var driveInfo = new DriveInfo(devicePath);
|
||||
@@ -184,7 +188,7 @@ namespace MPF.Core.Data
|
||||
#if NET6_0_OR_GREATER
|
||||
else
|
||||
return GetMediaTypeFromSize();
|
||||
#endif
|
||||
#else
|
||||
|
||||
// Get the current drive information
|
||||
string deviceId = null;
|
||||
@@ -208,8 +212,6 @@ namespace MPF.Core.Data
|
||||
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;
|
||||
@@ -237,17 +239,12 @@ namespace MPF.Core.Data
|
||||
|
||||
var media = dataWriter.CurrentPhysicalMediaType;
|
||||
return (media.IMAPIToMediaType(), null);
|
||||
|
||||
#else
|
||||
|
||||
return (null, "IMAPI2 recorder not supported");
|
||||
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (null, ex.Message);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -605,7 +602,7 @@ namespace MPF.Core.Data
|
||||
// https://github.com/aaru-dps/Aaru/blob/5164a154e2145941472f2ee0aeb2eff3338ecbb3/Aaru.Devices/Windows/ListDevices.cs#L66
|
||||
|
||||
// Create an output drive list
|
||||
List<Drive> drives = new List<Drive>();
|
||||
var drives = new List<Drive>();
|
||||
|
||||
// Get all standard supported drive types
|
||||
try
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace MPF.Core.Data
|
||||
{
|
||||
public class Options : IDictionary<string, string>
|
||||
{
|
||||
private Dictionary<string, string> _settings;
|
||||
/// <summary>
|
||||
/// All settings in the form of a dictionary
|
||||
/// </summary>
|
||||
public Dictionary<string, string> Settings { get; private set; }
|
||||
|
||||
#region Internal Program
|
||||
|
||||
@@ -17,8 +20,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public string AaruPath
|
||||
{
|
||||
get { return GetStringSetting(_settings, "AaruPath", "Programs\\Aaru\\Aaru.exe"); }
|
||||
set { _settings["AaruPath"] = value; }
|
||||
get { return GetStringSetting(Settings, "AaruPath", "Programs\\Aaru\\Aaru.exe"); }
|
||||
set { Settings["AaruPath"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -26,8 +29,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public string DiscImageCreatorPath
|
||||
{
|
||||
get { return GetStringSetting(_settings, "DiscImageCreatorPath", "Programs\\Creator\\DiscImageCreator.exe"); }
|
||||
set { _settings["DiscImageCreatorPath"] = value; }
|
||||
get { return GetStringSetting(Settings, "DiscImageCreatorPath", "Programs\\Creator\\DiscImageCreator.exe"); }
|
||||
set { Settings["DiscImageCreatorPath"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,8 +38,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public string RedumperPath
|
||||
{
|
||||
get { return GetStringSetting(_settings, "RedumperPath", "Programs\\Redumper\\redumper.exe"); }
|
||||
set { _settings["RedumperPath"] = value; }
|
||||
get { return GetStringSetting(Settings, "RedumperPath", "Programs\\Redumper\\redumper.exe"); }
|
||||
set { Settings["RedumperPath"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,13 +49,13 @@ namespace MPF.Core.Data
|
||||
{
|
||||
get
|
||||
{
|
||||
string valueString = GetStringSetting(_settings, "InternalProgram", InternalProgram.DiscImageCreator.ToString());
|
||||
string valueString = GetStringSetting(Settings, "InternalProgram", InternalProgram.DiscImageCreator.ToString());
|
||||
var valueEnum = EnumConverter.ToInternalProgram(valueString);
|
||||
return valueEnum == InternalProgram.NONE ? InternalProgram.DiscImageCreator : valueEnum;
|
||||
}
|
||||
set
|
||||
{
|
||||
_settings["InternalProgram"] = value.ToString();
|
||||
Settings["InternalProgram"] = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +68,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool EnableDarkMode
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EnableDarkMode", false); }
|
||||
set { _settings["EnableDarkMode"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "EnableDarkMode", false); }
|
||||
set { Settings["EnableDarkMode"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -74,8 +77,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool CheckForUpdatesOnStartup
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "CheckForUpdatesOnStartup", true); }
|
||||
set { _settings["CheckForUpdatesOnStartup"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "CheckForUpdatesOnStartup", true); }
|
||||
set { Settings["CheckForUpdatesOnStartup"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -83,8 +86,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool FastUpdateLabel
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "FastUpdateLabel", false); }
|
||||
set { _settings["FastUpdateLabel"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "FastUpdateLabel", false); }
|
||||
set { Settings["FastUpdateLabel"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -92,8 +95,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public string DefaultOutputPath
|
||||
{
|
||||
get { return GetStringSetting(_settings, "DefaultOutputPath", "ISO"); }
|
||||
set { _settings["DefaultOutputPath"] = value; }
|
||||
get { return GetStringSetting(Settings, "DefaultOutputPath", "ISO"); }
|
||||
set { Settings["DefaultOutputPath"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -103,13 +106,13 @@ namespace MPF.Core.Data
|
||||
{
|
||||
get
|
||||
{
|
||||
string valueString = GetStringSetting(_settings, "DefaultSystem", null);
|
||||
string valueString = GetStringSetting(Settings, "DefaultSystem", null);
|
||||
var valueEnum = Extensions.ToRedumpSystem(valueString);
|
||||
return valueEnum;
|
||||
}
|
||||
set
|
||||
{
|
||||
_settings["DefaultSystem"] = value.LongName();
|
||||
Settings["DefaultSystem"] = value.LongName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,8 +122,8 @@ namespace MPF.Core.Data
|
||||
/// <remarks>This is a hidden setting</remarks>
|
||||
public bool ShowDebugViewMenuItem
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ShowDebugViewMenuItem", false); }
|
||||
set { _settings["ShowDebugViewMenuItem"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ShowDebugViewMenuItem", false); }
|
||||
set { Settings["ShowDebugViewMenuItem"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -132,8 +135,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedCD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedCD", 24); }
|
||||
set { _settings["PreferredDumpSpeedCD"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "PreferredDumpSpeedCD", 24); }
|
||||
set { Settings["PreferredDumpSpeedCD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -141,8 +144,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedDVD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedDVD", 16); }
|
||||
set { _settings["PreferredDumpSpeedDVD"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "PreferredDumpSpeedDVD", 16); }
|
||||
set { Settings["PreferredDumpSpeedDVD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -150,8 +153,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedHDDVD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedHDDVD", 8); }
|
||||
set { _settings["PreferredDumpSpeedHDDVD"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "PreferredDumpSpeedHDDVD", 8); }
|
||||
set { Settings["PreferredDumpSpeedHDDVD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -159,8 +162,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int PreferredDumpSpeedBD
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "PreferredDumpSpeedBD", 8); }
|
||||
set { _settings["PreferredDumpSpeedBD"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "PreferredDumpSpeedBD", 8); }
|
||||
set { Settings["PreferredDumpSpeedBD"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -172,8 +175,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool AaruEnableDebug
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "AaruEnableDebug", false); }
|
||||
set { _settings["AaruEnableDebug"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "AaruEnableDebug", false); }
|
||||
set { Settings["AaruEnableDebug"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -181,8 +184,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool AaruEnableVerbose
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "AaruEnableVerbose", false); }
|
||||
set { _settings["AaruEnableVerbose"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "AaruEnableVerbose", false); }
|
||||
set { Settings["AaruEnableVerbose"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -190,8 +193,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool AaruForceDumping
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "AaruForceDumping", true); }
|
||||
set { _settings["AaruForceDumping"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "AaruForceDumping", true); }
|
||||
set { Settings["AaruForceDumping"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -199,8 +202,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int AaruRereadCount
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "AaruRereadCount", 5); }
|
||||
set { _settings["AaruRereadCount"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "AaruRereadCount", 5); }
|
||||
set { Settings["AaruRereadCount"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -208,8 +211,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool AaruStripPersonalData
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "AaruStripPersonalData", false); }
|
||||
set { _settings["AaruStripPersonalData"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "AaruStripPersonalData", false); }
|
||||
set { Settings["AaruStripPersonalData"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -221,8 +224,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool DICMultiSectorRead
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "DICMultiSectorRead", false); }
|
||||
set { _settings["DICMultiSectorRead"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "DICMultiSectorRead", false); }
|
||||
set { Settings["DICMultiSectorRead"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -230,8 +233,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int DICMultiSectorReadValue
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "DICMultiSectorReadValue", 0); }
|
||||
set { _settings["DICMultiSectorReadValue"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "DICMultiSectorReadValue", 0); }
|
||||
set { Settings["DICMultiSectorReadValue"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -244,8 +247,8 @@ namespace MPF.Core.Data
|
||||
/// </remarks>
|
||||
public bool DICParanoidMode
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "DICParanoidMode", false); }
|
||||
set { _settings["DICParanoidMode"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "DICParanoidMode", false); }
|
||||
set { Settings["DICParanoidMode"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -253,8 +256,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool DICQuietMode
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "DICQuietMode", false); }
|
||||
set { _settings["DICQuietMode"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "DICQuietMode", false); }
|
||||
set { Settings["DICQuietMode"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -262,8 +265,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int DICRereadCount
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "DICRereadCount", 20); }
|
||||
set { _settings["DICRereadCount"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "DICRereadCount", 20); }
|
||||
set { Settings["DICRereadCount"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -271,8 +274,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int DICDVDRereadCount
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "DICDVDRereadCount", 10); }
|
||||
set { _settings["DICDVDRereadCount"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "DICDVDRereadCount", 10); }
|
||||
set { Settings["DICDVDRereadCount"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -280,8 +283,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool DICResetDriveAfterDump
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "DICResetDriveAfterDump", false); }
|
||||
set { _settings["DICResetDriveAfterDump"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "DICResetDriveAfterDump", false); }
|
||||
set { Settings["DICResetDriveAfterDump"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -289,8 +292,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool DICUseCMIFlag
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "DICUseCMIFlag", false); }
|
||||
set { _settings["DICUseCMIFlag"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "DICUseCMIFlag", false); }
|
||||
set { Settings["DICUseCMIFlag"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -302,8 +305,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool RedumperEnableDebug
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "RedumperEnableDebug", false); }
|
||||
set { _settings["RedumperEnableDebug"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "RedumperEnableDebug", false); }
|
||||
set { Settings["RedumperEnableDebug"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -311,8 +314,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool RedumperEnableVerbose
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "RedumperEnableVerbose", false); }
|
||||
set { _settings["RedumperEnableVerbose"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "RedumperEnableVerbose", false); }
|
||||
set { Settings["RedumperEnableVerbose"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -320,8 +323,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public int RedumperRereadCount
|
||||
{
|
||||
get { return GetInt32Setting(_settings, "RedumperRereadCount", 20); }
|
||||
set { _settings["RedumperRereadCount"] = value.ToString(); }
|
||||
get { return GetInt32Setting(Settings, "RedumperRereadCount", 20); }
|
||||
set { Settings["RedumperRereadCount"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -333,8 +336,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool ScanForProtection
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ScanForProtection", true); }
|
||||
set { _settings["ScanForProtection"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ScanForProtection", true); }
|
||||
set { Settings["ScanForProtection"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -342,8 +345,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool OutputSeparateProtectionFile
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "OutputSeparateProtectionFile", true); }
|
||||
set { _settings["OutputSeparateProtectionFile"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "OutputSeparateProtectionFile", true); }
|
||||
set { Settings["OutputSeparateProtectionFile"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -351,8 +354,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool AddPlaceholders
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "AddPlaceholders", true); }
|
||||
set { _settings["AddPlaceholders"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "AddPlaceholders", true); }
|
||||
set { Settings["AddPlaceholders"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -360,8 +363,17 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool PromptForDiscInformation
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "PromptForDiscInformation", true); }
|
||||
set { _settings["PromptForDiscInformation"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "PromptForDiscInformation", true); }
|
||||
set { Settings["PromptForDiscInformation"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pull all information from Redump if signed in
|
||||
/// </summary>
|
||||
public bool PullAllInformation
|
||||
{
|
||||
get { return GetBooleanSetting(Settings, "PullAllInformation", false); }
|
||||
set { Settings["PullAllInformation"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -369,8 +381,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool EnableTabsInInputFields
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EnableTabsInInputFields", false); }
|
||||
set { _settings["EnableTabsInInputFields"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "EnableTabsInInputFields", false); }
|
||||
set { Settings["EnableTabsInInputFields"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -378,8 +390,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool EnableRedumpCompatibility
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EnableRedumpCompatibility", true); }
|
||||
set { _settings["EnableRedumpCompatibility"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "EnableRedumpCompatibility", true); }
|
||||
set { Settings["EnableRedumpCompatibility"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -387,8 +399,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool ShowDiscEjectReminder
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ShowDiscEjectReminder", true); }
|
||||
set { _settings["ShowDiscEjectReminder"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ShowDiscEjectReminder", true); }
|
||||
set { Settings["ShowDiscEjectReminder"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -396,8 +408,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool EjectAfterDump
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EjectAfterDump", false); }
|
||||
set { _settings["EjectAfterDump"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "EjectAfterDump", false); }
|
||||
set { Settings["EjectAfterDump"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -405,8 +417,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool IgnoreFixedDrives
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "IgnoreFixedDrives", true); }
|
||||
set { _settings["IgnoreFixedDrives"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "IgnoreFixedDrives", true); }
|
||||
set { Settings["IgnoreFixedDrives"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -414,8 +426,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool ToolsInSeparateWindow
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ToolsInSeparateWindow", true); }
|
||||
set { _settings["ToolsInSeparateWindow"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ToolsInSeparateWindow", true); }
|
||||
set { Settings["ToolsInSeparateWindow"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -423,8 +435,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool OutputSubmissionJSON
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "OutputSubmissionJSON", false); }
|
||||
set { _settings["OutputSubmissionJSON"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "OutputSubmissionJSON", false); }
|
||||
set { Settings["OutputSubmissionJSON"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -432,8 +444,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool IncludeArtifacts
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "IncludeArtifacts", false); }
|
||||
set { _settings["IncludeArtifacts"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "IncludeArtifacts", false); }
|
||||
set { Settings["IncludeArtifacts"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -441,8 +453,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool CompressLogFiles
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "CompressLogFiles", true); }
|
||||
set { _settings["CompressLogFiles"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "CompressLogFiles", true); }
|
||||
set { Settings["CompressLogFiles"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -454,8 +466,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool SkipMediaTypeDetection
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "SkipMediaTypeDetection", false); }
|
||||
set { _settings["SkipMediaTypeDetection"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "SkipMediaTypeDetection", false); }
|
||||
set { Settings["SkipMediaTypeDetection"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -463,8 +475,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool SkipSystemDetection
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "SkipSystemDetection", false); }
|
||||
set { _settings["SkipSystemDetection"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "SkipSystemDetection", false); }
|
||||
set { Settings["SkipSystemDetection"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -476,8 +488,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool ScanArchivesForProtection
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ScanArchivesForProtection", true); }
|
||||
set { _settings["ScanArchivesForProtection"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ScanArchivesForProtection", true); }
|
||||
set { Settings["ScanArchivesForProtection"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -485,8 +497,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool ScanPackersForProtection
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "ScanPackersForProtection", false); }
|
||||
set { _settings["ScanPackersForProtection"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "ScanPackersForProtection", false); }
|
||||
set { Settings["ScanPackersForProtection"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -494,8 +506,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool IncludeDebugProtectionInformation
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "IncludeDebugProtectionInformation", false); }
|
||||
set { _settings["IncludeDebugProtectionInformation"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "IncludeDebugProtectionInformation", false); }
|
||||
set { Settings["IncludeDebugProtectionInformation"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -507,8 +519,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool VerboseLogging
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "VerboseLogging", true); }
|
||||
set { _settings["VerboseLogging"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "VerboseLogging", true); }
|
||||
set { Settings["VerboseLogging"] = value.ToString(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -516,8 +528,8 @@ namespace MPF.Core.Data
|
||||
/// </summary>
|
||||
public bool OpenLogWindowAtStartup
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "OpenLogWindowAtStartup", true); }
|
||||
set { _settings["OpenLogWindowAtStartup"] = value.ToString(); }
|
||||
get { return GetBooleanSetting(Settings, "OpenLogWindowAtStartup", true); }
|
||||
set { Settings["OpenLogWindowAtStartup"] = value.ToString(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -526,15 +538,15 @@ namespace MPF.Core.Data
|
||||
|
||||
public string RedumpUsername
|
||||
{
|
||||
get { return GetStringSetting(_settings, "RedumpUsername", ""); }
|
||||
set { _settings["RedumpUsername"] = value; }
|
||||
get { return GetStringSetting(Settings, "RedumpUsername", ""); }
|
||||
set { Settings["RedumpUsername"] = value; }
|
||||
}
|
||||
|
||||
// TODO: Figure out a way to keep this encrypted in some way, BASE64 to start?
|
||||
public string RedumpPassword
|
||||
{
|
||||
get { return GetStringSetting(_settings, "RedumpPassword", ""); }
|
||||
set { _settings["RedumpPassword"] = value; }
|
||||
get { return GetStringSetting(Settings, "RedumpPassword", ""); }
|
||||
set { Settings["RedumpPassword"] = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -550,7 +562,7 @@ namespace MPF.Core.Data
|
||||
/// <param name="settings"></param>
|
||||
public Options(Dictionary<string, string> settings = null)
|
||||
{
|
||||
this._settings = settings ?? new Dictionary<string, string>();
|
||||
this.Settings = settings ?? new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -559,16 +571,7 @@ namespace MPF.Core.Data
|
||||
/// <param name="source"></param>
|
||||
public Options(Options source)
|
||||
{
|
||||
_settings = new Dictionary<string, string>(source._settings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set all fields from an existing Options object
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
public void SetFromExisting(Options source)
|
||||
{
|
||||
_settings = new Dictionary<string, string>(source._settings);
|
||||
Settings = new Dictionary<string, string>(source.Settings);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
@@ -636,41 +639,41 @@ namespace MPF.Core.Data
|
||||
|
||||
#region IDictionary implementations
|
||||
|
||||
public ICollection<string> Keys => _settings.Keys;
|
||||
public ICollection<string> Keys => Settings.Keys;
|
||||
|
||||
public ICollection<string> Values => _settings.Values;
|
||||
public ICollection<string> Values => Settings.Values;
|
||||
|
||||
public int Count => _settings.Count;
|
||||
public int Count => Settings.Count;
|
||||
|
||||
public bool IsReadOnly => ((IDictionary<string, string>)_settings).IsReadOnly;
|
||||
public bool IsReadOnly => ((IDictionary<string, string>)Settings).IsReadOnly;
|
||||
|
||||
public string this[string key]
|
||||
{
|
||||
get { return (_settings.ContainsKey(key) ? _settings[key] : null); }
|
||||
set { _settings[key] = value; }
|
||||
get { return (Settings.ContainsKey(key) ? Settings[key] : null); }
|
||||
set { Settings[key] = value; }
|
||||
}
|
||||
|
||||
public bool ContainsKey(string key) => _settings.ContainsKey(key);
|
||||
public bool ContainsKey(string key) => Settings.ContainsKey(key);
|
||||
|
||||
public void Add(string key, string value) => _settings.Add(key, value);
|
||||
public void Add(string key, string value) => Settings.Add(key, value);
|
||||
|
||||
public bool Remove(string key) => _settings.Remove(key);
|
||||
public bool Remove(string key) => Settings.Remove(key);
|
||||
|
||||
public bool TryGetValue(string key, out string value) => _settings.TryGetValue(key, out value);
|
||||
public bool TryGetValue(string key, out string value) => Settings.TryGetValue(key, out value);
|
||||
|
||||
public void Add(KeyValuePair<string, string> item) => _settings.Add(item.Key, item.Value);
|
||||
public void Add(KeyValuePair<string, string> item) => Settings.Add(item.Key, item.Value);
|
||||
|
||||
public void Clear() => _settings.Clear();
|
||||
public void Clear() => Settings.Clear();
|
||||
|
||||
public bool Contains(KeyValuePair<string, string> item) => ((IDictionary<string, string>)_settings).Contains(item);
|
||||
public bool Contains(KeyValuePair<string, string> item) => ((IDictionary<string, string>)Settings).Contains(item);
|
||||
|
||||
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex) => ((IDictionary<string, string>)_settings).CopyTo(array, arrayIndex);
|
||||
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex) => ((IDictionary<string, string>)Settings).CopyTo(array, arrayIndex);
|
||||
|
||||
public bool Remove(KeyValuePair<string, string> item) => ((IDictionary<string, string>)_settings).Remove(item);
|
||||
public bool Remove(KeyValuePair<string, string> item) => ((IDictionary<string, string>)Settings).Remove(item);
|
||||
|
||||
public IEnumerator<KeyValuePair<string, string>> GetEnumerator() => _settings.GetEnumerator();
|
||||
public IEnumerator<KeyValuePair<string, string>> GetEnumerator() => Settings.GetEnumerator();
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() => _settings.GetEnumerator();
|
||||
IEnumerator IEnumerable.GetEnumerator() => Settings.GetEnumerator();
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0;net7.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -40,12 +37,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0-preview.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.2" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.4" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.1.1" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.1.2" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.1.6" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
#if FALSE
|
||||
|
||||
using System;
|
||||
|
||||
namespace MPF.Core.Utilities
|
||||
{
|
||||
@@ -394,3 +396,5 @@ namespace MPF.Core.Utilities
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using MPF.Core.Converters;
|
||||
using MPF.Core.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MPF.Core.Utilities
|
||||
{
|
||||
public static class OptionsLoader
|
||||
{
|
||||
private const string ConfigurationPath = "config.json";
|
||||
|
||||
#region Arguments
|
||||
|
||||
/// <summary>
|
||||
@@ -143,17 +146,16 @@ namespace MPF.Core.Utilities
|
||||
/// </summary>
|
||||
public static Options LoadFromConfig()
|
||||
{
|
||||
Configuration configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
|
||||
|
||||
var settings = configFile.AppSettings.Settings;
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
foreach (string key in settings.AllKeys)
|
||||
if (!File.Exists(ConfigurationPath))
|
||||
{
|
||||
dict[key] = settings[key]?.Value ?? string.Empty;
|
||||
_ = File.Create(ConfigurationPath);
|
||||
return new Options();
|
||||
}
|
||||
|
||||
return new Options(dict);
|
||||
var serializer = JsonSerializer.Create();
|
||||
var reader = new StreamReader(ConfigurationPath);
|
||||
var settings = serializer.Deserialize(reader, typeof(Dictionary<string, string>)) as Dictionary<string, string>;
|
||||
return new Options(settings);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -161,16 +163,10 @@ namespace MPF.Core.Utilities
|
||||
/// </summary>
|
||||
public static void SaveToConfig(Options options)
|
||||
{
|
||||
Configuration configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
|
||||
|
||||
// Loop through all settings in Options and save them, overwriting existing settings
|
||||
foreach (var kvp in options)
|
||||
{
|
||||
configFile.AppSettings.Settings.Remove(kvp.Key);
|
||||
configFile.AppSettings.Settings.Add(kvp.Key, kvp.Value);
|
||||
}
|
||||
|
||||
configFile.Save(ConfigurationSaveMode.Modified);
|
||||
var serializer = JsonSerializer.Create();
|
||||
var sw = new StreamWriter(ConfigurationPath) { AutoFlush = true };
|
||||
var writer = new JsonTextWriter(sw) { Formatting = Formatting.Indented };
|
||||
serializer.Serialize(writer, options.Settings, typeof(Dictionary<string, string>));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace MPF.Library
|
||||
this.Options = options;
|
||||
|
||||
// Output paths
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(outputPath);
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(outputPath, true);
|
||||
|
||||
// UI information
|
||||
this.Drive = drive;
|
||||
@@ -131,7 +131,7 @@ namespace MPF.Library
|
||||
try
|
||||
{
|
||||
// Normalize the output path
|
||||
string outputPath = InfoTool.NormalizeOutputPaths(this.OutputPath);
|
||||
string outputPath = InfoTool.NormalizeOutputPaths(this.OutputPath, true);
|
||||
|
||||
// Replace all instances in the output directory
|
||||
string outputDirectory = Path.GetDirectoryName(outputPath);
|
||||
@@ -498,7 +498,7 @@ namespace MPF.Library
|
||||
return Result.Failure("Error! Current configuration is not supported!");
|
||||
|
||||
// Fix the output paths, just in case
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(this.OutputPath);
|
||||
this.OutputPath = InfoTool.NormalizeOutputPaths(this.OutputPath, true);
|
||||
|
||||
// Validate that the output path isn't on the dumping drive
|
||||
if (this.OutputPath[0] == Drive.Letter)
|
||||
|
||||
@@ -13,7 +13,6 @@ using MPF.Core.Data;
|
||||
using MPF.Core.Utilities;
|
||||
using MPF.Modules;
|
||||
using Newtonsoft.Json;
|
||||
using SabreTools.Models.PIC;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using SabreTools.RedumpLib.Web;
|
||||
using Formatting = Newtonsoft.Json.Formatting;
|
||||
@@ -68,7 +67,7 @@ namespace MPF.Library
|
||||
|
||||
// Create the SubmissionInfo object with all user-inputted values by default
|
||||
string combinedBase = Path.Combine(outputDirectory, outputFilename);
|
||||
SubmissionInfo info = new SubmissionInfo()
|
||||
var info = new SubmissionInfo()
|
||||
{
|
||||
CommonDiscInfo = new CommonDiscInfoSection()
|
||||
{
|
||||
@@ -520,11 +519,11 @@ namespace MPF.Library
|
||||
if (string.IsNullOrWhiteSpace(hashData))
|
||||
return false;
|
||||
|
||||
Regex hashreg = new Regex(@"<rom name="".*?"" size=""(.*?)"" crc=""(.*?)"" md5=""(.*?)"" sha1=""(.*?)""");
|
||||
var hashreg = new Regex(@"<rom name="".*?"" size=""(.*?)"" crc=""(.*?)"" md5=""(.*?)"" sha1=""(.*?)""");
|
||||
Match m = hashreg.Match(hashData);
|
||||
if (m.Success)
|
||||
{
|
||||
Int64.TryParse(m.Groups[1].Value, out size);
|
||||
_ = Int64.TryParse(m.Groups[1].Value, out size);
|
||||
crc32 = m.Groups[2].Value;
|
||||
md5 = m.Groups[3].Value;
|
||||
sha1 = m.Groups[4].Value;
|
||||
@@ -577,7 +576,7 @@ namespace MPF.Library
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Information Output
|
||||
|
||||
@@ -623,10 +622,11 @@ namespace MPF.Library
|
||||
zf = ZipFile.Open(archiveName, ZipArchiveMode.Create);
|
||||
foreach (string file in files)
|
||||
{
|
||||
string entryName = file.Substring(outputDirectory.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
#if NET48
|
||||
string entryName = file.Substring(outputDirectory.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
zf.CreateEntryFromFile(file, entryName, CompressionLevel.Optimal);
|
||||
#else
|
||||
string entryName = file[outputDirectory.Length..].TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
zf.CreateEntryFromFile(file, entryName, CompressionLevel.SmallestSize);
|
||||
#endif
|
||||
|
||||
@@ -672,7 +672,7 @@ namespace MPF.Library
|
||||
bool reverseOrder = system.HasReversedRingcodes();
|
||||
|
||||
// Common Disc Info section
|
||||
List<string> output = new List<string> { "Common Disc Info:" };
|
||||
var output = new List<string> { "Common Disc Info:" };
|
||||
AddIfExists(output, Template.TitleField, info.CommonDiscInfo.Title, 1);
|
||||
AddIfExists(output, Template.ForeignTitleField, info.CommonDiscInfo.ForeignTitleNonLatin, 1);
|
||||
AddIfExists(output, Template.DiscNumberField, info.CommonDiscInfo.DiscNumberLetter, 1);
|
||||
@@ -691,7 +691,7 @@ namespace MPF.Library
|
||||
AddIfExists(output, Template.PartiallyMatchingIDsField, info.PartiallyMatchedIDs, 1);
|
||||
AddIfExists(output, Template.RegionField, info.CommonDiscInfo.Region.LongName() ?? "SPACE! (CHANGE THIS)", 1);
|
||||
AddIfExists(output, Template.LanguagesField, (info.CommonDiscInfo.Languages ?? new Language?[] { null }).Select(l => l.LongName() ?? "SILENCE! (CHANGE THIS)").ToArray(), 1);
|
||||
AddIfExists(output, Template.PlaystationLanguageSelectionViaField, (info.CommonDiscInfo.LanguageSelection ?? new LanguageSelection?[] { }).Select(l => l.LongName()).ToArray(), 1);
|
||||
AddIfExists(output, Template.PlaystationLanguageSelectionViaField, (info.CommonDiscInfo.LanguageSelection ?? Array.Empty<LanguageSelection?>()).Select(l => l.LongName()).ToArray(), 1);
|
||||
AddIfExists(output, Template.DiscSerialField, info.CommonDiscInfo.Serial, 1);
|
||||
|
||||
// All ringcode information goes in an indented area
|
||||
@@ -1016,7 +1016,7 @@ namespace MPF.Library
|
||||
// Now write out to a generic file
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Open(Path.Combine(outputDirectory, "!submissionInfo.txt"), FileMode.Create, FileAccess.Write)))
|
||||
using (var sw = new StreamWriter(File.Open(Path.Combine(outputDirectory, "!submissionInfo.txt"), FileMode.Create, FileAccess.Write)))
|
||||
{
|
||||
foreach (string line in lines)
|
||||
{
|
||||
@@ -1070,7 +1070,7 @@ namespace MPF.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
// We don't care what the error is right now
|
||||
return false;
|
||||
@@ -1094,7 +1094,7 @@ namespace MPF.Library
|
||||
// Now write out to a generic file
|
||||
try
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(File.Open(Path.Combine(outputDirectory, "!protectionInfo.txt"), FileMode.Create, FileAccess.Write)))
|
||||
using (var sw = new StreamWriter(File.Open(Path.Combine(outputDirectory, "!protectionInfo.txt"), FileMode.Create, FileAccess.Write)))
|
||||
{
|
||||
foreach (var kvp in info.CopyProtection.FullProtections)
|
||||
{
|
||||
@@ -1102,7 +1102,7 @@ namespace MPF.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
// We don't care what the error is right now
|
||||
return false;
|
||||
@@ -1144,7 +1144,11 @@ namespace MPF.Library
|
||||
|
||||
// If the value contains a newline
|
||||
value = value.Replace("\r\n", "\n");
|
||||
#if NET48
|
||||
if (value.Contains("\n"))
|
||||
#else
|
||||
if (value.Contains('\n'))
|
||||
#endif
|
||||
{
|
||||
output.Add(prefix + key + ":"); output.Add("");
|
||||
string[] values = value.Split('\n');
|
||||
@@ -1187,7 +1191,7 @@ namespace MPF.Library
|
||||
private static void AddIfExists(List<string> output, string key, List<int> value, int indent)
|
||||
{
|
||||
// If there's no valid value to write
|
||||
if (value == null || value.Count() == 0)
|
||||
if (value == null || value.Count == 0)
|
||||
return;
|
||||
|
||||
AddIfExists(output, key, string.Join(", ", value.Select(o => o.ToString())), indent);
|
||||
@@ -1200,7 +1204,7 @@ namespace MPF.Library
|
||||
/// <returns>List of all log file paths, empty otherwise</returns>
|
||||
private static List<string> GetGeneratedFilePaths(string outputDirectory)
|
||||
{
|
||||
List<string> files = new List<string>();
|
||||
var files = new List<string>();
|
||||
|
||||
if (File.Exists(Path.Combine(outputDirectory, "!submissionInfo.txt")))
|
||||
files.Add(Path.Combine(outputDirectory, "!submissionInfo.txt"));
|
||||
@@ -1588,7 +1592,7 @@ namespace MPF.Library
|
||||
|
||||
// Insert the first item if we have a `:` or `-`
|
||||
bool itemInserted = false;
|
||||
StringBuilder newTitleBuilder = new StringBuilder();
|
||||
var newTitleBuilder = new StringBuilder();
|
||||
for (int i = 1; i < splitTitle.Length; i++)
|
||||
{
|
||||
string segment = splitTitle[i];
|
||||
@@ -1682,16 +1686,20 @@ namespace MPF.Library
|
||||
/// Normalize a split set of paths
|
||||
/// </summary>
|
||||
/// <param name="path">Path value to normalize</param>
|
||||
public static string NormalizeOutputPaths(string path)
|
||||
public static string NormalizeOutputPaths(string path, bool getFullPath)
|
||||
{
|
||||
// The easy way
|
||||
try
|
||||
{
|
||||
// Trim quotes from the path
|
||||
path = path.Trim('"');
|
||||
// If we have an invalid path
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
return string.Empty;
|
||||
|
||||
// Remove quotes from path
|
||||
path = path.Replace("\"", string.Empty);
|
||||
|
||||
// Try getting the combined path and returning that directly
|
||||
string fullPath = Path.GetFullPath(path);
|
||||
string fullPath = getFullPath ? Path.GetFullPath(path) : path;
|
||||
string fullDirectory = Path.GetDirectoryName(fullPath);
|
||||
string fullFile = Path.GetFileName(fullPath);
|
||||
|
||||
@@ -1722,7 +1730,7 @@ namespace MPF.Library
|
||||
/// <remarks>Not currently working</remarks>
|
||||
private static SubmissionInfo CreateFromID(string discData)
|
||||
{
|
||||
SubmissionInfo info = new SubmissionInfo()
|
||||
var info = new SubmissionInfo()
|
||||
{
|
||||
CommonDiscInfo = new CommonDiscInfoSection(),
|
||||
VersionAndEditions = new VersionAndEditionsSection(),
|
||||
@@ -1735,7 +1743,7 @@ namespace MPF.Library
|
||||
try
|
||||
{
|
||||
// Load the current disc page into an XML document
|
||||
XmlDocument redumpPage = new XmlDocument() { PreserveWhitespace = true };
|
||||
var redumpPage = new XmlDocument() { PreserveWhitespace = true };
|
||||
redumpPage.LoadXml(discData);
|
||||
|
||||
// If the current page isn't valid, we can't parse it
|
||||
@@ -1897,14 +1905,15 @@ namespace MPF.Library
|
||||
/// <param name="wc">RedumpWebClient for making the connection</param>
|
||||
/// <param name="info">Existing SubmissionInfo object to fill</param>
|
||||
/// <param name="id">Redump disc ID to retrieve</param>
|
||||
/// <param name="includeAllData">True to include all pullable information, false to do bare minimum</param>
|
||||
#if NET48
|
||||
private static bool FillFromId(RedumpWebClient wc, SubmissionInfo info, int id)
|
||||
private static bool FillFromId(RedumpWebClient wc, SubmissionInfo info, int id, bool includeAllData)
|
||||
{
|
||||
string discData = wc.DownloadSingleSiteID(id);
|
||||
if (string.IsNullOrEmpty(discData))
|
||||
return false;
|
||||
#else
|
||||
private async static Task<bool> FillFromId(RedumpHttpClient wc, SubmissionInfo info, int id)
|
||||
private async static Task<bool> FillFromId(RedumpHttpClient wc, SubmissionInfo info, int id, bool includeAllData)
|
||||
{
|
||||
string discData = await wc.DownloadSingleSiteID(id);
|
||||
if (string.IsNullOrEmpty(discData))
|
||||
@@ -1912,7 +1921,7 @@ namespace MPF.Library
|
||||
#endif
|
||||
|
||||
// Title, Disc Number/Letter, Disc Title
|
||||
var match = SabreTools.RedumpLib.Data.Constants.TitleRegex.Match(discData);
|
||||
var match = Constants.TitleRegex.Match(discData);
|
||||
if (match.Success)
|
||||
{
|
||||
string title = WebUtility.HtmlDecode(match.Groups[1].Value);
|
||||
@@ -1921,9 +1930,13 @@ namespace MPF.Library
|
||||
int firstParenLocation = title.IndexOf(" (");
|
||||
if (firstParenLocation >= 0)
|
||||
{
|
||||
#if NET48
|
||||
info.CommonDiscInfo.Title = title.Substring(0, firstParenLocation);
|
||||
var subMatches = SabreTools.RedumpLib.Data.Constants.DiscNumberLetterRegex.Matches(title);
|
||||
foreach (Match subMatch in subMatches)
|
||||
#else
|
||||
info.CommonDiscInfo.Title = title[..firstParenLocation];
|
||||
#endif
|
||||
var subMatches = Constants.DiscNumberLetterRegex.Matches(title);
|
||||
foreach (Match subMatch in subMatches.Cast<Match>())
|
||||
{
|
||||
var subMatchValue = subMatch.Groups[1].Value;
|
||||
|
||||
@@ -1944,14 +1957,14 @@ namespace MPF.Library
|
||||
}
|
||||
|
||||
// Foreign Title
|
||||
match = SabreTools.RedumpLib.Data.Constants.ForeignTitleRegex.Match(discData);
|
||||
match = Constants.ForeignTitleRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.CommonDiscInfo.ForeignTitleNonLatin = WebUtility.HtmlDecode(match.Groups[1].Value);
|
||||
else
|
||||
info.CommonDiscInfo.ForeignTitleNonLatin = null;
|
||||
|
||||
// Category
|
||||
match = SabreTools.RedumpLib.Data.Constants.CategoryRegex.Match(discData);
|
||||
match = Constants.CategoryRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.CommonDiscInfo.Category = Extensions.ToDiscCategory(match.Groups[1].Value);
|
||||
else
|
||||
@@ -1960,32 +1973,37 @@ namespace MPF.Library
|
||||
// Region
|
||||
if (info.CommonDiscInfo.Region == null)
|
||||
{
|
||||
match = SabreTools.RedumpLib.Data.Constants.RegionRegex.Match(discData);
|
||||
match = Constants.RegionRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.CommonDiscInfo.Region = Extensions.ToRegion(match.Groups[1].Value);
|
||||
}
|
||||
|
||||
// Languages
|
||||
var matches = SabreTools.RedumpLib.Data.Constants.LanguagesRegex.Matches(discData);
|
||||
var matches = Constants.LanguagesRegex.Matches(discData);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
List<Language?> tempLanguages = new List<Language?>();
|
||||
foreach (Match submatch in matches)
|
||||
var tempLanguages = new List<Language?>();
|
||||
foreach (Match submatch in matches.Cast<Match>())
|
||||
{
|
||||
tempLanguages.Add(Extensions.ToLanguage(submatch.Groups[1].Value));
|
||||
}
|
||||
|
||||
info.CommonDiscInfo.Languages = tempLanguages.Where(l => l != null).ToArray();
|
||||
}
|
||||
|
||||
// Serial
|
||||
// TODO: Re-enable if there's a way of verifying against a disc
|
||||
//match = Constants.SerialRegex.Match(discData);
|
||||
//if (match.Success)
|
||||
// info.CommonDiscInfo.Serial = $"(VERIFY THIS) {WebUtility.HtmlDecode(match.Groups[1].Value)}";
|
||||
if (includeAllData)
|
||||
{
|
||||
// TODO: Re-enable if there's a way of verifying against a disc
|
||||
//match = Constants.SerialRegex.Match(discData);
|
||||
//if (match.Success)
|
||||
// info.CommonDiscInfo.Serial = $"(VERIFY THIS) {WebUtility.HtmlDecode(match.Groups[1].Value)}";
|
||||
}
|
||||
|
||||
// Error count
|
||||
if (string.IsNullOrEmpty(info.CommonDiscInfo.ErrorsCount))
|
||||
{
|
||||
match = SabreTools.RedumpLib.Data.Constants.ErrorCountRegex.Match(discData);
|
||||
match = Constants.ErrorCountRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.CommonDiscInfo.ErrorsCount = match.Groups[1].Value;
|
||||
}
|
||||
@@ -1993,25 +2011,27 @@ namespace MPF.Library
|
||||
// Version
|
||||
if (info.VersionAndEditions.Version == null)
|
||||
{
|
||||
match = SabreTools.RedumpLib.Data.Constants.VersionRegex.Match(discData);
|
||||
match = Constants.VersionRegex.Match(discData);
|
||||
if (match.Success)
|
||||
info.VersionAndEditions.Version = $"(VERIFY THIS) {WebUtility.HtmlDecode(match.Groups[1].Value)}";
|
||||
}
|
||||
|
||||
// Dumpers
|
||||
matches = SabreTools.RedumpLib.Data.Constants.DumpersRegex.Matches(discData);
|
||||
matches = Constants.DumpersRegex.Matches(discData);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
// Start with any currently listed dumpers
|
||||
List<string> tempDumpers = new List<string>();
|
||||
var tempDumpers = new List<string>();
|
||||
if (info.DumpersAndStatus.Dumpers.Length > 0)
|
||||
{
|
||||
foreach (string dumper in info.DumpersAndStatus.Dumpers)
|
||||
tempDumpers.Add(dumper);
|
||||
}
|
||||
|
||||
foreach (Match submatch in matches)
|
||||
foreach (Match submatch in matches.Cast<Match>())
|
||||
{
|
||||
tempDumpers.Add(WebUtility.HtmlDecode(submatch.Groups[1].Value));
|
||||
}
|
||||
|
||||
info.DumpersAndStatus.Dumpers = tempDumpers.ToArray();
|
||||
}
|
||||
@@ -2019,212 +2039,218 @@ namespace MPF.Library
|
||||
// TODO: Unify handling of fields that can include site codes (Comments/Contents)
|
||||
|
||||
// Comments
|
||||
match = SabreTools.RedumpLib.Data.Constants.CommentsRegex.Match(discData);
|
||||
if (match.Success)
|
||||
if (includeAllData)
|
||||
{
|
||||
// Process the old comments block
|
||||
string oldComments = info.CommonDiscInfo.Comments
|
||||
+ (string.IsNullOrEmpty(info.CommonDiscInfo.Comments) ? string.Empty : "\n")
|
||||
+ WebUtility.HtmlDecode(match.Groups[1].Value)
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "\n")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
oldComments = Regex.Replace(oldComments, @"<div .*?>", string.Empty);
|
||||
|
||||
// Create state variables
|
||||
bool addToLast = false;
|
||||
SiteCode? lastSiteCode = null;
|
||||
string newComments = string.Empty;
|
||||
|
||||
// Process the comments block line-by-line
|
||||
string[] commentsSeparated = oldComments.Split('\n');
|
||||
for (int i = 0; i < commentsSeparated.Length; i++)
|
||||
match = Constants.CommentsRegex.Match(discData);
|
||||
if (match.Success)
|
||||
{
|
||||
string commentLine = commentsSeparated[i].Trim();
|
||||
// Process the old comments block
|
||||
string oldComments = info.CommonDiscInfo.Comments
|
||||
+ (string.IsNullOrEmpty(info.CommonDiscInfo.Comments) ? string.Empty : "\n")
|
||||
+ WebUtility.HtmlDecode(match.Groups[1].Value)
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "\n")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
oldComments = Regex.Replace(oldComments, @"<div .*?>", string.Empty);
|
||||
|
||||
// If we have an empty line, we want to treat this as intentional
|
||||
if (string.IsNullOrWhiteSpace(commentLine))
|
||||
// Create state variables
|
||||
bool addToLast = false;
|
||||
SiteCode? lastSiteCode = null;
|
||||
string newComments = string.Empty;
|
||||
|
||||
// Process the comments block line-by-line
|
||||
string[] commentsSeparated = oldComments.Split('\n');
|
||||
for (int i = 0; i < commentsSeparated.Length; i++)
|
||||
{
|
||||
addToLast = false;
|
||||
lastSiteCode = null;
|
||||
newComments += $"{commentLine}\n";
|
||||
continue;
|
||||
}
|
||||
string commentLine = commentsSeparated[i].Trim();
|
||||
|
||||
// Otherwise, we need to find what tag is in use
|
||||
bool foundTag = false;
|
||||
foreach (SiteCode? siteCode in Enum.GetValues(typeof(SiteCode)))
|
||||
{
|
||||
// If we have a null site code, just skip
|
||||
if (siteCode == null)
|
||||
continue;
|
||||
|
||||
// If the line doesn't contain this tag, just skip
|
||||
if (!commentLine.Contains(siteCode.ShortName()))
|
||||
continue;
|
||||
|
||||
// Mark as having found a tag
|
||||
foundTag = true;
|
||||
|
||||
// Cache the current site code
|
||||
lastSiteCode = siteCode;
|
||||
|
||||
// A subset of tags can be multiline
|
||||
addToLast = IsMultiLine(siteCode);
|
||||
|
||||
// Skip certain site codes because of data issues
|
||||
switch (siteCode)
|
||||
{
|
||||
// Multiple
|
||||
case SiteCode.InternalSerialName:
|
||||
case SiteCode.Multisession:
|
||||
case SiteCode.VolumeLabel:
|
||||
continue;
|
||||
|
||||
// Audio CD
|
||||
case SiteCode.RingNonZeroDataStart:
|
||||
case SiteCode.UniversalHash:
|
||||
continue;
|
||||
|
||||
// Microsoft Xbox and Xbox 360
|
||||
case SiteCode.DMIHash:
|
||||
case SiteCode.PFIHash:
|
||||
case SiteCode.SSHash:
|
||||
case SiteCode.SSVersion:
|
||||
case SiteCode.XMID:
|
||||
case SiteCode.XeMID:
|
||||
continue;
|
||||
|
||||
// Microsoft Xbox One and Series X/S
|
||||
case SiteCode.Filename:
|
||||
continue;
|
||||
|
||||
// Nintendo Gamecube
|
||||
case SiteCode.InternalName:
|
||||
continue;
|
||||
}
|
||||
|
||||
// If we don't already have this site code, add it to the dictionary
|
||||
if (!info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(siteCode.Value))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[siteCode.Value] = $"(VERIFY THIS) {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
// Otherwise, append the value to the existing key
|
||||
else
|
||||
info.CommonDiscInfo.CommentsSpecialFields[siteCode.Value] += $", {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// If we didn't find a known tag, just add the line, just in case
|
||||
if (!foundTag)
|
||||
{
|
||||
if (addToLast && lastSiteCode != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value]))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value] += "\n";
|
||||
|
||||
info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value] += commentLine;
|
||||
}
|
||||
else
|
||||
// If we have an empty line, we want to treat this as intentional
|
||||
if (string.IsNullOrWhiteSpace(commentLine))
|
||||
{
|
||||
addToLast = false;
|
||||
lastSiteCode = null;
|
||||
newComments += $"{commentLine}\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
// Otherwise, we need to find what tag is in use
|
||||
bool foundTag = false;
|
||||
foreach (SiteCode? siteCode in Enum.GetValues(typeof(SiteCode)))
|
||||
{
|
||||
// If we have a null site code, just skip
|
||||
if (siteCode == null)
|
||||
continue;
|
||||
|
||||
// If the line doesn't contain this tag, just skip
|
||||
if (!commentLine.Contains(siteCode.ShortName()))
|
||||
continue;
|
||||
|
||||
// Mark as having found a tag
|
||||
foundTag = true;
|
||||
|
||||
// Cache the current site code
|
||||
lastSiteCode = siteCode;
|
||||
|
||||
// A subset of tags can be multiline
|
||||
addToLast = IsMultiLine(siteCode);
|
||||
|
||||
// Skip certain site codes because of data issues
|
||||
switch (siteCode)
|
||||
{
|
||||
// Multiple
|
||||
case SiteCode.InternalSerialName:
|
||||
case SiteCode.Multisession:
|
||||
case SiteCode.VolumeLabel:
|
||||
continue;
|
||||
|
||||
// Audio CD
|
||||
case SiteCode.RingNonZeroDataStart:
|
||||
case SiteCode.UniversalHash:
|
||||
continue;
|
||||
|
||||
// Microsoft Xbox and Xbox 360
|
||||
case SiteCode.DMIHash:
|
||||
case SiteCode.PFIHash:
|
||||
case SiteCode.SSHash:
|
||||
case SiteCode.SSVersion:
|
||||
case SiteCode.XMID:
|
||||
case SiteCode.XeMID:
|
||||
continue;
|
||||
|
||||
// Microsoft Xbox One and Series X/S
|
||||
case SiteCode.Filename:
|
||||
continue;
|
||||
|
||||
// Nintendo Gamecube
|
||||
case SiteCode.InternalName:
|
||||
continue;
|
||||
}
|
||||
|
||||
// If we don't already have this site code, add it to the dictionary
|
||||
if (!info.CommonDiscInfo.CommentsSpecialFields.ContainsKey(siteCode.Value))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[siteCode.Value] = $"(VERIFY THIS) {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
// Otherwise, append the value to the existing key
|
||||
else
|
||||
info.CommonDiscInfo.CommentsSpecialFields[siteCode.Value] += $", {commentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// If we didn't find a known tag, just add the line, just in case
|
||||
if (!foundTag)
|
||||
{
|
||||
if (addToLast && lastSiteCode != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value]))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value] += "\n";
|
||||
|
||||
info.CommonDiscInfo.CommentsSpecialFields[lastSiteCode.Value] += commentLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
newComments += $"{commentLine}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the new comments field
|
||||
info.CommonDiscInfo.Comments = newComments;
|
||||
// Set the new comments field
|
||||
info.CommonDiscInfo.Comments = newComments;
|
||||
}
|
||||
}
|
||||
|
||||
// Contents
|
||||
match = SabreTools.RedumpLib.Data.Constants.ContentsRegex.Match(discData);
|
||||
if (match.Success)
|
||||
if (includeAllData)
|
||||
{
|
||||
// Process the old contents block
|
||||
string oldContents = info.CommonDiscInfo.Contents
|
||||
+ (string.IsNullOrEmpty(info.CommonDiscInfo.Contents) ? string.Empty : "\n")
|
||||
+ WebUtility.HtmlDecode(match.Groups[1].Value)
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "\n")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
oldContents = Regex.Replace(oldContents, @"<div .*?>", string.Empty);
|
||||
|
||||
// Create state variables
|
||||
bool addToLast = false;
|
||||
SiteCode? lastSiteCode = null;
|
||||
string newContents = string.Empty;
|
||||
|
||||
// Process the contents block line-by-line
|
||||
string[] contentsSeparated = oldContents.Split('\n');
|
||||
for (int i = 0; i < contentsSeparated.Length; i++)
|
||||
match = Constants.ContentsRegex.Match(discData);
|
||||
if (match.Success)
|
||||
{
|
||||
string contentLine = contentsSeparated[i].Trim();
|
||||
// Process the old contents block
|
||||
string oldContents = info.CommonDiscInfo.Contents
|
||||
+ (string.IsNullOrEmpty(info.CommonDiscInfo.Contents) ? string.Empty : "\n")
|
||||
+ WebUtility.HtmlDecode(match.Groups[1].Value)
|
||||
.Replace("\r\n", "\n")
|
||||
.Replace("<br />\n", "\n")
|
||||
.Replace("<br />", string.Empty)
|
||||
.Replace("</div>", string.Empty)
|
||||
.Replace("[+]", string.Empty)
|
||||
.ReplaceHtmlWithSiteCodes();
|
||||
oldContents = Regex.Replace(oldContents, @"<div .*?>", string.Empty);
|
||||
|
||||
// If we have an empty line, we want to treat this as intentional
|
||||
if (string.IsNullOrWhiteSpace(contentLine))
|
||||
// Create state variables
|
||||
bool addToLast = false;
|
||||
SiteCode? lastSiteCode = null;
|
||||
string newContents = string.Empty;
|
||||
|
||||
// Process the contents block line-by-line
|
||||
string[] contentsSeparated = oldContents.Split('\n');
|
||||
for (int i = 0; i < contentsSeparated.Length; i++)
|
||||
{
|
||||
addToLast = false;
|
||||
lastSiteCode = null;
|
||||
newContents += $"{contentLine}\n";
|
||||
continue;
|
||||
}
|
||||
string contentLine = contentsSeparated[i].Trim();
|
||||
|
||||
// Otherwise, we need to find what tag is in use
|
||||
bool foundTag = false;
|
||||
foreach (SiteCode? siteCode in Enum.GetValues(typeof(SiteCode)))
|
||||
{
|
||||
// If we have a null site code, just skip
|
||||
if (siteCode == null)
|
||||
continue;
|
||||
|
||||
// If the line doesn't contain this tag, just skip
|
||||
if (!contentLine.Contains(siteCode.ShortName()))
|
||||
continue;
|
||||
|
||||
// Cache the current site code
|
||||
lastSiteCode = siteCode;
|
||||
|
||||
// If we don't already have this site code, add it to the dictionary
|
||||
if (!info.CommonDiscInfo.ContentsSpecialFields.ContainsKey(siteCode.Value))
|
||||
info.CommonDiscInfo.ContentsSpecialFields[siteCode.Value] = $"(VERIFY THIS) {contentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
// A subset of tags can be multiline
|
||||
addToLast = IsMultiLine(siteCode);
|
||||
|
||||
// Mark as having found a tag
|
||||
foundTag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// If we didn't find a known tag, just add the line, just in case
|
||||
if (!foundTag)
|
||||
{
|
||||
if (addToLast && lastSiteCode != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value]))
|
||||
info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value] += "\n";
|
||||
|
||||
info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value] += contentLine;
|
||||
}
|
||||
else
|
||||
// If we have an empty line, we want to treat this as intentional
|
||||
if (string.IsNullOrWhiteSpace(contentLine))
|
||||
{
|
||||
addToLast = false;
|
||||
lastSiteCode = null;
|
||||
newContents += $"{contentLine}\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
// Otherwise, we need to find what tag is in use
|
||||
bool foundTag = false;
|
||||
foreach (SiteCode? siteCode in Enum.GetValues(typeof(SiteCode)))
|
||||
{
|
||||
// If we have a null site code, just skip
|
||||
if (siteCode == null)
|
||||
continue;
|
||||
|
||||
// If the line doesn't contain this tag, just skip
|
||||
if (!contentLine.Contains(siteCode.ShortName()))
|
||||
continue;
|
||||
|
||||
// Cache the current site code
|
||||
lastSiteCode = siteCode;
|
||||
|
||||
// If we don't already have this site code, add it to the dictionary
|
||||
if (!info.CommonDiscInfo.ContentsSpecialFields.ContainsKey(siteCode.Value))
|
||||
info.CommonDiscInfo.ContentsSpecialFields[siteCode.Value] = $"(VERIFY THIS) {contentLine.Replace(siteCode.ShortName(), string.Empty).Trim()}";
|
||||
|
||||
// A subset of tags can be multiline
|
||||
addToLast = IsMultiLine(siteCode);
|
||||
|
||||
// Mark as having found a tag
|
||||
foundTag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// If we didn't find a known tag, just add the line, just in case
|
||||
if (!foundTag)
|
||||
{
|
||||
if (addToLast && lastSiteCode != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value]))
|
||||
info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value] += "\n";
|
||||
|
||||
info.CommonDiscInfo.ContentsSpecialFields[lastSiteCode.Value] += contentLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
newContents += $"{contentLine}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the new contents field
|
||||
info.CommonDiscInfo.Contents = newContents;
|
||||
// Set the new contents field
|
||||
info.CommonDiscInfo.Contents = newContents;
|
||||
}
|
||||
}
|
||||
|
||||
// Added
|
||||
match = SabreTools.RedumpLib.Data.Constants.AddedRegex.Match(discData);
|
||||
match = Constants.AddedRegex.Match(discData);
|
||||
if (match.Success)
|
||||
{
|
||||
if (DateTime.TryParse(match.Groups[1].Value, out DateTime added))
|
||||
@@ -2234,7 +2260,7 @@ namespace MPF.Library
|
||||
}
|
||||
|
||||
// Last Modified
|
||||
match = SabreTools.RedumpLib.Data.Constants.LastModifiedRegex.Match(discData);
|
||||
match = Constants.LastModifiedRegex.Match(discData);
|
||||
if (match.Success)
|
||||
{
|
||||
if (DateTime.TryParse(match.Groups[1].Value, out DateTime lastModified))
|
||||
@@ -2263,9 +2289,9 @@ namespace MPF.Library
|
||||
info.PartiallyMatchedIDs = new List<int>();
|
||||
|
||||
#if NET48
|
||||
using (RedumpWebClient wc = new RedumpWebClient())
|
||||
using (var wc = new RedumpWebClient())
|
||||
#else
|
||||
using (RedumpHttpClient wc = new RedumpHttpClient())
|
||||
using (var wc = new RedumpHttpClient())
|
||||
#endif
|
||||
{
|
||||
// Login to Redump
|
||||
@@ -2305,7 +2331,9 @@ namespace MPF.Library
|
||||
|
||||
// If the line ends in a known extra track names, skip them for checking
|
||||
if (hashData.Contains("(Track 0).bin")
|
||||
|| hashData.Contains("(Track 0.2).bin")
|
||||
|| hashData.Contains("(Track 00).bin")
|
||||
|| hashData.Contains("(Track 00.2).bin")
|
||||
|| hashData.Contains("(Track A).bin")
|
||||
|| hashData.Contains("(Track AA).bin"))
|
||||
{
|
||||
@@ -2392,9 +2420,9 @@ namespace MPF.Library
|
||||
// Fill in the fields from the existing ID
|
||||
resultProgress?.Report(Result.Success($"Filling fields from existing ID {fullyMatchedIDs[i]}..."));
|
||||
#if NET48
|
||||
FillFromId(wc, info, fullyMatchedIDs[i]);
|
||||
FillFromId(wc, info, fullyMatchedIDs[i], options.PullAllInformation);
|
||||
#else
|
||||
_ = await FillFromId(wc, info, fullyMatchedIDs[i]);
|
||||
_ = await FillFromId(wc, info, fullyMatchedIDs[i], options.PullAllInformation);
|
||||
#endif
|
||||
resultProgress?.Report(Result.Success("Information filling complete!"));
|
||||
|
||||
@@ -2406,7 +2434,7 @@ namespace MPF.Library
|
||||
// Clear out fully matched IDs from the partial list
|
||||
if (info.FullyMatchedID.HasValue)
|
||||
{
|
||||
if (info.PartiallyMatchedIDs.Count() == 1)
|
||||
if (info.PartiallyMatchedIDs.Count == 1)
|
||||
info.PartiallyMatchedIDs = null;
|
||||
else
|
||||
info.PartiallyMatchedIDs.Remove(info.FullyMatchedID.Value);
|
||||
@@ -2462,7 +2490,7 @@ namespace MPF.Library
|
||||
private async static Task<List<int>> ListSearchResults(RedumpHttpClient wc, string query, bool filterForwardSlashes = true)
|
||||
#endif
|
||||
{
|
||||
List<int> ids = new List<int>();
|
||||
var ids = new List<int>();
|
||||
|
||||
// Strip quotes
|
||||
query = query.Trim('"', '\'');
|
||||
@@ -2483,9 +2511,9 @@ namespace MPF.Library
|
||||
while (true)
|
||||
{
|
||||
#if NET48
|
||||
List<int> pageIds = wc.CheckSingleSitePage(string.Format(SabreTools.RedumpLib.Data.Constants.QuickSearchUrl, query, pageNumber++));
|
||||
List<int> pageIds = wc.CheckSingleSitePage(string.Format(Constants.QuickSearchUrl, query, pageNumber++));
|
||||
#else
|
||||
List<int> pageIds = await wc.CheckSingleSitePage(string.Format(SabreTools.RedumpLib.Data.Constants.QuickSearchUrl, query, pageNumber++));
|
||||
List<int> pageIds = await wc.CheckSingleSitePage(string.Format(Constants.QuickSearchUrl, query, pageNumber++));
|
||||
#endif
|
||||
ids.AddRange(pageIds);
|
||||
if (pageIds.Count <= 1)
|
||||
@@ -2571,7 +2599,11 @@ namespace MPF.Library
|
||||
}
|
||||
|
||||
// Format the universal hash for finding within the comments
|
||||
#if NET48
|
||||
universalHash = $"{universalHash.Substring(0, universalHash.Length - 1)}/comments/only";
|
||||
#else
|
||||
universalHash = $"{universalHash[..^1]}/comments/only";
|
||||
#endif
|
||||
|
||||
// Get all matching IDs for the hash
|
||||
#if NET48
|
||||
@@ -2623,7 +2655,7 @@ namespace MPF.Library
|
||||
return false;
|
||||
|
||||
// Discs with only 1 track don't have a track count listed
|
||||
var match = SabreTools.RedumpLib.Data.Constants.TrackCountRegex.Match(discData);
|
||||
var match = Constants.TrackCountRegex.Match(discData);
|
||||
if (!match.Success && localCount == 1)
|
||||
return true;
|
||||
else if (!match.Success)
|
||||
@@ -2883,6 +2915,6 @@ namespace MPF.Library
|
||||
return sorted;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0;net7.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<AssemblyName>MPF.Library</AssemblyName>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -29,6 +25,7 @@
|
||||
<IncludeAssets>runtime; compile; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.4" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.1.1" />
|
||||
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace MPF.Library
|
||||
{
|
||||
// If the filtered list is empty in some way, return
|
||||
if (protections == null || !protections.Any())
|
||||
return "None found";
|
||||
return "None found [OMIT FROM SUBMISSION]";
|
||||
|
||||
// Get an ordered list of distinct found protections
|
||||
var orderedDistinctProtections = protections
|
||||
@@ -77,7 +77,7 @@ namespace MPF.Library
|
||||
// Sanitize and join protections for writing
|
||||
string protectionString = SanitizeFoundProtections(orderedDistinctProtections);
|
||||
if (string.IsNullOrWhiteSpace(protectionString))
|
||||
return "None found";
|
||||
return "None found [OMIT FROM SUBMISSION]";
|
||||
|
||||
return protectionString;
|
||||
}
|
||||
@@ -132,6 +132,15 @@ namespace MPF.Library
|
||||
/// <param name="foundProtections">Enumerable of found protections</param>
|
||||
public static string SanitizeFoundProtections(IEnumerable<string> foundProtections)
|
||||
{
|
||||
// EXCEPTIONS
|
||||
if (foundProtections.Any(p => p.StartsWith("[Exception opening file")))
|
||||
{
|
||||
foundProtections = foundProtections.Where(p => !p.StartsWith("[Exception opening file"));
|
||||
foundProtections = foundProtections
|
||||
.Prepend("Exception occurred while scanning [RESCAN NEEDED]")
|
||||
.OrderBy(p => p);
|
||||
}
|
||||
|
||||
// ActiveMARK
|
||||
if (foundProtections.Any(p => p == "ActiveMARK 5") && foundProtections.Any(p => p == "ActiveMARK"))
|
||||
foundProtections = foundProtections.Where(p => p != "ActiveMARK");
|
||||
|
||||
@@ -13,6 +13,9 @@ using SabreTools.Models.CueSheets;
|
||||
using SabreTools.RedumpLib.Data;
|
||||
using Schemas;
|
||||
|
||||
// Ignore "Type or member is obsolete"
|
||||
#pragma warning disable CS0618
|
||||
|
||||
namespace MPF.Modules.Aaru
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -278,8 +278,8 @@ namespace MPF.Modules
|
||||
// Start processing tasks, if necessary
|
||||
if (!separateWindow)
|
||||
{
|
||||
Logging.OutputToLog(process.StandardOutput, this, ReportStatus);
|
||||
Logging.OutputToLog(process.StandardError, this, ReportStatus);
|
||||
_ = Logging.OutputToLog(process.StandardOutput, this, ReportStatus);
|
||||
_ = Logging.OutputToLog(process.StandardError, this, ReportStatus);
|
||||
}
|
||||
|
||||
process.WaitForExit();
|
||||
@@ -1107,8 +1107,7 @@ namespace MPF.Modules
|
||||
datString += $"<rom name=\"{rom.Name}\" size=\"{rom.Size}\" crc=\"{rom.Crc}\" md5=\"{rom.Md5}\" sha1=\"{rom.Sha1}\" />\n";
|
||||
}
|
||||
|
||||
datString.TrimEnd('\n');
|
||||
return datString;
|
||||
return datString.TrimEnd('\n');
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1149,7 +1148,7 @@ namespace MPF.Modules
|
||||
if (xtr == null)
|
||||
return null;
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(Datafile));
|
||||
var serializer = new XmlSerializer(typeof(Datafile));
|
||||
Datafile obj = serializer.Deserialize(xtr) as Datafile;
|
||||
|
||||
return obj;
|
||||
@@ -1203,7 +1202,7 @@ namespace MPF.Modules
|
||||
try
|
||||
{
|
||||
// Get a list of hashers to run over the buffer
|
||||
List<Hasher> hashers = new List<Hasher>
|
||||
var hashers = new List<Hasher>
|
||||
{
|
||||
new Hasher(Hash.CRC),
|
||||
new Hasher(Hash.MD5),
|
||||
@@ -1275,7 +1274,7 @@ namespace MPF.Modules
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (IOException ex)
|
||||
catch (IOException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1283,8 +1282,6 @@ namespace MPF.Modules
|
||||
{
|
||||
input.Dispose();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1317,11 +1314,11 @@ namespace MPF.Modules
|
||||
|
||||
// TODO: Use deserialization to Rom instead of Regex
|
||||
|
||||
Regex hashreg = new Regex(@"<rom name="".*?"" size=""(.*?)"" crc=""(.*?)"" md5=""(.*?)"" sha1=""(.*?)""");
|
||||
var hashreg = new Regex(@"<rom name="".*?"" size=""(.*?)"" crc=""(.*?)"" md5=""(.*?)"" sha1=""(.*?)""");
|
||||
Match m = hashreg.Match(hashData);
|
||||
if (m.Success)
|
||||
{
|
||||
Int64.TryParse(m.Groups[1].Value, out size);
|
||||
_ = Int64.TryParse(m.Groups[1].Value, out size);
|
||||
crc32 = m.Groups[2].Value;
|
||||
md5 = m.Groups[3].Value;
|
||||
sha1 = m.Groups[4].Value;
|
||||
@@ -1347,7 +1344,7 @@ namespace MPF.Modules
|
||||
|
||||
var rom = datafile.Games[0].Roms[0];
|
||||
|
||||
Int64.TryParse(rom.Size, out size);
|
||||
_ = Int64.TryParse(rom.Size, out size);
|
||||
crc32 = rom.Crc;
|
||||
md5 = rom.Md5;
|
||||
sha1 = rom.Sha1;
|
||||
@@ -1369,7 +1366,11 @@ namespace MPF.Modules
|
||||
if (di?.Units == null || di.Units.Length <= 1)
|
||||
return false;
|
||||
|
||||
#if NET48
|
||||
int ReadFromArrayBigEndian(byte[] bytes, int offset)
|
||||
#else
|
||||
static int ReadFromArrayBigEndian(byte[] bytes, int offset)
|
||||
#endif
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>(bytes, offset, 0x04);
|
||||
byte[] rev = span.ToArray();
|
||||
@@ -1498,8 +1499,8 @@ namespace MPF.Modules
|
||||
return false;
|
||||
|
||||
// Fix the Y2K timestamp issue
|
||||
FileInfo fi = new FileInfo(exePath);
|
||||
DateTime dt = new DateTime(fi.LastWriteTimeUtc.Year >= 1900 && fi.LastWriteTimeUtc.Year < 1920 ? 2000 + fi.LastWriteTimeUtc.Year % 100 : fi.LastWriteTimeUtc.Year,
|
||||
var fi = new FileInfo(exePath);
|
||||
var dt = new DateTime(fi.LastWriteTimeUtc.Year >= 1900 && fi.LastWriteTimeUtc.Year < 1920 ? 2000 + fi.LastWriteTimeUtc.Year % 100 : fi.LastWriteTimeUtc.Year,
|
||||
fi.LastWriteTimeUtc.Month, fi.LastWriteTimeUtc.Day);
|
||||
date = dt.ToString("yyyy-MM-dd");
|
||||
|
||||
@@ -1558,7 +1559,7 @@ namespace MPF.Modules
|
||||
// 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)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x18, SeekOrigin.End);
|
||||
return new string(br.ReadChars(9));
|
||||
@@ -1595,7 +1596,7 @@ namespace MPF.Modules
|
||||
// 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)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x08, SeekOrigin.End);
|
||||
return new string(br.ReadChars(5));
|
||||
@@ -1632,7 +1633,7 @@ namespace MPF.Modules
|
||||
// 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)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x14, SeekOrigin.End);
|
||||
return new string(br.ReadChars(9));
|
||||
@@ -1669,7 +1670,7 @@ namespace MPF.Modules
|
||||
// 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)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramSfoPath)))
|
||||
{
|
||||
br.BaseStream.Seek(-0x08, SeekOrigin.End);
|
||||
return new string(br.ReadChars(5));
|
||||
@@ -1706,7 +1707,7 @@ namespace MPF.Modules
|
||||
// Let's try reading param.json to find the serial in the unencrypted JSON
|
||||
try
|
||||
{
|
||||
using (BinaryReader br = new BinaryReader(File.OpenRead(paramJsonPath)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramJsonPath)))
|
||||
{
|
||||
br.BaseStream.Seek(0x82E, SeekOrigin.Begin);
|
||||
return new string(br.ReadChars(9));
|
||||
@@ -1743,7 +1744,7 @@ namespace MPF.Modules
|
||||
// Let's try reading param.json to find the version in the unencrypted JSON
|
||||
try
|
||||
{
|
||||
using (BinaryReader br = new BinaryReader(File.OpenRead(paramJsonPath)))
|
||||
using (var br = new BinaryReader(File.OpenRead(paramJsonPath)))
|
||||
{
|
||||
br.BaseStream.Seek(0x89E, SeekOrigin.Begin);
|
||||
return new string(br.ReadChars(5));
|
||||
@@ -1756,7 +1757,7 @@ namespace MPF.Modules
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Category Extraction
|
||||
|
||||
|
||||
@@ -281,32 +281,31 @@ namespace MPF.Modules.DiscImageCreator
|
||||
}
|
||||
|
||||
// Removed or inconsistent files
|
||||
if (false)
|
||||
{
|
||||
// Doesn't output on Linux
|
||||
if (!File.Exists($"{basePath}.c2"))
|
||||
missingFiles.Add($"{basePath}.c2");
|
||||
//{
|
||||
// // Doesn't output on Linux
|
||||
// if (!File.Exists($"{basePath}.c2"))
|
||||
// missingFiles.Add($"{basePath}.c2");
|
||||
|
||||
// Doesn't output on Linux
|
||||
if (!File.Exists($"{basePath}_c2Error.txt"))
|
||||
missingFiles.Add($"{basePath}_c2Error.txt");
|
||||
// // Doesn't output on Linux
|
||||
// if (!File.Exists($"{basePath}_c2Error.txt"))
|
||||
// missingFiles.Add($"{basePath}_c2Error.txt");
|
||||
|
||||
// Replaced by timestamp-named file
|
||||
if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
missingFiles.Add($"{basePath}_cmd.txt");
|
||||
// // Replaced by timestamp-named file
|
||||
// if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
// missingFiles.Add($"{basePath}_cmd.txt");
|
||||
|
||||
// Not guaranteed output
|
||||
if (!File.Exists($"{basePath}_subIntention.txt"))
|
||||
missingFiles.Add($"{basePath}_subIntention.txt");
|
||||
// // Not guaranteed output
|
||||
// if (!File.Exists($"{basePath}_subIntention.txt"))
|
||||
// missingFiles.Add($"{basePath}_subIntention.txt");
|
||||
|
||||
// Not guaranteed output
|
||||
if (File.Exists($"{basePath}_suppl.dat"))
|
||||
missingFiles.Add($"{basePath}_suppl.dat");
|
||||
// // Not guaranteed output
|
||||
// if (File.Exists($"{basePath}_suppl.dat"))
|
||||
// missingFiles.Add($"{basePath}_suppl.dat");
|
||||
|
||||
// Not guaranteed output (at least PCE)
|
||||
if (!File.Exists($"{basePath}.toc"))
|
||||
missingFiles.Add($"{basePath}.toc");
|
||||
}
|
||||
// // Not guaranteed output (at least PCE)
|
||||
// if (!File.Exists($"{basePath}.toc"))
|
||||
// missingFiles.Add($"{basePath}.toc");
|
||||
//}
|
||||
|
||||
break;
|
||||
|
||||
@@ -332,24 +331,23 @@ namespace MPF.Modules.DiscImageCreator
|
||||
}
|
||||
|
||||
// Removed or inconsistent files
|
||||
if (false)
|
||||
{
|
||||
// Replaced by timestamp-named file
|
||||
if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
missingFiles.Add($"{basePath}_cmd.txt");
|
||||
//{
|
||||
// // Replaced by timestamp-named file
|
||||
// if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
// missingFiles.Add($"{basePath}_cmd.txt");
|
||||
|
||||
// Not guaranteed output
|
||||
if (File.Exists($"{basePath}_CSSKey.txt"))
|
||||
missingFiles.Add($"{basePath}_CSSKey.txt");
|
||||
// // Not guaranteed output
|
||||
// if (File.Exists($"{basePath}_CSSKey.txt"))
|
||||
// missingFiles.Add($"{basePath}_CSSKey.txt");
|
||||
|
||||
// Only output for some parameters
|
||||
if (File.Exists($"{basePath}.raw"))
|
||||
missingFiles.Add($"{basePath}.raw");
|
||||
// // Only output for some parameters
|
||||
// if (File.Exists($"{basePath}.raw"))
|
||||
// missingFiles.Add($"{basePath}.raw");
|
||||
|
||||
// Not guaranteed output
|
||||
if (File.Exists($"{basePath}_suppl.dat"))
|
||||
missingFiles.Add($"{basePath}_suppl.dat");
|
||||
}
|
||||
// // Not guaranteed output
|
||||
// if (File.Exists($"{basePath}_suppl.dat"))
|
||||
// missingFiles.Add($"{basePath}_suppl.dat");
|
||||
//}
|
||||
|
||||
break;
|
||||
|
||||
@@ -365,12 +363,11 @@ namespace MPF.Modules.DiscImageCreator
|
||||
}
|
||||
|
||||
// Removed or inconsistent files
|
||||
if (false)
|
||||
{
|
||||
// Replaced by timestamp-named file
|
||||
if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
missingFiles.Add($"{basePath}_cmd.txt");
|
||||
}
|
||||
//{
|
||||
// // Replaced by timestamp-named file
|
||||
// if (!File.Exists($"{basePath}_cmd.txt"))
|
||||
// missingFiles.Add($"{basePath}_cmd.txt");
|
||||
//}
|
||||
|
||||
break;
|
||||
|
||||
@@ -443,7 +440,8 @@ namespace MPF.Modules.DiscImageCreator
|
||||
|
||||
// Attempt to get multisession data
|
||||
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}_disc.txt") ?? string.Empty;
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
|
||||
if (!string.IsNullOrWhiteSpace(cdMultiSessionInfo))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
|
||||
|
||||
// Attempt to get the universal hash, if it's an audio disc
|
||||
if (this.System.IsAudio())
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0;net7.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -23,9 +20,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.2" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.4" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.1.1" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.1.2" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.1.6" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.3">
|
||||
|
||||
@@ -69,5 +69,6 @@ namespace MPF.Modules.Redumper
|
||||
public const string RefineSubchannel = "--refine-subchannel";
|
||||
public const string Skip = "--skip";
|
||||
public const string DumpReadSize = "--dump-read-size";
|
||||
public const string OverreadLeadout = "--overread-leadout";
|
||||
}
|
||||
}
|
||||
@@ -181,7 +181,7 @@ namespace MPF.Modules.Redumper
|
||||
/// <inheritdoc/>
|
||||
public override (bool, List<string>) CheckAllOutputFilesExist(string basePath, bool preCheck)
|
||||
{
|
||||
List<string> missingFiles = new List<string>();
|
||||
var missingFiles = new List<string>();
|
||||
|
||||
switch (this.Type)
|
||||
{
|
||||
@@ -208,12 +208,11 @@ namespace MPF.Modules.Redumper
|
||||
}
|
||||
|
||||
// Removed or inconsistent files
|
||||
if (false)
|
||||
{
|
||||
// Depends on the disc
|
||||
if (!File.Exists($"{basePath}.cdtext"))
|
||||
missingFiles.Add($"{basePath}.cdtext");
|
||||
}
|
||||
//{
|
||||
// // Depends on the disc
|
||||
// if (!File.Exists($"{basePath}.cdtext"))
|
||||
// missingFiles.Add($"{basePath}.cdtext");
|
||||
//}
|
||||
|
||||
break;
|
||||
|
||||
@@ -275,7 +274,8 @@ namespace MPF.Modules.Redumper
|
||||
|
||||
// Attempt to get multisession data
|
||||
string cdMultiSessionInfo = GetMultisessionInformation($"{basePath}.log") ?? string.Empty;
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
|
||||
if (!string.IsNullOrWhiteSpace(cdMultiSessionInfo))
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Multisession] = cdMultiSessionInfo;
|
||||
|
||||
// Attempt to get the universal hash, if it's an audio disc
|
||||
if (this.System.IsAudio())
|
||||
@@ -351,7 +351,7 @@ namespace MPF.Modules.Redumper
|
||||
break;
|
||||
|
||||
case RedumpSystem.SegaMegaCDSegaCD:
|
||||
info.Extras.Header = GetSegaCDHeader($"{basePath}.log", out string scdBuildDate, out string scdSerial, out string scdRegion) ?? string.Empty;
|
||||
info.Extras.Header = GetSegaCDHeader($"{basePath}.log", out string scdBuildDate, out string scdSerial, out string _) ?? string.Empty;
|
||||
info.CommonDiscInfo.CommentsSpecialFields[SiteCode.InternalSerialName] = scdSerial ?? string.Empty;
|
||||
info.CommonDiscInfo.EXEDateBuildDate = scdBuildDate ?? string.Empty;
|
||||
// TODO: Support region setting from parsed value
|
||||
@@ -477,10 +477,14 @@ namespace MPF.Modules.Redumper
|
||||
/// </remarks>
|
||||
public override string GenerateParameters()
|
||||
{
|
||||
List<string> parameters = new List<string>();
|
||||
var parameters = new List<string>();
|
||||
|
||||
#if NET48
|
||||
if (ModeValues == null)
|
||||
ModeValues = new List<string> { CommandStrings.NONE };
|
||||
#else
|
||||
ModeValues ??= new List<string> { CommandStrings.NONE };
|
||||
#endif
|
||||
|
||||
// Modes
|
||||
parameters.AddRange(ModeValues);
|
||||
@@ -692,6 +696,10 @@ namespace MPF.Modules.Redumper
|
||||
parameters.Add($"{FlagStrings.DumpReadSize}={DumpReadSizeValue}");
|
||||
}
|
||||
|
||||
// Overread Leadout
|
||||
if (this[FlagStrings.OverreadLeadout] == true)
|
||||
parameters.Add(FlagStrings.OverreadLeadout);
|
||||
|
||||
#endregion
|
||||
|
||||
return string.Join(" ", parameters);
|
||||
@@ -749,6 +757,7 @@ namespace MPF.Modules.Redumper
|
||||
FlagStrings.RefineSubchannel,
|
||||
FlagStrings.Skip,
|
||||
FlagStrings.DumpReadSize,
|
||||
FlagStrings.OverreadLeadout,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -759,7 +768,7 @@ namespace MPF.Modules.Redumper
|
||||
/// <inheritdoc/>
|
||||
public override List<string> GetLogFilePaths(string basePath)
|
||||
{
|
||||
List<string> logFiles = new List<string>();
|
||||
var logFiles = new List<string>();
|
||||
|
||||
switch (this.Type)
|
||||
{
|
||||
@@ -1145,6 +1154,9 @@ namespace MPF.Modules.Redumper
|
||||
if (!string.IsNullOrWhiteSpace(stringValue))
|
||||
DumpReadSizeValue = intValue;
|
||||
|
||||
// Overread Leadout
|
||||
ProcessFlagParameter(parts, FlagStrings.OverreadLeadout, ref i);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -1264,17 +1276,29 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
if (line.StartsWith("protection system type"))
|
||||
{
|
||||
#if NET48
|
||||
copyrightProtectionSystemType = line.Substring("protection system type: ".Length);
|
||||
if (copyrightProtectionSystemType == "none")
|
||||
#else
|
||||
copyrightProtectionSystemType = line["protection system type: ".Length..];
|
||||
#endif
|
||||
if (copyrightProtectionSystemType == "none" || copyrightProtectionSystemType == "<none>")
|
||||
copyrightProtectionSystemType = "No";
|
||||
}
|
||||
else if (line.StartsWith("region management information:"))
|
||||
{
|
||||
#if NET48
|
||||
region = line.Substring("region management information: ".Length);
|
||||
#else
|
||||
region = line["region management information: ".Length..];
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("disc key"))
|
||||
{
|
||||
#if NET48
|
||||
decryptedDiscKey = line.Substring("disc key: ".Length).Replace(':', ' ');
|
||||
#else
|
||||
decryptedDiscKey = line["disc key: ".Length..].Replace(':', ' ');
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("title keys"))
|
||||
{
|
||||
@@ -1287,7 +1311,7 @@ namespace MPF.Modules.Redumper
|
||||
if (match.Success)
|
||||
{
|
||||
string normalizedKey = match.Groups[2].Value.Replace(':', ' ');
|
||||
if (normalizedKey == "<none>")
|
||||
if (normalizedKey == "none" || normalizedKey == "<none>")
|
||||
normalizedKey = "No Title Key";
|
||||
else if (normalizedKey == "<error>")
|
||||
normalizedKey = "Error Retrieving Title Key";
|
||||
@@ -1416,7 +1440,11 @@ namespace MPF.Modules.Redumper
|
||||
else if (line.StartsWith("layer break:"))
|
||||
{
|
||||
// layer break: <layerbreak>
|
||||
#if NET48
|
||||
layerbreak = line.Substring("layer break: ".Length).Trim();
|
||||
#else
|
||||
layerbreak = line["layer break: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Dual-layer discs have a regular layerbreak (old)
|
||||
@@ -1424,7 +1452,11 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
// data { LBA: <startLBA> .. <endLBA>, length: <length>, hLBA: <startLBA> .. <endLBA> }
|
||||
string[] split = line.Split(' ').Where(s => !string.IsNullOrEmpty(s)).ToArray();
|
||||
layerbreak = layerbreak == null ? split[7].TrimEnd(',') : layerbreak;
|
||||
#if NET48
|
||||
layerbreak = layerbreak ?? split[7].TrimEnd(',');
|
||||
#else
|
||||
layerbreak ??= split[7].TrimEnd(',');
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1471,11 +1503,19 @@ namespace MPF.Modules.Redumper
|
||||
|
||||
// Store the first session range
|
||||
if (line.Contains("session 1:"))
|
||||
#if NET48
|
||||
firstSession = line.Substring("session 1: ".Length).Trim();
|
||||
#else
|
||||
firstSession = line["session 1: ".Length..].Trim();
|
||||
#endif
|
||||
|
||||
// Store the secomd session range
|
||||
else if (line.Contains("session 2:"))
|
||||
#if NET48
|
||||
secondSession = line.Substring("session 2: ".Length).Trim();
|
||||
#else
|
||||
secondSession = line["session 2: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
|
||||
// If either is blank, we don't have multisession
|
||||
@@ -1555,9 +1595,9 @@ namespace MPF.Modules.Redumper
|
||||
if (line == null)
|
||||
return false;
|
||||
|
||||
if (line.StartsWith("EDC: no"))
|
||||
if (line.Contains("EDC: no"))
|
||||
return false;
|
||||
else if (line.StartsWith("EDC: yes"))
|
||||
else if (line.Contains("EDC: yes"))
|
||||
return true;
|
||||
|
||||
line = sr.ReadLine().Trim();
|
||||
@@ -1710,7 +1750,11 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
line = sr.ReadLine().TrimStart();
|
||||
if (line.StartsWith("non-zero data sample range"))
|
||||
#if NET48
|
||||
return line.Substring("non-zero data sample range: [".Length).Trim().Split(' ')[0];
|
||||
#else
|
||||
return line["non-zero data sample range: [".Length..].Trim().Split(' ')[0];
|
||||
#endif
|
||||
}
|
||||
|
||||
// We couldn't detect it then
|
||||
@@ -1742,11 +1786,19 @@ namespace MPF.Modules.Redumper
|
||||
try
|
||||
{
|
||||
string[] header = segaHeader.Split('\n');
|
||||
#if NET48
|
||||
string serialVersionLine = header[2].Substring(58);
|
||||
string dateLine = header[3].Substring(58);
|
||||
serial = serialVersionLine.Substring(0, 10).Trim();
|
||||
version = serialVersionLine.Substring(10, 6).TrimStart('V', 'v');
|
||||
date = dateLine.Substring(0, 8);
|
||||
#else
|
||||
string serialVersionLine = header[2][58..];
|
||||
string dateLine = header[3][58..];
|
||||
serial = serialVersionLine[..10].Trim();
|
||||
version = serialVersionLine.Substring(10, 6).TrimStart('V', 'v');
|
||||
date = dateLine[..8];
|
||||
#endif
|
||||
date = $"{date[0]}{date[1]}{date[2]}{date[3]}-{date[4]}{date[5]}-{date[6]}{date[7]}";
|
||||
return true;
|
||||
}
|
||||
@@ -1835,19 +1887,35 @@ namespace MPF.Modules.Redumper
|
||||
line = sr.ReadLine().TrimStart();
|
||||
if (line.StartsWith("build date:"))
|
||||
{
|
||||
#if NET48
|
||||
buildDate = line.Substring("build date: ".Length).Trim();
|
||||
#else
|
||||
buildDate = line["build date: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("serial:"))
|
||||
{
|
||||
#if NET48
|
||||
serial = line.Substring("serial: ".Length).Trim();
|
||||
#else
|
||||
serial = line["serial: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("region:"))
|
||||
{
|
||||
#if NET48
|
||||
region = line.Substring("region: ".Length).Trim();
|
||||
#else
|
||||
region = line["region: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("regions:"))
|
||||
{
|
||||
#if NET48
|
||||
region = line.Substring("regions: ".Length).Trim();
|
||||
#else
|
||||
region = line["regions: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
else if (line.StartsWith("header:"))
|
||||
{
|
||||
@@ -1895,7 +1963,11 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
line = sr.ReadLine().TrimStart();
|
||||
if (line.StartsWith("Universal Hash"))
|
||||
#if NET48
|
||||
return line.Substring("Universal Hash (SHA-1): ".Length).Trim();
|
||||
#else
|
||||
return line["Universal Hash (SHA-1): ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
|
||||
// We couldn't detect it then
|
||||
@@ -1930,7 +2002,11 @@ namespace MPF.Modules.Redumper
|
||||
{
|
||||
line = sr.ReadLine().TrimStart();
|
||||
if (line.StartsWith("disc write offset"))
|
||||
#if NET48
|
||||
return line.Substring("disc write offset: ".Length).Trim();
|
||||
#else
|
||||
return line["disc write offset: ".Length..].Trim();
|
||||
#endif
|
||||
}
|
||||
|
||||
// We couldn't detect it then
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace MPF.Test.Library
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null, null)]
|
||||
[InlineData(" ", " ")]
|
||||
[InlineData(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")]
|
||||
@@ -63,7 +63,7 @@ namespace MPF.Test.Library
|
||||
if (!string.IsNullOrWhiteSpace(expectedPath))
|
||||
expectedPath = Path.GetFullPath(expectedPath);
|
||||
|
||||
string actualPath = InfoTool.NormalizeOutputPaths(outputPath);
|
||||
string actualPath = InfoTool.NormalizeOutputPaths(outputPath, true);
|
||||
Assert.Equal(expectedPath, actualPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,22 +33,22 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeCoverage" Version="17.6.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Microsoft.CodeCoverage" Version="17.7.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.1.1" />
|
||||
<PackageReference Include="xunit" Version="2.5.0" />
|
||||
<PackageReference Include="xunit" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.2.0" />
|
||||
<PackageReference Include="xunit.assert" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.core" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.extensibility.core" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.extensibility.execution" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.5.0">
|
||||
<PackageReference Include="xunit.analyzers" Version="1.3.0" />
|
||||
<PackageReference Include="xunit.assert" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.core" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.extensibility.core" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.extensibility.execution" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.5.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
ShowInTaskbar="False"
|
||||
ResizeMode="NoResize" SizeToContent="WidthAndHeight"
|
||||
TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType" UseLayoutRounding="True"
|
||||
Title="" MinHeight="155" MaxWidth="470" MinWidth="154"
|
||||
|
||||
@@ -91,6 +91,9 @@ namespace WPFCustomMessageBox
|
||||
InitializeComponent();
|
||||
|
||||
_removeTitleBarIcon = removeTitleBarIcon;
|
||||
Focusable = true;
|
||||
ShowActivated = true;
|
||||
ShowInTaskbar = true;
|
||||
|
||||
if (owner != null)
|
||||
{
|
||||
|
||||
@@ -2,16 +2,12 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0-windows;net7.0-windows</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>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-2023</Copyright>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -31,7 +27,7 @@
|
||||
<ProjectReference Include="..\MPF.Library\MPF.Library.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -292,14 +292,14 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.DiscOffset.Text = SubmissionInfo.TracksAndWriteOffsets.OtherWriteOffsets;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.DMIHash) != true)
|
||||
Parent.DMIHash.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.CommonDiscInfo?.ErrorsCount))
|
||||
Parent.ErrorsCount.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.CommonDiscInfo?.EXEDateBuildDate))
|
||||
Parent.EXEDateBuildDate.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.EDC?.EDC == null)
|
||||
Parent.EDC.Visibility = Visibility.Collapsed;
|
||||
else
|
||||
Parent.EDC.Text = SubmissionInfo.EDC.EDC.LongName();
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.CommonDiscInfo?.ErrorsCount))
|
||||
Parent.ErrorsCount.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.CommonDiscInfo?.EXEDateBuildDate))
|
||||
Parent.EXEDateBuildDate.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.Filename) != true)
|
||||
Parent.Filename.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.Extras?.Header))
|
||||
@@ -308,6 +308,8 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.InternalName.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.InternalSerialName) != true)
|
||||
Parent.InternalSerialName.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CommonDiscInfo?.CommentsSpecialFields.Keys.Contains(SiteCode.Multisession) != true)
|
||||
Parent.Multisession.Visibility = Visibility.Collapsed;
|
||||
if (SubmissionInfo?.CopyProtection?.LibCrypt == null)
|
||||
Parent.LibCrypt.Visibility = Visibility.Collapsed;
|
||||
else
|
||||
@@ -320,8 +322,6 @@ namespace MPF.UI.Core.ViewModels
|
||||
Parent.PIC.Visibility = Visibility.Collapsed;
|
||||
if (string.IsNullOrWhiteSpace(SubmissionInfo?.Extras?.PVD))
|
||||
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))
|
||||
|
||||
@@ -505,7 +505,14 @@ namespace MPF.UI.Core.ViewModels
|
||||
/// </summary>
|
||||
public void ShowOptionsWindow()
|
||||
{
|
||||
var optionsWindow = new OptionsWindow(this.Options) { Owner = this.Parent };
|
||||
var optionsWindow = new OptionsWindow(this.Options)
|
||||
{
|
||||
Focusable = true,
|
||||
Owner = this.Parent,
|
||||
ShowActivated = true,
|
||||
ShowInTaskbar = true,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
};
|
||||
optionsWindow.Closed += OnOptionsUpdated;
|
||||
optionsWindow.Show();
|
||||
}
|
||||
@@ -590,7 +597,7 @@ namespace MPF.UI.Core.ViewModels
|
||||
{
|
||||
if (optionsWindow?.OptionsViewModel.SavedSettings == true)
|
||||
{
|
||||
this.Options.SetFromExisting(optionsWindow.OptionsViewModel.Options);
|
||||
this.Options = new MPF.Core.Data.Options(optionsWindow.OptionsViewModel.Options);
|
||||
InitializeUIValues(removeEventHandlers: true, rescanDrives: true);
|
||||
}
|
||||
}
|
||||
@@ -933,7 +940,12 @@ namespace MPF.UI.Core.ViewModels
|
||||
if (Drives == null || Drives.Count == 0 || this.Parent.DriveLetterComboBox.SelectedIndex == -1)
|
||||
{
|
||||
if (this.Options.VerboseLogging)
|
||||
this.Logger.VerboseLog("Skipping system type detection because no valid drives found!");
|
||||
this.Logger.VerboseLogLn("Skipping system type detection because no valid drives found!");
|
||||
}
|
||||
else if ((this.Parent.DriveLetterComboBox.SelectedItem as Drive)?.MarkedActive != true)
|
||||
{
|
||||
if (this.Options.VerboseLogging)
|
||||
this.Logger.VerboseLogLn("Skipping system type detection because drive not marked as active!");
|
||||
}
|
||||
else if (!this.Options.SkipSystemDetection)
|
||||
{
|
||||
@@ -953,7 +965,7 @@ namespace MPF.UI.Core.ViewModels
|
||||
{
|
||||
var currentSystem = this.Options.DefaultSystem;
|
||||
if (this.Options.VerboseLogging)
|
||||
this.Logger.VerboseLog($"System detection disabled, setting to default of {currentSystem.LongName()}.");
|
||||
this.Logger.VerboseLogLn($"System detection disabled, setting to default of {currentSystem.LongName()}.");
|
||||
int sysIndex = Systems.FindIndex(s => s == currentSystem);
|
||||
this.Parent.SystemTypeComboBox.SelectedIndex = sysIndex;
|
||||
}
|
||||
@@ -1033,8 +1045,9 @@ namespace MPF.UI.Core.ViewModels
|
||||
else if (driveChanged)
|
||||
{
|
||||
string label = drive?.FormattedVolumeLabel ?? systemType.LongName();
|
||||
string oldFilename = Path.GetFileNameWithoutExtension(this.Parent.OutputPathTextBox.Text);
|
||||
string directory = Path.GetDirectoryName(this.Parent.OutputPathTextBox.Text);
|
||||
string oldPath = InfoTool.NormalizeOutputPaths(this.Parent.OutputPathTextBox.Text, false);
|
||||
string oldFilename = Path.GetFileNameWithoutExtension(oldPath);
|
||||
string directory = Path.GetDirectoryName(oldPath);
|
||||
string filename = $"{label}{extension ?? ".bin"}";
|
||||
|
||||
// If the previous path included the label
|
||||
@@ -1051,8 +1064,9 @@ namespace MPF.UI.Core.ViewModels
|
||||
// Otherwise, reset the extension of the currently set path
|
||||
else
|
||||
{
|
||||
string filename = Path.GetFileNameWithoutExtension(this.Parent.OutputPathTextBox.Text);
|
||||
string directory = Path.GetDirectoryName(this.Parent.OutputPathTextBox.Text);
|
||||
string oldPath = InfoTool.NormalizeOutputPaths(this.Parent.OutputPathTextBox.Text, false);
|
||||
string filename = Path.GetFileNameWithoutExtension(oldPath);
|
||||
string directory = Path.GetDirectoryName(oldPath);
|
||||
filename = $"{filename}{extension ?? ".bin"}";
|
||||
|
||||
this.Parent.OutputPathTextBox.Text = Path.Combine(directory, filename);
|
||||
@@ -1089,9 +1103,7 @@ namespace MPF.UI.Core.ViewModels
|
||||
// Disable change handling
|
||||
DisableEventHandlers();
|
||||
|
||||
string trimmedPath = Env.Parameters.OutputPath?.Trim('"') ?? string.Empty;
|
||||
trimmedPath = InfoTool.NormalizeOutputPaths(trimmedPath);
|
||||
this.Parent.OutputPathTextBox.Text = trimmedPath;
|
||||
this.Parent.OutputPathTextBox.Text = InfoTool.NormalizeOutputPaths(Env.Parameters.OutputPath, true);
|
||||
|
||||
MediaType? mediaType = Env.Parameters.GetMediaType();
|
||||
int mediaTypeIndex = MediaTypes.FindIndex(m => m == mediaType);
|
||||
@@ -1113,7 +1125,7 @@ namespace MPF.UI.Core.ViewModels
|
||||
|
||||
// Pull the drive letter from the UI directly, just in case
|
||||
var drive = this.Parent.DriveLetterComboBox.SelectedItem as Drive;
|
||||
if (drive.Letter != default(char))
|
||||
if (drive != null && drive.Letter != default(char))
|
||||
{
|
||||
if (this.Options.VerboseLogging)
|
||||
this.Logger.VerboseLogLn($"Scanning for copy protection in {drive.Letter}");
|
||||
@@ -1246,7 +1258,10 @@ namespace MPF.UI.Core.ViewModels
|
||||
|
||||
var discInformationWindow = new DiscInformationWindow(this.Options, submissionInfo)
|
||||
{
|
||||
Focusable = true,
|
||||
Owner = this.Parent,
|
||||
ShowActivated = true,
|
||||
ShowInTaskbar = true,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
};
|
||||
bool? result = discInformationWindow.ShowDialog();
|
||||
|
||||
@@ -181,6 +181,11 @@
|
||||
ToolTip="Enable showing the disc information output after dumping" Margin="0,4"
|
||||
/>
|
||||
|
||||
<CheckBox VerticalAlignment="Center" Content="Pull All Information"
|
||||
IsChecked="{Binding Options.PullAllInformation}"
|
||||
ToolTip="Enable pulling all comment and content data after dumping" Margin="0,4"
|
||||
/>
|
||||
|
||||
<CheckBox VerticalAlignment="Center" Content="Enable Tab Input"
|
||||
IsChecked="{Binding Options.EnableTabsInInputFields}"
|
||||
ToolTip="Enable entering tabs in supported input fields instead of tab navigation" Margin="0,4"
|
||||
|
||||
2
MPF.sln
2
MPF.sln
@@ -19,8 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
.github\ISSUE_TEMPLATE\informational.md = .github\ISSUE_TEMPLATE\informational.md
|
||||
.github\ISSUE_TEMPLATE\issue-report.md = .github\ISSUE_TEMPLATE\issue-report.md
|
||||
publish-nix.sh = publish-nix.sh
|
||||
README.md = README.md
|
||||
publish-win.bat = publish-win.bat
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MPF.Core", "MPF.Core\MPF.Core.csproj", "{70B1265D-FE49-472A-A83D-0B462152D37A}"
|
||||
|
||||
@@ -2,20 +2,16 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net48;net6.0-windows;net7.0-windows</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win7-x64;win8-x64;win81-x64;win10-x64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ApplicationIcon>Images\Icon.ico</ApplicationIcon>
|
||||
<Title>MPF</Title>
|
||||
<AssemblyName>MPF</AssemblyName>
|
||||
<Description>Frontend for various dumping programs</Description>
|
||||
<Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
|
||||
<Copyright>Copyright (c)2019-2023</Copyright>
|
||||
<RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
|
||||
<Version>2.6.4</Version>
|
||||
<IncludeSource>true</IncludeSource>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<Version>2.6.6</Version>
|
||||
<InternalsVisibleTo>MPF.Test</InternalsVisibleTo>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -35,7 +31,7 @@
|
||||
<ProjectReference Include="..\MPF.UI.Core\MPF.UI.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -44,7 +40,6 @@
|
||||
<IncludeAssets>runtime; compile; build; native; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.1.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>
|
||||
|
||||
20
README.md
20
README.md
@@ -15,7 +15,7 @@ For those who like to test the newest features, download the latest AppVeyor WIP
|
||||
|
||||
## Media Preservation Frontend (MPF)
|
||||
|
||||
MPF is the main, UI-centric application of the MPF suite. This program allows users to use Redumper, Aaru, DiscImageCreator, or dd for Windows in a more user-friendly way. Each backend dumping program is supported as fully as possible to ensure that all information is captured on output. There are many customization options and quality of life settings that can be access through the Options menu.
|
||||
MPF is the main, UI-centric application of the MPF suite. This program allows users to use Redumper, Aaru, or DiscImageCreator in a more user-friendly way. Each backend dumping program is supported as fully as possible to ensure that all information is captured on output. There are many customization options and quality of life settings that can be access through the Options menu.
|
||||
|
||||
### System Requirements
|
||||
|
||||
@@ -27,7 +27,7 @@ MPF is the main, UI-centric application of the MPF suite. This program allows us
|
||||
```
|
||||
- Alternatively, look at this [StackOverflow question](https://stackoverflow.com/questions/403731/strong-name-validation-failed) for more information.
|
||||
|
||||
- .NET Framework 4.8 or .NET 6.0 Runtimes
|
||||
- .NET Framework 4.8 .NET 6.0, or .NET 7.0 Runtimes
|
||||
- As much hard drive space as the amount of discs you will be dumping (20+ GB recommended)
|
||||
|
||||
Ensure that your operating system is as up-to-date as possible, since some features may rely on those updates.
|
||||
@@ -50,23 +50,21 @@ dotnet restore
|
||||
msbuild MPF\MPF.csproj -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
|
||||
```
|
||||
|
||||
To build for .NET 6.0 (Windows only), ensure that the .NET 6.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, or Terminal:
|
||||
To build for .NET 6.0 or .NET 7.0 (Windows only), ensure that the .NET 7.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, or Terminal:
|
||||
|
||||
```
|
||||
dotnet build MPF\MPF.csproj --framework net6.0-windows --runtime [win7-x64|win8-x64|win81-x64|win10-x64]
|
||||
dotnet build MPF\MPF.csproj --framework net6.0-windows --runtime [win-x64]
|
||||
```
|
||||
|
||||
Choose one of `[win7-x64|win8-x64|win81-x64|win10-x64]` depending on the machine you are targeting. `win10-x64` also includes Windows 11.
|
||||
|
||||
|
||||
## Media Preservation Frontend Checker (MPF.Check)
|
||||
|
||||
MPF.Check is a commandline-only program that allows users to generate submission information from their personal rips. This program supports the outputs from Redumper, Aaru, DiscImageCreator, dd for Windows, Cleanrip, and UmdImageCreator. Running this program without any parameters will display the help text, including all supported parameters.
|
||||
MPF.Check is a commandline-only program that allows users to generate submission information from their personal rips. This program supports the outputs from Redumper, Aaru, DiscImageCreator, Cleanrip, and UmdImageCreator. Running this program without any parameters will display the help text, including all supported parameters.
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Windows 8.1 (x86 or x64) or newer, GNU/Linux x64, or OSX x64
|
||||
- .NET Framework 4.8 (Windows or `mono` only) or .NET 6.0 Runtimes
|
||||
- .NET Framework 4.8 (Windows or `mono` only), .NET 6.0, or .NET 7.0 Runtimes
|
||||
|
||||
### Build Instructions
|
||||
|
||||
@@ -77,13 +75,13 @@ dotnet restore
|
||||
msbuild MPF.Check\MPF.Check.csproj -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
|
||||
```
|
||||
|
||||
To build for .NET 6.0 (All supported OSes), ensure that the .NET 6.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, Terminal, or shell:
|
||||
To build for .NET 6.0 and .NET 7.0 (All supported OSes), ensure that the .NET 7.0 SDK (or later) is installed and included in your PATH. Then, run the following commands from command prompt, Powershell, Terminal, or shell:
|
||||
|
||||
```
|
||||
dotnet build MPF.Check\MPF.Check.csproj --framework net6.0 --runtime [win7-x64|win8-x64|win81-x64|win10-x64|linux-x64|osx-x64]
|
||||
dotnet build MPF.Check\MPF.Check.csproj --framework net6.0 --runtime [win-x64linux-x64|osx-x64]
|
||||
```
|
||||
|
||||
Choose one of `[win7-x64|win8-x64|win81-x64|win10-x64|linux-x64|osx-x64]` depending on the machine you are targeting. `win10-x64` also includes Windows 11.
|
||||
Choose one of `[win-x64|linux-x64|osx-x64]` depending on the machine you are targeting.
|
||||
|
||||
## Information
|
||||
|
||||
|
||||
221
appveyor.yml
221
appveyor.yml
@@ -1,5 +1,5 @@
|
||||
# version format
|
||||
version: 2.6.4-{build}
|
||||
version: 2.6.6-{build}
|
||||
|
||||
# pull request template
|
||||
pull_requests:
|
||||
@@ -24,21 +24,37 @@ before_build:
|
||||
build_script:
|
||||
- dotnet restore
|
||||
|
||||
# .NET Framework 4.8
|
||||
# .NET Framework 4.8 Debug
|
||||
- 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 win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
# # .NET Framework 4.8 Release
|
||||
# - msbuild MPF\MPF.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
|
||||
# - msbuild MPF.Check\MPF.Check.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
|
||||
|
||||
# .NET 6.0 Debug
|
||||
- dotnet publish MPF\MPF.csproj -f net6.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# # .NET 6.0 Release
|
||||
# - dotnet publish MPF\MPF.csproj -f net6.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# .NET 7.0 Debug
|
||||
- dotnet publish MPF\MPF.csproj -f net7.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
- dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# # .NET 7.0 Release
|
||||
# - dotnet publish MPF\MPF.csproj -f net7.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
# - dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# post-build step
|
||||
after_build:
|
||||
@@ -46,72 +62,77 @@ after_build:
|
||||
# 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\win7-x64\publish\Programs\Aaru *
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\win8-x64\publish\Programs\Aaru *
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\win81-x64\publish\Programs\Aaru *
|
||||
- 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Debug\net6.0-windows\win10-x64\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\net7.0-windows\win-x64\publish\Programs\Aaru *
|
||||
# - 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Release\net48\publish\Programs\Aaru *
|
||||
# - 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Release\net6.0-windows\win-x64\publish\Programs\Aaru *
|
||||
# - 7z x aaru-5.3.2_windows_x64.zip -oMPF\bin\Release\net7.0-windows\win-x64\publish\Programs\Aaru *
|
||||
|
||||
# DiscImageCreator
|
||||
- ps: appveyor DownloadFile https://github.com/saramibreak/DiscImageCreator/files/11660558/DiscImageCreator_20230606.zip
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net48\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net6.0-windows\win7-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net6.0-windows\win8-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net6.0-windows\win81-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net6.0-windows\win10-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\Creator Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20230606.zip -oMPF\bin\Debug\net7.0-windows\win-x64\publish\Programs\Creator Release_ANSI\*
|
||||
# - 7z e DiscImageCreator_20230606.zip -oMPF\bin\Release\net48\publish\Programs\Creator Release_ANSI\*
|
||||
# - 7z e DiscImageCreator_20230606.zip -oMPF\bin\Release\net6.0-windows\win-x64\publish\Programs\Creator Release_ANSI\*
|
||||
# - 7z e DiscImageCreator_20230606.zip -oMPF\bin\Release\net7.0-windows\win-x64\publish\Programs\Creator Release_ANSI\*
|
||||
|
||||
# Redumper
|
||||
- ps: appveyor DownloadFile https://github.com/superg/redumper/releases/download/build_195/redumper-2023.07.19_build195-win64.zip
|
||||
- 7z e redumper-2023.07.19_build195-win64.zip -oMPF\bin\Debug\net48\publish\Programs\Redumper redumper-2023.07.19_build195-win64\bin\*
|
||||
- 7z e redumper-2023.07.19_build195-win64.zip -oMPF\bin\Debug\net6.0-windows\win7-x64\publish\Programs\Redumper redumper-2023.07.19_build195-win64\bin\*
|
||||
- 7z e redumper-2023.07.19_build195-win64.zip -oMPF\bin\Debug\net6.0-windows\win8-x64\publish\Programs\Redumper redumper-2023.07.19_build195-win64\bin\*
|
||||
- 7z e redumper-2023.07.19_build195-win64.zip -oMPF\bin\Debug\net6.0-windows\win81-x64\publish\Programs\Redumper redumper-2023.07.19_build195-win64\bin\*
|
||||
- 7z e redumper-2023.07.19_build195-win64.zip -oMPF\bin\Debug\net6.0-windows\win10-x64\publish\Programs\Redumper redumper-2023.07.19_build195-win64\bin\*
|
||||
- ps: appveyor DownloadFile https://github.com/superg/redumper/releases/download/build_221/redumper-2023.10.02_build221-win64.zip
|
||||
- 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Debug\net48\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
- 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Debug\net6.0-windows\win-x64\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
- 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Debug\net7.0-windows\win-x64\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
# - 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Release\net48\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
# - 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Release\net6.0-windows\win-x64\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
# - 7z e redumper-2023.10.02_build221-win64.zip -oMPF\bin\Release\net7.0-windows\win-x64\publish\Programs\Redumper redumper-2023.10.02_build221-win64\bin\*
|
||||
|
||||
# Subdump
|
||||
- ps: appveyor DownloadFile https://archive.org/download/subdump_fua_0x28/subdump_fua_0x28.zip
|
||||
- 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-windows *
|
||||
- mkdir MPF\bin\Debug\net6.0-windows\win7-x64\publish\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net6.0-windows\subdump_fua_0x28.exe MPF\bin\Debug\net6.0-windows\win7-x64\publish\Programs\Subdump\subdump.exe
|
||||
- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net6.0-windows *
|
||||
- mkdir MPF\bin\Debug\net6.0-windows\win8-x64\publish\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net6.0-windows\subdump_fua_0x28.exe MPF\bin\Debug\net6.0-windows\win8-x64\publish\Programs\Subdump\subdump.exe
|
||||
- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net6.0-windows *
|
||||
- mkdir MPF\bin\Debug\net6.0-windows\win81-x64\publish\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net6.0-windows\subdump_fua_0x28.exe MPF\bin\Debug\net6.0-windows\win81-x64\publish\Programs\Subdump\subdump.exe
|
||||
- 7z e subdump_fua_0x28.zip -oMPF\bin\Debug\net6.0-windows *
|
||||
- mkdir MPF\bin\Debug\net6.0-windows\win10-x64\publish\Programs\Subdump
|
||||
- mv MPF\bin\Debug\net6.0-windows\subdump_fua_0x28.exe MPF\bin\Debug\net6.0-windows\win10-x64\publish\Programs\Subdump\subdump.exe
|
||||
|
||||
# MPF
|
||||
# Create MPF Debug archives
|
||||
- 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\win7-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win7-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win8-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win8-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win81-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win81-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win10-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win10-x64.zip *
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF-dbg_net48.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF-dbg_net6.0_win-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Debug\net7.0-windows\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF-dbg_net7.0_win-x64.zip *
|
||||
|
||||
# MPF.Check
|
||||
# # Create MPF Release archives
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Release\net48\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net48.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net6.0_win-x64.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF_net7.0_win-x64.zip *
|
||||
|
||||
# Create MPF.Check Debug archives
|
||||
- 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\win7-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win7-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win8-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win8-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win81-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win81-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win10-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_win10-x64.zip *
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_net48.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_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 *
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_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 *
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_net6.0_osx-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\win-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_net7.0_win-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\linux-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_net7.0_linux-x64.zip *
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\osx-x64\publish\
|
||||
- 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check-dbg_net7.0_osx-x64.zip *
|
||||
|
||||
# # Create MPF.Check Release archives
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Release\net48\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net48.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Release\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\Release\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\Release\net6.0\osx-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net7.0_win-x64.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\linux-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net7.0_linux-x64.zip *
|
||||
# - cd %APPVEYOR_BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\osx-x64\publish\
|
||||
# - 7z a -tzip %APPVEYOR_BUILD_FOLDER%\MPF.Check_net7.0_osx-x64.zip *
|
||||
|
||||
# success/failure tracking
|
||||
on_success:
|
||||
@@ -123,28 +144,46 @@ on_failure:
|
||||
|
||||
# artifact linking
|
||||
artifacts:
|
||||
- path: MPF_net48.zip
|
||||
name: MPF (.NET Framework 4.8)
|
||||
- path: MPF_net6.0_win7-x64.zip
|
||||
name: MPF (.NET 6.0, Windows 7 x64)
|
||||
- path: MPF_net6.0_win8-x64.zip
|
||||
name: MPF (.NET 6.0, Windows 8 x64)
|
||||
- path: MPF_net6.0_win81-x64.zip
|
||||
name: MPF (.NET 6.0, Windows 8.1 x64)
|
||||
- path: MPF_net6.0_win10-x64.zip
|
||||
name: MPF (.NET 6.0, Windows 10 x64)
|
||||
- path: MPF-dbg_net48.zip
|
||||
name: MPF (.NET Framework 4.8, Debug)
|
||||
- path: MPF-dbg_net6.0_win-x64.zip
|
||||
name: MPF (.NET 6.0, Debug, Windows x64)
|
||||
- path: MPF-dbg_net7.0_win-x64.zip
|
||||
name: MPF (.NET 7.0, Debug, Windows x64)
|
||||
|
||||
- path: MPF.Check_net48.zip
|
||||
name: MPF Check (.NET Framework 4.8)
|
||||
- path: MPF.Check_net6.0_win7-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Windows 7 x64)
|
||||
- path: MPF.Check_net6.0_win8-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Windows 8 x64)
|
||||
- path: MPF.Check_net6.0_win81-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Windows 8.1 x64)
|
||||
- path: MPF.Check_net6.0_win10-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Windows 10 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)
|
||||
# - path: MPF_net48.zip
|
||||
# name: MPF (.NET Framework 4.8, Release)
|
||||
# - path: MPF_net6.0_win-x64.zip
|
||||
# name: MPF (.NET 6.0, Release, Windows x64)
|
||||
# - path: MPF_net7.0_win-x64.zip
|
||||
# name: MPF (.NET 7.0, Release, Windows x64)
|
||||
|
||||
- path: MPF.Check-dbg_net48.zip
|
||||
name: MPF Check (.NET Framework 4.8, Debug)
|
||||
- path: MPF.Check-dbg_net6.0_win-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Debug, Windows x64)
|
||||
- path: MPF.Check-dbg_net6.0_linux-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Debug, Linux x64)
|
||||
- path: MPF.Check-dbg_net6.0_osx-x64.zip
|
||||
name: MPF.Check (.NET 6.0, Debug, OSX x64)
|
||||
- path: MPF.Check-dbg_net7.0_win-x64.zip
|
||||
name: MPF.Check (.NET 7.0, Debug, Windows x64)
|
||||
- path: MPF.Check-dbg_net7.0_linux-x64.zip
|
||||
name: MPF.Check (.NET 7.0, Debug, Linux x64)
|
||||
- path: MPF.Check-dbg_net7.0_osx-x64.zip
|
||||
name: MPF.Check (.NET 7.0, Debug, OSX x64)
|
||||
|
||||
# - path: MPF.Check_net48.zip
|
||||
# name: MPF Check (.NET Framework 4.8, Release)
|
||||
# - path: MPF.Check_net6.0_win-x64.zip
|
||||
# name: MPF.Check (.NET 6.0, Release, Windows x64)
|
||||
# - path: MPF.Check_net6.0_linux-x64.zip
|
||||
# name: MPF.Check (.NET 6.0, Release, Linux x64)
|
||||
# - path: MPF.Check_net6.0_osx-x64.zip
|
||||
# name: MPF.Check (.NET 6.0, Release, OSX x64)
|
||||
# - path: MPF.Check_net7.0_win-x64.zip
|
||||
# name: MPF.Check (.NET 7.0, Release, Windows x64)
|
||||
# - path: MPF.Check_net7.0_linux-x64.zip
|
||||
# name: MPF.Check (.NET 7.0, Release, Linux x64)
|
||||
# - path: MPF.Check_net7.0_osx-x64.zip
|
||||
# name: MPF.Check (.NET 7.0, Release, OSX x64)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
#! /bin/bash
|
||||
|
||||
# This batch file assumes the following:
|
||||
# - .NET 6.0 (or newer) SDK is installed and in PATH
|
||||
# - .NET 7.0 (or newer) SDK is installed and in PATH
|
||||
# - zip is installed and in PATH
|
||||
# - The relevant commandline programs are already downloaded
|
||||
# and put into their respective folders
|
||||
@@ -19,39 +19,70 @@ BUILD_FOLDER=$PWD
|
||||
echo "Restoring Nuget packages"
|
||||
dotnet restore
|
||||
|
||||
# .NET 6.0
|
||||
echo "Building .NET 6.0 releases"
|
||||
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
#dotnet publish MPF/MPF.csproj --framework net6.0-windows --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
# .NET 6.0 Debug
|
||||
echo "Building .NET 6.0 debug"
|
||||
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# Create MPF archives
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win7-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net6.0_win7-x64.zip .
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win8-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net6.0_win8-x64.zip .
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win81-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net6.0_win81-x64.zip .
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win10-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net6.0_win10-x64.zip .
|
||||
# .NET 6.0 Release
|
||||
echo "Building .NET 6.0 release"
|
||||
#dotnet publish MPF/MPF.csproj -f net6.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
|
||||
# Create MPF.Check archives
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win7-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win7-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win8-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win8-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win81-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win81-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win10-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win10-x64.zip .
|
||||
# .NET 7.0 Debug
|
||||
echo "Building .NET 7.0 debug"
|
||||
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
# .NET 7.0 Release
|
||||
echo "Building .NET 7.0 release"
|
||||
#dotnet publish MPF/MPF.csproj -f net7.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
dotnet publish MPF.Check/MPF.Check.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
|
||||
# Create MPF Debug archives
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net6.0-windows/win-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF-dbg_net6.0_win-x64.zip .
|
||||
#cd $BUILD_FOLDER/MPF/bin/Debug/net7.0-windows/win-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF-dbg_net7.0_win-x64.zip .
|
||||
|
||||
# Create MPF Release archives
|
||||
#cd $BUILD_FOLDER/MPF/bin/Release/net6.0-windows/win-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net6.0_win-x64.zip .
|
||||
#cd $BUILD_FOLDER/MPF/bin/Release/net7.0-windows/win-x64/publish/
|
||||
#zip -r $BUILD_FOLDER/MPF_net7.0_win-x64.zip .
|
||||
|
||||
# Create MPF.Check Debug archives
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/win-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net6.0_win-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/linux-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_linux-x64.zip .
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net6.0_linux-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net6.0/osx-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_osx-x64.zip .
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net6.0_osx-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net7.0/win-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net7.0_win-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net7.0/linux-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net7.0_linux-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Debug/net7.0/osx-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check-dbg_net7.0_osx-x64.zip .
|
||||
|
||||
# Create MPF.Check Release archives
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/win-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_win-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/linux-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_linux-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net6.0/osx-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net6.0_osx-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/win-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net7.0_win-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/linux-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net7.0_linux-x64.zip .
|
||||
cd $BUILD_FOLDER/MPF.Check/bin/Release/net7.0/osx-x64/publish/
|
||||
zip -r $BUILD_FOLDER/MPF.Check_net7.0_osx-x64.zip .
|
||||
114
publish-win.bat
114
publish-win.bat
@@ -2,7 +2,7 @@
|
||||
|
||||
REM This batch file assumes the following:
|
||||
REM - .NET Framework 4.8 SDK is installed and in PATH
|
||||
REM - .NET 6.0 (or newer) SDK is installed and in PATH
|
||||
REM - .NET 7.0 (or newer) SDK is installed and in PATH
|
||||
REM - 7-zip commandline (7z.exe) is installed and in PATH
|
||||
REM - The relevant commandline programs are already downloaded
|
||||
REM and put into their respective folders
|
||||
@@ -17,48 +17,88 @@ REM Restore Nuget packages for all builds
|
||||
echo Restoring Nuget packages
|
||||
dotnet restore
|
||||
|
||||
REM .NET Framework 4.8
|
||||
echo Building .NET Framework 4.8 releases
|
||||
REM .NET Framework 4.8 Debug
|
||||
echo Building .NET Framework 4.8 debug
|
||||
msbuild MPF\MPF.csproj -target:Publish -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
|
||||
msbuild MPF.Check\MPF.Check.csproj -target:Publish -property:TargetFramework=net48 -property:RuntimeIdentifiers=win7-x64
|
||||
|
||||
REM .NET 6.0
|
||||
echo Building .NET 6.0 releases
|
||||
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF\MPF.csproj --framework net6.0-windows --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win7-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win8-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win81-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime win10-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj --framework net6.0 --runtime osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
REM .NET Framework 4.8 Release
|
||||
echo Building .NET Framework 4.8 release
|
||||
msbuild MPF\MPF.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
|
||||
msbuild MPF.Check\MPF.Check.csproj -target:Publish -property:TargetFramework=net48 -property:Configuration=Release -property:RuntimeIdentifiers=win7-x64
|
||||
|
||||
REM Create MPF archives
|
||||
REM .NET 6.0 Debug
|
||||
echo Building .NET 6.0 debug
|
||||
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
REM .NET 6.0 Release
|
||||
echo Building .NET 6.0 release
|
||||
dotnet publish MPF\MPF.csproj -f net6.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net6.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
REM .NET 7.0 Debug
|
||||
echo Building .NET 7.0 debug
|
||||
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r linux-x64 --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r osx-x64 --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
REM .NET 7.0 Release
|
||||
echo Building .NET 7.0 release
|
||||
dotnet publish MPF\MPF.csproj -f net7.0-windows -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r win-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r linux-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
dotnet publish MPF.Check\MPF.Check.csproj -f net7.0 -r osx-x64 -c Release --self-contained true -p:PublishSingleFile=true
|
||||
|
||||
REM Create MPF Debug archives
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net48\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win7-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win7-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win8-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win8-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win81-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win81-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win10-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win10-x64.zip *
|
||||
7z a -tzip %BUILD_FOLDER%\MPF-dbg_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net6.0-windows\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF-dbg_net6.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Debug\net7.0-windows\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF-dbg_net7.0_win-x64.zip *
|
||||
|
||||
REM Create MPF.Check archives
|
||||
REM Create MPF Release archives
|
||||
cd %BUILD_FOLDER%\MPF\bin\Release\net48\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Release\net6.0-windows\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net6.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF\bin\Release\net7.0-windows\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF_net7.0_win-x64.zip *
|
||||
|
||||
REM Create MPF.Check Debug archives
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net48\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win7-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win7-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win8-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win8-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win81-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win81-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win10-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win10-x64.zip *
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net6.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\linux-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_linux-x64.zip *
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net6.0_linux-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net6.0\osx-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net6.0_osx-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net7.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\linux-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net7.0_linux-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Debug\net7.0\osx-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check-dbg_net7.0_osx-x64.zip *
|
||||
|
||||
REM Create MPF.Check Release archives
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net48\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net48.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\linux-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_linux-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net6.0\osx-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net6.0_osx-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\win-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_win-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\linux-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_linux-x64.zip *
|
||||
cd %BUILD_FOLDER%\MPF.Check\bin\Release\net7.0\osx-x64\publish\
|
||||
7z a -tzip %BUILD_FOLDER%\MPF.Check_net7.0_osx-x64.zip *
|
||||
Reference in New Issue
Block a user