mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-29 12:18:44 +01:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87d7609022 | ||
|
|
7c4f99c85d |
+7
-4
@@ -4,10 +4,10 @@ project(wowlet)
|
|||||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
set(VERSION_MAJOR "3")
|
set(VERSION_MAJOR "4")
|
||||||
set(VERSION_MINOR "2")
|
set(VERSION_MINOR "0")
|
||||||
set(VERSION_REVISION "0")
|
set(VERSION_REVISION "0")
|
||||||
set(VERSION "beta-6")
|
set(VERSION "beta-7")
|
||||||
|
|
||||||
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
||||||
option(OPENVR "Include OpenVR support")
|
option(OPENVR "Include OpenVR support")
|
||||||
@@ -25,7 +25,7 @@ include(FindCcache)
|
|||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
set(WOWNERO_HEAD "cf3bba3aee00d9d3e3f902f66f3710d820d3bdfb")
|
set(WOWNERO_HEAD "a21819cc22587e16af00e2c3d8f70156c11310a0")
|
||||||
set(BUILD_GUI_DEPS ON)
|
set(BUILD_GUI_DEPS ON)
|
||||||
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
||||||
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
||||||
@@ -116,6 +116,9 @@ message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
|||||||
# HIDApi
|
# HIDApi
|
||||||
set(HIDAPI_FOUND OFF)
|
set(HIDAPI_FOUND OFF)
|
||||||
|
|
||||||
|
# Unbound
|
||||||
|
find_package(Unbound REQUIRED)
|
||||||
|
|
||||||
# QrEncode
|
# QrEncode
|
||||||
find_package(QREncode REQUIRED)
|
find_package(QREncode REQUIRED)
|
||||||
|
|
||||||
|
|||||||
+20
@@ -280,6 +280,26 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
|
|||||||
make -j$THREADS install_sw && \
|
make -j$THREADS install_sw && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2 && \
|
||||||
|
echo "a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16 expat-2.4.8.tar.bz2" | sha256sum -c && \
|
||||||
|
tar -xf expat-2.4.8.tar.bz2 && \
|
||||||
|
rm expat-2.4.8.tar.bz2 && \
|
||||||
|
cd expat-2.4.8 && \
|
||||||
|
./configure --enable-static --disable-shared --prefix=/usr/local/expat/ && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz && \
|
||||||
|
echo "2e32f283820c24c51ca1dd8afecfdb747c7385a137abe865c99db4b257403581 unbound-1.16.2.tar.gz" | sha256sum -c && \
|
||||||
|
tar -xzf unbound-1.16.2.tar.gz && \
|
||||||
|
rm unbound-1.16.2.tar.gz && \
|
||||||
|
cd unbound-1.16.2 && \
|
||||||
|
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr/local/expat/ --with-ssl=/usr/local/openssl/ --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
make -j$THREADS install && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
||||||
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
|
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
|
||||||
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
||||||
|
|||||||
+3
-3
@@ -16,9 +16,9 @@ RUN apt update && \
|
|||||||
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
||||||
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
||||||
|
|
||||||
RUN git clone -b v0.17.1.9 --depth 1 https://github.com/monero-project/monero && \
|
RUN git clone -b v0.18.2.0 --depth 1 https://github.com/monero-project/monero && \
|
||||||
cd monero && \
|
cd monero && \
|
||||||
git reset --hard 8fef32e45c80aec41f25be9d1d8fb75adc883c64 && \
|
git reset --hard 99be9a044f3854f339548e2d99c539c18d7b1b01 && \
|
||||||
cp -a contrib/depends / && \
|
cp -a contrib/depends / && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf monero
|
rm -rf monero
|
||||||
@@ -186,4 +186,4 @@ RUN git clone https://git.wownero.com/wowlet/wownero-seed.git && \
|
|||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git config --global --add safe.directory /wowlet
|
RUN git config --global --add safe.directory /wowlet
|
||||||
RUN git config --global --add safe.directory /wowlet/wownero
|
RUN git config --global --add safe.directory /wowlet/wownero
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ target_link_libraries(wowlet PUBLIC
|
|||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
${Iconv_LIBRARIES}
|
${Iconv_LIBRARIES}
|
||||||
|
/usr/local/lib/libunbound.a
|
||||||
${EXTRA_LIBRARIES})
|
${EXTRA_LIBRARIES})
|
||||||
|
|
||||||
# Link Qt libraries
|
# Link Qt libraries
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||||||
{Config::walletPath,{QS("walletPath"), ""}},
|
{Config::walletPath,{QS("walletPath"), ""}},
|
||||||
{Config::xmrigPath,{QS("xmrigPath"), ""}},
|
{Config::xmrigPath,{QS("xmrigPath"), ""}},
|
||||||
{Config::wownerodPath, {QS("wownerodPath"), ""}},
|
{Config::wownerodPath, {QS("wownerodPath"), ""}},
|
||||||
|
{Config::extraArgs, {QS("extraArgs"), ""}},
|
||||||
{Config::nodes,{QS("nodes"), "{}"}},
|
{Config::nodes,{QS("nodes"), "{}"}},
|
||||||
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
|
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
|
||||||
{Config::nodeSource,{QS("nodeSource"), 0}},
|
{Config::nodeSource,{QS("nodeSource"), 0}},
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public:
|
|||||||
walletPath,
|
walletPath,
|
||||||
xmrigPath,
|
xmrigPath,
|
||||||
wownerodPath,
|
wownerodPath,
|
||||||
|
extraArgs,
|
||||||
nodes,
|
nodes,
|
||||||
websocketEnabled,
|
websocketEnabled,
|
||||||
nodeSource,
|
nodeSource,
|
||||||
|
|||||||
+5
-2
@@ -9,7 +9,7 @@
|
|||||||
#include "utils/xmrig.h"
|
#include "utils/xmrig.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
XmRig::XmRig(const QString &configDir, QObject *parent) :
|
XmRig::XmRig(const QString &configDir, QObject *parent, QString extraArgs) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_statusTimer(new QTimer(this))
|
m_statusTimer(new QTimer(this))
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ void XmRig::stop() {
|
|||||||
m_statusTimer->stop();
|
m_statusTimer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XmRig::start(const QString &path, int threads) {
|
bool XmRig::start(const QString &path, int threads, QString extraArgs) {
|
||||||
m_ctx = MainWindow::getContext();
|
m_ctx = MainWindow::getContext();
|
||||||
|
|
||||||
auto state = m_process.state();
|
auto state = m_process.state();
|
||||||
@@ -72,6 +72,9 @@ bool XmRig::start(const QString &path, int threads) {
|
|||||||
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
|
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
|
||||||
arguments << "--spendkey" << privateSpendKey;
|
arguments << "--spendkey" << privateSpendKey;
|
||||||
|
|
||||||
|
// additional arguments to wownerod a user can define
|
||||||
|
arguments << extraArgs;
|
||||||
|
|
||||||
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
|
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
|
||||||
cmd = cmd.replace(privateSpendKey, "[redacted]");
|
cmd = cmd.replace(privateSpendKey, "[redacted]");
|
||||||
emit output(cmd.toUtf8());
|
emit output(cmd.toUtf8());
|
||||||
|
|||||||
+2
-2
@@ -27,10 +27,10 @@ class XmRig : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit XmRig(const QString &configDir, QObject *parent = nullptr);
|
explicit XmRig(const QString &configDir, QObject *parent = nullptr, QString extraArgs = nullptr);
|
||||||
void prepare();
|
void prepare();
|
||||||
|
|
||||||
bool start(const QString &path, int threads);
|
bool start(const QString &path, int threads, QString extraArgs);
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
DaemonMiningState daemonMiningState = DaemonMiningState::idle;
|
DaemonMiningState daemonMiningState = DaemonMiningState::idle;
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ XMRigWidget::XMRigWidget(AppContext *ctx, QWidget *parent) :
|
|||||||
if(!path.isEmpty())
|
if(!path.isEmpty())
|
||||||
ui->lineEdit_path->setText(path);
|
ui->lineEdit_path->setText(path);
|
||||||
|
|
||||||
|
auto extraArgs = config()->get(Config::extraArgs).toString();
|
||||||
|
if(!extraArgs.isEmpty())
|
||||||
|
ui->extraArgs->setText(extraArgs);
|
||||||
|
|
||||||
connect(ui->lineEdit_path, &QLineEdit::textChanged, [=] {
|
connect(ui->lineEdit_path, &QLineEdit::textChanged, [=] {
|
||||||
config()->set(Config::wownerodPath, ui->lineEdit_path->text().trimmed());
|
config()->set(Config::wownerodPath, ui->lineEdit_path->text().trimmed());
|
||||||
});
|
});
|
||||||
@@ -208,7 +212,8 @@ void XMRigWidget::onClearClicked() {
|
|||||||
|
|
||||||
void XMRigWidget::onStartClicked() {
|
void XMRigWidget::onStartClicked() {
|
||||||
auto binPath = config()->get(Config::wownerodPath).toString();
|
auto binPath = config()->get(Config::wownerodPath).toString();
|
||||||
if(!m_ctx->XMRig->start(binPath, m_threads)) return;
|
auto extraArgs = config()->get(Config::extraArgs).toString();
|
||||||
|
if(!m_ctx->XMRig->start(binPath, m_threads, extraArgs)) return;
|
||||||
|
|
||||||
ui->btn_start->setEnabled(false);
|
ui->btn_start->setEnabled(false);
|
||||||
ui->btn_stop->setEnabled(true);
|
ui->btn_stop->setEnabled(true);
|
||||||
|
|||||||
@@ -227,13 +227,31 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="extraArgs_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Extra Args</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="extraArgs">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_threads">
|
<widget class="QLabel" name="label_threads">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>CPU threads</string>
|
<string>CPU threads</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="threadSlider">
|
<widget class="QSlider" name="threadSlider">
|
||||||
|
|||||||
+1
-1
Submodule wownero updated: cf3bba3aee...a21819cc22
Reference in New Issue
Block a user