Add project files.

This commit is contained in:
2025-07-21 23:19:39 -06:00
commit 976150ab4b
101 changed files with 13369 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

BIN
PatchEmAll-CLI/App.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2D9F35C9-4274-429F-851E-96DAE240B59E}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>PatchEmAll_CLI</RootNamespace>
<AssemblyName>PatchEmAll-CLI</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\PatchEmAll-CLI.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>App.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.2.12.0\lib\net47\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.Console, Version=4.1.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.Sinks.Console.4.1.0\lib\net45\Serilog.Sinks.Console.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.LogEmAll, Version=0.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.Sinks.LogEmAll.0.0.7\lib\net461\Serilog.Sinks.LogEmAll.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PatchEmAll\PatchEmAll.csproj">
<Project>{956e3b6c-eee3-44a9-be64-7b3ae0238924}</Project>
<Name>PatchEmAll</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="App.ico" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\BASHes\PatchEmAll-Build-Patches-Dat.sh" />
<None Include="Resources\BASHes\PatchEmAll-Build-Patches.sh" />
<None Include="Resources\BASHes\PatchEmAll-Build-ROMs.sh" />
<None Include="Resources\BASHes\PatchEmAll-Print-Donation-Info.sh" />
<None Include="Resources\BASHes\PatchEmAll-Print-Help.sh" />
<None Include="Resources\BASHes\PatchEmAll-Print-License.sh" />
<None Include="Resources\BASHes\PatchEmAll-Print-Version.sh" />
<None Include="Resources\BASHes\PatchEmAll-Save-Options.sh" />
<None Include="Resources\BASHes\put your bash files in this directory.txt" />
<None Include="Resources\Batches\PatchEmAll-Build-Patches.bat" />
<None Include="Resources\Batches\PatchEmAll-Build-Patches-Dat.bat" />
<None Include="Resources\Batches\PatchEmAll-Build-ROMs.bat" />
<None Include="Resources\Batches\PatchEmAll-Print-Donation-Info.bat" />
<None Include="Resources\Batches\PatchEmAll-Print-Help.bat" />
<None Include="Resources\Batches\PatchEmAll-Print-License.bat" />
<None Include="Resources\Batches\PatchEmAll-Print-Version.bat" />
<None Include="Resources\Batches\PatchEmAll-Save-Options.bat" />
<None Include="Resources\Batches\put your batch files in this directory.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

54
PatchEmAll-CLI/Program.cs Normal file
View File

@@ -0,0 +1,54 @@
using Serilog;
using Serilog.Formatting.Display;
using Serilog.Sinks.LogEmAll;
namespace PatchEmAll_CLI
{
/// <summary>
/// The Main Program Class.
/// </summary>
class Program
{
/// <summary>
/// The Main entry point for the program.
/// </summary>
static void Main(string[] args)
{
// Configure the Logger.
ConfigureSerilog();
// Create a new program object.
PatchEmAll.PatchEmAll pea = new PatchEmAll.PatchEmAll();
// Set the title.
pea.UpdateTitle();
// Print the version.
pea.PrintVersion();
// Load the default options passed from the default options file.
pea.LoadOptionsFromFile();
// Load the default options passed from the command line arguments.
pea.LoadOptionsFromCLI(args);
// Process the command switch.
pea.ProcessCommandSwitch();
// Output the log to a text file.
pea.SaveLogToFile();
}
/// <summary>
/// Configure the logger.
/// </summary>
public static void ConfigureSerilog()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Console(outputTemplate: "{Level:u4}: {Message:lj}{NewLine}{Exception}")
.WriteToListString(new MessageTemplateTextFormatter("{Level:u4}: {Message:lj}{Exception}"))
.CreateLogger();
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PatchEmAll-CLI")]
[assembly: AssemblyDescription("The Original Automated ROM Patcher")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("PatchEmAll")]
[assembly: AssemblyProduct("PatchEmAll-CLI")]
[assembly: AssemblyCopyright("Copyright (c) 2016-2025 PatchEmAll - All Rights Reserved")]
[assembly: AssemblyTrademark("PatchEmAll - The Original Automated ROM Patcher")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2d9f35c9-4274-429f-851e-96dae240b59e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.7")]
[assembly: AssemblyFileVersion("1.5.7")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PatchEmAll_CLI.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PatchEmAll_CLI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -buildpatchesdat

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -buildpatches

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -buildroms

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -donations

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -help

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -license

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -version

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Main
mono "../PatchEmAll-CLI.exe" -saveoptions

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -buildpatchesdat "PD:..\Patches" "XF:..\Xdelta\xdelta3-3.1.0-x86_64.exe" "XC:-e -9 -s" "MN:YourMachineName" "DD:..\Dats" "CO:YourComment"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -buildpatches "RD:..\ROMs" "PD:..\Patches" "XF:..\Xdelta\xdelta3-3.1.0-x86_64.exe" "XC:-e -9 -s" "DL: -- " "DF:..\Dats\YourDatPPDXMLFile.ppd"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -buildroms "RD:..\ROMs" "PD:..\Patches" "XF:..\Xdelta\xdelta3-3.1.0-x86_64.exe" "DL: -- "
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -donations
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -help "LF:..\Logs\Log_PEA_00000000_000000.txt"
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -license
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -version
rem */ Pause /*
@pause

View File

@@ -0,0 +1,7 @@
@echo off
rem */ Main /*
"..\PatchEmAll-CLI.exe" -saveoptions
rem */ Pause /*
@pause

View File

@@ -0,0 +1 @@
This file can be deleted.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Serilog" version="2.12.0" targetFramework="net48" />
<package id="Serilog.Sinks.Console" version="4.1.0" targetFramework="net48" />
<package id="Serilog.Sinks.LogEmAll" version="0.0.7" targetFramework="net48" />
</packages>