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

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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

MHendricks
Copy link
Member

@MHendricks MHendricks commented Oct 19, 2023

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

  • I have read the CONTRIBUTING.md document
  • I formatted my changes with black
  • I linted my changes with flake8
  • I have added documentation regarding my changes where necessary
  • Any pre-existing tests continue to pass
  • Additional tests were made covering my changes

Types of Changes

  • Bugfix (change that fixes an issue)
  • New Feature (change that adds functionality)
  • Documentation Update (if none of the other choices apply)

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"},
                }
            ]
        ]
    }
}

@MHendricks MHendricks force-pushed the mikeh/per-alias-launcher branch from 03308b9 to e512f2d Compare October 19, 2023 02:29
@MHendricks MHendricks marked this pull request as ready for review October 19, 2023 02:41
- Enable using a custom entry_point dict not the Site defined one.
@MHendricks MHendricks force-pushed the mikeh/per-alias-launcher branch from e512f2d to 445f199 Compare October 19, 2023 21:46
@MHendricks MHendricks merged commit b8a3956 into main Oct 19, 2023
23 checks passed
@MHendricks MHendricks deleted the mikeh/per-alias-launcher branch October 19, 2023 21:50
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

Successfully merging this pull request may close these issues.

1 participant