fix
This commit is contained in:
parent
7b86aad61a
commit
a799ce3f0f
|
@ -1031,9 +1031,9 @@ QString CSbieAPI::GetUserSection(QString* pUserName, bool* pIsAdmin) const
|
||||||
|
|
||||||
SB_RESULT(quint32) CSbieAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
SB_RESULT(quint32) CSbieAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
||||||
{
|
{
|
||||||
return RunStart(BoxName, Command, Elevated, WorkingDir, false, pProcess);
|
return RunStartWithFCP(BoxName, Command,false, Elevated, WorkingDir, pProcess);
|
||||||
}
|
}
|
||||||
SB_RESULT(quint32) CSbieAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir,bool isFCP, QProcess* pProcess)
|
SB_RESULT(quint32) CSbieAPI::RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP,bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
||||||
{
|
{
|
||||||
if (m_SbiePath.isEmpty())
|
if (m_SbiePath.isEmpty())
|
||||||
return SB_ERR(SB_PathFail);
|
return SB_ERR(SB_PathFail);
|
||||||
|
|
|
@ -154,7 +154,7 @@ public:
|
||||||
virtual QString GetSbieMsgStr(quint32 code, quint32 Lang = 1033);
|
virtual QString GetSbieMsgStr(quint32 code, quint32 Lang = 1033);
|
||||||
|
|
||||||
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
||||||
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), bool isFCP,QProcess* pProcess = NULL);
|
virtual SB_RESULT(quint32) RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP,bool Elevated = false, const QString& WorkingDir = QString(),QProcess* pProcess = NULL);
|
||||||
virtual QString GetStartPath() const;
|
virtual QString GetStartPath() const;
|
||||||
|
|
||||||
virtual quint32 GetSessionID() const;
|
virtual quint32 GetSessionID() const;
|
||||||
|
|
|
@ -1714,9 +1714,9 @@ bool CSandMan::RunSandboxed(const QStringList& Commands, QString BoxName, const
|
||||||
|
|
||||||
SB_RESULT(quint32) CSandMan::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
SB_RESULT(quint32) CSandMan::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
||||||
{
|
{
|
||||||
return RunStart(BoxName, Command, Elevated, WorkingDir, false, pProcess);
|
return RunStartWithFCP(BoxName, Command, false, Elevated, WorkingDir, pProcess);
|
||||||
}
|
}
|
||||||
SB_RESULT(quint32) CSandMan::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir,bool isFCP, QProcess* pProcess)
|
SB_RESULT(quint32) CSandMan::RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
||||||
{
|
{
|
||||||
auto pBoxEx = theAPI->GetBoxByName(BoxName).objectCast<CSandBoxPlus>();
|
auto pBoxEx = theAPI->GetBoxByName(BoxName).objectCast<CSandBoxPlus>();
|
||||||
if (pBoxEx && pBoxEx->UseImageFile() && pBoxEx->GetMountRoot().isEmpty()) {
|
if (pBoxEx && pBoxEx->UseImageFile() && pBoxEx->GetMountRoot().isEmpty()) {
|
||||||
|
@ -1726,7 +1726,7 @@ SB_RESULT(quint32) CSandMan::RunStart(const QString& BoxName, const QString& Com
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return theAPI->RunStart(BoxName, Command, Elevated, WorkingDir,isFCP, pProcess);
|
return theAPI->RunStartWithFCP(BoxName, Command, isFCP, Elevated, WorkingDir, pProcess);
|
||||||
}
|
}
|
||||||
SB_STATUS CSandMan::ImBoxMount(const CSandBoxPtr& pBox, bool bAutoUnmount)
|
SB_STATUS CSandMan::ImBoxMount(const CSandBoxPtr& pBox, bool bAutoUnmount)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
|
|
||||||
bool RunSandboxed(const QStringList& Commands, QString BoxName = QString(), const QString& WrkDir = QString());
|
bool RunSandboxed(const QStringList& Commands, QString BoxName = QString(), const QString& WrkDir = QString());
|
||||||
SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
||||||
SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), bool isFCP,QProcess* pProcess = NULL);
|
SB_RESULT(quint32) RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP, bool Elevated = false, const QString& WorkingDir = QString(),QProcess* pProcess = NULL);
|
||||||
SB_STATUS ImBoxMount(const CSandBoxPtr& pBox, bool bAutoUnmount = false);
|
SB_STATUS ImBoxMount(const CSandBoxPtr& pBox, bool bAutoUnmount = false);
|
||||||
|
|
||||||
void EditIni(const QString& IniPath, bool bPlus = false);
|
void EditIni(const QString& IniPath, bool bPlus = false);
|
||||||
|
|
|
@ -95,13 +95,13 @@ void CSbiePlusAPI::StopMonitor()
|
||||||
SB_RESULT(quint32) CSbiePlusAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
SB_RESULT(quint32) CSbiePlusAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, QProcess* pProcess)
|
||||||
{
|
{
|
||||||
|
|
||||||
return RunStart(BoxName,Command,Elevated,WorkingDir,false,pProcess);
|
return RunStartWithFCP(BoxName,Command,false,Elevated,WorkingDir,pProcess);
|
||||||
}
|
}
|
||||||
SB_RESULT(quint32) CSbiePlusAPI::RunStart(const QString& BoxName, const QString& Command, bool Elevated, const QString& WorkingDir, bool isFCP,QProcess* pProcess)
|
SB_RESULT(quint32) CSbiePlusAPI::RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP, bool Elevated, const QString& WorkingDir,QProcess* pProcess)
|
||||||
{
|
{
|
||||||
if (!pProcess)
|
if (!pProcess)
|
||||||
pProcess = new QProcess(this);
|
pProcess = new QProcess(this);
|
||||||
SB_RESULT(quint32) Status = CSbieAPI::RunStart(BoxName, Command, Elevated, WorkingDir, pProcess);
|
SB_RESULT(quint32) Status = CSbieAPI::RunStartWithFCP(BoxName, Command,isFCP, Elevated, WorkingDir, pProcess);
|
||||||
if (pProcess->parent() == this) {
|
if (pProcess->parent() == this) {
|
||||||
if (!Status.IsError()) {
|
if (!Status.IsError()) {
|
||||||
connect(pProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(OnStartFinished()));
|
connect(pProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(OnStartFinished()));
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
virtual void StopMonitor();
|
virtual void StopMonitor();
|
||||||
|
|
||||||
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), QProcess* pProcess = NULL);
|
||||||
virtual SB_RESULT(quint32) RunStart(const QString& BoxName, const QString& Command, bool Elevated = false, const QString& WorkingDir = QString(), bool isFCP,QProcess* pProcess = NULL);
|
virtual SB_RESULT(quint32) RunStartWithFCP(const QString& BoxName, const QString& Command, bool isFCP,bool Elevated = false, const QString& WorkingDir = QString(),QProcess* pProcess = NULL);
|
||||||
virtual bool IsStarting(qint64 pid) const { return m_PendingStarts.contains(pid); }
|
virtual bool IsStarting(qint64 pid) const { return m_PendingStarts.contains(pid); }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
Loading…
Reference in New Issue