blurstudio / hab

A application environment and launcher
GNU Lesser General Public License v3.0
25 stars 3 forks source link

Config.launch now supports defining `launch_cls` entry_points per alias #77

Closed MHendricks closed 11 months ago

MHendricks commented 11 months ago

If launching houdini using hab-gui using habw.exe gui launch, houdini would not be able to print. The stdout/stderror objects will not accept write's.

This seems to be happening because Launcher uses subprocess.PIPE to capture stdout/stderr. Switching to the normal subprocess.Popen class instead fixes houdini.

Checklist

Types of Changes

Proposed Changes

This PR makes it so we can define a per-alias launcher class.

Example .hab.json for houdini:

{
    "name": "houdini19.5",
    "aliases": {
        "windows": [
            [
                "houdinicore", {
                    "cmd": "C:\\Program Files\\Side Effects Software\\Houdini 19.5.716\\bin\\houdinicore.exe",
                    "icon": "{relative_root}/.img/houdini.ico",
                    "label": "Houdini Core",
                    // Launcher captures stdout/error and this breaks printing
                    // when launching houdini's gui. Just use the standard class
                    "launch_cls": {"subprocess": "subprocess:Popen"},
                }
            ]
        ]
    }
}