forked from Public/monero-gui
installer: move p2pool to LocalAppData
This commit is contained in:
@@ -56,7 +56,6 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Dirs]
|
[Dirs]
|
||||||
Name: "{app}";
|
Name: "{app}";
|
||||||
Name: "{app}\p2pool"; Permissions: users-full
|
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
; The use of the flag "ignoreversion" for the following entries leads to the following behaviour:
|
; 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}\Material"
|
||||||
Type: filesandordirs; Name: "{app}\Universal"
|
Type: filesandordirs; Name: "{app}\Universal"
|
||||||
Type: filesandordirs; Name: "{app}\scenegraph"
|
Type: filesandordirs; Name: "{app}\scenegraph"
|
||||||
|
Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
|
||||||
Type: filesandordirs; Name: "{app}\p2pool"
|
Type: filesandordirs; Name: "{app}\p2pool"
|
||||||
Type: files; Name: "{app}\D3Dcompiler_47.dll"
|
Type: files; Name: "{app}\D3Dcompiler_47.dll"
|
||||||
Type: files; Name: "{app}\libbz2-1.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: "{app}\start-high-dpi.bat"
|
||||||
Type: files; Name: "{group}\Utilities\x (Check Blockchain Folder).lnk"
|
Type: files; Name: "{group}\Utilities\x (Check Blockchain Folder).lnk"
|
||||||
|
|
||||||
|
[UninstallDelete]
|
||||||
|
Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:";
|
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:";
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ public:
|
|||||||
Q_INVOKABLE bool isCapsLock() const;
|
Q_INVOKABLE bool isCapsLock() const;
|
||||||
Q_INVOKABLE quint8 getNetworkTypeFromFile(const QString &keysPath) const;
|
Q_INVOKABLE quint8 getNetworkTypeFromFile(const QString &keysPath) const;
|
||||||
Q_INVOKABLE void openSeedTemplate() const;
|
Q_INVOKABLE void openSeedTemplate() const;
|
||||||
|
bool installed() const;
|
||||||
|
|
||||||
static std::pair<quint8, QString> getNetworkTypeAndAddressFromFile(const QString &wallet);
|
static std::pair<quint8, QString> getNetworkTypeAndAddressFromFile(const QString &wallet);
|
||||||
private:
|
private:
|
||||||
bool installed() const;
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "P2PoolManager.h"
|
#include "P2PoolManager.h"
|
||||||
#include "net/http_client.h"
|
#include "net/http_client.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
#include "main/oshelper.h"
|
||||||
#include "qt/utils.h"
|
#include "qt/utils.h"
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
|
|
||||||
#if defined(Q_OS_MACOS) && defined(__aarch64__) && !defined(Q_OS_MACOS_AARCH64)
|
#if defined(Q_OS_MACOS) && defined(__aarch64__) && !defined(Q_OS_MACOS_AARCH64)
|
||||||
@@ -241,9 +243,14 @@ P2PoolManager::P2PoolManager(QObject *parent)
|
|||||||
started = false;
|
started = false;
|
||||||
// Platform dependent path to p2pool
|
// Platform dependent path to p2pool
|
||||||
#ifdef Q_OS_WIN
|
#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()) {
|
if (!QDir(m_p2poolPath).exists()) {
|
||||||
QDir().mkdir(m_p2poolPath);
|
QDir().mkpath(m_p2poolPath);
|
||||||
}
|
}
|
||||||
m_p2pool = m_p2poolPath + "/p2pool.exe";
|
m_p2pool = m_p2poolPath + "/p2pool.exe";
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
|
|||||||
Reference in New Issue
Block a user