commontk / AppLauncher

Simple and small program allowing to set the environment of any executable.
http://www.commontk.org
Apache License 2.0
31 stars 32 forks source link

ctkAppLauncher: Add support for interactive process #100

Closed jcfr closed 6 years ago

jcfr commented 6 years ago

See http://blog.qt.io/blog/2006/03/16/starting-interactive-processes-with-qprocess/

Suggested-by: Isaiah Norton inorton@bwh.harvard.edu

jcfr commented 6 years ago
jcfr commented 6 years ago

Cc: @ihnorton

ihnorton commented 6 years ago

before

macbook-pro:bin inorton$ ./SlicerPython
                              ---> nothing happens, no display or response
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyboardInterrupt

after:

macbook-pro:bin inorton$ ./SlicerPython
Python 2.7.13 (default, Apr  5 2018, 16:41:55)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

💯 👍

lassoan commented 6 years ago

@jcfr Where can I get the latest binary?

jcfr commented 6 years ago

For now, it turns out the easiest would be to build it locally against Qt4 or Qt5.

On Fri, Jul 20, 2018, 4:40 PM Andras Lasso notifications@github.com wrote:

@jcfr https://github.com/jcfr Where can I get the latest binary?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/commontk/AppLauncher/pull/100#issuecomment-406720816, or mute the thread https://github.com/notifications/unsubscribe-auth/AANXo51skDMDceVuX48bSOA1Ee5qLK73ks5uIkBGgaJpZM4VYN7O .

lassoan commented 6 years ago

Do you mean for testing only? (I don't have license for static Qt builds)

jcfr commented 6 years ago

For the sake of testing the interactive mode, you could just set the PATH to include Qt before running the launcher.

On Fri, Jul 20, 2018, 4:55 PM Andras Lasso notifications@github.com wrote:

Do you mean for testing only? (I don't have license for static Qt builds)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/commontk/AppLauncher/pull/100#issuecomment-406724284, or mute the thread https://github.com/notifications/unsubscribe-auth/AANXo0zU-k-FqVtdwNpG-FCR_GzgN6zOks5uIkOxgaJpZM4VYN7O .

lassoan commented 6 years ago

It did not work on Windows (no output appeared when started Python), but I could manage to fix it - see required change here: https://github.com/commontk/AppLauncher/pull/101#partial-pull-merging

(I've also added another fix for the error when launcher failed to start when .exe extension was not specified)

jcfr commented 6 years ago

Thanks :+1: I posted few comments that should be addressed before we can integrated.