Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Latest commit

 

History

History
81 lines (65 loc) · 3.98 KB

README.md

File metadata and controls

81 lines (65 loc) · 3.98 KB

Hzexe.QQMusic

解析QQ音乐的库,支持无损品质解析和下载

Telegram Chat license

Package Branch Visual Studio 2017 Linux .Net Core 多平台Native库
NuGet NuGet Release master Build status Build Status Build status

功能

  • 按歌名搜索
  • 下载指定歌曲的指定品质文件
  • 下载歌词

演示截图

截图

安装

Package manager:

Install-Package QQMusicLib

.NET CLI:

dotnet add package QQMusicLib

使用示例


https://github.com/hzexe/Hzexe.QQMusic/tree/master/Example

从源码编译

  1. 获取源码
git clone https://github.com/hzexe/Hzexe.QQMusic.git

Or

svn checkout https://github.com/hzexe/Hzexe.QQMusic.git
  1. 修改以满足你需求的目标运行库 项目配置成支持多种.NET运行时,如果编译环境缺少相关SDK,导致编译部分失败或完全失败.错误号MSB3644,提示大致是:

    /home/android/dotnet/sdk/2.2.101/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/android/Hzexe.QQMusic/Example/WindowsFormsApp/WindowsFormsApp.csproj]

:使用文本编辑工具打开QQMusic.hzexe.com.csproj,修改TargetFrameworks 比如在非Windows下修改成

<TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>

比如Windows下修改成

<TargetFrameworks>net45</TargetFrameworks>

  1. 编译工具执行编译

    1. Visual Studio 2017 打开解决方案直接编译成Release或在开发人员命令提示符下运行msbuild /p:Configuration=Release
    2. .NET Core(2.1或以上版本,已知在Linux Arm64下需要3.0或以上版本coreclr_issues_19578
            dotnet build -f netstandard1.6 QQMusic.hzexe.com
3.Native库编译
  .net core下执行:<br />
            dotnet publish /p:NativeLib=Shared -r win-x64 -c release QQMusic_Native_Library
  其中参数值NativeLib可以为Static 为静态库<br />
  其中-r参数是你要的目标运行时,win-x64 linux-x64  osx-x64 android等,更多见[RID Catalog](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)。<br />
  win-x64有个使用native库的[vc示例](https://github.com/hzexe/Hzexe.QQMusic/tree/master/Example/Windows_x64) <br />
  可能是CoreRT还没有Release的原因,分别在ubuntu和windows下尝试交叉编译失败。

其它

限技术交流,不对使用本库后果负责