[Bash shell] 纯文本查看 复制代码 ➜ playlist git:(main) mkdir build && cd build
➜ build git:(main) cmake ..
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 4.0 or higher is required. You are running version 3.28.3
-- Configuring incomplete, errors occurred!
➜ build git:(main) ✗ cmake --version
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
➜ build git:(main) ✗ sudo apt update && sudo apt-get install cmake g++ libpugixml-dev rapidjson-dev libcurl4-openssl-dev libtag1-dev
...
➜ build git:(main) ✗ vi ../CMakeLists.txt
# 此处需要修改第一行的版本号 4.0->3.0
➜ build git:(main) ✗ cmake ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found RapidJSON: /usr/include/rapidjson
-- Found CURL: /usr/lib/aarch64-linux-gnu/libcurl.so (found version "8.5.0")
-- Found TagLib: /usr/lib/aarch64-linux-gnu/libtag.so
-- Configuring done (3.3s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pi/playlist/build
➜ build git:(main) ✗ ls
CMakeCache.txt CMakeFiles Makefile cmake_install.cmake
➜ build git:(main) ✗ make
[ 10%] Building CXX object CMakeFiles/playlist.dir/src/main.cpp.o
[ 20%] Building CXX object CMakeFiles/playlist.dir/src/playlist.cpp.o
[ 30%] Building CXX object CMakeFiles/playlist.dir/src/asx.cpp.o
[ 40%] Building CXX object CMakeFiles/playlist.dir/src/cue.cpp.o
[ 50%] Building CXX object CMakeFiles/playlist.dir/src/jspf.cpp.o
[ 60%] Building CXX object CMakeFiles/playlist.dir/src/m3u.cpp.o
[ 70%] Building CXX object CMakeFiles/playlist.dir/src/pls.cpp.o
[ 80%] Building CXX object CMakeFiles/playlist.dir/src/wpl.cpp.o
[ 90%] Building CXX object CMakeFiles/playlist.dir/src/xspf.cpp.o
[100%] Linking CXX executable playlist
[100%] Built target playlist
➜ build git:(main) ✗ ls
CMakeCache.txt CMakeFiles Makefile cmake_install.cmake playlist
➜ build git:(main) ✗ ./playlist
Nothing to do!
playlist -h for usage information
➜ build git:(main) ✗ ./playlist -h
playlist version 2.8
Copyright (C) James D. Smith
Usage: playlist [-l|-L|-P|-J|-S|-K|-C|-A|-T|-M|-E|-D|-G|-N dupe|image|net|netimg|target|unfound|unfoundimg|unique] [-p] [-f path] [-z] [[-O|-I]|[-R|-B path]] [-c trackpos:track] [-a [track:]target] [-e track:FIELD=value] [-r track|target] [-s] [-i] [-d] [-u] [-j] [-n] [-m] [-b artist] [-k comment] [-g image] [-t title] [-q] [-v] [-x] [-o] [-w outfile.ext] infile...
Options:
-l LIST Targets only
-L LIST Tracks and targets
-P LIST Playlist and targets
-J LIST Playlist title and targets
-S LIST Playlist artist and targets
-K LIST Playlist image and targets
-C LIST Playlist comment and targets
-A LIST Artists and targets
-T LIST Titles and targets
-M LIST Albums and targets
-E LIST Comments and targets
-D LIST Identifiers and targets
-G LIST Image and targets
-N LIST Info and targets
-p List all entry targets in absolute paths (same as -O -l target)
-x Preview changes (with -w)
-f In playlist relative local target base path
-z Ignore in playlist parse errors
-w Out playlist file (.asx, .cue, .jspf, .m3u, .pls, .wpl, .xspf)
-o Clobber playlist (with -w out; or first in)
-R Out playlist local targets relative to out playlist
-B Out playlist local targets base path
-O Out playlist local targets in absolute paths
-I Out playlist local targets in file URI scheme (implied -O)
-t Set title for out playlist
-b Set artist for out playlist
-g Set image for out playlist
-k Set comment for out playlist
-c trackpos:track Move entry
-a Insert or append target as entry
-e track:FIELD=value Set entry field
-r Remove entry matching track or target
-d Remove duplicate entries from out playlist
-u Remove unfound target entries and images from out playlist
-j Merge nested playlists
-n Out playlist entries in random order
-m Minimal out playlist (targets only)
-s Verify network targets
-i Get entry metadata from local targets
-q Quiet
-v Verbose
-h This help
FIELD can be one of: (ta)rget, (ar)tist, (ti)tle, (al)bum, (co)mment, (id)entifier, (im)age, (in)fo, album (tr)ack, (du)ration
LIST can be one of: dupe, image, net, netimg, target, unfound, unfoundimg, or unique (multiple infiles)
Exit codes:
0: Success or quiet flag
1: Out playlist has unfound entry targets or images; or multiple artists, images, or titles; or a dupe or unfound list contains at least one entry; or an in playlist was not found or was parsed with errors; or metadata could not be read from a target
2: IO, parse, or command line error
➜ build git:(main) ✗
先贴个linux环境下编译成功的操作序列吧,windows下安装各种依赖库很麻烦,楼主是只要二进制文件? |