Moved OCR Command

This commit is contained in:
Robin 2018-06-04 12:55:20 +02:00
commit e4653d426e
27 changed files with 129 additions and 192 deletions

View file

@ -23,26 +23,16 @@
#region Usings #region Usings
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using CliWrap; using CliWrap;
using CliWrap.Models;
using Dapplo.Ini;
using Dapplo.Log;
using Greenshot.Addon.ExternalCommand.Entities; using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons; using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Core; using Greenshot.Addons.Core;
using Greenshot.Addons.Extensions; using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces;
using Greenshot.Addons.Interfaces.Plugin;
#endregion #endregion
@ -53,52 +43,48 @@ namespace Greenshot.Addon.ExternalCommand
/// </summary> /// </summary>
public class ExternalCommandDestination : AbstractDestination public class ExternalCommandDestination : AbstractDestination
{ {
private static readonly LogSource Log = new LogSource();
private static readonly Regex UriRegexp = new Regex( private static readonly Regex UriRegexp = new Regex(
@"((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)", RegexOptions.Compiled); @"((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)", RegexOptions.Compiled);
private static readonly IExternalCommandConfiguration Config = IniConfig.Current.Get<IExternalCommandConfiguration>(); private readonly ExternalCommandDefinition _externalCommandDefinition;
private readonly string _presetCommand;
private readonly IExternalCommandConfiguration _externalCommandConfiguration; private readonly IExternalCommandConfiguration _externalCommandConfiguration;
public ExternalCommandDestination(string commando, public ExternalCommandDestination(ExternalCommandDefinition defintion,
IExternalCommandConfiguration externalCommandConfiguration, IExternalCommandConfiguration externalCommandConfiguration,
ICoreConfiguration coreConfiguration, ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage IGreenshotLanguage greenshotLanguage
) : base(coreConfiguration, greenshotLanguage) ) : base(coreConfiguration, greenshotLanguage)
{ {
_presetCommand = commando; _externalCommandDefinition = defintion;
_externalCommandConfiguration = externalCommandConfiguration; _externalCommandConfiguration = externalCommandConfiguration;
} }
public override string Designation => "External " + _presetCommand.Replace(',', '_'); public override string Designation => "External " + _externalCommandDefinition.Name.Replace(',', '_');
public override string Description => _presetCommand; public override string Description => _externalCommandDefinition.Name;
public override Bitmap GetDisplayIcon(double dpi) public override Bitmap GetDisplayIcon(double dpi)
{ {
return IconCache.IconForCommand(_presetCommand, dpi > 100); return IconCache.IconForCommand(_externalCommandDefinition, dpi > 100);
} }
public override async Task<ExportInformation> ExportCaptureAsync(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) public override async Task<ExportInformation> ExportCaptureAsync(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
{ {
var exportInformation = new ExportInformation(Designation, Description); var exportInformation = new ExportInformation(Designation, Description);
var definition = _externalCommandConfiguration.Read(_presetCommand);
var fullPath = captureDetails.Filename; var fullPath = captureDetails.Filename;
if (fullPath == null) if (fullPath == null)
{ {
fullPath = surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration); fullPath = surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration);
} }
using (var cli = new Cli(definition.Command)) using (var cli = new Cli(_externalCommandDefinition.Command))
{ {
var arguments = string.Format(definition.Arguments, fullPath); var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath);
// Execute // Execute
var output = await cli.ExecuteAsync(arguments); var output = await cli.ExecuteAsync(arguments);
if (definition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris)) if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris))
{ {
var uriMatches = UriRegexp.Matches(output.StandardOutput); var uriMatches = UriRegexp.Matches(output.StandardOutput);
if (uriMatches.Count > 0) if (uriMatches.Count > 0)
@ -109,7 +95,7 @@ namespace Greenshot.Addon.ExternalCommand
} }
} }
if (definition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit)) if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit))
{ {
File.Delete(fullPath); File.Delete(fullPath);
} }

View file

@ -62,7 +62,8 @@ namespace Greenshot.Addon.ExternalCommand
public IEnumerable<Lazy<IDestination, DestinationAttribute>> Provide() public IEnumerable<Lazy<IDestination, DestinationAttribute>> Provide()
{ {
return _externalCommandConfig.Commands return _externalCommandConfig.Commands
.Select(command => new Lazy<IDestination, DestinationAttribute>(() => new ExternalCommandDestination(command, _externalCommandConfig, _coreConfiguration, _greenshotLanguage), new DestinationAttribute(command))); .Select(command => _externalCommandConfig.Read(command))
.Select(definition => new Lazy<IDestination, DestinationAttribute>(() => new ExternalCommandDestination(definition, _externalCommandConfig, _coreConfiguration, _greenshotLanguage), new DestinationAttribute(definition.Name)));
} }

View file

@ -26,8 +26,8 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using Dapplo.Ini;
using Dapplo.Log; using Dapplo.Log;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons.Core; using Greenshot.Addons.Core;
#endregion #endregion
@ -39,33 +39,32 @@ namespace Greenshot.Addon.ExternalCommand
/// </summary> /// </summary>
public static class IconCache public static class IconCache
{ {
private static readonly IExternalCommandConfiguration Config = IniConfig.Current.Get<IExternalCommandConfiguration>();
private static readonly LogSource Log = new LogSource(); private static readonly LogSource Log = new LogSource();
/// <summary> /// <summary>
/// Retrieve the icon for a command /// Retrieve the icon for a command
/// </summary> /// </summary>
/// <param name="commandName">string</param> /// <param name="externalCommandDefinition">string</param>
/// <param name="useLargeIcons">true to use the large icon</param> /// <param name="useLargeIcons">true to use the large icon</param>
/// <returns>Bitmap</returns> /// <returns>Bitmap</returns>
public static Bitmap IconForCommand(string commandName, bool useLargeIcons) public static Bitmap IconForCommand(ExternalCommandDefinition externalCommandDefinition, bool useLargeIcons)
{ {
Bitmap icon = null; Bitmap icon = null;
if (commandName == null) if (externalCommandDefinition == null)
{ {
return null; return null;
} }
if (!Config.Commandline.ContainsKey(commandName) || !File.Exists(Config.Commandline[commandName])) if (!File.Exists(externalCommandDefinition.Command))
{ {
return null; return null;
} }
try try
{ {
icon = PluginUtils.GetCachedExeIcon(Config.Commandline[commandName], 0, useLargeIcons); icon = PluginUtils.GetCachedExeIcon(externalCommandDefinition.Command, 0, useLargeIcons);
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Warn().WriteLine(ex, "Problem loading icon for " + Config.Commandline[commandName]); Log.Warn().WriteLine(ex, "Problem loading icon for " + externalCommandDefinition.Command);
} }
return icon; return icon;
} }

View file

@ -89,6 +89,8 @@ namespace Greenshot.Addon.ExternalCommand.ViewModels
{ {
foreach (var item in Items) foreach (var item in Items)
{ {
// Remove before
ExternalCommandConfiguration.Delete(item.Definition.Name);
if (item.Definition?.IsValid != true) if (item.Definition?.IsValid != true)
{ {
continue; continue;

View file

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

View file

@ -33,7 +33,7 @@ using System.Runtime.Remoting.Proxies;
#endregion #endregion
namespace GreenshotOCRCommand namespace Greenshot.Addon.OcrCommand
{ {
/// <summary> /// <summary>
/// Wraps a late-bound COM server. /// Wraps a late-bound COM server.

View file

@ -27,7 +27,7 @@ using System;
#endregion #endregion
namespace GreenshotOCRCommand namespace Greenshot.Addon.OcrCommand
{ {
/// <summary> /// <summary>
/// An attribute to specifiy the ProgID of the COM class to create. (As suggested by Kristen Wegner) /// An attribute to specifiy the ProgID of the COM class to create. (As suggested by Kristen Wegner)

View file

@ -1,95 +1,77 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <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> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion> <ProjectGuid>{7B8E9055-A054-4290-B537-075EBFDF8BDF}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Greenshot.Addon.OcrCommand</RootNamespace>
<RootNamespace>GreenshotOCRCommand</RootNamespace>
<AssemblyName>GreenshotOCRCommand</AssemblyName> <AssemblyName>GreenshotOCRCommand</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>x86</PlatformTarget>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>None</DebugType> <PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DebugSymbols>false</DebugSymbols>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject>GreenshotOCRCommand.Program</StartupObject> <StartupObject />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CustomMarshalers" /> <Reference Include="CustomMarshalers" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" />
<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="ComProgIdAttribute.cs" />
<Compile Include="COMWrapper.cs" />
<Compile Include="Modi\CompressionLevel.cs" />
<Compile Include="Modi\FileFormat.cs" />
<Compile Include="Modi\ICommon.cs" />
<Compile Include="Modi\IDispatch.cs" />
<Compile Include="Modi\IDocument.cs" />
<Compile Include="Modi\IImage.cs" />
<Compile Include="Modi\IImages.cs" />
<Compile Include="Modi\ILayout.cs" />
<Compile Include="Modi\IMiRect.cs" />
<Compile Include="Modi\IMiRects.cs" />
<Compile Include="Modi\IWord.cs" />
<Compile Include="Modi\IWords.cs" />
<Compile Include="Modi\ModiLanguage.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
<Compile Include="Modi\ICommon.cs" />
<Compile Include="Modi\CompressionLevel.cs" />
<Compile Include="ComProgIdAttribute.cs" />
<Compile Include="COMWrapper.cs" />
<Compile Include="Modi\FileFormat.cs" />
<Compile Include="Modi\IDispatch.cs" />
<Compile Include="Modi\IMiRect.cs" />
<Compile Include="Modi\IImage.cs" />
<Compile Include="Modi\IMiRects.cs" />
<Compile Include="Modi\IImages.cs" />
<Compile Include="Modi\ILayout.cs" />
<Compile Include="Modi\IDocument.cs" />
<Compile Include="Modi\ModiLanguage.cs" />
<Compile Include="Modi\IWord.cs" />
<Compile Include="Modi\IWords.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\" <PostBuildEvent>copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName).config" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"</PostBuildEvent> copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName).config" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<!-- 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> </Project>

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
public enum CompressionLevel public enum CompressionLevel
{ {

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
public enum FileFormat public enum FileFormat
{ {

View file

@ -27,7 +27,7 @@ using System;
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Base class for the common properties of the Modi interfaces /// Base class for the common properties of the Modi interfaces

View file

@ -29,7 +29,7 @@ using System.Runtime.InteropServices.CustomMarshalers;
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
[ComImport] [ComImport]
[Guid("00020400-0000-0000-C000-000000000046")] [Guid("00020400-0000-0000-C000-000000000046")]

View file

@ -25,7 +25,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// The MODI Document object represents an ordered collection of document images saved as a single file. /// The MODI Document object represents an ordered collection of document images saved as a single file.

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Describes the page in a scan /// Describes the page in a scan

View file

@ -27,7 +27,7 @@ using System.Collections;
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Use the Images accessor property of the Document object to return an Images collection. /// Use the Images accessor property of the Document object to return an Images collection.

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Layout of the IImage /// Layout of the IImage

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Represents a bounding rectangle in the optical character recognition (OCR) layout. /// Represents a bounding rectangle in the optical character recognition (OCR) layout.

View file

@ -27,7 +27,7 @@ using System.Collections;
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Represents the collection of bounding rectangles in the optical character recognition (OCR) layout. A collection of /// Represents the collection of bounding rectangles in the optical character recognition (OCR) layout. A collection of

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// Represents a word recognized in the text during an optical character recognition (OCR) operation. /// Represents a word recognized in the text during an optical character recognition (OCR) operation.

View file

@ -27,7 +27,7 @@ using System.Collections;
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
/// <summary> /// <summary>
/// The Words collection recognized in the text during an optical character recognition (OCR) operation. /// The Words collection recognized in the text during an optical character recognition (OCR) operation.

View file

@ -21,7 +21,7 @@
#endregion #endregion
namespace GreenshotOCRCommand.Modi namespace Greenshot.Addon.OcrCommand.Modi
{ {
public enum ModiLanguage public enum ModiLanguage
{ {

View file

@ -27,11 +27,11 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using GreenshotOCRCommand.Modi; using Greenshot.Addon.OcrCommand.Modi;
#endregion #endregion
namespace GreenshotOCRCommand namespace Greenshot.Addon.OcrCommand
{ {
public static class Program public static class Program
{ {

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("Greenshot.Addon.OcrCommand")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Greenshot")]
[assembly: AssemblyProduct("Greenshot.Addon.OcrCommand")]
[assembly: AssemblyCopyright("Copyright © Greenshot 2018")]
[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("7b8e9055-a054-4290-b537-075ebfdf8bdf")]
// 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

@ -17,11 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Jira", "Gre
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GreenshotOCRCommand", "GreenshotOCRCommand\GreenshotOCRCommand.csproj", "{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}"
ProjectSection(ProjectDependencies) = postProject
{C6988EE8-2FEE-4349-9F09-F9628A0D8965} = {C6988EE8-2FEE-4349-9F09-F9628A0D8965}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Box", "Greenshot.Addon.Box\Greenshot.Addon.Box.csproj", "{697CF066-9077-4F22-99D9-D989CCE7282B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Box", "Greenshot.Addon.Box\Greenshot.Addon.Box.csproj", "{697CF066-9077-4F22-99D9-D989CCE7282B}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}"
@ -52,6 +47,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OneDrive",
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OcrCommand", "Greenshot.Addon.OcrCommand\Greenshot.Addon.OcrCommand.csproj", "{7B8E9055-A054-4290-B537-075EBFDF8BDF}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -109,14 +106,6 @@ Global
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.Build.0 = Release|Any CPU {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.Build.0 = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|x86 {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.ActiveCfg = Debug|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.Build.0 = Debug|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.ActiveCfg = Debug|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.Build.0 = Debug|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.ActiveCfg = Release|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.Build.0 = Release|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.ActiveCfg = Release|x86
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.Build.0 = Release|x86
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.ActiveCfg = Debug|x86 {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.ActiveCfg = Debug|x86
@ -232,6 +221,14 @@ Global
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.Build.0 = Release|Any CPU {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.Build.0 = Release|Any CPU
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|x86 {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|x86
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|x86 {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|x86
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|x86.ActiveCfg = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|x86.Build.0 = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|Any CPU.Build.0 = Release|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|x86.ActiveCfg = Release|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -1,58 +0,0 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
//
// 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 1 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/>.
#endregion
#region Usings
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("GreenshotOCRCommand")]
[assembly: AssemblyDescription("A small executable to OCR a bitmap")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Greenshot")]
[assembly: AssemblyProduct("GreenshotOCRCommand")]
[assembly: AssemblyCopyright("Greenshot")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("d7668e7e-3018-4d27-9aa0-21b1afade1b8")]
// The assembly version, replaced by build scripts
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyInformationalVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>

View file

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