Skip to content

Commit

Permalink
Merge remote-tracking branch 'fc/develop' into olemis_t266_sch_ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Dec 5, 2019
2 parents 4b7fe03 + c099019 commit 1a90652
Show file tree
Hide file tree
Showing 147 changed files with 299 additions and 244 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ rcc__*
.DS_Store
*.orig
*.bak
darwin
linux
windows
android

# Temporary build files
rcc_cgo_*.go
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go:
- 1.12.6
services:
- docker
go_import_path: github.com/fibercrypto/FiberCryptoWallet
go_import_path: github.com/fibercrypto/fibercryptowallet
matrix:
include:
- stage: RPI
Expand Down
91 changes: 69 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
# Application info (for dumping)
ORG_DOMAIN := simelo.tech.org
ORG_NAME := Simelo.Tech
APP_NAME := FiberCrypto Wallet
APP_NAME := FiberCryptoWallet
APP_DESCRIPTION := Multi-coin cryptocurrency wallet
APP_VERSION := 0.27.0
LICENSE := GPLv3
COPYRIGHT := Copyright © 2019 $(ORG_NAME)

UNAME_S = $(shell uname -s)
OSNAME = $(shell echo $(UNAME_S) | tr A-Z a-z)
DEFAULT_TARGET ?= desktop
DEFAULT_ARCH ?= linux
## In future use as a parameter tu make command.
Expand Down Expand Up @@ -55,14 +56,47 @@ else
endif
endif

# Files
GIT := $(shell which git)
ifeq ($(GIT),)
ALLFILES := $(shell find . type f | grep -v .git | grep -v vendor)
else
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ALLFILES := $(shell git ls-tree -r $(GIT_BRANCH) --name-only | grep -v vendor)
endif

GOFILES := $(shell echo "$(ALLFILES)" | grep '.go$$')
QRCFILES := $(shell echo "$(ALLFILES)" | grep '.qrc$$')
QMLFILES := $(shell echo "$(ALLFILES)" | grep '.qml$$')
TSFILES := $(shell echo "$(ALLFILES)" | grep '.ts$$')
SVGFILES := $(shell echo "$(ALLFILES)" | grep '.svg$$')
JSFILES := $(shell echo "$(ALLFILES)" | grep '.js$$')
PNGFILES := $(shell echo "$(ALLFILES)" | grep '.png$$')
OTFFILES := $(shell echo "$(ALLFILES)" | grep '.otf$$')
ICNSFILES := $(shell echo "$(ALLFILES)" | grep '.icns$$')
ICOFILES := $(shell echo "$(ALLFILES)" | grep '.ico$$')
RCFILES := $(shell echo "$(ALLFILES)" | grep '.rc$$')
PLISTFILES := $(shell echo "$(ALLFILES)" | grep 'Info.plist$$')
QTCONFFILES := $(shell echo "$(ALLFILES)" | grep 'qtquickcontrols2.conf$$')

QMLFILES := $(shell echo "$(QMLFILES) $(JSFILES)")
QTFILES := $(shell echo "$(QRCFILES) $(TSFILES) $(PLISTFILES) $(QTCONFFILES)")
RESOURCEFILES := $(shell echo "$(SVGFILES) $(PNGFILES) $(OTFFILES) $(ICNSFILES) $(ICOFILES) $(RCFILES)")
SRCFILES := $(shell echo "$(QTFILES) $(RESOURCEFILES) $(GOFILES)")

BINPATH_Linux := deploy/linux/FiberCryptoWallet
BINPATH_Windows_NT := deploy/windows/FiberCryptoWallet.exe
BINPATH_Darwin := deploy/darwin/fibercryptowallet.app/Contents/MacOS/fibercryptowallet
BINPATH := $(BINPATH_$(UNAME_S))

deps: ## Add dependencies
dep ensure
rm -rf rm -rf vendor/github.com/therecipe

# Targets
run: build ## Run FiberCrypto Wallet.
run: $(BINPATH) ## Run FiberCrypto Wallet.
@echo "Running $(APP_NAME)..."
@./deploy/linux/FiberCryptoWallet
@$(BINPATH)

install-deps-no-envs: ## Install therecipe/qt with -tags=no_env set
go get -v -tags=no_env github.com/therecipe/qt/cmd/...
Expand Down Expand Up @@ -98,7 +132,7 @@ install-deps: install-deps-$(UNAME_S) install-linters ## Install dependencies
@echo "Dependencies installed"

build-docker: ## Build project using docker
@echo "Building FiberCrypto Wallet..."
@echo "Building $(APP_NAME)..."
qtdeploy -docker build $(DEFAULT_TARGET)
@echo "Done."

Expand Down Expand Up @@ -136,25 +170,38 @@ build-icon-Linux: ## Build the application icon in Linux
build-icon: build-icon-$(OS) ## Build the application icon (Windows_NT and Darwin systems)
@echo "Builded $(OS) icon..."

build-Linux: ## Build FiberCryptoWallet in Windows
@echo "Building on Linux"
build-qt:
@echo "Building on $(UNAME_S)"
@echo "Building $(APP_NAME)..."
# Add the flag `-quickcompiler` when making a release
qtdeploy build $(DEFAULT_TARGET)
@echo "Done."

$(BINPATH_Linux): $(SRCFILES)
make build-qt

build-Windows_NT: build-icon ## Build FiberCrypto Wallet in Windows
build-res-Windows_NT: $(RC_FILE)
@echo "Building on windows"
$(WINDRES) -i "$(RC_FILE)" -o "$(RC_OBJ)"

$(BINPATH_Windows_NT): $(SRCFILES)
make build-icon
make build-res-Windows_NT
make build-qt

build-Darwin: build-icon ## Build FiberCrypto Wallet in Darwin
build-res-Darwin: $(PLIST) $(APP_ICON_PATH)/appIcon.icns
@echo "Building on Darwin"
mkdir -p "$(DARWIN_RES)/Content/Resources"
cp "$(PLIST)" "$(DARWIN_RES)/Content/"
cp "$(APP_ICON_PATH)/appIcon.icns" "$(DARWIN_RES)/Content/"

build: build-$(OS) ## Build FiberCrypto Wallet
@echo "Building $(APP_NAME)..."
# Add the flag `-quickcompiler` when making a release
qtdeploy build $(DEFAULT_TARGET)
@echo "Done."
$(BINPATH_Darwin): $(SRCFILES)
make build-icon
make build-res-Darwin
make build-qt

build: $(BINPATH) ## Build FiberCrypto Wallet
@echo "Output => $(BINPATH)"

prepare-release: ## Change the resources in the app and prepare to release the app
./.travis/setup_release.sh
Expand Down Expand Up @@ -185,26 +232,26 @@ clean: clean-test clean-build ## Remove temporary files

gen-mocks: ## Generate mocks for interface types
mockery -all -output src/coin/mocks -outpkg mocks -dir src/core
find src/coin/mocks/ -name '*.go' -type f -print0 | xargs -0 -I PATH sed -i '' -e 's/fibercryptowallet/FiberCryptoWallet/g' PATH
find src/coin/mocks/ -name '*.go' -type f -print0

test-sky: ## Run Skycoin plugin test suite
go test -cover -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin/models
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models

test-core: ## Run tests for API core and helpers
go test -cover -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/util
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/util

test-sky-launch-html-cover:
go test -cover -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin/models
go test -cover -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models
go tool cover -html=$(COVERAGEFILE) -o $(COVERAGEHTML)

test-cover-travis:
go test -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/util
go test -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/util
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin/models
go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin/models
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP
go test -cover -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin
go test -cover -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/fibercryptowallet/src/coin/skycoin
$(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP


Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ install-deps-Darwin Install osx dependencies
install-deps-Windows Install Windowns dependencies
install-deps Install dependencies
build-docker Build project using docker
build Build FiberCrypto Wallet.
clean-Windows Clean project FiberCrypto Wallet.
build-icon-Windows_NT Build the application icon in Windows
build-icon-Darwin Build the application icon in Darwin
build-icon-Linux Build the application icon in Linux
build-icon Build the application icon (Windows_NT and Darwin systems)
build Build FiberCrypto Wallet
prepare-release Change the resources in the app and prepare to release the app
clean-test Remove temporary test files
clean-build Remove temporary files
Expand All @@ -104,6 +107,7 @@ test-core Run tests for API core and helpers
test-cover Show more details of test coverage
test Run project test suite
install-linters Install linters
install-coveralls Install coveralls
lint Run linters. Use make install-linters first.
```

Expand Down
Loading

0 comments on commit 1a90652

Please sign in to comment.