Skip to content

Commit

Permalink
Merge pull request monero-project#63 from stoffu/aeon-v0.14.2-prep
Browse files Browse the repository at this point in the history
Preparing for v0.14.2 release
  • Loading branch information
aeonix authored Apr 1, 2022
2 parents a90eda1 + f322f12 commit 117c317
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 76 deletions.
90 changes: 78 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,30 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf qt5
- name: force link qt5
run: brew link qt5 --force
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
- name: add qt to path
run: echo "$Qt5_Dir/bin" >> $GITHUB_PATH
- name: check qt version
run: qmake --version
- name: fetch zmq.hpp
run: brew tap osrf/simulation && brew install cppzmq
- name: build
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
run: ./build.sh
- name: test qml
run: build/release/bin/aeon-wallet-gui.app/Contents/MacOS/aeon-wallet-gui --test-qml
- name: deploy
run: make deploy
working-directory: build
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static -j3
cp build/release/bin/* ../build/release/bin/
cp build/release/bin/aeond ../build/release/bin/aeon-wallet-gui.app/Contents/MacOS/aeond
working-directory: monero
- name: archive
run: |
Expand All @@ -50,7 +58,7 @@ jobs:

build-ubuntu:

runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1
Expand All @@ -66,21 +74,67 @@ jobs:
- name: update apt
run: sudo apt update
- name: install aeon dependencies
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libnorm-dev libpgm-dev
- name: install aeon gui dependencies
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev xvfb
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libsodium-dev
- name: build & install static zmq
run: |
git clone https://github.com/zeromq/libzmq
cd libzmq
git checkout v4.3.2
mkdir build && cd build
cmake -D WITH_PERF_TOOL=OFF -D ZMQ_BUILD_TESTS=OFF -D ENABLE_CPACK=OFF -D CMAKE_BUILD_TYPE=Release ..
make -j3
sudo make install
sudo curl -L https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp --output /usr/local/include/zmq.hpp
working-directory: ..
- name: install dependencies for deployment
run: sudo apt -y install libgstreamer-plugins-base1.0-dev icnsutils
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
- name: add qt to path
run: echo "$Qt5_Dir/bin" >> $GITHUB_PATH
- name: qt check version
run: qmake --version
- name: build
run: ./build.sh
- name: check size of aeon-wallet-gui
run: ls -l build/release/bin/aeon-wallet-gui
- name: test qml
run: xvfb-run -a build/release/bin/aeon-wallet-gui --test-qml
- name: deploy
run: make deploy
working-directory: build
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static -j3
cp build/release/bin/* ../build/release/bin/
working-directory: monero
- name: deploy - create directory structure, copy files
run: |
mkdir -p AppDir/usr/{bin,lib,share}
mkdir -p AppDir/usr/share/{applications,icons}
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
mv bin/aeon-wallet-gui AppDir/usr/bin
cp bin/aeond AppDir/usr/bin
icns2png -x ../../images/appicon.icns
mv appicon_256x256x32.png AppDir/usr/share/icons/hicolor/256x256/apps/aeon-wallet-gui.png
working-directory: build/release
- name: deploy - create desktop file
run: |
echo "[Desktop Entry]" >> aeon-wallet-gui.desktop
echo "Type=Application" >> aeon-wallet-gui.desktop
echo "Name=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Comment=GUI wallet for AEON cryptocurrency" >> aeon-wallet-gui.desktop
echo "Exec=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Icon=aeon-wallet-gui" >> aeon-wallet-gui.desktop
echo "Categories=Finance;" >> aeon-wallet-gui.desktop
working-directory: build/release/AppDir/usr/share/applications
- name: deploy - run linuxdeployqt
run: |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/8/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage AppDir/usr/share/applications/aeon-wallet-gui.desktop -appimage -qmldir=../..
mv aeon-wallet-gui-*.AppImage bin/aeon-wallet-gui.AppImage
working-directory: build/release
- name: archive
run: |
export ARTIFACT_NAME="aeon-gui-linux-x64-$(git describe --tags)"
Expand Down Expand Up @@ -113,7 +167,18 @@ jobs:
- uses: eine/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-protobuf-c git mingw-w64-x86_64-qt5 mingw-w64-x86_64-hidapi zip curl
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-protobuf-c git mingw-w64-x86_64-hidapi zip curl mingw-w64-x86_64-libtiff mingw-w64-x86_64-libpng mingw-w64-x86_64-pcre mingw-w64-x86_64-pcre2 mingw-w64-x86_64-libmng mingw-w64-x86_64-lcms2 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libiconv mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-graphite2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-freetype mingw-w64-x86_64-double-conversion mingw-w64-x86_64-md4c
- name: install qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.2'
arch: 'win64_mingw73'
- name: copy qt to /usr/local # because $GITHUB_PATH doesn't seem to work on msys somehow
run: |
mkdir -p /usr/local
cp -rf $Qt5_Dir/* /usr/local
- name: check qt version
run: qmake --version
- name: build
run: |
sed -i 's/CONFIG\ +=\ qtquickcompiler//' aeon-wallet-gui.pro
Expand All @@ -125,6 +190,7 @@ jobs:
working-directory: build
- name: build CLI
run: |
rm -rf build/
USE_SINGLE_BUILDDIR=1 make release-static-win64 -j2
cp build/release/bin/* ../build/release/bin/
working-directory: monero
Expand Down
136 changes: 72 additions & 64 deletions components/StandardButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Item {
id: button
property string rightIcon: ""
property string rightIconInactive: ""
property string icon: ""
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
property string textAlign: rightIcon !== "" ? "left" : "center"
property bool small: false
Expand All @@ -46,22 +45,10 @@ Item {
}
signal clicked()

// Dynamic height/width
Layout.minimumWidth: {
var _padding = 22;
if(button.rightIcon !== ""){
_padding += 60;
}

var _width = label.contentWidth + _padding;
if(_width <= 50) {
return 60;
}

return _width;
}

height: small ? 30 * scaleRatio : 36 * scaleRatio
width: buttonLayout.width + 22 * scaleRatio
implicitHeight: height
implicitWidth: width

function doClick() {
// Android workaround
Expand All @@ -70,70 +57,91 @@ Item {
}

Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
id: buttonRect
anchors.fill: parent
radius: 3
color: parent.enabled ? MoneroComponents.Style.buttonBackgroundColor : MoneroComponents.Style.buttonBackgroundColorDisabled
border.width: parent.focus ? 1 : 0

MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true

propagateComposedEvents: true

// possibly do some hover effects here
onEntered: {
// if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
// else parent.color = Style.buttonBackgroundColorDisabledHover;
}
onExited: {
// if(button.enabled) parent.color = Style.buttonBackgroundColor;
// else parent.color = Style.buttonBackgroundColorDisabled;
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
states: [
State {
name: "hover"
when: buttonArea.containsMouse || button.focus
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColorHover
}
},
State {
name: "active"
when: button.enabled
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColor
}
},
State {
name: "disabled"
when: !button.enabled
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColorDisabled
}
}
]
transitions: Transition {
ColorAnimation { duration: 100 }
}
}

Text {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: textAlign === "center" ? Text.AlignHCenter : Text.AlignLeft
anchors.leftMargin: textAlign === "center" ? 0 : 11
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
color: parent.textColor
visible: parent.icon === ""
}

Image {
RowLayout {
id: buttonLayout
height: button.height
spacing: 11 * scaleRatio
anchors.centerIn: parent
visible: parent.icon !== ""
source: parent.icon
}

Image {
visible: parent.rightIcon !== ""
anchors.right: parent.right
anchors.rightMargin: 11 * scaleRatio
anchors.verticalCenter: parent.verticalCenter
width: parent.small ? 16 * scaleRatio : 20 * scaleRatio
height: parent.small ? 16 * scaleRatio : 20 * scaleRatio
source: {
if(parent.rightIconInactive !== "" && !parent.enabled){
return parent.rightIconInactive;
Text {
id: label
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
horizontalAlignment: textAlign === "center" ? Text.AlignHCenter : Text.AlignLeft
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""

Text {
anchors.fill: parent
color: button.textColor
font.bold: label.font.bold
font.family: label.font.family
font.pixelSize: label.font.pixelSize - 1
horizontalAlignment: label.horizontalAlignment
Layout.alignment: label.Layout.alignment
text: label.text
visible: buttonArea.pressed
}
}

Image {
visible: button.rightIcon !== ""
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
width: button.small ? 16 * scaleRatio : 20 * scaleRatio
height: button.small ? 16 * scaleRatio : 20 * scaleRatio
source: {
if(button.rightIconInactive !== "" && !button.enabled) {
return button.rightIconInactive;
}
return button.rightIcon;
}
return parent.rightIcon;
}
}

MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
onClicked: doClick()
cursorShape: Qt.PointingHandCursor
}
Expand Down

0 comments on commit 117c317

Please sign in to comment.