summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorDavid Rickard <[email protected]>2019-05-08 13:31:41 -0700
committerScott <[email protected]>2019-05-08 21:31:41 +0100
commit7bd675b67fbadc193750377f7f2fc4b60a1ca193 (patch)
tree896a112621aae9572e18bfd3f8e8b42d691ced87 /win/CS
parentbafd0c3dfd1e6a23da7389b1d9c783d3b489861c (diff)
Updated HandBrake.Interop to .NET Standard 2.0 and the new SDK project style. (#2068)
Updated solution to VS 2019
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.Interop/HandBrake.Interop.csproj207
-rw-r--r--win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs10
-rw-r--r--win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs10
-rw-r--r--win/CS/HandBrake.Interop/Interop/Model/Language.cs9
-rw-r--r--win/CS/HandBrake.Worker/HandBrake.Worker.csproj2
-rw-r--r--win/CS/HandBrake.sln18
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj13
7 files changed, 34 insertions, 235 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
index a4aff67fe..e6bb24056 100644
--- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
+++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
@@ -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> \ No newline at end of file
+
+</Project>
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs
index 139a62e8d..7d8ae9a64 100644
--- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs
@@ -95,16 +95,6 @@ namespace HandBrake.Interop.Interop
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>
/// <param name="verbosity">
diff --git a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
index 193769090..2c224fb4b 100644
--- a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs
@@ -46,16 +46,6 @@ namespace HandBrake.Interop.Interop.Interfaces
/// </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
diff --git a/win/CS/HandBrake.Interop/Interop/Model/Language.cs b/win/CS/HandBrake.Interop/Interop/Model/Language.cs
index 5564a434e..fc8ceb24b 100644
--- a/win/CS/HandBrake.Interop/Interop/Model/Language.cs
+++ b/win/CS/HandBrake.Interop/Interop/Model/Language.cs
@@ -63,5 +63,14 @@ namespace HandBrake.Interop.Interop.Model
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;
+ }
}
}
diff --git a/win/CS/HandBrake.Worker/HandBrake.Worker.csproj b/win/CS/HandBrake.Worker/HandBrake.Worker.csproj
index 506e37245..a9a3d38c9 100644
--- a/win/CS/HandBrake.Worker/HandBrake.Worker.csproj
+++ b/win/CS/HandBrake.Worker/HandBrake.Worker.csproj
@@ -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>
diff --git a/win/CS/HandBrake.sln b/win/CS/HandBrake.sln
index 5bea23de6..4a20de550 100644
--- a/win/CS/HandBrake.sln
+++ b/win/CS/HandBrake.sln
@@ -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}"
@@ -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
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index 53235d092..d2a1619b0 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -711,18 +711,17 @@
<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>