diff options
author | sr55 <[email protected]> | 2019-05-08 21:39:40 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-05-08 21:39:40 +0100 |
commit | 447a4aa7443726e70b74c163315ea0f7e97cd03b (patch) | |
tree | 1655cad7851a72ea05088c1817f03b6df47b4f2b | |
parent | 7bd675b67fbadc193750377f7f2fc4b60a1ca193 (diff) |
Revert "Updated HandBrake.Interop to .NET Standard 2.0 and the new SDK project style. (#2068)"
This reverts commit 7bd675b67fbadc193750377f7f2fc4b60a1ca193.
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrake.Interop.csproj | 207 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/Model/Language.cs | 9 | ||||
-rw-r--r-- | win/CS/HandBrake.Worker/HandBrake.Worker.csproj | 2 | ||||
-rw-r--r-- | win/CS/HandBrake.sln | 18 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 13 |
7 files changed, 235 insertions, 34 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj index e6bb24056..a4aff67fe 100644 --- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj +++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj @@ -1,12 +1,203 @@ -<Project Sdk="Microsoft.NET.Sdk"> - +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> - <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <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> </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> - <PackageReference Include="Newtonsoft.Json" Version="12.0.2" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> </ItemGroup> - -</Project> + <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 diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs index 7d8ae9a64..139a62e8d 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs @@ -95,6 +95,16 @@ 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 2c224fb4b..193769090 100644 --- a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs @@ -46,6 +46,16 @@ 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 fc8ceb24b..5564a434e 100644 --- a/win/CS/HandBrake.Interop/Interop/Model/Language.cs +++ b/win/CS/HandBrake.Interop/Interop/Model/Language.cs @@ -63,14 +63,5 @@ 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 a9a3d38c9..506e37245 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>{21bd6180-2f40-44c7-803d-65aba245447e}</Project> + <Project>{087a2ba8-bac2-4577-a46f-07ff9d420016}</Project> <Name>HandBrake.Interop</Name> </ProjectReference> </ItemGroup> diff --git a/win/CS/HandBrake.sln b/win/CS/HandBrake.sln index 4a20de550..5bea23de6 100644 --- a/win/CS/HandBrake.sln +++ b/win/CS/HandBrake.sln @@ -1,8 +1,10 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.28803.202
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.12
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}"
@@ -16,30 +18,26 @@ 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 d2a1619b0..53235d092 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -711,17 +711,18 @@ <Resource Include="Views\Images\Presets2.png" />
</ItemGroup>
<ItemGroup>
- <Resource Include="Views\Images\close64.png" />
+ <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_dark.png" />
+ <Resource Include="Views\Images\close64.png" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\HandBrake.Interop\HandBrake.Interop.csproj">
- <Project>{21bd6180-2f40-44c7-803d-65aba245447e}</Project>
- <Name>HandBrake.Interop</Name>
- </ProjectReference>
+ <Resource Include="Views\Images\close64_dark.png" />
</ItemGroup>
+ <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
|