fixed yt-dlp executable name for linux

master
subhra74 2022-08-06 19:17:33 +05:30
parent 89fbfd685b
commit 1e6d43acc3
5 changed files with 11 additions and 42 deletions

View File

@ -30,7 +30,7 @@
<AppConfig>App.PreDotNet4.config</AppConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net4.7.2|x86'">
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

View File

@ -137,7 +137,7 @@ namespace XDM.Core.Updater
//TODO: Handle MacOS
private static string GetYoutubeDLExecutableNameForCurrentOS() =>
Environment.OSVersion.Platform == PlatformID.Win32NT ? "yt-dlp_x86.exe" : "yt-dlp";
Environment.OSVersion.Platform == PlatformID.Win32NT ? "yt-dlp_x86.exe" : "yt-dlp_linux";
//TODO: Handle MacOS
private static string GetFFmpegExecutableNameForCurrentOS() =>

View File

@ -278,7 +278,7 @@ namespace XDM.Core.Util
public static string FindYDLBinary()
{
//var executableName = Environment.OSVersion.Platform == PlatformID.Win32NT ? "youtube-dl.exe" : "youtube-dl";
var executableName = Environment.OSVersion.Platform == PlatformID.Win32NT ? "yt-dlp_x86.exe" : "yt-dlp";
var executableName = Environment.OSVersion.Platform == PlatformID.Win32NT ? "yt-dlp_x86.exe" : "yt-dlp_linux";
var path = Path.Combine(Config.DataDir, executableName);
if (File.Exists(path))
{

View File

@ -7,7 +7,7 @@
<PublishTrimmed>true</PublishTrimmed>
<AssemblyName>xdm-app</AssemblyName>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>Link</TrimMode>
<TrimMode>Link</TrimMode>
<RootNamespace>XDM.GtkUI</RootNamespace>
<!--RuntimeIdentifier>linux-x64</RuntimeIdentifier-->
<!--RuntimeIdentifier>win-x64</RuntimeIdentifier-->
@ -20,6 +20,11 @@
<!--<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>-->
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.38" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />

View File

@ -18,36 +18,12 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net4.7.2|x86'">
<Optimize>true</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net4.7.2|x64'">
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net4.7.2|x86'">
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net4.7.2|x64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<!--<ItemGroup>
<ProjectReference Include="..\BrowserMonitor\BrowserMonitor.csproj" />
<ProjectReference Include="..\NativeMessagingHost\NativeMessagingHost.csproj" />
<ProjectReference Include="..\Translations\Translations.csproj" />
<ProjectReference Include="..\XDM.Core.UI\XDM.Core.UI.csproj" />
<ProjectReference Include="..\XDM.Core\XDM.Core.csproj" />
<ProjectReference Include="..\XDM_CoreFx\XDM.Core.csproj" />
<ProjectReference Include="..\YoutubeDLHandler\YDLWrapper.csproj" />
<ProjectReference Include="..\TraceLog\TraceLog.csproj" />
</ItemGroup>-->
<ItemGroup>
<Reference Include="PresentationFramework.Aero2" />
</ItemGroup>
@ -60,20 +36,12 @@
<Folder Include="MainWindow\Resources\" />
</ItemGroup>
<!--<ItemGroup>
<LangFiles Include="$(SolutionDir)\Lang\**" />
</ItemGroup>-->
<ItemGroup>
<None Update="xdm-logo.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<!--<Target Name="Copy" AfterTargets="Build">
<Copy SourceFiles="@(LangFiles)" DestinationFolder="$(OutDir)\Lang" />
</Target>-->
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
@ -98,10 +66,6 @@
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
</ItemGroup>
<!--<ItemGroup>
<ProjectReference Include="..\NativeMessagingHost\NativeMessagingHost.csproj" />
</ItemGroup>-->
<Import Project="..\XDM.Core\XDM.Core.projitems" Label="Shared" />
<Import Project="..\XDM.Messaging\XDM.Messaging.projitems" Label="Shared" />