Merge branch 'pre-commit'

This commit is contained in:
Michael Becker 2022-04-11 20:49:44 -04:00
commit 84335ba420
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C
10 changed files with 181 additions and 18 deletions

View File

@ -0,0 +1,43 @@
//
// DataFormatImplementationArea.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2022 Mike Becker's Software
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
namespace UniversalEditor
{
[Flags]
public enum DataFormatImplementationArea
{
None = 0,
/// <summary>
/// For FileSystem data formats. Indicates that a file list can be
/// retrieved, even if the files cannot be extracted.
/// </summary>
List,
/// <summary>
/// Indicates that the data format can properly read a file.
/// </summary>
Load,
/// <summary>
/// Indicates that the data format can properly save a file.
/// </summary>
Save,
All = List | Load | Save
}
}

View File

@ -21,13 +21,19 @@
using System;
namespace UniversalEditor
{
public class ImplementationStatusAttribute : Attribute
public class DataFormatImplementationStatusAttribute : Attribute
{
private DataFormatImplementationStatus _dfStatus = DataFormatImplementationStatus.None;
public DataFormatImplementationArea Area { get; } = DataFormatImplementationArea.None;
public ImplementationStatus Status { get; }= ImplementationStatus.None;
public ImplementationStatusAttribute(DataFormatImplementationStatus status)
public DataFormatImplementationStatusAttribute(ImplementationStatus status)
: this(DataFormatImplementationArea.All, status)
{
_dfStatus = status;
}
public DataFormatImplementationStatusAttribute(DataFormatImplementationArea area, ImplementationStatus status)
{
Area = area;
Status = status;
}
}
}

View File

@ -21,12 +21,10 @@
using System;
namespace UniversalEditor
{
public enum DataFormatImplementationStatus
public enum ImplementationStatus
{
None = 0,
Incomplete = -1,
Load = 1,
Save = 2,
Complete = 3
Incomplete,
Complete
}
}

View File

@ -101,8 +101,9 @@
<Compile Include="UserInterface\HostApplicationMessage.cs" />
<Compile Include="UserInterface\HostApplicationOutputWindow.cs" />
<Compile Include="CustomOptionCompatSettingsProvider.cs" />
<Compile Include="ImplementationStatusAttribute.cs" />
<Compile Include="DataFormatImplementationStatus.cs" />
<Compile Include="DataFormatImplementationStatusAttribute.cs" />
<Compile Include="ImplementationStatus.cs" />
<Compile Include="DataFormatImplementationArea.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>

View File

@ -209,7 +209,6 @@
<Compile Include="DataFormats\FileSystem\Apogee\DLTDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\PAC\PACDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\MechCommander\MechCommanderDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\Merscom\DPKDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\TechArts3D\TAHDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\SquareSoft\LGPDataFormat.cs" />
<Compile Include="DataFormats\FileSystem\RealNetworks\RZTDataFormat.cs" />
@ -284,7 +283,6 @@
<Folder Include="DataFormats\FileSystem\Apogee\" />
<Folder Include="DataFormats\FileSystem\PAC\" />
<Folder Include="DataFormats\FileSystem\MechCommander\" />
<Folder Include="DataFormats\FileSystem\Merscom\" />
<Folder Include="DataFormats\FileSystem\TechArts3D\" />
<Folder Include="DataFormats\FileSystem\SquareSoft\" />
<Folder Include="DataFormats\FileSystem\RealNetworks\" />
@ -306,7 +304,6 @@
<Folder Include="Associations\KenSilverman\" />
<Folder Include="Associations\ElectronicArts\" />
<Folder Include="Associations\Ultra3D\" />
<Folder Include="Associations\Merscom\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Associations\7Zip.uexml" />
@ -397,7 +394,6 @@
<EmbeddedResource Include="Associations\Ultra3D\RBX.uexml" />
<EmbeddedResource Include="Associations\Ultra3D\TBV.uexml" />
<EmbeddedResource Include="DataFormats\FileSystem\StuffIt\StuffItDataFormat.uexml" />
<EmbeddedResource Include="Associations\Merscom\DPK.uexml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -18,7 +18,7 @@
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel" />
</ObjectModels>
<DataFormats>
<DataFormat TypeName="UniversalEditor.DataFormats.FileSystem.Merscom.DPKDataFormat" />
<DataFormat TypeName="UniversalEditor.Plugins.Merscom.DataFormats.FileSystem.DPK.DPKDataFormat" />
</DataFormats>
</Association>
</Associations>

View File

@ -23,12 +23,12 @@ using System;
using UniversalEditor.IO;
using UniversalEditor.ObjectModels.FileSystem;
namespace UniversalEditor.DataFormats.FileSystem.Merscom
namespace UniversalEditor.Plugins.Merscom.DataFormats.FileSystem.DPK
{
/// <summary>
/// Provides a <see cref="DataFormat" />for manipulating archives in Merscom DPK format.
/// </summary>
[ImplementationStatus(DataFormatImplementationStatus.Load)]
[DataFormatImplementationStatus(DataFormatImplementationArea.Load, ImplementationStatus.Complete)]
public class DPKDataFormat : DataFormat
{
private static DataFormatReference _dfr;

View File

@ -0,0 +1,46 @@
//
// AssemblyInfo.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2022 Mike Becker's Software
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("Universal Editor plugin for Merscom games")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mike Becker's Software")]
[assembly: AssemblyProduct("Universal Editor Plugin Pack")]
[assembly: AssemblyCopyright("Mike Becker's Software")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{29F3E82C-CF84-4966-91BF-152D3BCC2117}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>UniversalEditor.Plugins.Merscom</RootNamespace>
<AssemblyName>UniversalEditor.Plugins.Merscom</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Output\Debug\Plugins</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>..\..\Output\Release\Plugins</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DataFormats\FileSystem\DPK\DPKDataFormat.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Associations\" />
<Folder Include="Associations\Merscom\" />
<Folder Include="DataFormats\" />
<Folder Include="DataFormats\FileSystem\" />
<Folder Include="DataFormats\FileSystem\DPK\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Associations\Merscom\DPK.uexml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Libraries\UniversalEditor.Compression\UniversalEditor.Compression.csproj">
<Project>{3F664673-7E22-4486-9AD0-FC81861D0B78}</Project>
<Name>UniversalEditor.Compression</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\UniversalEditor.Checksum\UniversalEditor.Checksum.csproj">
<Project>{0F7D5BD4-7970-412F-ABD7-0A098BB01ACE}</Project>
<Name>UniversalEditor.Checksum</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\UniversalEditor.Essential\UniversalEditor.Essential.csproj">
<Project>{30467E5C-05BC-4856-AADC-13906EF4CADD}</Project>
<Name>UniversalEditor.Essential</Name>
</ProjectReference>
<ProjectReference Include="..\..\Libraries\UniversalEditor.Core\UniversalEditor.Core.csproj">
<Project>{2D4737E6-6D95-408A-90DB-8DFF38147E85}</Project>
<Name>UniversalEditor.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -213,6 +213,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Mic
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBS.Framework.UserInterface.Engines.GTK3", "..\MBS.Framework.UserInterface\Engines\GTK3\MBS.Framework.UserInterface.Engines.GTK3\MBS.Framework.UserInterface.Engines.GTK3.csproj", "{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Merscom", "Plugins\UniversalEditor.Plugins.Merscom\UniversalEditor.Plugins.Merscom.csproj", "{29F3E82C-CF84-4966-91BF-152D3BCC2117}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -617,6 +619,10 @@ Global
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.Build.0 = Release|Any CPU
{29F3E82C-CF84-4966-91BF-152D3BCC2117}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29F3E82C-CF84-4966-91BF-152D3BCC2117}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29F3E82C-CF84-4966-91BF-152D3BCC2117}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29F3E82C-CF84-4966-91BF-152D3BCC2117}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2} = {05D15661-E684-4EC9-8FBD-C014BA433CC5}
@ -718,6 +724,7 @@ Global
{D4AEC562-0FA7-48C4-9E46-C706AFCFA015} = {7B535D74-5496-4802-B809-89ED88274A91}
{94059860-1F0B-453D-AFAB-EEDBB0AA25BB} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6} = {20F315E0-52AE-479F-AF43-3402482C1FC8}
{29F3E82C-CF84-4966-91BF-152D3BCC2117} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0