Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix linux build error #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
# trezord-go
# onekey-bridge

[![Build Status](https://travis-ci.org/trezor/trezord-go.svg?branch=master)](https://travis-ci.org/trezor/trezord-go) [![gitter](https://badges.gitter.im/trezor/community.svg)](https://gitter.im/trezor/community) [![Go Report Card](https://goreportcard.com/badge/trezor/trezord-go)](https://goreportcard.com/report/trezor/trezord-go)
从 [trezord-go](https://github.com/trezor/trezord-go) fork 而来,主要为了本地通信时增加 \*.onekey.so 域名的支持。在 web 端连接时,需要本地有 bridge 的支持。

Trezor Communication Daemon aka Trezor Bridge (written in Go)
可以在 [release](https://github.com/OneKeyHQ/onekey-bridge/releases) 看到最新发布的二进制安装文件。

## 编译与安装
在本地安装了 go 环境之后,最好把项目安装到 GOPATH 中,防止后续 go 编译错误,一般来说 GOPATH 是 `~/${username}/go` (`username` 是当前登陆账户):
```
go get github.com/karalabe/xgo
docker pull karalabe/xgo-latest
```

同时确保 `xgo` 和 `docker` 在环境变量中

```
cd release
GOPATH=xx make all
```

进入 release 文件夹,在跑命令时,增加 GOPATH 环境变量,GOPATH 一般来说是 `~/${username}/go` (username 是当前登陆账户),也可以通过 `go env` 来确认。

编译完成之后,installers 下面就会有以下 8 个编译文件:

* onekey-bridge-2.0.33-1.aarch64.rpm
* onekey-bridge-2.0.33-1.i386.rpm(Linux 32-bit (rpm))
* onekey-bridge-2.0.33-1.x86_64.rpm(Linux 64-bit (rpm))
* onekey-bridge-2.0.33-win32-install.exe(windows 系统用户,32位,64位均用此安装包)
* onekey-bridge-2.0.33.pkg(OSX 系统用户)
* onekey-bridge_2.0.33_amd64.deb(Linux 64-bit (deb))
* onekey-bridge_2.0.33_arm64.deb
* onekey-bridge_2.0.33_i386.deb(Linux 32-bit (deb))

其中中间的内容是版本号,由根目录下的 VERSION 文件控制,所以每次代码更新后,需要手动更新 VERSION 文件中的版本号。

**Only compatible with Chrome (version 53 or later) and Firefox (version 55 or later).**

Expand Down
9 changes: 6 additions & 3 deletions release/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: windows linux macos copy gpg clean

all: windows linux macos copy gpg
all: windows linux macos copy gpg rename

linux:
make -C linux all
Expand All @@ -19,8 +19,11 @@ copy:
cp linux/build/*.deb linux/build/*.rpm installers

gpg:
gpg -u 54067D8BBF00554181B5AB8F26A3A56662F0E7E2 --armor --detach-sig installers/trezor-bridge*.exe
gpg -u 54067D8BBF00554181B5AB8F26A3A56662F0E7E2 --armor --detach-sig installers/*.pkg
# gpg -u 54067D8BBF00554181B5AB8F26A3A56662F0E7E2 --armor --detach-sig installers/trezor-bridge*.exe
# gpg -u 54067D8BBF00554181B5AB8F26A3A56662F0E7E2 --armor --detach-sig installers/*.pkg

clean:
rm -rf installers

rename:
cd installers && for f in trezor*;do mv $$f onekey$$(echo $$f | cut -c7-); done;
1 change: 1 addition & 0 deletions release/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN dnf update -y

RUN dnf install -y ruby-devel rubygems rpm-build
RUN dnf install -y autoconf automake libtool make
RUN dnf install -y git
RUN gem install fpm --no-document

# install package signing tools
Expand Down

This file was deleted.