|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2014-2016 Markus Prasser
|
|
|
|
|
* Copyright 2014-2018 Markus Prasser, Tobias Weiss
|
|
|
|
|
*
|
|
|
|
|
* This file is part of Labcontrol.
|
|
|
|
|
*
|
|
|
|
|
@ -17,35 +17,35 @@
|
|
|
|
|
* along with Labcontrol. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
#include "ztree.h"
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
#include "ztree.h"
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
extern std::unique_ptr< lc::Settings > settings;
|
|
|
|
|
extern std::unique_ptr<lc::Settings> settings;
|
|
|
|
|
|
|
|
|
|
lc::ZTree::ZTree( const QString &argZTreeDataTargetPath, const int &argZTreePort,
|
|
|
|
|
const QString &argZTreeVersionPath, QObject *argParent ) :
|
|
|
|
|
QObject{ argParent }
|
|
|
|
|
lc::ZTree::ZTree(const QString &argZTreeDataTargetPath, const int argZTreePort,
|
|
|
|
|
const QString &argZTreeVersionPath, QObject *argParent) :
|
|
|
|
|
QObject{argParent}
|
|
|
|
|
{
|
|
|
|
|
QStringList arguments{ QStringList{} << "-c" << "0" << settings->wineCmd
|
|
|
|
|
<< QString{ settings->zTreeInstDir + "/zTree_"
|
|
|
|
|
+ argZTreeVersionPath + "/ztree.exe" }
|
|
|
|
|
<< "/datadir" << QString{ "Z:/" + argZTreeDataTargetPath }
|
|
|
|
|
<< "/privdir" << QString{ "Z:/" + argZTreeDataTargetPath }
|
|
|
|
|
<< "/gsfdir" << QString{ "Z:/" + argZTreeDataTargetPath }
|
|
|
|
|
<< "/tempdir" << QString{ "Z:/" + argZTreeDataTargetPath }
|
|
|
|
|
<< "/leafdir" << QString{ "Z:/" + argZTreeDataTargetPath }
|
|
|
|
|
<< "/channel" << QString::number( argZTreePort - 7000 ) };
|
|
|
|
|
QStringList arguments{QStringList{} << "-c" << "0" << settings->wineCmd
|
|
|
|
|
<< QString{settings->zTreeInstDir + "/zTree_"
|
|
|
|
|
+ argZTreeVersionPath + "/ztree.exe"}
|
|
|
|
|
<< "/datadir" << QString{"Z:/" + argZTreeDataTargetPath}
|
|
|
|
|
<< "/privdir" << QString{"Z:/" + argZTreeDataTargetPath}
|
|
|
|
|
<< "/gsfdir" << QString{"Z:/" + argZTreeDataTargetPath}
|
|
|
|
|
<< "/tempdir" << QString{"Z:/" + argZTreeDataTargetPath}
|
|
|
|
|
<< "/leafdir" << QString{"Z:/" + argZTreeDataTargetPath}
|
|
|
|
|
<< "/channel" << QString::number(argZTreePort - 7000)};
|
|
|
|
|
|
|
|
|
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
|
|
|
|
zTreeInstance.setProcessEnvironment( env );
|
|
|
|
|
zTreeInstance.setWorkingDirectory( QDir::homePath() );
|
|
|
|
|
zTreeInstance.start( settings->tasksetCmd, arguments, QIODevice::NotOpen );
|
|
|
|
|
connect( &zTreeInstance, SIGNAL( finished( int ) ),
|
|
|
|
|
this, SIGNAL( ZTreeClosed( int ) ) );
|
|
|
|
|
zTreeInstance.setProcessEnvironment(QProcessEnvironment::systemEnvironment());
|
|
|
|
|
zTreeInstance.setWorkingDirectory(QDir::homePath());
|
|
|
|
|
zTreeInstance.start(settings->tasksetCmd, arguments, QIODevice::NotOpen);
|
|
|
|
|
connect(&zTreeInstance, SIGNAL(finished(int)),
|
|
|
|
|
this, SIGNAL(ZTreeClosed(int)));
|
|
|
|
|
|
|
|
|
|
qDebug() << settings->tasksetCmd << arguments.join( " " );
|
|
|
|
|
qDebug() << settings->tasksetCmd << arguments.join(" ");
|
|
|
|
|
}
|
|
|
|
|
|