mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 12:09:50 +00:00
Merge pull request 'Beta-8 fixes (2)' (#371) from tobtoht/feather:beta-8-fixes-2 into master
Reviewed-on: https://git.featherwallet.org/feather/feather/pulls/371
This commit is contained in:
commit
b7cf9f98aa
5 changed files with 23 additions and 48 deletions
|
@ -24,7 +24,6 @@ option(WITH_SCANNER "Enable webcam QR scanner" OFF)
|
||||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
include(CheckLinkerFlag)
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
include(FindCcache)
|
include(FindCcache)
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
|
@ -103,11 +102,9 @@ set(HIDAPI_FOUND OFF)
|
||||||
find_package(QREncode REQUIRED)
|
find_package(QREncode REQUIRED)
|
||||||
|
|
||||||
# Qr scanner
|
# Qr scanner
|
||||||
if (WITH_SCANNER)
|
find_package(ZBAR REQUIRED)
|
||||||
find_package(ZBAR REQUIRED)
|
message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}")
|
||||||
message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}")
|
message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}")
|
||||||
message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Tevador 14 word Monero seed
|
# Tevador 14 word Monero seed
|
||||||
find_package(monero-seed CONFIG)
|
find_package(monero-seed CONFIG)
|
||||||
|
@ -181,11 +178,6 @@ if(TOR_BIN)
|
||||||
execute_process(COMMAND bash -c "touch ${CMAKE_CURRENT_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
|
execute_process(COMMAND bash -c "touch ${CMAKE_CURRENT_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
execute_process(COMMAND bash -c "${TOR_BIN} --version --quiet" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE out RESULT_VARIABLE ret)
|
|
||||||
if (ret EQUAL "0")
|
|
||||||
string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]" version ${out})
|
|
||||||
set(TOR_VERSION "${version}")
|
|
||||||
endif()
|
|
||||||
message(STATUS "Embedded Tor version: ${TOR_VERSION}")
|
message(STATUS "Embedded Tor version: ${TOR_VERSION}")
|
||||||
configure_file("cmake/config-feather.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-feather.h")
|
configure_file("cmake/config-feather.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-feather.h")
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||||
# Feather build flags
|
# Feather build flags
|
||||||
ENV CHECK_UPDATES=ON
|
ENV CHECK_UPDATES=ON
|
||||||
ENV WITH_SCANNER=ON
|
ENV WITH_SCANNER=ON
|
||||||
|
ENV TOR_VERSION=0.4.6.6
|
||||||
|
|
||||||
COPY --from=featherwallet/feather-deps:linux-beta-8 /deps /deps
|
COPY --from=featherwallet/feather-deps:linux-beta-8 /deps /deps
|
||||||
COPY --from=featherwallet/feather-deps:linux-beta-8 /var/cache/apt/archives /archives
|
COPY --from=featherwallet/feather-deps:linux-beta-8 /var/cache/apt/archives /archives
|
||||||
|
@ -230,7 +231,7 @@ RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||||
# Tor: Optional for Feather (-DTOR_BIN)
|
# Tor: Optional for Feather (-DTOR_BIN)
|
||||||
# Binary can be embedded in Feather
|
# Binary can be embedded in Feather
|
||||||
ENV TOR_BIN=/usr/local/tor/bin/tor
|
ENV TOR_BIN=/usr/local/tor/bin/tor
|
||||||
RUN git clone -b tor-0.4.6.6 --depth 1 https://git.torproject.org/tor.git && \
|
RUN git clone -b tor-$TOR_VERSION --depth 1 https://git.torproject.org/tor.git && \
|
||||||
cd tor && \
|
cd tor && \
|
||||||
git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \
|
git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
|
|
|
@ -11,6 +11,7 @@ ENV WITH_SCANNER=ON
|
||||||
|
|
||||||
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
||||||
ENV TOR_BIN=/usr/local/tor/bin/tor.exe
|
ENV TOR_BIN=/usr/local/tor/bin/tor.exe
|
||||||
|
ENV TOR_VERSION=0.4.6.6
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install -y \
|
apt install -y \
|
||||||
|
@ -154,7 +155,7 @@ RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.11-s
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b tor-0.4.6.6 --depth 1 https://git.torproject.org/tor.git && \
|
RUN git clone -b tor-$TOR_VERSION --depth 1 https://git.torproject.org/tor.git && \
|
||||||
cd tor && \
|
cd tor && \
|
||||||
git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \
|
git reset --hard 60d1fb3d37274e29e9e88620d77e1636ef922561 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
|
@ -197,7 +198,8 @@ RUN git clone https://github.com/nih-at/libzip.git && \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DCMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32 && \
|
-DCMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32 && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.git && \
|
RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.git && \
|
||||||
cd zbar && \
|
cd zbar && \
|
||||||
|
@ -205,4 +207,5 @@ RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.g
|
||||||
autoreconf -vfi && \
|
autoreconf -vfi && \
|
||||||
./configure --enable-static --disable-shared --without-imagemagick --disable-video --without-xv --with-gtk=no --with-python=no --enable-doc=no --host=x86_64-w64-mingw32 && \
|
./configure --enable-static --disable-shared --without-imagemagick --disable-video --without-xv --with-gtk=no --with-python=no --enable-doc=no --host=x86_64-w64-mingw32 && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make install
|
make install && \
|
||||||
|
rm -rf $(pwd)
|
39
Makefile
39
Makefile
|
@ -1,30 +1,5 @@
|
||||||
# Copyright (c) 2014-2021, The Monero Project
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
# Copyright (c) 2020-2021, The Monero Project.
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
||||||
|
|
||||||
CMAKEFLAGS = \
|
CMAKEFLAGS = \
|
||||||
-DARCH=x86_64 \
|
-DARCH=x86_64 \
|
||||||
|
@ -43,21 +18,23 @@ CMAKEFLAGS = \
|
||||||
$(CMAKEFLAGS_EXTRA)
|
$(CMAKEFLAGS_EXTRA)
|
||||||
|
|
||||||
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
||||||
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN}, Off)
|
||||||
|
release-static: CMAKEFLAGS += -DTOR_VERSION=$(or ${TOR_VERSION}, Off)
|
||||||
release-static: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
|
release-static: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
|
||||||
release-static: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, Off)
|
release-static: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, Off)
|
||||||
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||||
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF)
|
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH}, Off)
|
||||||
release-static:
|
release-static:
|
||||||
cmake -Bbuild $(CMAKEFLAGS)
|
cmake -Bbuild $(CMAKEFLAGS)
|
||||||
$(MAKE) -Cbuild
|
$(MAKE) -Cbuild
|
||||||
|
|
||||||
depends:
|
depends:
|
||||||
mkdir -p build/$(target)/release
|
mkdir -p build/$(target)/release
|
||||||
cd build/$(target)/release && cmake -D STATIC=ON -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DTOR_BIN=$(or ${TOR_BIN},OFF) -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, OFF) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
cd build/$(target)/release && cmake -D STATIC=ON -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DTOR_BIN=$(or ${TOR_BIN},OFF) -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, OFF) -DWITH_SCANNER=$(or ${WITH_SCANNER}, Off) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||||
|
|
||||||
mac-release: CMAKEFLAGS += -DSTATIC=Off
|
mac-release: CMAKEFLAGS += -DSTATIC=Off
|
||||||
mac-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
mac-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN}, Off)
|
||||||
|
mac-release: CMAKEFLAGS += -DTOR_VERSION=$(or ${TOR_VERSION}, Off)
|
||||||
mac-release: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
|
mac-release: CMAKEFLAGS += -DCHECK_UPDATES=$(or ${CHECK_UPDATES}, Off)
|
||||||
mac-release: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, On)
|
mac-release: CMAKEFLAGS += -DWITH_SCANNER=$(or ${WITH_SCANNER}, On)
|
||||||
mac-release: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
|
mac-release: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
|
||||||
|
|
|
@ -57,6 +57,8 @@ file(GLOB SOURCE_FILES
|
||||||
"qrcode/*.cpp"
|
"qrcode/*.cpp"
|
||||||
"dialog/*.h"
|
"dialog/*.h"
|
||||||
"dialog/*.cpp"
|
"dialog/*.cpp"
|
||||||
|
"qrcode_scanner/QrCodeUtils.cpp"
|
||||||
|
"qrcode_scanner/QrCodeUtils.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_SCANNER)
|
if (WITH_SCANNER)
|
||||||
|
@ -141,11 +143,11 @@ target_include_directories(feather PUBLIC
|
||||||
${Qt5WebSockets_INCLUDE_DIRS}
|
${Qt5WebSockets_INCLUDE_DIRS}
|
||||||
${ZLIB_INCLUDE_DIRS}
|
${ZLIB_INCLUDE_DIRS}
|
||||||
${LIBZIP_INCLUDE_DIRS}
|
${LIBZIP_INCLUDE_DIRS}
|
||||||
|
${ZBAR_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
target_include_directories(feather PUBLIC
|
target_include_directories(feather PUBLIC
|
||||||
${ZBAR_INCLUDE_DIR}
|
|
||||||
${Qt5Multimedia_INCLUDE_DIRS}
|
${Qt5Multimedia_INCLUDE_DIRS}
|
||||||
${Qt5MultimediaWidgets_INCLUDE_DIRS}
|
${Qt5MultimediaWidgets_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
@ -248,6 +250,7 @@ target_link_libraries(feather
|
||||||
${QRENCODE_LIBRARY}
|
${QRENCODE_LIBRARY}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${LIBZIP_LIBRARIES}
|
${LIBZIP_LIBRARIES}
|
||||||
|
${ZBAR_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DEVICE_TREZOR_READY)
|
if(DEVICE_TREZOR_READY)
|
||||||
|
@ -258,7 +261,6 @@ if (WITH_SCANNER)
|
||||||
target_link_libraries(feather
|
target_link_libraries(feather
|
||||||
Qt5::Multimedia
|
Qt5::Multimedia
|
||||||
Qt5::MultimediaWidgets
|
Qt5::MultimediaWidgets
|
||||||
${ZBAR_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue