[Headerer] Remove standalone headerer exe

This commit is contained in:
Matt Nadareski
2016-09-12 16:49:18 -07:00
parent b96d0c936f
commit ccafe6999c
9 changed files with 8 additions and 371 deletions

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration />

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{66339C8A-F331-467C-B311-08A8F7284671}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Headerer</RootNamespace>
<AssemblyName>Headerer</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\Debug-x64\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\..\Release-x64\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\Mono.Data.Sqlite.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Portable, Version=4.0.0.0, Culture=neutral, PublicKeyToken=59e704a76bc4613a, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Data.Portable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Transactions.Portable, Version=4.0.0.0, Culture=neutral, PublicKeyToken=59e704a76bc4613a, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\lib\net4\System.Transactions.Portable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="HeadererApp.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SabreTools.Helper\SabreTools.Helper.csproj">
<Project>{225a1afd-0890-44e8-b779-7502665c23a5}</Project>
<Name>SabreTools.Helper</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets" Condition="Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" />
<Target Name="EnsureMonoDataSqlitePortableImported" BeforeTargets="BeforeBuild" Condition="'$(MonoDataSqlitePortableImported)' == ''">
<Error Condition="!Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them." />
<Error Condition="Exists('..\packages\Mono.Data.Sqlite.Portable.1.0.3.5\tools\Mono.Data.Sqlite.Portable.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build." />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,141 +0,0 @@
using SabreTools.Helper;
using System;
using System.Collections.Generic;
using System.IO;
namespace SabreTools
{
/// <summary>
/// Entry class for the Deheader application
/// </summary>
public class HeadererApp
{
// Private required variables
private static string _headererDbSchema = "Headerer";
private static string _headererDbName = "Headerer.sqlite";
private static string _headererConnectionString = "Data Source=" + _headererDbName + ";Version = 3;";
/// <summary>
/// Start deheader operation with supplied parameters
/// </summary>
/// <param name="args">String array representing command line parameters</param>
public static void Main(string[] args)
{
// If output is being redirected, don't allow clear screens
if (!Console.IsOutputRedirected)
{
Console.Clear();
}
// Perform initial setup and verification
Logger logger = new Logger(true, "headerer.log");
logger.Start();
DBTools.EnsureDatabase(_headererDbSchema, _headererDbName, _headererConnectionString);
// Credits take precidence over all
if ((new List<string>(args)).Contains("--credits"))
{
Build.Credits();
return;
}
// If we have no arguments, show the help
if (args.Length == 0)
{
Build.Help();
logger.Close();
return;
}
// Output the title
Build.Start("Headerer");
// Get the filename (or foldername)
string input = "";
bool help = false,
extract = true,
headerer = true;
foreach (string arg in args)
{
string temparg = arg.Replace("\"", "").Replace("file://", "");
switch (temparg)
{
case "-?":
case "-h":
case "--help":
help = true;
break;
case "-e":
case "--extract":
extract = true;
break;
case "-r":
case "-re":
case "--restore":
extract = false;
break;
default:
if (File.Exists(temparg) || Directory.Exists(temparg))
{
input = temparg;
}
else
{
logger.Error("Invalid input detected: " + arg);
Console.WriteLine();
Build.Help();
Console.WriteLine();
logger.Error("Invalid input detected: " + arg);
logger.Close();
return;
}
break;
}
}
// If help is set, show the help screen
if (help)
{
Build.Help();
logger.Close();
return;
}
// If a switch that requires a filename is set and no file is, show the help screen
if (String.IsNullOrEmpty(input) && (headerer))
{
logger.Error("This feature requires at least one input");
Build.Help();
logger.Close();
return;
}
// If we're in headerer mode
if (headerer)
{
InitHeaderer(input, extract, logger);
}
// If nothing is set, show the help
else
{
Build.Help();
}
logger.Close();
return;
}
/// <summary>
/// Wrap extracting and replacing headers
/// </summary>
/// <param name="input">Input file or folder name</param>
/// <param name="flag">True if we're extracting headers (default), false if we're replacing them</param>
/// <param name="logger">Logger object for file and console output</param>
private static void InitHeaderer(string input, bool flag, Logger logger)
{
Headerer headerer = new Headerer(input, flag, logger);
headerer.Process();
}
}
}

View File

@@ -1,36 +0,0 @@
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("Deheader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Deheader")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[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("66339c8a-f331-467c-b311-08a8f7284671")]
// 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.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.Data.Sqlite.Portable" version="1.0.3.5" targetFramework="net452" />
</packages>

View File

@@ -59,21 +59,6 @@ The main tool of the SabreTools suite. Performs the majority of the core feature
</ul>
This tool has a comprehensive list of command line parameters that can be used to do the above and much more.
<b>Headerer</b>
<p/>
A simple auxilary tool that detects and removes headers and also restores headers for the following systems:
<ul>
<li>Atari 7800</li>
<li>Atari Lynx</li>
<li>Commodore 64 PSID music</li>
<li>NEC PC-Engine / TurboGrafx 16</li>
<li>Nintendo Famicom Disk System</li>
<li>Nintendo Entertainment System / Famicom</li>
<li>Super Nintendo Entertainment System / Super Famicom</li>
<li>Super Nintendo Entertainment System / Super Famicom SPC music</li>
</ul>
The saved headers are currently stored in a database; multiple headers allowed per file.
<b>SimpleSort</b>
<p/>
A simple rebuild-from-DAT tool that allows users to sort from the commandline.

View File

@@ -279,16 +279,6 @@ namespace SabreTools.Helper
helptext.Add("Filter parameters for size can use postfixes for inputs:");
helptext.Add(" e.g. 8kb => 8000 or 8kib => 8192");
break;
case "Headerer":
helptext.Add(Resources.Resources.Headerer_Name + " - " + Resources.Resources.Headerer_Desc);
helptext.Add(barrier);
helptext.Add(Resources.Resources.Usage + ": " + Resources.Resources.Headerer_Name + " [option] [filename|dirname]");
helptext.Add("");
helptext.Add("Options:");
helptext.Add(" -?, -h, --help Show this help");
helptext.Add(" -e, --extract Detect and remove mode");
helptext.Add(" -r, --restore Restore header to file based on SHA-1");
break;
case "SimpleSort":
helptext.Add(Resources.Resources.SimpleSort_Name + " - " + Resources.Resources.SimpleSort_Desc);
helptext.Add(barrier);

View File

@@ -7,11 +7,10 @@ Table of Contents
-----------------
1.0 Introduction and History
2.0 Included Programs
2.1 Headerer
2.2 RombaSharp
2.3 SabreTools
2.4 SimpleSort
2.5 TGZConvert
2.1 RombaSharp
2.2 SabreTools
2.3 SimpleSort
2.4 TGZConvert
3.0 Examples
4.0 Contributors
5.0 Licensing
@@ -75,42 +74,7 @@ Below are a list of the programs that are included in the current SabreTools
release. Each of them have a brief description of the tool along with in-depth
desciptions of all flags.
** Section 2.1 - Headerer
Headerer is a small program that is meant as an intermediary between header skipper
files (which, a bit apart from their name, do not just show how to skip copier headers)
and rom managers that do not use them.
The following systems have headers that this program can work with:
- Atari 7800
- Atari Lynx
- Commodore PSID Music
- NEC PC-Engine / TurboGrafx 16
- Nintendo Famicom / Nintendo Entertainment System
- Nintendo Famicom Disk System
- Nintendo Super Famicom / Super Nintendo Entertainment System
- Nintendo Super Famicom / Super Nintendo Entertainment System SPC Music
Usage:
Headerer.exe [options] [filename|dirname]
Options:
-?, -h, --help Show the built-in help text
Built-in to most of the programs is a basic help text
-e, --extract Enable detect and remove mode
This mode allows the user to detect, store, and remove copier headers from a file
or folder of files. The headers are backed up and collated by the hash of the un-
headered file. Files are then output without the detected copier header alongside
the originals with the suffix .new. No input files are altered in the process.
-r, --restore Restore headers to file(s)
This mode uses stored copier headers and reapplies them to files if they match the
included hash. More than one header can be applied to a file, so they will be out-
put to new files, suffixed with .newX, where X is a number. No input files are
altered in the process.
** Section 2.2 - RombaSharp
** Section 2.1 - RombaSharp
RombaSharp is an ongoing "spiritual port" of the Romba tool (https://github.com/uwedeportivo/romba).
The code is not based on the actual source, rather taking the features and using the code
@@ -142,7 +106,7 @@ Options:
refresh-dats Refreshes the DAT index from the files in the DAT root
shutdown Gracefully shuts down server [OBSOLETE]
** Section 2.3 - SabreTools
** Section 2.2 - SabreTools
SabreTools is the main application of the SabreTools suite. It is mostly just a frontend
to a lot of features that are available in the DLL and can be considered the reference
@@ -728,7 +692,7 @@ Options:
This sets an output folder to be used when the files are created. If a path
is not defined, the application directory is used instead.
** Section 2.4 - SimpleSort
** Section 2.3 - SimpleSort
SimpleSort is a WIP program that is meant as a command-line tool to quickly rebuild and
verify files based on a supplied DAT file. The eventual aim for this program is to have
@@ -802,7 +766,7 @@ Options:
Once the files that were able to rebuilt are taken care of, a DAT of the files
that could not be matched will be output to the program directory.
** Section 2.5 - TGZConvert
** Section 2.4 - TGZConvert
TGZConvert is a small program that allows conversion of a folder or set of folders to
TorrentGZ format. It is only useful in a small amount of situations at the present,

View File

@@ -5,8 +5,6 @@ VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools", "SabreTools\SabreTools.csproj", "{3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Headerer", "Deheader\Headerer.csproj", "{66339C8A-F331-467C-B311-08A8F7284671}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreToolsUI", "SabreToolsUI\SabreToolsUI.csproj", "{7DC54E53-4A46-4323-97E1-062EEFB7E4BC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabreTools.Helper", "SabreTools.Helper\SabreTools.Helper.csproj", "{225A1AFD-0890-44E8-B779-7502665C23A5}"
@@ -34,14 +32,6 @@ Global
{3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Release|Any CPU.Deploy.0 = Release|Any CPU
{3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Release|x64.ActiveCfg = Release|x64
{3B615702-1866-4D7B-8AF1-7B43FD0CC1D0}.Release|x64.Build.0 = Release|x64
{66339C8A-F331-467C-B311-08A8F7284671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66339C8A-F331-467C-B311-08A8F7284671}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66339C8A-F331-467C-B311-08A8F7284671}.Debug|x64.ActiveCfg = Debug|x64
{66339C8A-F331-467C-B311-08A8F7284671}.Debug|x64.Build.0 = Debug|x64
{66339C8A-F331-467C-B311-08A8F7284671}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66339C8A-F331-467C-B311-08A8F7284671}.Release|Any CPU.Build.0 = Release|Any CPU
{66339C8A-F331-467C-B311-08A8F7284671}.Release|x64.ActiveCfg = Release|x64
{66339C8A-F331-467C-B311-08A8F7284671}.Release|x64.Build.0 = Release|x64
{7DC54E53-4A46-4323-97E1-062EEFB7E4BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DC54E53-4A46-4323-97E1-062EEFB7E4BC}.Debug|x64.ActiveCfg = Debug|x64
{7DC54E53-4A46-4323-97E1-062EEFB7E4BC}.Release|Any CPU.ActiveCfg = Release|Any CPU