Skip to content
Snippets Groups Projects
Commit 60f16719 authored by cyberta's avatar cyberta
Browse files

Merge branch 'improve_build_core' into 'main'

take into GOBIN env variable into account when using gomobile

See merge request !4
parents 2c86fe92 41bc651d
Branches
No related tags found
1 merge request!4take into GOBIN env variable into account when using gomobile
Subproject commit e372171b7c36a5429a3260ffcd274c5b3806cd74 Subproject commit 7a64a5a349cfe88a70b1bee7787a4db867bd323a
...@@ -86,8 +86,11 @@ showtitle "Getting gomobile" ...@@ -86,8 +86,11 @@ showtitle "Getting gomobile"
./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile" ./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile"
showtitle "initiating gomobile" showtitle "initiating gomobile"
if [[ -z ${GOBIN} ]]; then
./golang/bin/gomobile init || quit "./golang/bin/gomobile init" ./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
else
$GOBIN/gomobile init || quit "$GOBIN/gomobile init"
fi
# -------- prepare snowflake --------------- # -------- prepare snowflake ---------------
showtitle "Checking out snowflake repository" showtitle "Checking out snowflake repository"
...@@ -117,19 +120,19 @@ fi ...@@ -117,19 +120,19 @@ fi
showtitle "Building Bitmask Core Android as full aar" showtitle "Building Bitmask Core Android as full aar"
gomobile bind -x -target android -ldflags="-s -w" -tags=netcgo -androidapi=21 -v -trimpath -o lib/bitmaskcore.aar ./obfsvpn/client/ ./motd ./IPtProxy/IPtProxy.go ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -x -target android -ldflags="-s -w" -tags=netcgo -androidapi=21 -v -trimpath -o lib/bitmaskcore.aar ./obfsvpn/client/ ./motd ./IPtProxy/IPtProxy.go ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android Web as full aar including pgpverify" showtitle "Building Bitmask Core Android Web as full aar including pgpverify"
gomobile bind -x -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v ./pgpverify ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -x -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v ./pgpverify ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for armv7" showtitle "Building Bitmask Core Android for armv7"
gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for x86" showtitle "Building Bitmask Core Android for x86"
gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for arm64" showtitle "Building Bitmask Core Android for arm64"
gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for x86_64" showtitle "Building Bitmask Core Android for x86_64"
gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
...@@ -105,7 +105,11 @@ showtitle "Getting gomobile" ...@@ -105,7 +105,11 @@ showtitle "Getting gomobile"
./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile" ./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile"
showtitle "initiating gomobile" showtitle "initiating gomobile"
if [[ -z ${GOBIN} ]]; then
./golang/bin/gomobile init || quit "./golang/bin/gomobile init" ./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
else
$GOBIN/gomobile init || quit "$GOBIN/gomobile init"
fi
...@@ -123,22 +127,21 @@ fi ...@@ -123,22 +127,21 @@ fi
showtitle "Building Bitmask Core Android as full aar" showtitle "Building Bitmask Core Android as full aar"
gomobile bind -x -target android -ldflags="-s -w" -tags=netcgo -androidapi=21 -v -trimpath -o lib/bitmaskcore.aar ./obfsvpn/client/ ./motd ./IPtProxy/IPtProxy.go ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -x -target android -ldflags="-s -w" -tags=netcgo -androidapi=21 -v -trimpath -o lib/bitmaskcore.aar ./obfsvpn/client/ ./motd ./IPtProxy/IPtProxy.go ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android Web as full aar including pgpverify" showtitle "Building Bitmask Core Android Web as full aar including pgpverify"
gomobile bind -x -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v ./pgpverify ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -x -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v ./pgpverify ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for armv7" showtitle "Building Bitmask Core Android for armv7"
gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for x86" showtitle "Building Bitmask Core Android for x86"
gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for arm64" showtitle "Building Bitmask Core Android for arm64"
gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
showtitle "Building Bitmask Core Android for x86_64" showtitle "Building Bitmask Core Android for x86_64"
gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/bootstrap ./bitmask-core/pkg/models gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v ./obfsvpn/client ./IPtProxy/IPtProxy.go ./motd ./bitmask-core/pkg/mobile
if [[ "bitmask_android" == `pwd | rev | cut -d / -f 2 | rev` ]]; then if [[ "bitmask_android" == `pwd | rev | cut -d / -f 2 | rev` ]]; then
showtitle "Copying to bitmask_android main repository" showtitle "Copying to bitmask_android main repository"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment