Merge pull request #455

c94bd2f linux: remove rpath requires #1709 (Jaquee)
2083357 Linux: static libgcc and libstdc++ (Jaquee)
08ceb5e settings: replace seed  box with popup requires #1709 (Jaquee)
This commit is contained in:
Riccardo Spagni 2017-02-17 21:43:12 +02:00
commit 87f55992f0
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
4 changed files with 35 additions and 86 deletions

View file

@ -143,7 +143,7 @@ elif [ "$platform" == "linux64" ]; then
echo "Configuring build for Android on Linux host" echo "Configuring build for Android on Linux host"
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
elif [ "$STATIC" == true ]; then elif [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi fi
@ -170,7 +170,7 @@ elif [ "$platform" == "linuxarmv7" ]; then
elif [ "$platform" == "linux" ]; then elif [ "$platform" == "linux" ]; then
echo "Configuring build for Linux general" echo "Configuring build for Linux general"
if [ "$STATIC" == true ]; then if [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi fi
@ -219,21 +219,19 @@ if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
eval make -j$CPU_CORE_COUNT eval make -j$CPU_CORE_COUNT
eval make install -j$CPU_CORE_COUNT eval make install -j$CPU_CORE_COUNT
popd popd
else
eval make -C $MONERO_DIR/build/release/contrib/epee all install
fi fi
# unbound is one more dependency. can't be merged to the wallet_merged # build install epee
# since filename conflict (random.c.obj) eval make -C $MONERO_DIR/build/release/contrib/epee all install
# for Linux, we use libunbound shipped with the system, so we don't need to build it
# Install libunwind
echo "Installing libunbound..."
pushd $MONERO_DIR/build/release/external/unbound
# no need to make, it was already built as dependency for libwallet
# make -j$CPU_CORE_COUNT
$make_exec install -j$CPU_CORE_COUNT
popd
if [ "$platform" != "linux32" ] && ([ "$ANDROID" == true ] || [ "$platform" != "linux64" ]); then
echo "Building libunbound..."
pushd $MONERO_DIR/build/release/external/unbound
# no need to make, it was already built as dependency for libwallet
# make -j$CPU_CORE_COUNT
$make_exec install -j$CPU_CORE_COUNT
popd
fi
popd popd

View file

@ -31,18 +31,22 @@ fi
# Copy dependencies # Copy dependencies
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread' EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
INCLUDE='libunbound'
cp -rv $QT_DIR/qml $TARGET || exit cp -rv $QT_DIR/qml $TARGET || exit
cp -rv $QT_DIR/plugins $TARGET || exit cp -rv $QT_DIR/plugins $TARGET || exit
mkdir -p $TARGET/libs || exit mkdir -p $TARGET/libs || exit
ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit #ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep $INCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit #ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit #ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
#cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit
# Create start script # Create start script
cat > $TARGET/start-gui.sh <<EOL cat > $TARGET/start-gui.sh <<EOL
#!/bin/bash #!/bin/bash
# export LD_LIBRARY_PATH=\`pwd\`/libs export LD_LIBRARY_PATH=\`pwd\`/libs
export QT_PLUGIN_PATH=\`pwd\`/plugins export QT_PLUGIN_PATH=\`pwd\`/plugins
export QML2_IMPORT_PATH=\`pwd\`/qml export QML2_IMPORT_PATH=\`pwd\`/qml
./$GUI_EXEC ./$GUI_EXEC
EOL EOL
chmod +x $TARGET/start-gui.sh

View file

@ -197,7 +197,12 @@ linux {
CONFIG(static) { CONFIG(static) {
message("using static libraries") message("using static libraries")
LIBS+= -Wl,-Bstatic LIBS+= -Wl,-Bstatic
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
contains(QT_ARCH, x86_64) {
LIBS+= -lunbound
}
} }
LIBS+= \ LIBS+= \
-lboost_serialization \ -lboost_serialization \
-lboost_thread \ -lboost_thread \
@ -210,7 +215,7 @@ linux {
-lssl \ -lssl \
-lcrypto \ -lcrypto \
-Wl,-Bdynamic \ -Wl,-Bdynamic \
-ldl -lGL
# currently monero has an issue with "static" build and linunwind-dev, # currently monero has an issue with "static" build and linunwind-dev,
# so we link libunwind-dev only for non-Ubuntu distros # so we link libunwind-dev only for non-Ubuntu distros
CONFIG(libunwind_off) { CONFIG(libunwind_off) {
@ -219,11 +224,6 @@ linux {
message(Building with libunwind) message(Building with libunwind)
LIBS += -Wl,-Bdynamic -lunwind LIBS += -Wl,-Bdynamic -lunwind
} }
QMAKE_LFLAGS_RPATH=
QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN/libs\'"
} }
macx { macx {

View file

@ -48,10 +48,6 @@ Rectangle {
function initSettings() { function initSettings() {
//runs on every page load //runs on every page load
// Mnemonic seed setting
memoTextInput.text = (viewOnly)? qsTr("View only wallets doesn't have a mnemonic seed") : qsTr("Click button to show seed") + translationManager.emptyString
showSeedButton.enabled = !viewOnly
// Daemon settings // Daemon settings
daemonAddress = persistentSettings.daemon_address.split(":"); daemonAddress = persistentSettings.daemon_address.split(":");
console.log("address: " + persistentSettings.daemon_address) console.log("address: " + persistentSettings.daemon_address)
@ -115,60 +111,6 @@ Rectangle {
} }
} }
}
//! show seed
TextArea {
enabled: !viewOnly
id: memoTextInput
textMargin: 6
wrapMode: TextEdit.WordWrap
readOnly: true
selectByMouse: true
font.pixelSize: 18
Layout.fillWidth: true
Layout.preferredHeight: 100
Layout.alignment: Qt.AlignHCenter
text: (viewOnly)? qsTr("View only wallets doesn't have a mnemonic seed") : qsTr("Click button to show seed") + translationManager.emptyString
style: TextAreaStyle {
backgroundColor: "#FFFFFF"
}
Image {
id : clipboardButton
anchors.right: memoTextInput.right
anchors.bottom: memoTextInput.bottom
source: "qrc:///images/greyTriangle.png"
Image {
anchors.centerIn: parent
source: "qrc:///images/copyToClipboard.png"
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: clipboard.setText(memoTextInput.text)
}
}
}
RowLayout {
enabled: !viewOnly
Layout.fillWidth: true
Text {
id: wordsTipText
font.family: "Arial"
font.pointSize: 12
color: "#4A4646"
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: qsTr("This is very important to write down and keep secret. It is all you need to restore your wallet.")
+ translationManager.emptyString
}
StandardButton { StandardButton {
id: showSeedButton id: showSeedButton
shadowReleasedColor: "#FF4304" shadowReleasedColor: "#FF4304"
@ -449,8 +391,13 @@ Rectangle {
onAccepted: { onAccepted: {
if(appWindow.password === settingsPasswordDialog.password){ if(appWindow.password === settingsPasswordDialog.password){
memoTextInput.text = currentWallet.seed informationPopup.title = qsTr("Wallet mnemonic seed") + translationManager.emptyString;
showSeedButton.enabled = false informationPopup.text = currentWallet.seed
informationPopup.open()
informationPopup.onCloseCallback = function() {
informationPopup.text = ""
}
} else { } else {
informationPopup.title = qsTr("Error") + translationManager.emptyString; informationPopup.title = qsTr("Error") + translationManager.emptyString;
informationPopup.text = qsTr("Wrong password"); informationPopup.text = qsTr("Wrong password");