From bec913d727719a8127d092e978e3aa461d095925 Mon Sep 17 00:00:00 2001 From: apple <2571583272@qq.com> Date: Fri, 9 Mar 2018 22:08:11 +0800 Subject: [PATCH] v3.3 --- README.md | 23 ++++++++++++++--------- build.sh | 18 ++++++++++++++---- main.go | 2 +- resource_windows.syso | Bin 69362 -> 69338 bytes versioninfo.json | 8 ++++---- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1fc4ea53..34c3d372 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ BaiduPCS-Go d <网盘文件或目录的路径1> <文件或目录2> <文件或目 ``` # 设置保存目录, 保存到 D:\Downloads # 注意区别反斜杠 "\" 和 斜杠 "/" !!! -BaiduPCS-Go set savedir D:/Downloads +BaiduPCS-Go config set -savedir D:/Downloads # 下载 /我的资源/1.mp4 BaiduPCS-Go d /我的资源/1.mp4 @@ -326,21 +326,26 @@ BaiduPCS-Go mv /我的资源/1.mp4 / BaiduPCS-Go mv /我的资源/1.mp4 /我的资源/3.mp4 ``` -## 设置 +## 显示和修改程序配置项 ``` -BaiduPCS-Go set OptionName Value +BaiduPCS-Go config +BaiduPCS-Go config set ``` #### 例子 ``` -# 查看所有可以设置的值 -BaiduPCS-Go set -h +# 显示所有可以设置的值 +BaiduPCS-Go config -h +BaiduPCS-Go config set -h # 设置下载文件的储存目录 -BaiduPCS-Go set savedir D:/Downloads +BaiduPCS-Go config set -savedir D:/Downloads # 设置下载最大并发量为 150 -BaiduPCS-Go set max_parallel 150 +BaiduPCS-Go config set -max_parallel 150 + +# 组合设置, +BaiduPCS-Go config set -max_parallel 150 -savedir D:/Downloads ``` # 举一些例子 @@ -423,9 +428,9 @@ d /我的资源 ## 6. 设置下载最大并发数 -console 模式下, 运行命令 `set -h` (注意空格) 查看设置帮助以及可供设置的值 +console 模式下, 运行命令 `config set -h` (注意空格) 查看设置帮助以及可供设置的值 -console 模式下, 运行命令 `set max_parallel 250` 将下载最大并发数设置为 250 +console 模式下, 运行命令 `config set -max_parallel 250` 将下载最大并发数设置为 250 下载最大并发数建议值: 50~500, 太低下载速度提升不明显甚至速度会变为0, 太高可能会导致程序出错被操作系统结束掉. diff --git a/build.sh b/build.sh index 93d41e2a..10b3284f 100644 --- a/build.sh +++ b/build.sh @@ -2,14 +2,19 @@ name="BaiduPCS-Go" version=$1 if [ "$1" = "" ];then - version=v3.3.Beta4 + version=v3.3 fi output="out/" Build() { + goarm=$4 + if [ "$4" = "" ];then + goarm=7 + fi + echo "Building $1..." - export GOOS=$2 GOARCH=$3 GO386=sse2 CGO_ENABLED=0 + export GOOS=$2 GOARCH=$3 GO386=sse2 CGO_ENABLED=0 GOARM=$4 if [ $2 = "windows" ];then goversioninfo -icon=assets/$name.ico -manifest="$name".exe.manifest -product-name="$name" -file-version="$version" -product-version="$version" -company=iikira -copyright="© 2016-2018 iikira." -o=resource_windows.syso go build -ldflags "-s -w" -o "$output/$1/$name.exe" @@ -26,7 +31,8 @@ ArmBuild() { echo "Building $1..." export GOOS=$2 GOARCH=$3 GOARM=$4 CGO_ENABLED=1 go build -ldflags '-s -w -linkmode=external -extldflags=-pie' -o "$output/$1/$name" - if [ $2 = "darwin" -a $3 = "arm64" ];then + if (( $2 = "darwin" )) && (( $3 = "arm" || $3 = "arm64" ));then + echo 1; ldid -S "$output/$1/$name" fi @@ -53,6 +59,9 @@ RicePack() { rice -i github.com/iikira/BaiduPCS-Go/pcsweb append --exec "$output/$1/$2" } +CC=$NDK_INSTALL/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc ArmBuild $name-$version"-android-21-arm64" android arm64 7 +exit + # Android export NDK_INSTALL=$ANDROID_NDK_ROOT/bin # CC=$NDK_INSTALL/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc ArmBuild $name-$version"-android-16-armv5" android arm 5 @@ -77,7 +86,8 @@ Build $name-$version"-windows-x64" windows amd64 # Linux Build $name-$version"-linux-386" linux 386 Build $name-$version"-linux-amd64" linux amd64 -Build $name-$version"-linux-arm" linux arm +Build $name-$version"-linux-armv5" linux arm 5 +Build $name-$version"-linux-armv7" linux arm 7 Build $name-$version"-linux-arm64" linux arm64 # Build $name-$version"-linux-mips" linux mips # Build $name-$version"-linux-mips64" linux mips64 diff --git a/main.go b/main.go index 95ad62a4..deb7e1ea 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ import ( var ( // Version 版本号 - Version = "v3.3.Beta4" + Version = "v3.3" historyFilePath = pcsutil.ExecutablePathJoin("pcs_command_history.txt") reloadFn = func(c *cli.Context) error { diff --git a/resource_windows.syso b/resource_windows.syso index 3116b6bdfc26524ad2c10810ffc34fde1d46487a..62796d644e7819507502f71010adf2d9f20892bb 100644 GIT binary patch delta 121 zcmew~m*v)67ET{VMg|Z#GLci7Gl7qh!3M~gvr$)>kynKYECVJcG{-V-k7Z=^=3rEr zzLJyCn3EMK&J2XC)1PuO$}_f1XXRp4W=xo_$;DXDtOFEY&BdrX{SFsn2eSc?m(I