Skip to content

Commit

Permalink
Updated HandBrake.Interop to .NET Standard 2.0 and the new SDK projec…
Browse files Browse the repository at this point in the history
…t style. (HandBrake#2068)

Updated solution to VS 2019
  • Loading branch information
RandomEngy authored and sr55 committed May 8, 2019
1 parent bafd0c3 commit 7bd675b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 235 deletions.
207 changes: 8 additions & 199 deletions win/CS/HandBrake.Interop/HandBrake.Interop.csproj
Original file line number Diff line number Diff line change
@@ -1,203 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HandBrake.Interop</RootNamespace>
<AssemblyName>HandBrake.Interop</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation />
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<UseVSHostingProcess>true</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>..\HandBrake.ruleset</CodeAnalysisRuleSet>
<NoWarn>0649</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="GongSolutions.WPF.DragDrop, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
<HintPath>..\packages\gong-wpf-dragdrop.2.0.1\lib\net47\GongSolutions.WPF.DragDrop.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Attributes\DisplayName.cs" />
<Compile Include="Attributes\DisplayNameLocalized.cs" />
<Compile Include="Attributes\ShortName.cs" />
<Compile Include="Interop\EventArgs\EncodeCompletedEventArgs.cs" />
<Compile Include="Interop\EventArgs\EncodeProgressEventArgs.cs" />
<Compile Include="Interop\EventArgs\MessageLoggedEventArgs.cs" />
<Compile Include="Interop\EventArgs\ScanProgressEventArgs.cs" />
<Compile Include="Interop\HandBrakeEncoderHelpers.cs" />
<Compile Include="Interop\HandBrakeFilterHelpers.cs" />
<Compile Include="Interop\HandBrakeInstance.cs" />
<Compile Include="Interop\HandBrakeLanguagesHelper.cs" />
<Compile Include="Interop\HandBrakePresetService.cs" />
<Compile Include="Interop\HandBrakeUnitConversionHelpers.cs" />
<Compile Include="Interop\HandBrakeUtils.cs" />
<Compile Include="Interop\HbLib\HBDelegates.cs" />
<Compile Include="Interop\HbLib\HbFunctions.cs" />
<Compile Include="Interop\HbLib\hb_anamorphic_mode_t.cs" />
<Compile Include="Interop\HbLib\hb_container_s.cs" />
<Compile Include="Interop\HbLib\hb_encoder_s.cs" />
<Compile Include="Interop\HbLib\hb_error_code.cs" />
<Compile Include="Interop\HbLib\hb_filter_ids.cs" />
<Compile Include="Interop\HbLib\hb_geometry.cs" />
<Compile Include="Interop\HbLib\hb_image_s.cs" />
<Compile Include="Interop\HbLib\hb_mixdown_s.cs" />
<Compile Include="Interop\HbLib\hb_rate_s.cs" />
<Compile Include="Interop\HbLib\hb_subtitle.cs" />
<Compile Include="Interop\HbLib\iso639_lang_t.cs" />
<Compile Include="Interop\HbLib\NativeConstants.cs" />
<Compile Include="Interop\Helpers\InteropUtilities.cs" />
<Compile Include="Interop\Helpers\NativeList.cs" />
<Compile Include="Interop\Helpers\Utilities.cs" />
<Compile Include="Interop\Interfaces\IEncodeInstance.cs" />
<Compile Include="Interop\Interfaces\IHandBrakeInstance.cs" />
<Compile Include="Interop\Json\Anamorphic\AnamorphicGeometry.cs" />
<Compile Include="Interop\Json\Anamorphic\DestSettings.cs" />
<Compile Include="Interop\Json\Encode\QSV.cs" />
<Compile Include="Interop\Json\Filters\PresetTune.cs" />
<Compile Include="Interop\Json\Presets\AudioList.cs" />
<Compile Include="Interop\Json\Presets\HBPreset.cs" />
<Compile Include="Interop\Json\Presets\PresetCategory.cs" />
<Compile Include="Interop\Json\Presets\PresetTransportContainer.cs" />
<Compile Include="Interop\Json\Queue\Task.cs" />
<Compile Include="Interop\Json\Scan\AudioAttributes.cs" />
<Compile Include="Interop\Json\Scan\SubtitleAttributes.cs" />
<Compile Include="Interop\Json\Shared\PAR.cs" />
<Compile Include="Interop\Json\Encode\Audio.cs" />
<Compile Include="Interop\Json\Encode\AudioTrack.cs" />
<Compile Include="Interop\Json\Encode\Chapter.cs" />
<Compile Include="Interop\Json\Encode\Destination.cs" />
<Compile Include="Interop\Json\Encode\Filters.cs" />
<Compile Include="Interop\Json\Encode\Filter.cs" />
<Compile Include="Interop\Json\Encode\JsonEncodeObject.cs" />
<Compile Include="Interop\Json\Encode\Metadata.cs" />
<Compile Include="Interop\Json\Encode\Mp4Options.cs" />
<Compile Include="Interop\Json\Encode\Range.cs" />
<Compile Include="Interop\Json\Encode\SubtitleSearch.cs" />
<Compile Include="Interop\Json\Encode\Source.cs" />
<Compile Include="Interop\Json\Encode\SubImport.cs" />
<Compile Include="Interop\Json\Encode\Subtitles.cs" />
<Compile Include="Interop\Json\Encode\SubtitleTrack.cs" />
<Compile Include="Interop\Json\Encode\Video.cs" />
<Compile Include="Interop\Factories\AnamorphicFactory.cs" />
<Compile Include="Interop\Json\State\TaskState.cs" />
<Compile Include="Interop\Model\Encoding\CombDetect.cs" />
<Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" />
<Compile Include="Interop\Model\Encoding\Denoise.cs" />
<Compile Include="Interop\Model\Encoding\Detelecine.cs" />
<Compile Include="Interop\Model\Encoding\HBPresetTune.cs" />
<Compile Include="Interop\Model\Encoding\Sharpen.cs" />
<Compile Include="Interop\Model\Preview\RawPreviewData.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Interop\Json\Scan\SourceAudioTrack.cs" />
<Compile Include="Interop\Json\Scan\SourceChapter.cs" />
<Compile Include="Interop\Json\Scan\Color.cs" />
<Compile Include="Interop\Json\Scan\Duration.cs" />
<Compile Include="Interop\Json\Scan\FrameRate.cs" />
<Compile Include="Interop\Json\Shared\Geometry.cs" />
<Compile Include="Interop\Json\Scan\JsonScanObject.cs" />
<Compile Include="Interop\Json\Scan\SourceMetadata.cs" />
<Compile Include="Interop\Json\Scan\SourceSubtitleTrack.cs" />
<Compile Include="Interop\Json\Scan\SourceTitle.cs" />
<Compile Include="Interop\Json\State\JsonState.cs" />
<Compile Include="Interop\Json\State\Scanning.cs" />
<Compile Include="Interop\Json\State\WorkDone.cs" />
<Compile Include="Interop\Json\State\Working.cs" />
<Compile Include="Interop\Model\BitrateLimits.cs" />
<Compile Include="Interop\Model\Cropping.cs" />
<Compile Include="Interop\Model\Encoding\Anamorphic.cs" />
<Compile Include="Interop\Model\Encoding\Container.cs" />
<Compile Include="Interop\Model\Encoding\HBAudioEncoder.cs" />
<Compile Include="Interop\Model\Encoding\HBContainer.cs" />
<Compile Include="Interop\Model\Encoding\HBMixdown.cs" />
<Compile Include="Interop\Model\Encoding\HBRate.cs" />
<Compile Include="Interop\Model\Encoding\HBVideoEncoder.cs" />
<Compile Include="Interop\Model\Encoding\PictureRotation.cs" />
<Compile Include="Interop\Model\Encoding\ScaleMethod.cs" />
<Compile Include="Interop\Model\Encoding\VideoEncoder.cs" />
<Compile Include="Interop\Model\Encoding\VideoEncodeRateType.cs" />
<Compile Include="Interop\Model\Language.cs" />
<Compile Include="Interop\Model\Preview\PreviewSettings.cs" />
<Compile Include="Interop\Model\RangeLimits.cs" />
<Compile Include="Interop\Model\Size.cs" />
<Compile Include="Interop\Model\SourceVideoInfo.cs" />
<Compile Include="Interop\Model\VideoQualityLimits.cs" />
<Compile Include="Model\HBConfiguration.cs" />
<Compile Include="Model\VideoScaler.cs" />
<Compile Include="Utilities\SystemInfo.cs" />
<Compile Include="Utilities\VersionHelper.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Utilities\CharCodesUtilities.cs" />
<Compile Include="Utilities\LanguageUtilities.cs" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="HandBrake.Interop.nuspec" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
</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>
-->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>

</Project>
10 changes: 0 additions & 10 deletions win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,6 @@ public class HandBrakeInstance : IHandBrakeInstance, IDisposable
/// </summary>
public int FeatureTitle { get; private set; }

/// <summary>
/// Gets the HandBrake version string.
/// </summary>
public string Version => Marshal.PtrToStringAnsi(HBFunctions.hb_get_version(this.Handle));

/// <summary>
/// Gets the HandBrake build number.
/// </summary>
public int Build => HBFunctions.hb_get_build(this.Handle);

/// <summary>
/// Initializes this instance.
/// </summary>
Expand Down
10 changes: 0 additions & 10 deletions win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ public interface IHandBrakeInstance : IEncodeInstance
/// </summary>
JsonScanObject Titles { get; }

/// <summary>
/// Gets the HandBrake version string.
/// </summary>
string Version { get; }

/// <summary>
/// Gets the HandBrake build number.
/// </summary>
int Build { get; }

#endregion

#region Public Methods
Expand Down
9 changes: 9 additions & 0 deletions win/CS/HandBrake.Interop/Interop/Model/Language.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,14 @@ public string Display
return this.EnglishName;
}
}

/// <summary>
/// Gets the string representation of the language.
/// </summary>
/// <returns>The string representation of the language.</returns>
public override string ToString()
{
return this.Display;
}
}
}
2 changes: 1 addition & 1 deletion win/CS/HandBrake.Worker/HandBrake.Worker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HandBrake.Interop\HandBrake.Interop.csproj">
<Project>{087a2ba8-bac2-4577-a46f-07ff9d420016}</Project>
<Project>{21bd6180-2f40-44c7-803d-65aba245447e}</Project>
<Name>HandBrake.Interop</Name>
</ProjectReference>
</ItemGroup>
Expand Down
18 changes: 10 additions & 8 deletions win/CS/HandBrake.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.202
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.Interop", "HandBrake.Interop\HandBrake.Interop.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeWPF", "HandBrakeWPF\HandBrakeWPF.csproj", "{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5CB7BC74-449C-4E95-98AB-E1E4387E514B}"
Expand All @@ -18,26 +16,30 @@ Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "HandBrakeAppX", "HandBrakeA
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.Worker", "HandBrake.Worker\HandBrake.Worker.csproj", "{F8370F37-B226-4830-AEE7-6D7AE403E3D2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandBrake.Interop", "HandBrake.Interop\HandBrake.Interop.csproj", "{21BD6180-2F40-44C7-803D-65ABA245447E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x64.ActiveCfg = Debug|x64
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x64.Build.0 = Debug|x64
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|x64.ActiveCfg = Release|x64
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|x64.Build.0 = Release|x64
{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x64.ActiveCfg = Debug|x64
{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x64.Build.0 = Debug|x64
{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|x64.ActiveCfg = Release|x64
{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|x64.Build.0 = Release|x64
{3BAEBAC7-9042-4863-876F-C550ADCA66DC}.Debug|x64.ActiveCfg = Debug|Any CPU
{3BAEBAC7-9042-4863-876F-C550ADCA66DC}.Debug|x64.Build.0 = Debug|Any CPU
{3BAEBAC7-9042-4863-876F-C550ADCA66DC}.Release|x64.ActiveCfg = Release|Any CPU
{6E855245-E402-4C0F-BB0B-EEB63082F6AC}.Debug|x64.ActiveCfg = Debug|x64
{6E855245-E402-4C0F-BB0B-EEB63082F6AC}.Release|x64.ActiveCfg = Release|x64
{F8370F37-B226-4830-AEE7-6D7AE403E3D2}.Debug|x64.ActiveCfg = Debug|x64
{F8370F37-B226-4830-AEE7-6D7AE403E3D2}.Debug|x64.Build.0 = Debug|x64
{F8370F37-B226-4830-AEE7-6D7AE403E3D2}.Release|x64.ActiveCfg = Release|x64
{21BD6180-2F40-44C7-803D-65ABA245447E}.Debug|x64.ActiveCfg = Debug|Any CPU
{21BD6180-2F40-44C7-803D-65ABA245447E}.Debug|x64.Build.0 = Debug|Any CPU
{21BD6180-2F40-44C7-803D-65ABA245447E}.Release|x64.ActiveCfg = Release|Any CPU
{21BD6180-2F40-44C7-803D-65ABA245447E}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
13 changes: 6 additions & 7 deletions win/CS/HandBrakeWPF/HandBrakeWPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -710,19 +710,18 @@
<ItemGroup>
<Resource Include="Views\Images\Presets2.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HandBrake.Interop\HandBrake.Interop.csproj">
<Project>{087a2ba8-bac2-4577-a46f-07ff9d420016}</Project>
<Name>HandBrake.Interop</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Views\Images\close64.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Views\Images\close64_dark.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\HandBrake.Interop\HandBrake.Interop.csproj">
<Project>{21bd6180-2f40-44c7-803d-65aba245447e}</Project>
<Name>HandBrake.Interop</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
Expand Down

0 comments on commit 7bd675b

Please sign in to comment.