mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
Merge pull request 'Write proper .exe on Windows' (#109) from dsc/feather:write-exe-windows into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/109 Reviewed-by: tobtoht <tobtoht@noreply.gitgud.wownero.nl>
This commit is contained in:
commit
df280cdd91
2 changed files with 10 additions and 2 deletions
|
@ -202,6 +202,10 @@ bool Tor::unpackBins() {
|
||||||
QFile f(torFile);
|
QFile f(torFile);
|
||||||
QFileInfo fileInfo(f);
|
QFileInfo fileInfo(f);
|
||||||
this->torPath = QDir(this->torDir).filePath(fileInfo.fileName());
|
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;
|
qDebug() << "Writing Tor executable to " << this->torPath;
|
||||||
f.copy(torPath);
|
f.copy(torPath);
|
||||||
f.close();
|
f.close();
|
||||||
|
|
|
@ -122,13 +122,17 @@ bool XmRig::unpackBins() {
|
||||||
QFile f(rigFile);
|
QFile f(rigFile);
|
||||||
QFileInfo fileInfo(f);
|
QFileInfo fileInfo(f);
|
||||||
this->rigPath = QDir(this->rigDir).filePath(fileInfo.fileName());
|
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;
|
qDebug() << "Writing XMRig executable to " << this->rigPath;
|
||||||
f.copy(rigPath);
|
f.copy(rigPath);
|
||||||
f.close();
|
f.close();
|
||||||
|
|
||||||
#if defined(Q_OS_UNIX)
|
#if defined(Q_OS_UNIX)
|
||||||
QFile torBin(this->rigPath);
|
QFile rigBin(this->rigPath);
|
||||||
torBin.setPermissions(QFile::ExeGroup | QFile::ExeOther | QFile::ExeOther | QFile::ExeUser);
|
rigBin.setPermissions(QFile::ExeGroup | QFile::ExeOther | QFile::ExeOther | QFile::ExeUser);
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue