aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-03-28 20:17:49 +0000
committertobtoht <tob@featherwallet.org>2026-03-28 20:17:49 +0000
commit49c3e498c79b28740a7febb8c74dfa87dbf20298 (patch)
tree77daf5234f2107ac4effabe3aaa3752a6604e916
parent541c895d713d694c23e2446ca1bf439c1789468f (diff)
parente2a8efca864f7e3af7b5d602f6e76e26f377e585 (diff)
downloadmonzero-gui-49c3e498c79b28740a7febb8c74dfa87dbf20298.tar.gz
monzero-gui-49c3e498c79b28740a7febb8c74dfa87dbf20298.tar.xz
monzero-gui-49c3e498c79b28740a7febb8c74dfa87dbf20298.zip
Merge pull request #4575
e2a8efc installer: move p2pool to LocalAppData (selsta)
-rw-r--r--installers/windows/Monero.iss4
-rw-r--r--src/main/oshelper.h2
-rw-r--r--src/p2pool/P2PoolManager.cpp11
3 files changed, 13 insertions, 4 deletions
diff --git a/installers/windows/Monero.iss b/installers/windows/Monero.iss
index 996d1f30..a95a5583 100644
--- a/installers/windows/Monero.iss
+++ b/installers/windows/Monero.iss
@@ -56,7 +56,6 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
[Dirs]
Name: "{app}";
-Name: "{app}\p2pool"; Permissions: users-full
[Files]
; The use of the flag "ignoreversion" for the following entries leads to the following behaviour:
@@ -138,6 +137,7 @@ Type: filesandordirs; Name: "{app}\QtQuick.2"
Type: filesandordirs; Name: "{app}\Material"
Type: filesandordirs; Name: "{app}\Universal"
Type: filesandordirs; Name: "{app}\scenegraph"
+Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
Type: filesandordirs; Name: "{app}\p2pool"
Type: files; Name: "{app}\D3Dcompiler_47.dll"
Type: files; Name: "{app}\libbz2-1.dll"
@@ -173,6 +173,8 @@ Type: files; Name: "{app}\ssleay32.dll"
Type: files; Name: "{app}\start-high-dpi.bat"
Type: files; Name: "{group}\Utilities\x (Check Blockchain Folder).lnk"
+[UninstallDelete]
+Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
[Tasks]
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:";
diff --git a/src/main/oshelper.h b/src/main/oshelper.h
index dc3058dd..1c3aeb72 100644
--- a/src/main/oshelper.h
+++ b/src/main/oshelper.h
@@ -56,10 +56,10 @@ public:
Q_INVOKABLE bool isCapsLock() const;
Q_INVOKABLE quint8 getNetworkTypeFromFile(const QString &keysPath) const;
Q_INVOKABLE void openSeedTemplate() const;
+ bool installed() const;
static std::pair<quint8, QString> getNetworkTypeAndAddressFromFile(const QString &wallet);
private:
- bool installed() const;
signals:
diff --git a/src/p2pool/P2PoolManager.cpp b/src/p2pool/P2PoolManager.cpp
index 27380a61..4d59eb35 100644
--- a/src/p2pool/P2PoolManager.cpp
+++ b/src/p2pool/P2PoolManager.cpp
@@ -29,6 +29,7 @@
#include "P2PoolManager.h"
#include "net/http_client.h"
#include "common/util.h"
+#include "main/oshelper.h"
#include "qt/utils.h"
#include <QElapsedTimer>
#include <QFile>
@@ -41,6 +42,7 @@
#include <QApplication>
#include <QProcess>
#include <QMap>
+#include <QStandardPaths>
#include <QCryptographicHash>
#if defined(Q_OS_MACOS) && defined(__aarch64__) && !defined(Q_OS_MACOS_AARCH64)
@@ -241,9 +243,14 @@ P2PoolManager::P2PoolManager(QObject *parent)
started = false;
// Platform dependent path to p2pool
#ifdef Q_OS_WIN
- m_p2poolPath = QApplication::applicationDirPath() + "/p2pool";
+ if (OSHelper().installed()) {
+ m_p2poolPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/p2pool";
+ } else {
+ m_p2poolPath = QApplication::applicationDirPath() + "/p2pool";
+ }
+
if (!QDir(m_p2poolPath).exists()) {
- QDir().mkdir(m_p2poolPath);
+ QDir().mkpath(m_p2poolPath);
}
m_p2pool = m_p2poolPath + "/p2pool.exe";
#elif defined(Q_OS_UNIX)