Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
0f1cbfd3
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0f1cbfd3
编写于
11月 25, 2016
作者:
P
Péter Szilágyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Makefile, build: do proper mobile builds, not cross builds
上级
586f10ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
16 deletion
+29
-16
Makefile
Makefile
+12
-13
build/ci.go
build/ci.go
+17
-3
未找到文件。
Makefile
浏览文件 @
0f1cbfd3
...
...
@@ -2,12 +2,11 @@
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.
.PHONY
:
geth geth-cross evm all test clean
.PHONY
:
geth
android ios
geth-cross evm all test clean
.PHONY
:
geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
.PHONY
:
geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
.PHONY
:
geth-darwin geth-darwin-386 geth-darwin-amd64
.PHONY
:
geth-windows geth-windows-386 geth-windows-amd64
.PHONY
:
geth-android geth-ios
GOBIN
=
build/bin
GO
?=
latest
...
...
@@ -20,11 +19,21 @@ geth:
evm
:
build/env.sh go run build/ci.go
install
./cmd/evm
@
echo
"Done building."
@
echo
"Run
\"
$(GOBIN)
/evm to start the evm."
@
echo
"Run
\"
$(GOBIN)
/evm
\"
to start the evm."
all
:
build/env.sh go run build/ci.go
install
android
:
build/env.sh go run build/ci.go aar
--local
@
echo
"Done building."
@
echo
"Import
\"
$(GOBIN)
/geth.aar
\"
to use the library."
ios
:
build/env.sh go run build/ci.go xcode
--local
@
echo
"Done building."
@
echo
"Import
\"
$(GOBIN)
/Geth.framework
\"
to use the library."
test
:
all
build/env.sh go run build/ci.go
test
...
...
@@ -112,13 +121,3 @@ geth-windows-amd64:
build/env.sh go run build/ci.go xgo
--
--go
=
$(GO)
--dest
=
$(GOBIN)
--targets
=
windows/amd64
-v
./cmd/geth
@
echo
"Windows amd64 cross compilation done:"
@
ls
-ld
$(GOBIN)
/geth-windows-
*
|
grep
amd64
geth-android
:
build/env.sh go run build/ci.go xgo
--
--go
=
$(GO)
--dest
=
$(GOBIN)
--targets
=
android-21/aar
-v
./cmd/geth
@
echo
"Android cross compilation done:"
@
ls
-ld
$(GOBIN)
/geth-android-
*
geth-ios
:
build/env.sh go run build/ci.go xgo
--
--go
=
$(GO)
--dest
=
$(GOBIN)
--targets
=
ios-7.0/framework
-v
./cmd/geth
@
echo
"iOS framework cross compilation done:"
@
ls
-ld
$(GOBIN)
/geth-ios-
*
build/ci.go
浏览文件 @
0f1cbfd3
...
...
@@ -29,8 +29,8 @@ Available commands are:
importkeys -- imports signing keys from env
debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
nsis -- creates a Windows NSIS installer
aar [ -
sign key-id ] [-deploy repo] [ -upload dest ]
-- creates an Android archive
xcode [ -
sign key-id ] [-deploy repo] [ -upload dest ]
-- creates an iOS XCode framework
aar [ -
local ] [ -sign key-id ] [-deploy repo] [ -upload dest ]
-- creates an Android archive
xcode [ -
local ] [ -sign key-id ] [-deploy repo] [ -upload dest ]
-- creates an iOS XCode framework
xgo [ options ] -- cross builds according to options
For all commands, -n prevents execution of external programs (dry run mode).
...
...
@@ -654,6 +654,7 @@ func doWindowsInstaller(cmdline []string) {
func
doAndroidArchive
(
cmdline
[]
string
)
{
var
(
local
=
flag
.
Bool
(
"local"
,
false
,
`Flag whether we're only doing a local build (skip Maven artifacts)`
)
signer
=
flag
.
String
(
"signer"
,
""
,
`Environment variable holding the signing key (e.g. ANDROID_SIGNING_KEY)`
)
deploy
=
flag
.
String
(
"deploy"
,
""
,
`Destination to deploy the archive (usually "https://oss.sonatype.org")`
)
upload
=
flag
.
String
(
"upload"
,
""
,
`Destination to upload the archive (usually "gethstore/builds")`
)
...
...
@@ -666,6 +667,11 @@ func doAndroidArchive(cmdline []string) {
build
.
MustRun
(
gomobileTool
(
"init"
))
build
.
MustRun
(
gomobileTool
(
"bind"
,
"--target"
,
"android"
,
"--javapkg"
,
"org.ethereum"
,
"-v"
,
"github.com/ethereum/go-ethereum/mobile"
))
if
*
local
{
// If we're building locally, copy bundle to build dir and skip Maven
os
.
Rename
(
"geth.aar"
,
filepath
.
Join
(
GOBIN
,
"geth.aar"
))
return
}
meta
:=
newMavenMetadata
(
env
)
build
.
Render
(
"build/mvn.pom"
,
meta
.
Package
+
".pom"
,
0755
,
meta
)
...
...
@@ -768,6 +774,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
func
doXCodeFramework
(
cmdline
[]
string
)
{
var
(
local
=
flag
.
Bool
(
"local"
,
false
,
`Flag whether we're only doing a local build (skip Maven artifacts)`
)
signer
=
flag
.
String
(
"signer"
,
""
,
`Environment variable holding the signing key (e.g. IOS_SIGNING_KEY)`
)
deploy
=
flag
.
String
(
"deploy"
,
""
,
`Destination to deploy the archive (usually "trunk")`
)
upload
=
flag
.
String
(
"upload"
,
""
,
`Destination to upload the archives (usually "gethstore/builds")`
)
...
...
@@ -777,12 +784,19 @@ func doXCodeFramework(cmdline []string) {
// Build the iOS XCode framework
build
.
MustRun
(
goTool
(
"get"
,
"golang.org/x/mobile/cmd/gomobile"
))
build
.
MustRun
(
gomobileTool
(
"init"
))
bind
:=
gomobileTool
(
"bind"
,
"--target"
,
"ios"
,
"--tags"
,
"ios"
,
"--prefix"
,
"GE"
,
"-v"
,
"github.com/ethereum/go-ethereum/mobile"
)
if
*
local
{
// If we're building locally, use the build folder and stop afterwards
bind
.
Dir
,
_
=
filepath
.
Abs
(
GOBIN
)
build
.
MustRun
(
bind
)
return
}
archive
:=
"geth-"
+
archiveBasename
(
"ios"
,
env
)
if
err
:=
os
.
Mkdir
(
archive
,
os
.
ModePerm
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
bind
:=
gomobileTool
(
"bind"
,
"--target"
,
"ios"
,
"--tags"
,
"ios"
,
"--prefix"
,
"GE"
,
"-v"
,
"github.com/ethereum/go-ethereum/mobile"
)
bind
.
Dir
,
_
=
filepath
.
Abs
(
archive
)
build
.
MustRun
(
bind
)
build
.
MustRunCommand
(
"tar"
,
"-zcvf"
,
archive
+
".tar.gz"
,
archive
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录