chore: en readme

This commit is contained in:
levi committed 2022-11-04 16:25:57 +08:00
1 parent 837a193e96
commit 8a94650370
2 files changed
+154 -26

No files matched your search

+33 -26
View File
@@ -5,13 +5,15 @@
![](_docs/img/banner.png)
## 介绍
[English](/README.md) | [中文](/README_zh-CN.md)
Gopeed 是一款由`Golang`+`Flutter`开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持全平台使用。
## Introduction
## 下载
Gopeed is a high-speed downloader developed by `Golang`+`Flutter`, which supports (HTTP, BitTorrent, Magnet) protocol downloads and supports all platforms.
**已支持平台**
## Installation
**Supported platforms**
- [x] windows
- [x] macos
@@ -20,44 +22,46 @@ Gopeed 是一款由`Golang`+`Flutter`开发的高速下载器,支持(HTTP、
- [ ] ios
- [x] web
[点击前往](https://github.com/monkeyWie/gopeed/releases/latest)
[Go Release](https://github.com/monkeyWie/gopeed/releases/latest)
### 命令行工具
### Command tool
使用`go install`安装:
use `go install`:
````bash
```bash
go install github.com/monkeyWie/gopeed/cmd/gopeed
```
````
## 界面展示
## Showcase
![](_docs/img/ui-demo.png)
## 开发
## Development
本项目分为前端和后端两个部分,前端使用`flutter`,后端使用`Golang`,两边通过`http`协议进行通讯,在 unix 系统下,使用的是`unix socket`,在 windows 系统下,使用的是`tcp`协议。
This project is divided into two parts, the front end uses `flutter`, the back end uses `Golang`, and the two sides communicate through the `http` protocol. On the unix system, `unix socket` is used, and on the windows system, `tcp` protocol is used.
> 前端代码位于`ui/flutter`目录下。
> The front code is located in the `ui/flutter` directory.
### 环境要求
### Environment
1. Golang 1.9+
2. Flutter 3.0+
### 克隆项目
### Clone
```bash
git clone [email protected]:monkeyWie/gopeed.git
```
### 编译
### Build
#### 桌面端
#### Desktop
首先需要按照[flutter desktop 官网文档](https://docs.flutter.dev/development/platform-integration/desktop)进行环境配置,然后需要准备好`cgo`环境,具体可以自行搜索。
First, you need to configure the environment according to the [flutter desktop official website document](https://docs.flutter.dev/development/platform-integration/desktop), and then you need to prepare the `cgo` environment, which can be searched for yourself.
构建命令:
command:
- windows
@@ -83,16 +87,16 @@ cd ui/flutter
flutter build linux
```
#### 移动端
#### Mobile
同样的也是需要准备好`cgo`环境,接着安装`gomobile`:
Same as before, you also need to prepare the `cgo` environment, and then install `gomobile`:
```bash
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
```
构建命令:
command:
- android
@@ -102,11 +106,13 @@ cd ui/flutter
flutter build apk
```
#### Web 端(推荐本地调试使用)
#### Web
Web 端直接与后端 http 服务通讯,不需要额外准备环境。
Web platform communicates directly with the backend http server, no additional environment is required.
构建命令:
```bash
command:
```bash
cd ui/flutter
@@ -116,6 +122,7 @@ cp -r ui/flutter/build/web cmd/web/dist
go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/monkeyWie/gopeed/cmd/web
```
## 开源许可
## License
[GPLv3](LICENSE)
基于 [GPLv3](LICENSE) 协议开源。
+121
View File
@@ -0,0 +1,121 @@
[![Test Status](https://github.com/monkeyWie/gopeed/workflows/test/badge.svg)](https://github.com/monkeyWie/gopeed/actions?query=workflow%3Atest)
[![Codecov](https://codecov.io/gh/monkeyWie/gopeed/branch/main/graph/badge.svg)](https://codecov.io/gh/monkeyWie/gopeed)
[![Release](https://img.shields.io/github/release/monkeyWie/gopeed.svg?style=flat-square)](https://github.com/monkeyWie/gopeed/releases)
[![Discord](https://img.shields.io/discord/1037992631881449472?label=Discord&logo=discord&style=social)](https://discord.gg/ZUJqJrwCGB)
![](_docs/img/banner.png)
## 介绍
Gopeed 是一款由`Golang`+`Flutter`开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持全平台使用。
## 下载
**已支持平台**
- [x] windows
- [x] macos
- [x] linux
- [x] android
- [ ] ios
- [x] web
[点击前往](https://github.com/monkeyWie/gopeed/releases/latest)
### 命令行工具
使用`go install`安装:
```bash
go install github.com/monkeyWie/gopeed/cmd/gopeed
```
## 界面展示
![](_docs/img/ui-demo.png)
## 开发
本项目分为前端和后端两个部分,前端使用`flutter`,后端使用`Golang`,两边通过`http`协议进行通讯,在 unix 系统下,使用的是`unix socket`,在 windows 系统下,使用的是`tcp`协议。
> 前端代码位于`ui/flutter`目录下。
### 环境要求
1. Golang 1.9+
2. Flutter 3.0+
### 克隆项目
```bash
git clone [email protected]:monkeyWie/gopeed.git
```
### 编译
#### 桌面端
首先需要按照[flutter desktop 官网文档](https://docs.flutter.dev/development/platform-integration/desktop)进行环境配置,然后需要准备好`cgo`环境,具体可以自行搜索。
构建命令:
- windows
```bash
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build windows
```
- macos
```bash
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build macos
```
- linux
```bash
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/monkeyWie/gopeed/bind/desktop
cd ui/flutter
flutter build linux
```
#### 移动端
同样的也是需要准备好`cgo`环境,接着安装`gomobile`:
```bash
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
```
构建命令:
- android
```bash
gomobile bind -tags nosqlite -ldflags="-w -s" -o ui/flutter/android/app/libs/libgopeed.aar -target=android -androidapi 19 -javapkg=com.gopeed github.com/monkeyWie/gopeed/bind/mobile
cd ui/flutter
flutter build apk
```
#### Web 端(推荐本地调试使用)
Web 端直接与后端 http 服务通讯,不需要额外准备环境。
构建命令:
```bash
cd ui/flutter
flutter build web
cd ../../
cp -r ui/flutter/build/web cmd/web/dist
go build -tags nosqlite,web -ldflags="-s -w" -o bin/ github.com/monkeyWie/gopeed/cmd/web
```
## 开源许可
基于 [GPLv3](LICENSE) 协议开源。