From 7bd675b67fbadc193750377f7f2fc4b60a1ca193 Mon Sep 17 00:00:00 2001 From: David Rickard Date: Wed, 8 May 2019 13:31:41 -0700 Subject: Updated HandBrake.Interop to .NET Standard 2.0 and the new SDK project style. (#2068) Updated solution to VS 2019 --- win/CS/HandBrake.Interop/HandBrake.Interop.csproj | 207 +-------------------- .../HandBrake.Interop/Interop/HandBrakeInstance.cs | 10 - .../Interop/Interfaces/IHandBrakeInstance.cs | 10 - win/CS/HandBrake.Interop/Interop/Model/Language.cs | 9 + win/CS/HandBrake.Worker/HandBrake.Worker.csproj | 2 +- win/CS/HandBrake.sln | 18 +- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 13 +- 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 @@ - - + + - Debug - x64 - {087A2BA8-BAC2-4577-A46F-07FF9D420016} - Library - Properties - HandBrake.Interop - HandBrake.Interop - v4.7.1 - 512 - - - - - + netstandard2.0 + false - - x64 - bin\Debug\ - TRACE;DEBUG - true - false - ..\HandBrake.ruleset - 0649 - - - x64 - bin\Release\ - DEBUG;TRACE - true - pdbonly - true - false - - - - ..\packages\gong-wpf-dragdrop.2.0.1\lib\net47\GongSolutions.WPF.DragDrop.dll - - - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll - - - - 3.5 - - - 3.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - - - - - stylecop.json - - - - - - - + - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - + - - - $(TargetFrameworkSDKToolsDirectory)$(Platform)\ - - - - - - - \ 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 139a62e8d..7d8ae9a64 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs @@ -94,16 +94,6 @@ namespace HandBrake.Interop.Interop /// public int FeatureTitle { get; private set; } - /// - /// Gets the HandBrake version string. - /// - public string Version => Marshal.PtrToStringAnsi(HBFunctions.hb_get_version(this.Handle)); - - /// - /// Gets the HandBrake build number. - /// - public int Build => HBFunctions.hb_get_build(this.Handle); - /// /// Initializes this instance. /// 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 /// JsonScanObject Titles { get; } - /// - /// Gets the HandBrake version string. - /// - string Version { get; } - - /// - /// Gets the HandBrake build number. - /// - 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; } } + + /// + /// Gets the string representation of the language. + /// + /// The string representation of the language. + 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 @@ - {087a2ba8-bac2-4577-a46f-07ff9d420016} + {21bd6180-2f40-44c7-803d-65aba245447e} HandBrake.Interop 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 @@ -710,19 +710,18 @@ - - - {087a2ba8-bac2-4577-a46f-07ff9d420016} - HandBrake.Interop - - - + + + {21bd6180-2f40-44c7-803d-65aba245447e} + HandBrake.Interop + + $(TargetFrameworkSDKToolsDirectory)$(Platform)\ -- cgit v1.2.3