Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OmSens_Qt installation #27

Open
GianniFerretti opened this issue Apr 29, 2021 · 1 comment
Open

OmSens_Qt installation #27

GianniFerretti opened this issue Apr 29, 2021 · 1 comment
Assignees

Comments

@GianniFerretti
Copy link

It is suggested to update the binary package libomsensplugin with our manual solution:

  • Create a symlink, because the plugin checks for the presence of pyhton with 'which python'
  • ln –s /usr/bin/python /usr/bin/python3
  • Update source code for OMSensDialog.cpp with the attached patch after you’ve verified the quality of patch

diff --git a/OMSensDialog.cpp b/OMSensDialog.cpp
index 32955b8..43b0c0b 100644
--- a/OMSensDialog.cpp
+++ b/OMSensDialog.cpp
@@ -270,14 +270,14 @@ bool OMSensDialog::runProcessAndShowProgress(QString scriptDirPath, QString comm

// Start process
pythonScriptProcess.start(command);

  • if (pythonScriptProcess.state() == QProcess::Running) {
  • if (pythonScriptProcess.state() >= QProcess::Starting) {
    // Show dialog with progress
    dialog->exec();
    } else {
    dialog->close();
    }
    // Wait for the process to finish in the case that we cancel the process and it doesn't have time to finish correctly
  • pythonScriptProcess.waitForFinished(3000);
  • pythonScriptProcess.waitForFinished(30000);
    //
    // See if the process ended correctly
    QProcess::ExitStatus exitStatus = pythonScriptProcess.exitStatus();

@casella

@casella
Copy link

casella commented May 6, 2021

@adeas31 could you take care of that, or pass this to someone who could?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants