Skip to content

Commit

Permalink
v3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iikira committed Mar 9, 2018
1 parent 6710658 commit bec913d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

# 举一些例子
Expand Down Expand Up @@ -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, 太高可能会导致程序出错被操作系统结束掉.

Expand Down
18 changes: 14 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file modified resource_windows.syso
Binary file not shown.
8 changes: 4 additions & 4 deletions versioninfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"Major": 3,
"Minor": 3,
"Patch": 0,
"Build": 4
"Build": 5
},
"ProductVersion": {
"Major": 3,
"Minor": 3,
"Patch": 0,
"Build": 4
"Build": 5
},
"FileFlagsMask": "3f",
"FileFlags ": "00",
Expand All @@ -22,14 +22,14 @@
"Comments": "",
"CompanyName": "iikira",
"FileDescription": "百度网盘客户端",
"FileVersion": "v3.3.Beta4",
"FileVersion": "v3.3",
"InternalName": "",
"LegalCopyright": "© 2016-2018 iikira.",
"LegalTrademarks": "",
"OriginalFilename": "",
"PrivateBuild": "",
"ProductName": "BaiduPCS-Go",
"ProductVersion": "v3.3.Beta4",
"ProductVersion": "v3.3",
"SpecialBuild": ""
},
"VarFileInfo": {
Expand Down

0 comments on commit bec913d

Please sign in to comment.