mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-29 12:18:44 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4bbfd49ad | ||
|
|
142b79ee27 | ||
|
|
a43e9fe122 | ||
|
|
ce84b1d062 | ||
|
|
0e6113729d | ||
|
|
27d7b346c0 | ||
|
|
ea9c73826b | ||
|
|
5a9605c87b | ||
|
|
db151c2920 | ||
|
|
c7fca31653 | ||
|
|
081c01ada9 | ||
|
|
613d4e7f61 | ||
|
|
79daae6796 | ||
|
|
b1e751a6b7 | ||
|
|
068e4c2aa5 | ||
|
|
f1144c483e | ||
|
|
e5b8ef6a00 |
@@ -42,30 +42,36 @@ jobs:
|
||||
|
||||
- name: fetch wownerod to embed
|
||||
run: |
|
||||
rm -rf /tmp/wownerod-embed && mkdir -p /tmp/wownerod-embed
|
||||
curl -fL -o /tmp/wownero.tar.bz2 \
|
||||
# ubuntu-latest and windows-latest both resolve to the same host in
|
||||
# host mode, so a fixed /tmp path lets a concurrently dispatched job's
|
||||
# `rm -rf` delete this job's binary between fetch and configure. Scope
|
||||
# every extract to the run.
|
||||
EMBED="/tmp/wowlet-${GITHUB_RUN_ID:-local}"
|
||||
rm -rf "$EMBED/wownerod-embed" && mkdir -p "$EMBED/wownerod-embed"
|
||||
curl -fL -o "$EMBED/wownero.tar.bz2" \
|
||||
https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/wownero-x86_64-linux-gnu-v0.11.4.0.tar.bz2
|
||||
rm -rf /tmp/wow-x && mkdir -p /tmp/wow-x
|
||||
tar xjf /tmp/wownero.tar.bz2 -C /tmp/wow-x
|
||||
find /tmp/wow-x -name wownerod -type f -exec cp {} /tmp/wownerod-embed/ \;
|
||||
chmod +x /tmp/wownerod-embed/wownerod
|
||||
ls -la /tmp/wownerod-embed
|
||||
rm -rf "$EMBED/wow-x" && mkdir -p "$EMBED/wow-x"
|
||||
tar xjf "$EMBED/wownero.tar.bz2" -C "$EMBED/wow-x"
|
||||
find "$EMBED/wow-x" -name wownerod -type f -exec cp {} "$EMBED/wownerod-embed/" \;
|
||||
chmod +x "$EMBED/wownerod-embed/wownerod"
|
||||
ls -la "$EMBED/wownerod-embed"
|
||||
|
||||
- name: fetch tor to embed
|
||||
run: |
|
||||
rm -rf /tmp/tor-embed && mkdir -p /tmp/tor-embed
|
||||
curl -fL -o /tmp/teb.tgz \
|
||||
EMBED="/tmp/wowlet-${GITHUB_RUN_ID:-local}"
|
||||
rm -rf "$EMBED/tor-embed" && mkdir -p "$EMBED/tor-embed"
|
||||
curl -fL -o "$EMBED/teb.tgz" \
|
||||
https://archive.torproject.org/tor-package-archive/torbrowser/15.0/tor-expert-bundle-linux-x86_64-15.0.tar.gz
|
||||
rm -rf /tmp/teb && mkdir -p /tmp/teb && tar xzf /tmp/teb.tgz -C /tmp/teb
|
||||
cp /tmp/teb/tor/tor /tmp/teb/tor/libssl.so.3 /tmp/teb/tor/libevent-2.1.so.7 \
|
||||
/tmp/teb/tor/libcrypto.so.3 /tmp/tor-embed/
|
||||
rm -rf "$EMBED/teb" && mkdir -p "$EMBED/teb" && tar xzf "$EMBED/teb.tgz" -C "$EMBED/teb"
|
||||
cp "$EMBED/teb/tor/tor" "$EMBED/teb/tor/libssl.so.3" "$EMBED/teb/tor/libevent-2.1.so.7" \
|
||||
"$EMBED/teb/tor/libcrypto.so.3" "$EMBED/tor-embed/"
|
||||
# The expert bundle's tor carries no rpath; point it and its libs at
|
||||
# $ORIGIN so the embedded copy resolves them from the extract dir on
|
||||
# any distro.
|
||||
for f in tor libssl.so.3 libevent-2.1.so.7 libcrypto.so.3; do
|
||||
patchelf --set-rpath '$ORIGIN' /tmp/tor-embed/$f
|
||||
patchelf --set-rpath '$ORIGIN' "$EMBED/tor-embed/$f"
|
||||
done
|
||||
chmod +x /tmp/tor-embed/tor
|
||||
chmod +x "$EMBED/tor-embed/tor"
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
@@ -73,15 +79,16 @@ jobs:
|
||||
# binary, or TorManager::unpackBins() sees embedded > unpacked and
|
||||
# rewrites Tor on every launch. The bundle's release number (15.0) is
|
||||
# not its tor version, so derive it.
|
||||
TORVER=$(/tmp/tor-embed/tor --version | grep -oE '[0-9]+(\.[0-9]+){3}' | head -1)
|
||||
EMBED="/tmp/wowlet-${GITHUB_RUN_ID:-local}"
|
||||
TORVER=$("$EMBED/tor-embed/tor" --version | grep -oE '[0-9]+(\.[0-9]+){3}' | head -1)
|
||||
echo "embedded tor version: $TORVER"
|
||||
# ARCH=x86-64, never native: the build host's CPU is newer than many
|
||||
# users' and native bakes in unsupported instructions -> SIGILL.
|
||||
cmake -S . -B build \
|
||||
-DWITH_SCANNER=OFF \
|
||||
-DARCH=x86-64 \
|
||||
-DWOWNEROD_DIR=/tmp/wownerod-embed \
|
||||
-DTOR_DIR=/tmp/tor-embed \
|
||||
-DWOWNEROD_DIR="$EMBED/wownerod-embed" \
|
||||
-DTOR_DIR="$EMBED/tor-embed" \
|
||||
-DTOR_VERSION="$TORVER"
|
||||
cmake --build build -j6
|
||||
ls -la build/bin/
|
||||
@@ -91,7 +98,7 @@ jobs:
|
||||
rm -rf AppDir
|
||||
mkdir -p AppDir/usr/bin AppDir/usr/share/applications \
|
||||
AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp build/bin/feather AppDir/usr/bin/wowlet
|
||||
cp build/bin/wowlet AppDir/usr/bin/wowlet
|
||||
chmod +x AppDir/usr/bin/wowlet
|
||||
cp src/assets/wowlet.desktop AppDir/usr/share/applications/wowlet.desktop
|
||||
cp src/assets/images/appicons/256x256.png \
|
||||
@@ -147,3 +154,41 @@ jobs:
|
||||
name: wowlet-x86_64-linux-AppImage
|
||||
path: wowlet-x86_64.AppImage
|
||||
if-no-files-found: error
|
||||
|
||||
- name: publish the AppImage to the tag's release
|
||||
# The artifact above uploads fine but this Gitea's REST listing reports
|
||||
# zero artifacts for every run, so a tag build's output cannot be fetched
|
||||
# back through the API. Release assets can, so publish there as well.
|
||||
# Fail-safe by design: with no usable token this says why and exits 0,
|
||||
# it never turns a green build red.
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -eu
|
||||
FILE=wowlet-x86_64.AppImage
|
||||
TAG="${GITHUB_REF#refs/tags/}"
|
||||
API="${GITHUB_SERVER_URL:-https://git.such.software}/api/v1/repos/$GITHUB_REPOSITORY"
|
||||
if [ -z "${RELEASE_TOKEN:-}" ]; then
|
||||
echo "no token available to this runner, skipping the release upload" >&2
|
||||
exit 0
|
||||
fi
|
||||
H="Authorization: token $RELEASE_TOKEN"
|
||||
# Single-line python on purpose: a continuation line at column 0 would
|
||||
# end this block scalar and break the workflow's YAML. `|| true` keeps
|
||||
# a malformed response from aborting the step under `set -e`.
|
||||
rid=$(curl -sS -H "$H" "$API/releases/tags/$TAG" | python3 -c "import json,sys;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||
if [ -z "$rid" ]; then
|
||||
rid=$(curl -sS -H "$H" -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"wowlet $TAG\"}" "$API/releases" | python3 -c "import json,sys;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||
fi
|
||||
if [ -z "$rid" ]; then
|
||||
echo "could not resolve or create a release for $TAG, skipping the upload" >&2
|
||||
exit 0
|
||||
fi
|
||||
code=$(curl -sS -H "$H" -o /dev/null -w '%{http_code}' -X POST \
|
||||
-F "attachment=@$FILE" "$API/releases/$rid/assets?name=$(basename "$FILE")")
|
||||
echo "release asset upload returned HTTP $code"
|
||||
if [ "$code" != "201" ]; then
|
||||
echo "the release upload did not return 201; the run artifact still holds the build" >&2
|
||||
fi
|
||||
|
||||
@@ -103,8 +103,39 @@ jobs:
|
||||
# for the dormant `installed/` layout)
|
||||
mkdir -p dist/Wowlet.app/Contents/Resources
|
||||
cp ../src/assets/images/appicons/appicon.icns dist/Wowlet.app/Contents/Resources/
|
||||
# bundle Qt frameworks/plugins so the app runs off-machine
|
||||
/opt/homebrew/opt/qt/bin/macdeployqt dist/Wowlet.app
|
||||
# bundle Qt frameworks/plugins so the app runs off-machine.
|
||||
# -qmldir is not optional: our QML lives in .qrc resources, which
|
||||
# macdeployqt cannot scan, so without it the bundle ships no QML
|
||||
# modules at all and every page importing anything beyond QtQuick
|
||||
# fails to load. That is how 5.1.2 shipped a grey mining tab on mac
|
||||
# while Linux was fine: Contents/Resources held no qml directory, and
|
||||
# the app logged 'module "QtQuick.Layouts" is not installed'.
|
||||
/opt/homebrew/opt/qt/bin/macdeployqt dist/Wowlet.app -qmldir=../src/assets/qml
|
||||
|
||||
# qmlimportscanner reads only the `import` lines in our QML and does
|
||||
# not follow a module's own qmldir depends chain, so transitive
|
||||
# modules (QtQuick -> QtQml.WorkerScript/Models) are silently skipped.
|
||||
# The AppImage build hit this twice and blanket-copies the trees; do
|
||||
# the same here, before the dylib passes below so their deps resolve.
|
||||
# Ask Qt where its QML modules live rather than assuming a brew
|
||||
# layout; the AppImage build asks qmake the same question.
|
||||
QTPREFIX="$(brew --prefix qt)"
|
||||
QMLSRC="$("$QTPREFIX/bin/qmake6" -query QT_INSTALL_QML 2>/dev/null || echo "$QTPREFIX/share/qt/qml")"
|
||||
[ -d "$QMLSRC" ] || { echo "ERROR: Qt QML modules not found at $QMLSRC" >&2; exit 1; }
|
||||
mkdir -p dist/Wowlet.app/Contents/Resources/qml
|
||||
for m in QtQuick QtQml; do
|
||||
cp -Rn "$QMLSRC/$m" dist/Wowlet.app/Contents/Resources/qml/ 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Guard: the module the mining tab needs has to be in the bundle. A
|
||||
# missing QML module is invisible until someone opens the tab, so it
|
||||
# fails the build instead of shipping a page that paints grey.
|
||||
for m in QtQuick QtQuick/Layouts; do
|
||||
[ -d "dist/Wowlet.app/Contents/Resources/qml/$m" ] || {
|
||||
echo "ERROR: $m missing from the bundle; QML pages will not load" >&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
# macdeployqt bundles Qt frameworks but not the plain-dylib brew deps
|
||||
# of Qt's image plugins (libwebp/libsharpyuv/libbrotli...), which are
|
||||
@@ -216,3 +247,47 @@ jobs:
|
||||
name: wowlet-macos
|
||||
path: build/wowlet-macos-*.zip
|
||||
retention-days: 14
|
||||
# Without this an empty upload passes silently, which is how a signed
|
||||
# build can appear to publish while shipping nothing.
|
||||
if-no-files-found: error
|
||||
|
||||
- name: publish the signed zip to the tag's release
|
||||
# Same reason as the Linux job: run artifacts upload but this Gitea's
|
||||
# REST listing returns zero for every run, so the notarized zip cannot
|
||||
# be fetched back through the API. Release assets can be. Fail-safe:
|
||||
# with no usable token this says why and exits 0.
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -eu
|
||||
FILE=$(ls build/wowlet-macos-*.zip 2>/dev/null | head -1)
|
||||
if [ -z "$FILE" ]; then
|
||||
echo "no macOS zip to publish; the packaging step should have failed first" >&2
|
||||
exit 0
|
||||
fi
|
||||
TAG="${GITHUB_REF#refs/tags/}"
|
||||
API="${GITHUB_SERVER_URL:-https://git.such.software}/api/v1/repos/$GITHUB_REPOSITORY"
|
||||
if [ -z "${RELEASE_TOKEN:-}" ]; then
|
||||
echo "no token available to this runner, skipping the release upload" >&2
|
||||
exit 0
|
||||
fi
|
||||
H="Authorization: token $RELEASE_TOKEN"
|
||||
# Single-line python on purpose: a continuation line at column 0 would
|
||||
# end this block scalar and break the workflow's YAML. `|| true` keeps
|
||||
# a malformed response from aborting the step under `set -e`.
|
||||
rid=$(curl -sS -H "$H" "$API/releases/tags/$TAG" | python3 -c "import json,sys;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||
if [ -z "$rid" ]; then
|
||||
rid=$(curl -sS -H "$H" -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"wowlet $TAG\"}" "$API/releases" | python3 -c "import json,sys;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
|
||||
fi
|
||||
if [ -z "$rid" ]; then
|
||||
echo "could not resolve or create a release for $TAG, skipping the upload" >&2
|
||||
exit 0
|
||||
fi
|
||||
code=$(curl -sS -H "$H" -o /dev/null -w '%{http_code}' -X POST \
|
||||
-F "attachment=@$FILE" "$API/releases/$rid/assets?name=$(basename "$FILE")")
|
||||
echo "release asset upload returned HTTP $code"
|
||||
if [ "$code" != "201" ]; then
|
||||
echo "the release upload did not return 201; the run artifact still holds the build" >&2
|
||||
fi
|
||||
|
||||
@@ -98,13 +98,17 @@ jobs:
|
||||
|
||||
- name: fetch wownerod.exe to embed
|
||||
run: |
|
||||
rm -rf /tmp/wownerod-embed && mkdir -p /tmp/wownerod-embed
|
||||
curl -fL -o /tmp/wownero-win.zip \
|
||||
# This job and the Linux one land on the same host in host mode, and a
|
||||
# fixed /tmp path let each wipe the other's binary mid-build. Scope the
|
||||
# extract to the run.
|
||||
EMBED="/tmp/wowlet-${GITHUB_RUN_ID:-local}"
|
||||
rm -rf "$EMBED/wownerod-embed" && mkdir -p "$EMBED/wownerod-embed"
|
||||
curl -fL -o "$EMBED/wownero-win.zip" \
|
||||
https://github.com/wownero/wownero-codeberg-mirror/releases/download/v0.11.4.0/wownero-x86_64-w64-mingw32-v0.11.4.0.zip
|
||||
# -j flattens the versioned subdir so wownerod.exe is a DIRECT child
|
||||
# (WownerodQrcGenerator globs ${WOWNEROD_DIR}/* non-recursively).
|
||||
unzip -o -j /tmp/wownero-win.zip 'wownero-x86_64-w64-mingw32-v0.11.4.0/wownerod.exe' -d /tmp/wownerod-embed
|
||||
ls -la /tmp/wownerod-embed
|
||||
unzip -o -j "$EMBED/wownero-win.zip" 'wownero-x86_64-w64-mingw32-v0.11.4.0/wownerod.exe' -d "$EMBED/wownerod-embed"
|
||||
ls -la "$EMBED/wownerod-embed"
|
||||
|
||||
- name: build wowlet.exe
|
||||
run: |
|
||||
@@ -118,7 +122,7 @@ jobs:
|
||||
-DCHECK_UPDATES=OFF \
|
||||
-DTOR_INSTALLED=On \
|
||||
-DFEATHER_TARGET_TRIPLET="$HOST" \
|
||||
-DWOWNEROD_DIR=/tmp/wownerod-embed \
|
||||
-DWOWNEROD_DIR="/tmp/wowlet-${GITHUB_RUN_ID:-local}/wownerod-embed" \
|
||||
..
|
||||
cmake --build . -j6
|
||||
ls -la bin/
|
||||
@@ -129,7 +133,7 @@ jobs:
|
||||
# archive contains the signed binary.
|
||||
run: |
|
||||
mkdir -p stage/tor
|
||||
cp build/bin/feather.exe stage/wowlet.exe
|
||||
cp build/bin/wowlet.exe stage/wowlet.exe
|
||||
cp "contrib/depends/$HOST/Tor/tor.exe" stage/tor/tor.exe
|
||||
(cp LICENSE stage/LICENSE.txt 2>/dev/null || cp COPYING stage/LICENSE.txt 2>/dev/null) || true
|
||||
ls -la stage stage/tor
|
||||
@@ -266,3 +270,47 @@ jobs:
|
||||
wowlet-x86_64-windows.zip
|
||||
wowlet-x86_64-windows-unsigned.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: publish the Windows zips to the tag's release
|
||||
# Same reason as the Linux and macOS jobs: artifacts upload fine, but
|
||||
# this Gitea's REST listing reports zero for every run, so the signed exe
|
||||
# cannot be fetched back through the API. Release assets can be.
|
||||
#
|
||||
# This runs after the Authenticode, timestamp and signer checks above, so
|
||||
# an unsigned or untimestamped binary never reaches a release. curl.exe,
|
||||
# not Invoke-WebRequest: `shell: powershell` is Windows PowerShell 5.1,
|
||||
# whose Invoke-WebRequest has no -Form for multipart uploads.
|
||||
#
|
||||
# Fail-safe: a build that produced a correctly signed binary must not go
|
||||
# red because publishing failed, so every bad path reports and exits 0.
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
shell: powershell
|
||||
env:
|
||||
RELEASE_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$ErrorActionPreference = 'Continue'
|
||||
if (-not $env:RELEASE_TOKEN) {
|
||||
Write-Host "no token available to this runner, skipping the release upload"
|
||||
exit 0
|
||||
}
|
||||
$tag = $env:GITHUB_REF -replace '^refs/tags/', ''
|
||||
$server = if ($env:GITHUB_SERVER_URL) { $env:GITHUB_SERVER_URL } else { 'https://git.such.software' }
|
||||
$api = "$server/api/v1/repos/$env:GITHUB_REPOSITORY"
|
||||
$auth = "Authorization: token $env:RELEASE_TOKEN"
|
||||
$rid = ''
|
||||
try { $rid = ((curl.exe -sS -H $auth "$api/releases/tags/$tag") | ConvertFrom-Json).id } catch { $rid = '' }
|
||||
if (-not $rid) {
|
||||
try {
|
||||
$body = "{""tag_name"":""$tag"",""name"":""wowlet $tag""}"
|
||||
$rid = ((curl.exe -sS -H $auth -H "Content-Type: application/json" -X POST -d $body "$api/releases") | ConvertFrom-Json).id
|
||||
} catch { $rid = '' }
|
||||
}
|
||||
if (-not $rid) {
|
||||
Write-Host "could not resolve or create a release for $tag, skipping the upload"
|
||||
exit 0
|
||||
}
|
||||
foreach ($f in @('wowlet-x86_64-windows.zip', 'wowlet-x86_64-windows-unsigned.zip')) {
|
||||
if (-not (Test-Path $f)) { Write-Host "missing $f, nothing to publish for it"; continue }
|
||||
$code = curl.exe -sS -o NUL -w '%{http_code}' -H $auth -F "attachment=@$f" "$api/releases/$rid/assets?name=$f"
|
||||
Write-Host "release asset upload for $f returned HTTP $code"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
|
||||
project(feather
|
||||
VERSION "5.1.1"
|
||||
VERSION "5.1.4"
|
||||
DESCRIPTION "A free Monero desktop wallet"
|
||||
LANGUAGES CXX C ASM
|
||||
)
|
||||
|
||||
@@ -5,4 +5,4 @@ echo $HERE
|
||||
|
||||
# Tails 5.8 sets QT_QPA_PLATFORM to wayland which breaks our app
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
${APPDIR}/usr/bin/feather $*
|
||||
${APPDIR}/usr/bin/wowlet $*
|
||||
|
||||
@@ -5,29 +5,29 @@ unset SOURCE_DATE_EPOCH
|
||||
|
||||
# Manually create the AppImage (reproducibly) since linuxdeployqt is not able to create cross-compiled AppImages
|
||||
|
||||
APPDIR="$PWD/feather.AppDir"
|
||||
APPDIR="$PWD/wowlet.AppDir"
|
||||
|
||||
mkdir -p "$APPDIR"
|
||||
mkdir -p "$APPDIR/usr/share/applications/"
|
||||
mkdir -p "$APPDIR/usr/bin"
|
||||
|
||||
cp "src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"
|
||||
cp "src/assets/feather.desktop" "$APPDIR/feather.desktop"
|
||||
cp "src/assets/images/appicons/64x64.png" "$APPDIR/feather.png"
|
||||
cp "build/bin/feather" "$APPDIR/usr/bin/feather"
|
||||
chmod +x "$APPDIR/usr/bin/feather"
|
||||
cp "src/assets/wowlet.desktop" "$APPDIR/usr/share/applications/wowlet.desktop"
|
||||
cp "src/assets/wowlet.desktop" "$APPDIR/wowlet.desktop"
|
||||
cp "src/assets/images/appicons/64x64.png" "$APPDIR/wowlet.png"
|
||||
cp "build/bin/wowlet" "$APPDIR/usr/bin/wowlet"
|
||||
chmod +x "$APPDIR/usr/bin/wowlet"
|
||||
|
||||
cp "contrib/AppImage/AppRun" "$APPDIR/"
|
||||
chmod +x "$APPDIR/AppRun"
|
||||
|
||||
find feather.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
|
||||
find wowlet.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
|
||||
|
||||
mksquashfs feather.AppDir feather.squashfs -comp zstd -info -root-owned -no-xattrs -noappend -fstime 0
|
||||
mksquashfs wowlet.AppDir wowlet.squashfs -comp zstd -info -root-owned -no-xattrs -noappend -fstime 0
|
||||
# mksquashfs writes a timestamp to the header
|
||||
printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))
|
||||
printf '\x00\x00\x00\x00' | dd conv=notrunc of=wowlet.squashfs bs=1 seek=$((0x8))
|
||||
|
||||
rm -f feather.AppImage
|
||||
rm -f wowlet.AppImage
|
||||
|
||||
cat "${GITHUB_WORKSPACE:-/feather}/contrib/depends/${HOST}/runtime" >> feather.AppImage
|
||||
cat feather.squashfs >> feather.AppImage
|
||||
chmod a+x feather.AppImage
|
||||
cat "${GITHUB_WORKSPACE:-/feather}/contrib/depends/${HOST}/runtime" >> wowlet.AppImage
|
||||
cat wowlet.squashfs >> wowlet.AppImage
|
||||
chmod a+x wowlet.AppImage
|
||||
|
||||
@@ -43,6 +43,15 @@ SET(absl_ROOT @prefix@)
|
||||
SET(NATIVE_BIN_PATH @prefix@/native/bin CACHE FILEPATH "path to native binaries" FORCE)
|
||||
SET(LRELEASE_PATH @prefix@/native/bin CACHE FILEPATH "path to lrelease" FORCE)
|
||||
|
||||
# A cross Qt that carries qtdeclarative makes find_package(Qt6) demand a HOST Qt,
|
||||
# because QML needs host-side tools (qmlcachegen, qmlimportscanner,
|
||||
# qmltyperegistrar). depends already builds one: native_qt installs to
|
||||
# native/qt-host and qt.mk hands that path to the cross Qt's own configure. Our
|
||||
# build never heard about it, so Qt6Config refused with "please set the
|
||||
# QT_HOST_PATH cache variable" and the Windows cross build has failed since
|
||||
# qtdeclarative landed. Same path, stated once more for the consuming project.
|
||||
SET(QT_HOST_PATH @prefix@/native/qt-host CACHE PATH "host Qt for cross QML tooling")
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
|
||||
SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
<string>????</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>feather</string>
|
||||
<string>wowlet</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>Feather</string>
|
||||
<string>Wowlet</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.monero-project.feather</string>
|
||||
<string>org.wownero.wowlet</string>
|
||||
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Camera is used to scan QR codes on demand.</string>
|
||||
|
||||
+13
-9
@@ -148,7 +148,10 @@ add_executable(feather ${EXECUTABLE_FLAG} main.cpp
|
||||
${ASSETS_TOR}
|
||||
)
|
||||
|
||||
# The CMake target keeps its upstream name so the target_* calls below stay put;
|
||||
# only what we ship is renamed.
|
||||
set_target_properties(feather PROPERTIES
|
||||
OUTPUT_NAME wowlet
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
LINK_FLAGS_RELEASE -s
|
||||
)
|
||||
@@ -370,14 +373,14 @@ else()
|
||||
)
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/feather.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/32x32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/48x48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/64x64.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/96x96.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/96x96/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/128x128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/512x512.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps RENAME "feather.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/wowlet.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/32x32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/32x32/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/48x48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/64x64.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/64x64/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/96x96.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/96x96/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/128x128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/128x128/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME "wowlet.png")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/512x512.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps RENAME "wowlet.png")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -385,13 +388,14 @@ if(APPLE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/contrib/macdeploy/Info.plist.in ${CMAKE_SOURCE_DIR}/contrib/macdeploy/Info.plist @ONLY)
|
||||
|
||||
set_target_properties(feather PROPERTIES
|
||||
OUTPUT_NAME wowlet
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/contrib/macdeploy/Info.plist"
|
||||
LINK_FLAGS_RELEASE -s
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/src/assets/images/appicons/appicon.icns" DESTINATION "${CMAKE_SOURCE_DIR}/installed/feather.app/Contents/Resources/" )
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/src/assets/images/appicons/appicon.icns" DESTINATION "${CMAKE_SOURCE_DIR}/installed/wowlet.app/Contents/Resources/" )
|
||||
endif()
|
||||
|
||||
qt_finalize_executable(feather)
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ void MainWindow::initWidgets() {
|
||||
});
|
||||
|
||||
// [Mining] — wowlet: the pixel-art mining tab (mining.qml + embedded-node solo miner)
|
||||
m_miningWidget = new MiningWidget(m_wallet, this);
|
||||
m_miningWidget = new MiningWidget(m_wallet, m_nodes, this);
|
||||
ui->tabWidget->addTab(m_miningWidget, "Mining");
|
||||
|
||||
// [Notes]
|
||||
|
||||
@@ -23,7 +23,7 @@ ReceiveWidget::ReceiveWidget(Wallet *wallet, QWidget *parent)
|
||||
|
||||
// wowlet: ambient scene as a short banner under the address table. A layout
|
||||
// item, never an overlay over the table.
|
||||
auto *scene = new SceneWidget(this, SceneWidget::Dawn);
|
||||
auto *scene = new SceneWidget(this, SceneWidget::Dawn, SceneWidget::Sit);
|
||||
scene->setMinimumHeight(110);
|
||||
scene->setMaximumHeight(130);
|
||||
ui->verticalLayout->addWidget(scene);
|
||||
|
||||
+10
-3
@@ -29,10 +29,17 @@ SendWidget::SendWidget(Wallet *wallet, QWidget *parent)
|
||||
// wowlet: the form only needs the top of the tab — give the rest of it to
|
||||
// the ambient scene. A layout item under the form, never an overlay: the
|
||||
// send form itself stays untouched.
|
||||
auto *scene = new SceneWidget(this, SceneWidget::Night);
|
||||
//
|
||||
// Centred in the space below the form rather than stacked straight under
|
||||
// it: butted up against the Clear/Send row the scene reads as part of the
|
||||
// form, and a band of night sky touching a button looks like a mistake.
|
||||
auto *scene = new SceneWidget(this, SceneWidget::Night, SceneWidget::Money);
|
||||
scene->setMinimumHeight(160);
|
||||
scene->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
ui->verticalLayoutOuter->addWidget(scene, 1);
|
||||
scene->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
ui->verticalLayoutOuter->addSpacing(14); // never touches the Send row
|
||||
ui->verticalLayoutOuter->addStretch(1);
|
||||
ui->verticalLayoutOuter->addWidget(scene);
|
||||
ui->verticalLayoutOuter->addStretch(1);
|
||||
|
||||
QString amount_rx = R"(^\d{0,8}[\.,]\d{0,12}|(all)$)";
|
||||
QRegularExpression rx;
|
||||
|
||||
@@ -512,6 +512,10 @@ Rectangle {
|
||||
Image {
|
||||
id: imgAxe
|
||||
visible: mining.daemonMiningState === 0
|
||||
// Greyed out while the wallet is on someone else's node:
|
||||
// solo mining is an RPC to the daemon we are connected
|
||||
// to, and that daemon has to be ours.
|
||||
opacity: mining.canMine ? 1.0 : 0.35
|
||||
source: "qrc:/mining/axe.png"
|
||||
width: 73
|
||||
height: 75
|
||||
@@ -551,7 +555,11 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onClicked: {
|
||||
if(mining.daemonMiningState === 0) {
|
||||
if (mining.daemonMiningState === 0) {
|
||||
if (!mining.canMine) {
|
||||
remoteNodeNotice.flash();
|
||||
return;
|
||||
}
|
||||
root.startMining();
|
||||
root.calcAvailableHeightConsoleLines();
|
||||
}
|
||||
@@ -559,14 +567,56 @@ Rectangle {
|
||||
root.stopMining();
|
||||
}
|
||||
onEntered: {
|
||||
imgAxe.height = 64
|
||||
imgAxe.width = 64
|
||||
if (mining.canMine) {
|
||||
imgAxe.height = 64
|
||||
imgAxe.width = 64
|
||||
} else {
|
||||
remoteNodeNotice.show();
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
imgAxe.height = 75
|
||||
imgAxe.width = 73
|
||||
remoteNodeNotice.hideSoon();
|
||||
}
|
||||
}
|
||||
|
||||
// Why the axe is greyed out. Shown on hover, and flashed if
|
||||
// the axe is clicked anyway.
|
||||
Rectangle {
|
||||
id: remoteNodeNotice
|
||||
z: parent.z + 5
|
||||
visible: opacity > 0.01
|
||||
opacity: 0.0
|
||||
width: 250
|
||||
height: noticeText.implicitHeight + 16
|
||||
radius: 6
|
||||
color: "#231a10"
|
||||
border.color: "#e0b062"
|
||||
border.width: 1
|
||||
anchors.right: parent.left
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
id: noticeText
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - 16
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: "#f2dcb4"
|
||||
font.pointSize: 9
|
||||
text: "Mining needs your own node.\nYou are connected to a remote one — " +
|
||||
"start the built-in node or point the wallet at a local daemon " +
|
||||
"under Settings to mine."
|
||||
}
|
||||
|
||||
Behavior on opacity { NumberAnimation { duration: 160 } }
|
||||
Timer { id: noticeHide; interval: 2600; onTriggered: remoteNodeNotice.opacity = 0.0 }
|
||||
function show() { noticeHide.stop(); opacity = 1.0 }
|
||||
function hideSoon() { noticeHide.restart() }
|
||||
function flash() { show(); noticeHide.restart() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+797
-84
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "MiningWidget.h"
|
||||
|
||||
#include "utils/nodes.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
@@ -20,9 +22,10 @@ static QString formatUptime(qint64 secs) {
|
||||
.arg(secs % 60, 2, 10, QChar('0'));
|
||||
}
|
||||
|
||||
MiningWidget::MiningWidget(Wallet *wallet, QWidget *parent)
|
||||
MiningWidget::MiningWidget(Wallet *wallet, Nodes *nodes, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_wallet(wallet)
|
||||
, m_nodes(nodes)
|
||||
, m_quickWidget(new QQuickWidget(this))
|
||||
, m_backend(new MiningBackend(this))
|
||||
, m_timer(new QTimer(this))
|
||||
@@ -46,6 +49,10 @@ MiningWidget::MiningWidget(Wallet *wallet, QWidget *parent)
|
||||
}
|
||||
|
||||
void MiningWidget::onStartMining() {
|
||||
// The QML disables the control, but the signal is not a promise: refuse
|
||||
// here too rather than send start_mining to a stranger's daemon.
|
||||
if (!m_backend->canMine())
|
||||
return;
|
||||
int threads = std::max(1, QThread::idealThreadCount() / 2);
|
||||
if (m_wallet->startMining(threads))
|
||||
m_backend->setState(3);
|
||||
@@ -57,6 +64,8 @@ void MiningWidget::onStopMining() {
|
||||
}
|
||||
|
||||
void MiningWidget::poll() {
|
||||
m_backend->setCanMine(m_nodes && m_nodes->connection().isLocal());
|
||||
|
||||
bool mining = m_wallet->isMining();
|
||||
m_backend->setState(mining ? 3 : 0);
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#define WOWLET_MININGWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class Nodes;
|
||||
#include <QTimer>
|
||||
#include <QQuickWidget>
|
||||
|
||||
@@ -16,16 +18,24 @@ class MiningBackend : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int daemonMiningState READ daemonMiningState NOTIFY daemonMiningStateChanged)
|
||||
Q_PROPERTY(bool reducedMotion READ reducedMotion NOTIFY reducedMotionChanged)
|
||||
Q_PROPERTY(bool canMine READ canMine NOTIFY canMineChanged)
|
||||
public:
|
||||
explicit MiningBackend(QObject *parent = nullptr) : QObject(parent) {}
|
||||
int daemonMiningState() const { return m_state; }
|
||||
void setState(int s) { if (m_state != s) { m_state = s; emit daemonMiningStateChanged(); } }
|
||||
bool reducedMotion() const { return m_reducedMotion; }
|
||||
void setReducedMotion(bool r) { if (m_reducedMotion != r) { m_reducedMotion = r; emit reducedMotionChanged(); } }
|
||||
// Solo mining is a start_mining RPC to whichever daemon the wallet is
|
||||
// connected to. Against a remote node that is either refused outright or —
|
||||
// worse, if the operator left the RPC open — it puts someone else's machine
|
||||
// to work on our address. It is only ever ours to ask of our own node.
|
||||
bool canMine() const { return m_canMine; }
|
||||
void setCanMine(bool c) { if (m_canMine != c) { m_canMine = c; emit canMineChanged(); } }
|
||||
|
||||
signals:
|
||||
void daemonMiningStateChanged();
|
||||
void reducedMotionChanged();
|
||||
void canMineChanged();
|
||||
void daemonOutput(const QString &line);
|
||||
void syncStatus(int from, int to, int pct);
|
||||
void uptimeChanged(const QString &uptime);
|
||||
@@ -34,6 +44,7 @@ signals:
|
||||
private:
|
||||
int m_state = 0; // 0:idle 1:startup 2:syncing 3:mining
|
||||
bool m_reducedMotion = false;
|
||||
bool m_canMine = false;
|
||||
};
|
||||
|
||||
// wowlet: the pixel-art mining tab. Hosts mining.qml and wires its pick-axe to the wallet's solo
|
||||
@@ -41,7 +52,7 @@ private:
|
||||
class MiningWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MiningWidget(Wallet *wallet, QWidget *parent = nullptr);
|
||||
explicit MiningWidget(Wallet *wallet, Nodes *nodes, QWidget *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void onStartMining();
|
||||
@@ -50,6 +61,7 @@ private slots:
|
||||
|
||||
private:
|
||||
Wallet *m_wallet;
|
||||
Nodes *m_nodes;
|
||||
QQuickWidget *m_quickWidget;
|
||||
MiningBackend *m_backend;
|
||||
QTimer *m_timer;
|
||||
|
||||
@@ -4,18 +4,44 @@
|
||||
#include "SceneWidget.h"
|
||||
|
||||
#include <QQmlContext>
|
||||
#include <QQuickItem>
|
||||
|
||||
#include "utils/config.h"
|
||||
|
||||
SceneWidget::SceneWidget(QWidget *parent, Variant variant)
|
||||
SceneWidget::SceneWidget(QWidget *parent, Variant variant, Mode mode)
|
||||
: QQuickWidget(parent)
|
||||
, m_backend(new SceneBackend(this))
|
||||
{
|
||||
m_backend->setReducedMotion(conf()->get(Config::reducedMotion).toBool());
|
||||
m_backend->setVariant(static_cast<int>(variant));
|
||||
m_backend->setMode(mode == Sit ? QStringLiteral("sit")
|
||||
: mode == Money ? QStringLiteral("money")
|
||||
: QStringLiteral("run"));
|
||||
this->rootContext()->setContextProperty("sceneCtx", m_backend);
|
||||
this->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
this->setSource(QUrl("qrc:/qml/scene.qml"));
|
||||
this->callScene("suspend");
|
||||
}
|
||||
|
||||
void SceneWidget::showEvent(QShowEvent *event) {
|
||||
QQuickWidget::showEvent(event);
|
||||
this->callScene("restart");
|
||||
}
|
||||
|
||||
void SceneWidget::hideEvent(QHideEvent *event) {
|
||||
this->callScene("suspend");
|
||||
QQuickWidget::hideEvent(event);
|
||||
}
|
||||
|
||||
void SceneWidget::resizeEvent(QResizeEvent *event) {
|
||||
QQuickWidget::resizeEvent(event);
|
||||
if (this->isVisible())
|
||||
this->callScene("restart");
|
||||
}
|
||||
|
||||
void SceneWidget::callScene(const char *method) {
|
||||
if (auto *root = this->rootObject())
|
||||
QMetaObject::invokeMethod(root, method);
|
||||
}
|
||||
|
||||
void SceneWidget::refreshReducedMotion() {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#define WOWLET_SCENEWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QQuickWidget>
|
||||
|
||||
// Context object exposed to scene.qml as `sceneCtx`. Carries the reduced-motion
|
||||
@@ -14,18 +15,23 @@ class SceneBackend : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool reducedMotion READ reducedMotion NOTIFY reducedMotionChanged)
|
||||
Q_PROPERTY(int variant READ variant NOTIFY variantChanged)
|
||||
Q_PROPERTY(QString mode READ mode NOTIFY modeChanged)
|
||||
public:
|
||||
explicit SceneBackend(QObject *parent = nullptr) : QObject(parent) {}
|
||||
bool reducedMotion() const { return m_reducedMotion; }
|
||||
void setReducedMotion(bool r) { if (m_reducedMotion != r) { m_reducedMotion = r; emit reducedMotionChanged(); } }
|
||||
int variant() const { return m_variant; }
|
||||
void setVariant(int v) { if (m_variant != v) { m_variant = v; emit variantChanged(); } }
|
||||
QString mode() const { return m_mode; }
|
||||
void setMode(const QString &m) { if (m_mode != m) { m_mode = m; emit modeChanged(); } }
|
||||
signals:
|
||||
void reducedMotionChanged();
|
||||
void variantChanged();
|
||||
void modeChanged();
|
||||
private:
|
||||
bool m_reducedMotion = false;
|
||||
int m_variant = 0;
|
||||
QString m_mode = QStringLiteral("run");
|
||||
};
|
||||
|
||||
// wowlet: reusable ambient-scene surface. Hosts scene.qml and reads the
|
||||
@@ -38,9 +44,32 @@ public:
|
||||
// same field. Must match the `skies` table in scene.qml.
|
||||
enum Variant { Dusk = 0, Dawn = 1, Night = 2 };
|
||||
|
||||
explicit SceneWidget(QWidget *parent = nullptr, Variant variant = Dusk);
|
||||
// How much scene a surface wants. History has room for the whole run;
|
||||
// Receive gets a doge sitting in the field; Send gets money blowing past and
|
||||
// nothing else, so the form it sits under is not competing with a dog.
|
||||
enum Mode { Run, Sit, Money };
|
||||
|
||||
explicit SceneWidget(QWidget *parent = nullptr, Variant variant = Dusk,
|
||||
Mode mode = Run);
|
||||
void refreshReducedMotion();
|
||||
|
||||
protected:
|
||||
// A scene on a hidden tab is parked rather than left running: an unshown
|
||||
// QQuickWidget is 0px wide, and a lap run against a 0px field collects every
|
||||
// coin at once and leaves its litter (+1s, barks) to surface on the real lap
|
||||
// when the tab is finally shown. Parking also keeps a background tab from
|
||||
// burning CPU on animation nobody is looking at.
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
// Belt and braces: a scene that is on screen and has just been given a real
|
||||
// size is running, whether or not a show event was the thing that got it
|
||||
// there. `restart` only sets a flag, so re-arming an already-running scene
|
||||
// costs nothing and does not interrupt its lap.
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private:
|
||||
void callScene(const char *method);
|
||||
|
||||
SceneBackend *m_backend;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user