mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
Write proper .exe on Windows
Signed-off-by: dsc <dsc@xmr.pm>
This commit is contained in:
parent
fa6ee35fb0
commit
70cbf59ce8
2 changed files with 10 additions and 2 deletions
|
@ -202,6 +202,10 @@ bool Tor::unpackBins() {
|
|||
QFile f(torFile);
|
||||
QFileInfo fileInfo(f);
|
||||
this->torPath = QDir(this->torDir).filePath(fileInfo.fileName());
|
||||
#if defined(Q_OS_WIN)
|
||||
if(!this->torPath.endsWith(".exe"))
|
||||
this->torPath += ".exe";
|
||||
#endif
|
||||
qDebug() << "Writing Tor executable to " << this->torPath;
|
||||
f.copy(torPath);
|
||||
f.close();
|
||||
|
|
|
@ -122,13 +122,17 @@ bool XmRig::unpackBins() {
|
|||
QFile f(rigFile);
|
||||
QFileInfo fileInfo(f);
|
||||
this->rigPath = QDir(this->rigDir).filePath(fileInfo.fileName());
|
||||
#if defined(Q_OS_WIN)
|
||||
if(!this->rigPath.endsWith(".exe"))
|
||||
this->rigPath += ".exe";
|
||||
#endif
|
||||
qDebug() << "Writing XMRig executable to " << this->rigPath;
|
||||
f.copy(rigPath);
|
||||
f.close();
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
QFile torBin(this->rigPath);
|
||||
torBin.setPermissions(QFile::ExeGroup | QFile::ExeOther | QFile::ExeOther | QFile::ExeUser);
|
||||
QFile rigBin(this->rigPath);
|
||||
rigBin.setPermissions(QFile::ExeGroup | QFile::ExeOther | QFile::ExeOther | QFile::ExeUser);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue