Skip to content

Commit

Permalink
employ full snapcraft build, don't use relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
who-biz committed Jan 8, 2020
1 parent 9ce3435 commit dc2b1d0
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 265 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "monero"]
path = monero
url = https://github.com/blur-network/blur.git
branch = v0.1.9.9.2-snap
2 changes: 1 addition & 1 deletion blur-gui-wallet.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

TEMPLATE = app

QT += qml quick widgets concurrent
QT += qml quick widgets

WALLET_ROOT=$$PWD/monero

Expand Down
22 changes: 7 additions & 15 deletions build_snap.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

BUILD_TYPE=$1
source ./../../../utils.sh
source ${SNAPCRAFT_PART_SRC}/utils.sh
platform=$(get_platform)
# default build type
if [ -z $BUILD_TYPE ]; then
Expand Down Expand Up @@ -60,7 +60,7 @@ else
fi


source ./../../../utils.sh
source ${SNAPCRAFT_PART_SRC}/utils.sh
pushd $(pwd)
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MONERO_DIR=monero
Expand All @@ -72,11 +72,11 @@ if [[ $platform == *bsd* ]]; then
fi

# build libwallet
./../../../get_libwallet_api.sh $BUILD_TYPE
${SNAPCRAFT_PART_SRC}/get_libwallet_api.sh $BUILD_TYPE

# build zxcvbn
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then
$MAKE -C ../../../src/zxcvbn-c || exit
$MAKE -C ${SNAPCRACFT_PART_SRC}/zxcvbn-c || exit
fi

if [ ! -d build ]; then mkdir build; fi
Expand All @@ -96,28 +96,20 @@ elif [ "$platform" == "mingw64" ] || [ "$platform" == "mingw32" ]; then
MONEROD_EXEC=blurd.exe
fi

# force version update
get_tag
echo "var GUI_VERSION = \"$TAGNAME\"" > version.js
pushd "$MONERO_DIR"
get_tag
popd
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js

cd build
if ! QMAKE=$(find_command qmake qmake-qt5); then
echo "Failed to find suitable qmake command."
exit 1
fi
$QMAKE ../../../../blur-gui-wallet.pro "$CONFIG" || exit
$QMAKE ${SNAPCRAFT_PART_SRC}/blur-gui-wallet.pro "$CONFIG" || exit
$MAKE || exit

# Copy blurd to bin folder
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
cp ../../../../$MONERO_DIR/bin/$MONEROD_EXEC $BIN_PATH
cp ${SNAPCRAFT_PART_SRC}/$MONERO_DIR/bin/$MONEROD_EXEC ${SNAPCRAFT_PART_SRC}/release/bin/
fi

# make deploy
make deploy
popd


4 changes: 2 additions & 2 deletions get_libwallet_api.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
MONERO_URL=https://github.com/blur-network/blur.git
MONERO_BRANCH=v0.1.9.9.2
MONERO_BRANCH=v0.1.9.9.2-snap

pushd $(pwd)
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand All @@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
fi
git submodule update --remote
git -C $MONERO_DIR fetch
git -C $MONERO_DIR checkout v0.1.9.9.2
git -C $MONERO_DIR checkout v0.1.9.9.2-snap



Expand Down
2 changes: 1 addition & 1 deletion monero
Submodule monero updated 51 files
+0 −3 .github/workflows/blur-ci.yml
+46 −72 CMakeLists.txt
+27 −26 Makefile
+2 −2 README.md
+0 −2,157 cmake/FindBoost.cmake
+3 −3 cmake/FindLibunwind.cmake
+0 −2 contrib/epee/include/net/levin_protocol_handler_async.h
+1 −1 contrib/epee/include/string_tools.h
+12 −11 contrib/snap/snapcraft.yaml
+1 −1 external/backward/backward.cpp
+3 −3 external/backward/backward.hpp
+4 −0 external/easylogging++/easylogging++.cc
+6 −0 external/easylogging++/easylogging++.h
+0 −1 src/CMakeLists.txt
+2 −0 src/blockchain_utilities/CMakeLists.txt
+1 −1 src/blockchain_utilities/blockchain_import.cpp
+4 −1 src/checkpoints/checkpoints.cpp
+1 −1 src/common/command_line.h
+16 −14 src/common/int-util.h
+1 −1 src/common/util.cpp
+1 −1 src/cryptonote_basic/account.cpp
+1 −4 src/cryptonote_basic/cryptonote_basic_impl.cpp
+19 −4 src/cryptonote_basic/cryptonote_format_utils.cpp
+1 −1 src/cryptonote_basic/cryptonote_format_utils.h
+1 −1 src/cryptonote_basic/difficulty.cpp
+1 −1 src/cryptonote_basic/miner.cpp
+1 −0 src/cryptonote_core/CMakeLists.txt
+1 −1 src/cryptonote_core/blockchain.cpp
+47 −48 src/cryptonote_core/cryptonote_core.cpp
+5 −12 src/cryptonote_core/cryptonote_core.h
+1 −1 src/cryptonote_core/cryptonote_tx_utils.cpp
+1 −1 src/cryptonote_core/tx_pool.h
+13 −0 src/cryptonote_protocol/cryptonote_protocol_handler.inl
+6 −6 src/daemon/command_line_args.h
+9 −10 src/daemon/core.h
+1 −1 src/gen_multisig/gen_multisig.cpp
+1 −0 src/multisig/CMakeLists.txt
+1 −1 src/multisig/multisig.cpp
+14 −2 src/p2p/net_node.cpp
+7 −5 src/p2p/net_node.h
+7 −9 src/p2p/net_node.inl
+1 −1 src/rpc/core_rpc_server.cpp
+3 −3 src/wallet/CMakeLists.txt
+1 −1 src/wallet/api/utils.cpp
+1 −1 src/wallet/node_rpc_proxy.h
+1 −1 src/wallet/wallet2.cpp
+1 −1 src/wallet/wallet2.h
+1 −1 src/wallet/wallet_errors.h
+1 −1 src/wallet/wallet_rpc_server.cpp
+2 −1 tests/unit_tests/block_reward.cpp
+6 −6 tests/unit_tests/multisig.cpp
17 changes: 17 additions & 0 deletions snap/etc/blurd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configuration for blurd
# Syntax: any command line option may be specified as 'clioptionname=value'.
# See 'blurd --help' for all available options.

# Overriden by snap:
# data-dir=/var/log/blur
# log-file=/var/log/blur/blurnetwork.log

add-priority-node=66.70.189.131:52541
add-priority-node=66.70.188.178:52541
add-priority-node=66.70.189.183:52541
add-priority-node=66.70.189.183:52541
add-priority-node=51.79.66.123:52541
add-priority-node=51.79.64.184:52541
p2p-bind-port=52541
rpc-bind-port=52542

211 changes: 0 additions & 211 deletions snap/qml.qrc

This file was deleted.

6 changes: 5 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ parts:
blur-wallet:
build-packages: [build-essential, git, cmake, pkg-config, libboost-all-dev, libssl-dev, libsodium-dev, qtbase5-dev, qt5-default, qtdeclarative5-dev, qml-module-qtquick-controls, qml-module-qtquick-dialogs, qml-module-qtquick-xmllistmodel, qml-module-qt-labs-folderlistmodel, qml-module-qt-labs-settings, qttools5-dev-tools]
plugin: dump
override-build: sh -c '${SNAPCRAFT_PART_SRC}/build_snap.sh release' && cp -r ${SNAPCRAFT_PART_BUILD}/release/bin ${SNAPCRAFT_PART_INSTALL}/
source: .
stage-packages:
- libboost-serialization1.62.0
Expand All @@ -45,7 +46,7 @@ parts:
- libboost-date-time1.62.0
- libboost-program-options1.62.0
- libssl-dev
- libsodium-dev
- libsodium23
- libstdc++6
- libgcc1
- libreadline-gplv2-dev
Expand All @@ -65,13 +66,16 @@ parts:
- libtinfo5
organize:
local/start_gui.sh: bin/start_gui.sh
bin: usr/bin
prime:
- usr/bin
- usr/lib
- -usr/share

dist-files:
plugin: dump
source: .
prime:
- usr/lib
- blurd
- blur-gui-wallet
34 changes: 0 additions & 34 deletions snap/translations.qrc

This file was deleted.

0 comments on commit dc2b1d0

Please sign in to comment.