RustPlayer icon indicating copy to clipboard operation
RustPlayer copied to clipboard

大佬可以提供一个win10的编译教程吗

Open ttyunwei opened this issue 3 years ago • 4 comments

从b站看到您的软件非常喜欢但是由于自己刚开始接触rust鼓捣了一天都无法编译通过如果可以希望大佬提供一个教程

ttyunwei avatar May 11 '22 10:05 ttyunwei

admin@DESKTOP-H5KK5O4 MINGW64 ~/Desktop/RustPlayer (master) $ cargo run Compiling ffmpeg-sys-next v4.4.0 Compiling reqwest v0.11.10 error: failed to run custom build command for ffmpeg-sys-next v4.4.0

Caused by: process didn't exit successfully: C:\Users\pys15\Desktop\RustPlayer\target\debug\build\ffmpeg-sys-next-eb17dac68dbfc544\build-script-build (exit code: 101) --- stdout Could not find ffmpeg with vcpkg: Could not find Vcpkg tree: Could not find Vcpkg root at C:\Users\pys15\Desktop\vcpkg.vcpkg-root cargo:rerun-if-env-changed=LIBAVUTIL_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

--- stderr thread 'main' panicked at 'called Result::unwrap() on an Err value: "pkg-config" "--libs" "--cflags" "libavutil" did not exit successfully: exit code: 1 error: could not find system library 'libavutil' required by the 'ffmpeg-sys-next' crate

--- stderr Package libavutil was not found in the pkg-config search path. Perhaps you should add the directory containing libavutil.pc' to the PKG_CONFIG_PATH environment variable No package 'libavutil' found ', C:\Users\pys15\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\ffmpeg-sys-next-4.4.0\build.rs:701:14 note: run with RUST_BACKTRACE=1` environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... error: build failed

ttyunwei avatar May 11 '22 10:05 ttyunwei

可以参考我的CI文件。 https://github.com/Kingtous/RustPlayer/blob/91d3e97dde921176bdeb2a85de8d7080c9b7248c/.github/workflows/rust.yml#L65

使用msys2,然后安装下面的依赖,和ci步骤一样就行。

全程在msys2的mingw64环境下执行命令。 pacman安装所有依赖,cargo run。注意:需要使用msys2下面的rust,而不是windows版本的rust.

如果只是使用的话,建议到action里面,找最近运行成功的条目,到里面下载exe安装包 https://github.com/Kingtous/RustPlayer/actions/workflows/rust.yml

Kingtous avatar May 11 '22 11:05 Kingtous

貌似action里面的win包已经过时了,无法下载

RookieOHY avatar Aug 26 '22 02:08 RookieOHY

搞定 全程在msys2下运行即可

RookieOHY avatar Oct 02 '22 10:10 RookieOHY

可以参考我的CI文件。

https://github.com/Kingtous/RustPlayer/blob/91d3e97dde921176bdeb2a85de8d7080c9b7248c/.github/workflows/rust.yml#L65

使用msys2,然后安装下面的依赖,和ci步骤一样就行。

全程在msys2的mingw64环境下执行命令。 pacman安装所有依赖,cargo run。注意:需要使用msys2下面的rust,而不是windows版本的rust.

如果只是使用的话,建议到action里面,找最近运行成功的条目,到里面下载exe安装包 https://github.com/Kingtous/RustPlayer/actions/workflows/rust.yml

请教下,windows的prerelease是直接把ffmpeg依赖库内置在exe文件中了吗?还是额外安装了一遍?

dbsxdbsx avatar Dec 15 '22 15:12 dbsxdbsx

可以参考我的CI文件。 https://github.com/Kingtous/RustPlayer/blob/91d3e97dde921176bdeb2a85de8d7080c9b7248c/.github/workflows/rust.yml#L65

使用msys2,然后安装下面的依赖,和ci步骤一样就行。 全程在msys2的mingw64环境下执行命令。 pacman安装所有依赖,cargo run。注意:需要使用msys2下面的rust,而不是windows版本的rust. 如果只是使用的话,建议到action里面,找最近运行成功的条目,到里面下载exe安装包 https://github.com/Kingtous/RustPlayer/actions/workflows/rust.yml

请教下,windows的prerelease是直接把ffmpeg依赖库内置在exe文件中了吗?还是额外安装了一遍?

目前windows的依赖是内置到了exe文件中。

Kingtous avatar Dec 16 '22 12:12 Kingtous